Browse Source

update glslang

Sasha Szpakowski 1 year ago
parent
commit
a99d5afc57
92 changed files with 10343 additions and 7931 deletions
  1. 10 7
      CMakeLists.txt
  2. 42 24
      platform/xcode/liblove.xcodeproj/project.pbxproj
  3. 0 165
      src/libraries/glslang/OGLCompilersDLL/InitializeDll.cpp
  4. 35 0
      src/libraries/glslang/SPIRV/GLSL.ext.ARM.h
  5. 2 0
      src/libraries/glslang/SPIRV/GLSL.ext.EXT.h
  6. 5 1
      src/libraries/glslang/SPIRV/GLSL.ext.KHR.h
  7. 6 0
      src/libraries/glslang/SPIRV/GLSL.ext.NV.h
  8. 41 0
      src/libraries/glslang/SPIRV/GLSL.ext.QCOM.h
  9. 1 1
      src/libraries/glslang/SPIRV/GLSL.std.450.h
  10. 286 133
      src/libraries/glslang/SPIRV/GlslangToSpv.cpp
  11. 15 9
      src/libraries/glslang/SPIRV/GlslangToSpv.h
  12. 0 4
      src/libraries/glslang/SPIRV/Logger.cpp
  13. 0 9
      src/libraries/glslang/SPIRV/Logger.h
  14. 5 5
      src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h
  15. 171 0
      src/libraries/glslang/SPIRV/NonSemanticShaderDebugInfo100.h
  16. 43 17
      src/libraries/glslang/SPIRV/SPVRemapper.cpp
  17. 9 29
      src/libraries/glslang/SPIRV/SPVRemapper.h
  18. 674 48
      src/libraries/glslang/SPIRV/SpvBuilder.cpp
  19. 121 24
      src/libraries/glslang/SPIRV/SpvBuilder.h
  20. 9 9
      src/libraries/glslang/SPIRV/SpvPostProcess.cpp
  21. 53 20
      src/libraries/glslang/SPIRV/SpvTools.cpp
  22. 20 11
      src/libraries/glslang/SPIRV/SpvTools.h
  23. 94 17
      src/libraries/glslang/SPIRV/disassemble.cpp
  24. 1773 1372
      src/libraries/glslang/SPIRV/doc.cpp
  25. 6 5
      src/libraries/glslang/SPIRV/doc.h
  26. 0 13
      src/libraries/glslang/SPIRV/hex_float.h
  27. 2796 2314
      src/libraries/glslang/SPIRV/spirv.hpp
  28. 43 17
      src/libraries/glslang/SPIRV/spvIR.h
  29. 4 15
      src/libraries/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl
  30. 2 6
      src/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp
  31. 3 7
      src/libraries/glslang/glslang/GenericCodeGen/Link.cpp
  32. 46 13
      src/libraries/glslang/glslang/Include/BaseTypes.h
  33. 4 47
      src/libraries/glslang/glslang/Include/Common.h
  34. 1 37
      src/libraries/glslang/glslang/Include/ConstantUnion.h
  35. 1 1
      src/libraries/glslang/glslang/Include/InitializeGlobals.h
  36. 13 8
      src/libraries/glslang/glslang/Include/PoolAlloc.h
  37. 9 0
      src/libraries/glslang/glslang/Include/ResourceLimits.h
  38. 8 8
      src/libraries/glslang/glslang/Include/ShHandle.h
  39. 19 7
      src/libraries/glslang/glslang/Include/SpirvIntrinsics.h
  40. 216 216
      src/libraries/glslang/glslang/Include/Types.h
  41. 25 4
      src/libraries/glslang/glslang/Include/arrays.h
  42. 0 253
      src/libraries/glslang/glslang/Include/glslang_c_interface.h
  43. 0 207
      src/libraries/glslang/glslang/Include/glslang_c_shader_types.h
  44. 110 68
      src/libraries/glslang/glslang/Include/intermediate.h
  45. 11 25
      src/libraries/glslang/glslang/MachineIndependent/Constant.cpp
  46. 369 246
      src/libraries/glslang/glslang/MachineIndependent/Initialize.cpp
  47. 3 0
      src/libraries/glslang/glslang/MachineIndependent/Initialize.h
  48. 106 87
      src/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp
  49. 33 18
      src/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp
  50. 309 124
      src/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp
  51. 19 16
      src/libraries/glslang/glslang/MachineIndependent/ParseHelper.h
  52. 16 32
      src/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp
  53. 83 48
      src/libraries/glslang/glslang/MachineIndependent/Scan.cpp
  54. 94 156
      src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp
  55. 42 32
      src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
  56. 14 15
      src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp
  57. 32 34
      src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h
  58. 87 42
      src/libraries/glslang/glslang/MachineIndependent/Versions.cpp
  59. 32 5
      src/libraries/glslang/glslang/MachineIndependent/Versions.h
  60. 3 4
      src/libraries/glslang/glslang/MachineIndependent/attribute.cpp
  61. 1 0
      src/libraries/glslang/glslang/MachineIndependent/attribute.h
  62. 542 517
      src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp
  63. 307 295
      src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
  64. 66 18
      src/libraries/glslang/glslang/MachineIndependent/intermOut.cpp
  65. 27 26
      src/libraries/glslang/glslang/MachineIndependent/iomapper.cpp
  66. 11 4
      src/libraries/glslang/glslang/MachineIndependent/iomapper.h
  67. 0 2
      src/libraries/glslang/glslang/MachineIndependent/limits.cpp
  68. 353 155
      src/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp
  69. 147 72
      src/libraries/glslang/glslang/MachineIndependent/localintermediate.h
  70. 1 1
      src/libraries/glslang/glslang/MachineIndependent/parseConst.cpp
  71. 7 71
      src/libraries/glslang/glslang/MachineIndependent/parseVersions.h
  72. 14 14
      src/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
  73. 1 1
      src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
  74. 48 12
      src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
  75. 105 14
      src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
  76. 3 8
      src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
  77. 2 6
      src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
  78. 11 15
      src/libraries/glslang/glslang/MachineIndependent/reflection.cpp
  79. 0 4
      src/libraries/glslang/glslang/MachineIndependent/reflection.h
  80. 92 0
      src/libraries/glslang/glslang/MachineIndependent/span.h
  81. 0 151
      src/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp
  82. 9 0
      src/libraries/glslang/glslang/OSDependent/Web/glslang.js.cpp
  83. 1 1
      src/libraries/glslang/glslang/OSDependent/Web/glslang.pre.js
  84. 0 80
      src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp
  85. 0 19
      src/libraries/glslang/glslang/OSDependent/osinclude.h
  86. 19 36
      src/libraries/glslang/glslang/Public/ResourceLimits.h
  87. 41 35
      src/libraries/glslang/glslang/Public/ShaderLang.h
  88. 542 0
      src/libraries/glslang/glslang/ResourceLimits/ResourceLimits.cpp
  89. 13 13
      src/libraries/glslang/glslang/build_info.h
  90. 2 109
      src/modules/graphics/ShaderStage.cpp
  91. 2 109
      src/modules/graphics/metal/Shader.mm
  92. 2 108
      src/modules/graphics/vulkan/Shader.cpp

+ 10 - 7
CMakeLists.txt

@@ -1391,6 +1391,7 @@ set(LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT
 	src/libraries/glslang/glslang/MachineIndependent/Scan.h
 	src/libraries/glslang/glslang/MachineIndependent/Scan.h
 	src/libraries/glslang/glslang/MachineIndependent/ScanContext.h
 	src/libraries/glslang/glslang/MachineIndependent/ScanContext.h
 	src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp
 	src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp
+	src/libraries/glslang/glslang/MachineIndependent/span.h
 	src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
 	src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
 	src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp
 	src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp
 	src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h
 	src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h
@@ -1405,7 +1406,6 @@ set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
 if(MSVC OR MINGW)
 if(MSVC OR MINGW)
 	set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
 	set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
 		${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
 		${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
-		src/libraries/glslang/glslang/OSDependent/Windows/main.cpp
 		src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp
 		src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp
 	)
 	)
 else()
 else()
@@ -1416,9 +1416,14 @@ else()
 endif()
 endif()
 
 
 set(LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC
 set(LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC
+	src/libraries/glslang/glslang/Public/ResourceLimits.h
 	src/libraries/glslang/glslang/Public/ShaderLang.h
 	src/libraries/glslang/glslang/Public/ShaderLang.h
 )
 )
 
 
+set(LOVE_SRC_3P_GLSLANG_GLSLANG_RESOURCELIMITS
+	src/libraries/glslang/glslang/ResourceLimits/ResourceLimits.cpp
+)
+
 set(LOVE_SRC_3P_GLSLANG_GLSLANG
 set(LOVE_SRC_3P_GLSLANG_GLSLANG
 	src/libraries/glslang/glslang/build_info.h
 	src/libraries/glslang/glslang/build_info.h
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_GENERICCODEGEN}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_GENERICCODEGEN}
@@ -1426,11 +1431,7 @@ set(LOVE_SRC_3P_GLSLANG_GLSLANG
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC}
-)
-
-set(LOVE_SRC_3P_GLSLANG_OGLCOMPILERSDLL
-	src/libraries/glslang/OGLCompilersDLL/InitializeDll.cpp
-	src/libraries/glslang/OGLCompilersDLL/InitializeDll.h
+	${LOVE_SRC_3P_GLSLANG_GLSLANG_RESOURCELIMITS}
 )
 )
 
 
 set(LOVE_SRC_3P_GLSLANG_SPIRV
 set(LOVE_SRC_3P_GLSLANG_SPIRV
@@ -1440,9 +1441,11 @@ set(LOVE_SRC_3P_GLSLANG_SPIRV
 	src/libraries/glslang/SPIRV/doc.cpp
 	src/libraries/glslang/SPIRV/doc.cpp
 	src/libraries/glslang/SPIRV/doc.h
 	src/libraries/glslang/SPIRV/doc.h
 	src/libraries/glslang/SPIRV/GLSL.ext.AMD.h
 	src/libraries/glslang/SPIRV/GLSL.ext.AMD.h
+	src/libraries/glslang/SPIRV/GLSL.ext.ARM.h
 	src/libraries/glslang/SPIRV/GLSL.ext.EXT.h
 	src/libraries/glslang/SPIRV/GLSL.ext.EXT.h
 	src/libraries/glslang/SPIRV/GLSL.ext.KHR.h
 	src/libraries/glslang/SPIRV/GLSL.ext.KHR.h
 	src/libraries/glslang/SPIRV/GLSL.ext.NV.h
 	src/libraries/glslang/SPIRV/GLSL.ext.NV.h
+	src/libraries/glslang/SPIRV/GLSL.ext.QCOM.h
 	src/libraries/glslang/SPIRV/GLSL.std.450.h
 	src/libraries/glslang/SPIRV/GLSL.std.450.h
 	src/libraries/glslang/SPIRV/GlslangToSpv.cpp
 	src/libraries/glslang/SPIRV/GlslangToSpv.cpp
 	src/libraries/glslang/SPIRV/GlslangToSpv.h
 	src/libraries/glslang/SPIRV/GlslangToSpv.h
@@ -1451,6 +1454,7 @@ set(LOVE_SRC_3P_GLSLANG_SPIRV
 	src/libraries/glslang/SPIRV/Logger.cpp
 	src/libraries/glslang/SPIRV/Logger.cpp
 	src/libraries/glslang/SPIRV/Logger.h
 	src/libraries/glslang/SPIRV/Logger.h
 	src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h
 	src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h
+	src/libraries/glslang/SPIRV/NonSemanticShaderDebugInfo100.h
 	src/libraries/glslang/SPIRV/spirv.hpp
 	src/libraries/glslang/SPIRV/spirv.hpp
 	src/libraries/glslang/SPIRV/SpvBuilder.cpp
 	src/libraries/glslang/SPIRV/SpvBuilder.cpp
 	src/libraries/glslang/SPIRV/SpvBuilder.h
 	src/libraries/glslang/SPIRV/SpvBuilder.h
@@ -1464,7 +1468,6 @@ set(LOVE_SRC_3P_GLSLANG_SPIRV
 
 
 set(LOVE_SRC_3P_GLSLANG
 set(LOVE_SRC_3P_GLSLANG
 	${LOVE_SRC_3P_GLSLANG_GLSLANG}
 	${LOVE_SRC_3P_GLSLANG_GLSLANG}
-	${LOVE_SRC_3P_GLSLANG_OGLCOMPILERSDLL}
 	${LOVE_SRC_3P_GLSLANG_SPIRV}
 	${LOVE_SRC_3P_GLSLANG_SPIRV}
 )
 )
 
 

+ 42 - 24
platform/xcode/liblove.xcodeproj/project.pbxproj

@@ -64,6 +64,15 @@
 		D9DAB92D2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
 		D9DAB92D2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
 		D9DAB92E2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
 		D9DAB92E2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; };
 		D9DAB9322963CD7500C64820 /* harfbuzz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9DAB9312963CD7500C64820 /* harfbuzz.framework */; };
 		D9DAB9322963CD7500C64820 /* harfbuzz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9DAB9312963CD7500C64820 /* harfbuzz.framework */; };
+		D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */; };
+		D9DB6E292B4B40970037A1F6 /* span.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E282B4B40970037A1F6 /* span.h */; };
+		D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; };
+		D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; };
+		D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */; };
+		D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */; };
+		D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */; };
+		D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */; };
+		D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E442B4B80E80037A1F6 /* build_info.h */; };
 		FA0A3A5F23366CE9001C269E /* floattypes.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0A3A5D23366CE9001C269E /* floattypes.h */; };
 		FA0A3A5F23366CE9001C269E /* floattypes.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0A3A5D23366CE9001C269E /* floattypes.h */; };
 		FA0A3A6023366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
 		FA0A3A6023366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
 		FA0A3A6123366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
 		FA0A3A6123366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; };
@@ -1288,9 +1297,6 @@
 		FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
 		FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
 		FAF140BC1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
 		FAF140BC1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; };
 		FAF140C41E20934C00F898D2 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140291E20934C00F898D2 /* ShaderLang.h */; };
 		FAF140C41E20934C00F898D2 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140291E20934C00F898D2 /* ShaderLang.h */; };
-		FAF140DB1E20934C00F898D2 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */; };
-		FAF140DC1E20934C00F898D2 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */; };
-		FAF140DD1E20934C00F898D2 /* InitializeDll.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF1403C1E20934C00F898D2 /* InitializeDll.h */; };
 		FAF6C9DA23C2DE2900D7B5BC /* SPVRemapper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */; };
 		FAF6C9DA23C2DE2900D7B5BC /* SPVRemapper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */; };
 		FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */; };
 		FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */; };
 		FAF6C9DC23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */; };
 		FAF6C9DC23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */; };
@@ -1409,6 +1415,14 @@
 		D9DAB9272961F0FF00C64820 /* TextShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextShaper.h; sourceTree = "<group>"; };
 		D9DAB9272961F0FF00C64820 /* TextShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextShaper.h; sourceTree = "<group>"; };
 		D9DAB9282961F10000C64820 /* TextShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextShaper.cpp; sourceTree = "<group>"; };
 		D9DAB9282961F10000C64820 /* TextShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextShaper.cpp; sourceTree = "<group>"; };
 		D9DAB9312963CD7500C64820 /* harfbuzz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = harfbuzz.framework; path = macosx/Frameworks/harfbuzz.framework; sourceTree = "<group>"; };
 		D9DAB9312963CD7500C64820 /* harfbuzz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = harfbuzz.framework; path = macosx/Frameworks/harfbuzz.framework; sourceTree = "<group>"; };
+		D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLimits.h; sourceTree = "<group>"; };
+		D9DB6E282B4B40970037A1F6 /* span.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = span.h; sourceTree = "<group>"; };
+		D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLimits.cpp; sourceTree = "<group>"; };
+		D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticDebugPrintf.h; sourceTree = "<group>"; };
+		D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticShaderDebugInfo100.h; sourceTree = "<group>"; };
+		D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.ARM.h; sourceTree = "<group>"; };
+		D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.QCOM.h; sourceTree = "<group>"; };
+		D9DB6E442B4B80E80037A1F6 /* build_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = build_info.h; sourceTree = "<group>"; };
 		FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = "<group>"; };
 		FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = "<group>"; };
 		FA0A3A5D23366CE9001C269E /* floattypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = floattypes.h; sourceTree = "<group>"; };
 		FA0A3A5D23366CE9001C269E /* floattypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = floattypes.h; sourceTree = "<group>"; };
 		FA0A3A5E23366CE9001C269E /* floattypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = floattypes.cpp; sourceTree = "<group>"; };
 		FA0A3A5E23366CE9001C269E /* floattypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = floattypes.cpp; sourceTree = "<group>"; };
@@ -1945,8 +1959,6 @@
 		FA7DA04C1C16874A0056B200 /* wrap_Math.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Math.lua; sourceTree = "<group>"; };
 		FA7DA04C1C16874A0056B200 /* wrap_Math.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Math.lua; sourceTree = "<group>"; };
 		FA7E9206277E120900C24CB2 /* theora.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = theora.xcframework; path = ios/libraries/theora.xcframework; sourceTree = "<group>"; };
 		FA7E9206277E120900C24CB2 /* theora.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = theora.xcframework; path = ios/libraries/theora.xcframework; sourceTree = "<group>"; };
 		FA84DE5D2778D7DB002674C6 /* SpirvIntrinsics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpirvIntrinsics.h; sourceTree = "<group>"; };
 		FA84DE5D2778D7DB002674C6 /* SpirvIntrinsics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpirvIntrinsics.h; sourceTree = "<group>"; };
-		FA84DE5E2778D7DC002674C6 /* glslang_c_interface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_c_interface.h; sourceTree = "<group>"; };
-		FA84DE5F2778D7DC002674C6 /* glslang_c_shader_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_c_shader_types.h; sourceTree = "<group>"; };
 		FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpirvIntrinsics.cpp; sourceTree = "<group>"; };
 		FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpirvIntrinsics.cpp; sourceTree = "<group>"; };
 		FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsReadback.cpp; sourceTree = "<group>"; };
 		FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsReadback.cpp; sourceTree = "<group>"; };
 		FA84DE6527791C36002674C6 /* GraphicsReadback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = "<group>"; };
 		FA84DE6527791C36002674C6 /* GraphicsReadback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = "<group>"; };
@@ -2199,7 +2211,6 @@
 		FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
 		FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
 		FAE272501C05A15B00A67640 /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = "<group>"; };
 		FAE272501C05A15B00A67640 /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = "<group>"; };
 		FAE272511C05A15B00A67640 /* ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = "<group>"; };
 		FAE272511C05A15B00A67640 /* ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = "<group>"; };
-		FAEC229F2534F25100EBD925 /* build_info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = build_info.h; sourceTree = "<group>"; };
 		FAECA1B01F3164700095D008 /* CompressedSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedSlice.cpp; sourceTree = "<group>"; };
 		FAECA1B01F3164700095D008 /* CompressedSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedSlice.cpp; sourceTree = "<group>"; };
 		FAECA1B11F3164700095D008 /* CompressedSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CompressedSlice.h; sourceTree = "<group>"; };
 		FAECA1B11F3164700095D008 /* CompressedSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CompressedSlice.h; sourceTree = "<group>"; };
 		FAF13FC21E20934C00F898D2 /* CodeGen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGen.cpp; sourceTree = "<group>"; };
 		FAF13FC21E20934C00F898D2 /* CodeGen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGen.cpp; sourceTree = "<group>"; };
@@ -2261,8 +2272,6 @@
 		FAF140031E20934C00F898D2 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
 		FAF140031E20934C00F898D2 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
 		FAF140211E20934C00F898D2 /* ossource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource.cpp; sourceTree = "<group>"; };
 		FAF140211E20934C00F898D2 /* ossource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource.cpp; sourceTree = "<group>"; };
 		FAF140291E20934C00F898D2 /* ShaderLang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderLang.h; sourceTree = "<group>"; };
 		FAF140291E20934C00F898D2 /* ShaderLang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderLang.h; sourceTree = "<group>"; };
-		FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
-		FAF1403C1E20934C00F898D2 /* InitializeDll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeDll.h; sourceTree = "<group>"; };
 		FAF1889C1E9DA834008C1479 /* Optional.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Optional.h; sourceTree = "<group>"; };
 		FAF1889C1E9DA834008C1479 /* Optional.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Optional.h; sourceTree = "<group>"; };
 		FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPVRemapper.h; sourceTree = "<group>"; };
 		FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPVRemapper.h; sourceTree = "<group>"; };
 		FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpvBuilder.h; sourceTree = "<group>"; };
 		FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpvBuilder.h; sourceTree = "<group>"; };
@@ -2371,6 +2380,14 @@
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 			usesTabs = 1;
 			usesTabs = 1;
 		};
 		};
+		D9DB6E312B4B41100037A1F6 /* ResourceLimits */ = {
+			isa = PBXGroup;
+			children = (
+				D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */,
+			);
+			path = ResourceLimits;
+			sourceTree = "<group>";
+		};
 		FA08F5AC16C751BA00F007B5 /* Resources */ = {
 		FA08F5AC16C751BA00F007B5 /* Resources */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -3870,7 +3887,6 @@
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
 				FAF13FC01E20934C00F898D2 /* glslang */,
 				FAF13FC01E20934C00F898D2 /* glslang */,
-				FAF1403A1E20934C00F898D2 /* OGLCompilersDLL */,
 				FAF6C9C023C2DE2900D7B5BC /* SPIRV */,
 				FAF6C9C023C2DE2900D7B5BC /* SPIRV */,
 			);
 			);
 			path = glslang;
 			path = glslang;
@@ -3879,12 +3895,13 @@
 		FAF13FC01E20934C00F898D2 /* glslang */ = {
 		FAF13FC01E20934C00F898D2 /* glslang */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				FAEC229F2534F25100EBD925 /* build_info.h */,
+				D9DB6E442B4B80E80037A1F6 /* build_info.h */,
 				FAF13FC11E20934C00F898D2 /* GenericCodeGen */,
 				FAF13FC11E20934C00F898D2 /* GenericCodeGen */,
 				FAF13FC41E20934C00F898D2 /* Include */,
 				FAF13FC41E20934C00F898D2 /* Include */,
 				FAF13FD21E20934C00F898D2 /* MachineIndependent */,
 				FAF13FD21E20934C00F898D2 /* MachineIndependent */,
 				FAF140021E20934C00F898D2 /* OSDependent */,
 				FAF140021E20934C00F898D2 /* OSDependent */,
 				FAF140281E20934C00F898D2 /* Public */,
 				FAF140281E20934C00F898D2 /* Public */,
+				D9DB6E312B4B41100037A1F6 /* ResourceLimits */,
 			);
 			);
 			path = glslang;
 			path = glslang;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -3905,8 +3922,6 @@
 				FAF13FC61E20934C00F898D2 /* BaseTypes.h */,
 				FAF13FC61E20934C00F898D2 /* BaseTypes.h */,
 				FAF13FC71E20934C00F898D2 /* Common.h */,
 				FAF13FC71E20934C00F898D2 /* Common.h */,
 				FAF13FC81E20934C00F898D2 /* ConstantUnion.h */,
 				FAF13FC81E20934C00F898D2 /* ConstantUnion.h */,
-				FA84DE5E2778D7DC002674C6 /* glslang_c_interface.h */,
-				FA84DE5F2778D7DC002674C6 /* glslang_c_shader_types.h */,
 				FAF13FC91E20934C00F898D2 /* InfoSink.h */,
 				FAF13FC91E20934C00F898D2 /* InfoSink.h */,
 				FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */,
 				FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */,
 				FAF13FCB1E20934C00F898D2 /* intermediate.h */,
 				FAF13FCB1E20934C00F898D2 /* intermediate.h */,
@@ -3958,6 +3973,7 @@
 				FAF13FFB1E20934C00F898D2 /* Scan.h */,
 				FAF13FFB1E20934C00F898D2 /* Scan.h */,
 				FAF13FFC1E20934C00F898D2 /* ScanContext.h */,
 				FAF13FFC1E20934C00F898D2 /* ScanContext.h */,
 				FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */,
 				FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */,
+				D9DB6E282B4B40970037A1F6 /* span.h */,
 				FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */,
 				FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */,
 				FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */,
 				FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */,
 				FAF13FFF1E20934C00F898D2 /* SymbolTable.h */,
 				FAF13FFF1E20934C00F898D2 /* SymbolTable.h */,
@@ -4001,20 +4017,12 @@
 		FAF140281E20934C00F898D2 /* Public */ = {
 		FAF140281E20934C00F898D2 /* Public */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */,
 				FAF140291E20934C00F898D2 /* ShaderLang.h */,
 				FAF140291E20934C00F898D2 /* ShaderLang.h */,
 			);
 			);
 			path = Public;
 			path = Public;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
-		FAF1403A1E20934C00F898D2 /* OGLCompilersDLL */ = {
-			isa = PBXGroup;
-			children = (
-				FAF1403B1E20934C00F898D2 /* InitializeDll.cpp */,
-				FAF1403C1E20934C00F898D2 /* InitializeDll.h */,
-			);
-			path = OGLCompilersDLL;
-			sourceTree = "<group>";
-		};
 		FAF6C9C023C2DE2900D7B5BC /* SPIRV */ = {
 		FAF6C9C023C2DE2900D7B5BC /* SPIRV */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -4024,9 +4032,11 @@
 				FAF6C9D823C2DE2900D7B5BC /* doc.cpp */,
 				FAF6C9D823C2DE2900D7B5BC /* doc.cpp */,
 				FAF6C9C823C2DE2900D7B5BC /* doc.h */,
 				FAF6C9C823C2DE2900D7B5BC /* doc.h */,
 				FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */,
 				FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */,
+				D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */,
 				FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */,
 				FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */,
 				FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */,
 				FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */,
 				FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */,
 				FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */,
+				D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */,
 				FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */,
 				FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */,
 				FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */,
 				FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */,
 				FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */,
 				FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */,
@@ -4034,6 +4044,8 @@
 				FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */,
 				FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */,
 				FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */,
 				FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */,
 				FAF6C9D723C2DE2900D7B5BC /* Logger.h */,
 				FAF6C9D723C2DE2900D7B5BC /* Logger.h */,
+				D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */,
+				D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */,
 				FAF6C9C923C2DE2900D7B5BC /* spirv.hpp */,
 				FAF6C9C923C2DE2900D7B5BC /* spirv.hpp */,
 				FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */,
 				FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */,
 				FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */,
 				FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */,
@@ -4091,6 +4103,7 @@
 				FAF6C9EF23C2DE2900D7B5BC /* disassemble.h in Headers */,
 				FAF6C9EF23C2DE2900D7B5BC /* disassemble.h in Headers */,
 				FA18CF4123DCF67900263725 /* spirv_common.hpp in Headers */,
 				FA18CF4123DCF67900263725 /* spirv_common.hpp in Headers */,
 				FAC7CD901FE35E95006A60C7 /* physfs_miniz.h in Headers */,
 				FAC7CD901FE35E95006A60C7 /* physfs_miniz.h in Headers */,
+				D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */,
 				FA0B791D1A958E3B000E1D17 /* b64.h in Headers */,
 				FA0B791D1A958E3B000E1D17 /* b64.h in Headers */,
 				FA0B7DC61A95902C000E1D17 /* wrap_JoystickModule.h in Headers */,
 				FA0B7DC61A95902C000E1D17 /* wrap_JoystickModule.h in Headers */,
 				FA0B7D201A95902C000E1D17 /* ImageRasterizer.h in Headers */,
 				FA0B7D201A95902C000E1D17 /* ImageRasterizer.h in Headers */,
@@ -4109,6 +4122,7 @@
 				FAF140871E20934C00F898D2 /* parseVersions.h in Headers */,
 				FAF140871E20934C00F898D2 /* parseVersions.h in Headers */,
 				FA0B7AC61A958EA3000E1D17 /* types.h in Headers */,
 				FA0B7AC61A958EA3000E1D17 /* types.h in Headers */,
 				FA0B7DBD1A95902C000E1D17 /* Joystick.h in Headers */,
 				FA0B7DBD1A95902C000E1D17 /* Joystick.h in Headers */,
+				D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */,
 				FA0B7D0E1A95902C000E1D17 /* wrap_Filesystem.h in Headers */,
 				FA0B7D0E1A95902C000E1D17 /* wrap_Filesystem.h in Headers */,
 				FA0B7EE41A95902D000E1D17 /* Window.h in Headers */,
 				FA0B7EE41A95902D000E1D17 /* Window.h in Headers */,
 				FA0B7CFC1A95902C000E1D17 /* Filesystem.h in Headers */,
 				FA0B7CFC1A95902C000E1D17 /* Filesystem.h in Headers */,
@@ -4297,12 +4311,14 @@
 				FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */,
 				FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */,
 				FABDA9BA2552448300B5C523 /* b2_weld_joint.h in Headers */,
 				FABDA9BA2552448300B5C523 /* b2_weld_joint.h in Headers */,
 				FA522D5323F9FF2A0059EE3C /* dr_mp3.h in Headers */,
 				FA522D5323F9FF2A0059EE3C /* dr_mp3.h in Headers */,
+				D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */,
 				FA0B791F1A958E3B000E1D17 /* Data.h in Headers */,
 				FA0B791F1A958E3B000E1D17 /* Data.h in Headers */,
 				FA18CF4523DD1A8100263725 /* ShaderStage.h in Headers */,
 				FA18CF4523DD1A8100263725 /* ShaderStage.h in Headers */,
 				217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */,
 				217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */,
 				FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */,
 				FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */,
 				FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */,
 				FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */,
 				FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */,
 				FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */,
+				D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */,
 				FABDA9E92552448300B5C523 /* b2_timer.h in Headers */,
 				FABDA9E92552448300B5C523 /* b2_timer.h in Headers */,
 				FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */,
 				FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */,
 				FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */,
 				FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */,
@@ -4362,6 +4378,7 @@
 				FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */,
 				FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */,
 				FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */,
 				FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */,
 				FAF140631E20934C00F898D2 /* Types.h in Headers */,
 				FAF140631E20934C00F898D2 /* Types.h in Headers */,
+				D9DB6E292B4B40970037A1F6 /* span.h in Headers */,
 				FACA06AF293EE5CD001A2557 /* Sensor.h in Headers */,
 				FACA06AF293EE5CD001A2557 /* Sensor.h in Headers */,
 				FA4F2BE61DE6650600CA37D7 /* wrap_Transform.h in Headers */,
 				FA4F2BE61DE6650600CA37D7 /* wrap_Transform.h in Headers */,
 				FA0B7EE71A95902D000E1D17 /* Window.h in Headers */,
 				FA0B7EE71A95902D000E1D17 /* Window.h in Headers */,
@@ -4378,7 +4395,6 @@
 				FABDA9DD2552448300B5C523 /* b2_contact.h in Headers */,
 				FABDA9DD2552448300B5C523 /* b2_contact.h in Headers */,
 				FABDA9802552448200B5C523 /* b2_circle_contact.h in Headers */,
 				FABDA9802552448200B5C523 /* b2_circle_contact.h in Headers */,
 				217DFC101D9F6D490055D849 /* url.lua.h in Headers */,
 				217DFC101D9F6D490055D849 /* url.lua.h in Headers */,
-				FAF140DD1E20934C00F898D2 /* InitializeDll.h in Headers */,
 				FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */,
 				FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */,
 				FA18CF2023DCF67900263725 /* spirv_hlsl.hpp in Headers */,
 				FA18CF2023DCF67900263725 /* spirv_hlsl.hpp in Headers */,
 				FA0B7D271A95902C000E1D17 /* wrap_Font.h in Headers */,
 				FA0B7D271A95902C000E1D17 /* wrap_Font.h in Headers */,
@@ -4437,6 +4453,7 @@
 				217DFC021D9F6D490055D849 /* tcp.h in Headers */,
 				217DFC021D9F6D490055D849 /* tcp.h in Headers */,
 				FA3C5E441F8C368C0003C579 /* ShaderStage.h in Headers */,
 				FA3C5E441F8C368C0003C579 /* ShaderStage.h in Headers */,
 				FA0B79261A958E3B000E1D17 /* Exception.h in Headers */,
 				FA0B79261A958E3B000E1D17 /* Exception.h in Headers */,
+				D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */,
 				FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */,
 				FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */,
 				FA0B793D1A958E3B000E1D17 /* runtime.h in Headers */,
 				FA0B793D1A958E3B000E1D17 /* runtime.h in Headers */,
 				FAF6C9E323C2DE2900D7B5BC /* GLSL.ext.AMD.h in Headers */,
 				FAF6C9E323C2DE2900D7B5BC /* GLSL.ext.AMD.h in Headers */,
@@ -4463,6 +4480,7 @@
 				FA6BDF90281219E900240F2A /* DataStream.h in Headers */,
 				FA6BDF90281219E900240F2A /* DataStream.h in Headers */,
 				FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */,
 				FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */,
 				FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */,
 				FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */,
+				D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */,
 				FA0B7B331A958EA3000E1D17 /* wuff_config.h in Headers */,
 				FA0B7B331A958EA3000E1D17 /* wuff_config.h in Headers */,
 				FA0B7D3B1A95902C000E1D17 /* Graphics.h in Headers */,
 				FA0B7D3B1A95902C000E1D17 /* Graphics.h in Headers */,
 				FA0B7E6E1A95902C000E1D17 /* wrap_RevoluteJoint.h in Headers */,
 				FA0B7E6E1A95902C000E1D17 /* wrap_RevoluteJoint.h in Headers */,
@@ -4636,6 +4654,7 @@
 				FAF140A81E20934C00F898D2 /* ShaderLang.cpp in Sources */,
 				FAF140A81E20934C00F898D2 /* ShaderLang.cpp in Sources */,
 				FA1BA09E1E16CFCE00AA2803 /* Font.cpp in Sources */,
 				FA1BA09E1E16CFCE00AA2803 /* Font.cpp in Sources */,
 				FABDA9A12552448300B5C523 /* b2_gear_joint.cpp in Sources */,
 				FABDA9A12552448300B5C523 /* b2_gear_joint.cpp in Sources */,
+				D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */,
 				FAE64A8A2071363100BC7981 /* physfs_archiver_wad.c in Sources */,
 				FAE64A8A2071363100BC7981 /* physfs_archiver_wad.c in Sources */,
 				FA18CF4723DD1A8100263725 /* ShaderStage.mm in Sources */,
 				FA18CF4723DD1A8100263725 /* ShaderStage.mm in Sources */,
 				FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
@@ -4746,7 +4765,6 @@
 				FAF140AD1E20934C00F898D2 /* Versions.cpp in Sources */,
 				FAF140AD1E20934C00F898D2 /* Versions.cpp in Sources */,
 				FA0B793C1A958E3B000E1D17 /* runtime.cpp in Sources */,
 				FA0B793C1A958E3B000E1D17 /* runtime.cpp in Sources */,
 				FA6BDF8A280B62A000240F2A /* GraphicsReadback.mm in Sources */,
 				FA6BDF8A280B62A000240F2A /* GraphicsReadback.mm in Sources */,
-				FAF140DC1E20934C00F898D2 /* InitializeDll.cpp in Sources */,
 				FA0B7DBC1A95902C000E1D17 /* Joystick.cpp in Sources */,
 				FA0B7DBC1A95902C000E1D17 /* Joystick.cpp in Sources */,
 				FA0B7DAF1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
 				FA0B7DAF1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
 				FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */,
 				FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */,
@@ -5065,6 +5083,7 @@
 				FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */,
 				FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */,
 				FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
+				D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */,
 				FACA02F21F5E396B0084B28F /* HashFunction.cpp in Sources */,
 				FACA02F21F5E396B0084B28F /* HashFunction.cpp in Sources */,
 				FABDA9A02552448300B5C523 /* b2_gear_joint.cpp in Sources */,
 				FABDA9A02552448300B5C523 /* b2_gear_joint.cpp in Sources */,
 				FAF140A71E20934C00F898D2 /* ShaderLang.cpp in Sources */,
 				FAF140A71E20934C00F898D2 /* ShaderLang.cpp in Sources */,
@@ -5186,7 +5205,6 @@
 				FAC7CD811FE35E95006A60C7 /* physfs_platform_os2.c in Sources */,
 				FAC7CD811FE35E95006A60C7 /* physfs_platform_os2.c in Sources */,
 				FABDA9962552448300B5C523 /* b2_distance_joint.cpp in Sources */,
 				FABDA9962552448300B5C523 /* b2_distance_joint.cpp in Sources */,
 				FA0B7DBB1A95902C000E1D17 /* Joystick.cpp in Sources */,
 				FA0B7DBB1A95902C000E1D17 /* Joystick.cpp in Sources */,
-				FAF140DB1E20934C00F898D2 /* InitializeDll.cpp in Sources */,
 				FA0B7DAE1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
 				FA0B7DAE1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */,
 				FA6A2B701F5F845F0074C308 /* wrap_DataView.cpp in Sources */,
 				FA6A2B701F5F845F0074C308 /* wrap_DataView.cpp in Sources */,
 				FAB17BE61ABFAA9000F9BA27 /* lz4.c in Sources */,
 				FAB17BE61ABFAA9000F9BA27 /* lz4.c in Sources */,

+ 0 - 165
src/libraries/glslang/OGLCompilersDLL/InitializeDll.cpp

@@ -1,165 +0,0 @@
-//
-// 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 <cassert>
-
-#include "InitializeDll.h"
-#include "../glslang/Include/InitializeGlobals.h"
-#include "../glslang/Public/ShaderLang.h"
-#include "../glslang/Include/PoolAlloc.h"
-
-namespace glslang {
-
-OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
-
-// Per-process initialization.
-// Needs to be called at least once before parsing, etc. is done.
-// Will also do thread initialization for the calling thread; other
-// threads will need to do that explicitly.
-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;
-}
-
-// Per-thread scoped initialization.
-// Must be called at least once by each new thread sharing the
-// symbol tables, etc., needed to parse.
-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;
-
-    if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
-        assert(0 && "InitThread(): Unable to set init flag.");
-        return false;
-    }
-
-    glslang::SetThreadPoolAllocator(nullptr);
-
-    return true;
-}
-
-// Not necessary to call this: InitThread() is reentrant, and the need
-// to do per thread tear down has been removed.
-//
-// This is kept, with memory management removed, to satisfy any exiting
-// calls to it that rely on it.
-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;
-        }
-    }
-
-    return success;
-}
-
-// Not necessary to call this: InitProcess() is reentrant.
-//
-// This is kept, with memory management removed, to satisfy any exiting
-// calls to it that rely on it.
-//
-// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for
-// process-scoped memory tear down.
-bool DetachProcess()
-{
-    bool success = true;
-
-    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
-        return true;
-
-    success = DetachThread();
-
-    OS_FreeTLSIndex(ThreadInitializeIndex);
-    ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
-
-    return success;
-}
-
-} // end namespace glslang

+ 35 - 0
src/libraries/glslang/SPIRV/GLSL.ext.ARM.h

@@ -0,0 +1,35 @@
+/*
+** Copyright (c) 2022 ARM Limited
+**
+** 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 GLSLextARM_H
+#define GLSLextARM_H
+
+static const int GLSLextARMVersion = 100;
+static const int GLSLextARMRevision = 1;
+
+static const char * const E_SPV_ARM_core_builtins = "SPV_ARM_core_builtins";
+
+#endif  // #ifndef GLSLextARM_H

+ 2 - 0
src/libraries/glslang/SPIRV/GLSL.ext.EXT.h

@@ -39,5 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
 static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
 static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
 static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
 static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
 static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
 static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
+static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
+static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
 
 
 #endif  // #ifndef GLSLextEXT_H
 #endif  // #ifndef GLSLextEXT_H

+ 5 - 1
src/libraries/glslang/SPIRV/GLSL.ext.KHR.h

@@ -29,7 +29,7 @@
 #define GLSLextKHR_H
 #define GLSLextKHR_H
 
 
 static const int GLSLextKHRVersion = 100;
 static const int GLSLextKHRVersion = 100;
-static const int GLSLextKHRRevision = 2;
+static const int GLSLextKHRRevision = 3;
 
 
 static const char* const E_SPV_KHR_shader_ballot                = "SPV_KHR_shader_ballot";
 static const char* const E_SPV_KHR_shader_ballot                = "SPV_KHR_shader_ballot";
 static const char* const E_SPV_KHR_subgroup_vote                = "SPV_KHR_subgroup_vote";
 static const char* const E_SPV_KHR_subgroup_vote                = "SPV_KHR_subgroup_vote";
@@ -52,5 +52,9 @@ static const char* const E_SPV_KHR_fragment_shading_rate        = "SPV_KHR_fragm
 static const char* const E_SPV_KHR_terminate_invocation         = "SPV_KHR_terminate_invocation";
 static const char* const E_SPV_KHR_terminate_invocation         = "SPV_KHR_terminate_invocation";
 static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
 static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
 static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
 static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
+static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
+static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
+static const char* const E_SPV_KHR_ray_tracing_position_fetch   = "SPV_KHR_ray_tracing_position_fetch";
+static const char* const E_SPV_KHR_cooperative_matrix           = "SPV_KHR_cooperative_matrix";
 
 
 #endif  // #ifndef GLSLextKHR_H
 #endif  // #ifndef GLSLextKHR_H

+ 6 - 0
src/libraries/glslang/SPIRV/GLSL.ext.NV.h

@@ -81,4 +81,10 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix";
 //SPV_NV_shader_sm_builtins
 //SPV_NV_shader_sm_builtins
 const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
 const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
 
 
+//SPV_NV_shader_execution_reorder
+const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder";
+
+//SPV_NV_displacement_micromap
+const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap";
+
 #endif  // #ifndef GLSLextNV_H
 #endif  // #ifndef GLSLextNV_H

+ 41 - 0
src/libraries/glslang/SPIRV/GLSL.ext.QCOM.h

@@ -0,0 +1,41 @@
+/*
+** Copyright (c) 2021 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 GLSLextQCOM_H
+#define GLSLextQCOM_H
+
+enum BuiltIn;
+enum Decoration;
+enum Op;
+enum Capability;
+
+static const int GLSLextQCOMVersion = 100;
+static const int GLSLextQCOMRevision = 1;
+
+//SPV_QCOM_image_processing
+const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing";
+
+#endif  // #ifndef GLSLextQCOM_H

+ 1 - 1
src/libraries/glslang/SPIRV/GLSL.std.450.h

@@ -13,7 +13,7 @@
 **
 **
 ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
 ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
 ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
 ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
-** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ 
+** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
 **
 **
 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

File diff suppressed because it is too large
+ 286 - 133
src/libraries/glslang/SPIRV/GlslangToSpv.cpp


+ 15 - 9
src/libraries/glslang/SPIRV/GlslangToSpv.h

@@ -35,19 +35,25 @@
 
 
 #pragma once
 #pragma once
 
 
-#if defined(_MSC_VER) && _MSC_VER >= 1900
-    #pragma warning(disable : 4464) // relative include path contains '..'
-#endif
-
-#include "SpvTools.h"
-#include "../glslang/Include/intermediate.h"
-
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
 
 
 #include "Logger.h"
 #include "Logger.h"
 
 
 namespace glslang {
 namespace glslang {
+class TIntermediate;
+
+struct SpvOptions {
+    bool generateDebugInfo {false};
+    bool stripDebugInfo {false};
+    bool disableOptimizer {true};
+    bool optimizeSize {false};
+    bool disassemble {false};
+    bool validate {false};
+    bool emitNonSemanticShaderDebugInfo {false};
+    bool emitNonSemanticShaderDebugSource{ false };
+    bool compileOnly{false};
+};
 
 
 void GetSpirvVersion(std::string&);
 void GetSpirvVersion(std::string&);
 int GetSpirvGeneratorVersion();
 int GetSpirvGeneratorVersion();
@@ -55,7 +61,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsign
                   SpvOptions* options = nullptr);
                   SpvOptions* options = nullptr);
 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, SpvOptions* options = nullptr);
                   spv::SpvBuildLogger* logger, SpvOptions* options = nullptr);
-void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
-void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
+bool OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName);
+bool OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName);
 
 
 }
 }

+ 0 - 4
src/libraries/glslang/SPIRV/Logger.cpp

@@ -32,8 +32,6 @@
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 
 
-#ifndef GLSLANG_WEB
-
 #include "Logger.h"
 #include "Logger.h"
 
 
 #include <algorithm>
 #include <algorithm>
@@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const {
 }
 }
 
 
 } // end spv namespace
 } // end spv namespace
-
-#endif

+ 0 - 9
src/libraries/glslang/SPIRV/Logger.h

@@ -46,14 +46,6 @@ class SpvBuildLogger {
 public:
 public:
     SpvBuildLogger() {}
     SpvBuildLogger() {}
 
 
-#ifdef GLSLANG_WEB
-    void tbdFunctionality(const std::string& f) { }
-    void missingFunctionality(const std::string& f) { }
-    void warning(const std::string& w) { }
-    void error(const std::string& e) { errors.push_back(e); }
-    std::string getAllMessages() { return ""; }
-#else
-
     // Registers a TBD functionality.
     // Registers a TBD functionality.
     void tbdFunctionality(const std::string& f);
     void tbdFunctionality(const std::string& f);
     // Registers a missing functionality.
     // Registers a missing functionality.
@@ -67,7 +59,6 @@ public:
     // Returns all messages accumulated in the order of:
     // Returns all messages accumulated in the order of:
     // TBD functionalities, missing functionalities, warnings, errors.
     // TBD functionalities, missing functionalities, warnings, errors.
     std::string getAllMessages() const;
     std::string getAllMessages() const;
-#endif
 
 
 private:
 private:
     SpvBuildLogger(const SpvBuildLogger&);
     SpvBuildLogger(const SpvBuildLogger&);

+ 5 - 5
src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h

@@ -1,5 +1,5 @@
 // Copyright (c) 2020 The Khronos Group Inc.
 // Copyright (c) 2020 The Khronos Group Inc.
-// 
+//
 // Permission is hereby granted, free of charge, to any person obtaining a
 // Permission is hereby granted, free of charge, to any person obtaining a
 // copy of this software and/or associated documentation files (the
 // copy of this software and/or associated documentation files (the
 // "Materials"), to deal in the Materials without restriction, including
 // "Materials"), to deal in the Materials without restriction, including
@@ -7,15 +7,15 @@
 // distribute, sublicense, and/or sell copies of the Materials, and to
 // distribute, sublicense, and/or sell copies of the Materials, and to
 // permit persons to whom the Materials are furnished to do so, subject to
 // permit persons to whom the Materials are furnished to do so, subject to
 // the following conditions:
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be included
 // The above copyright notice and this permission notice shall be included
 // in all copies or substantial portions of the Materials.
 // in all copies or substantial portions of the Materials.
-// 
+//
 // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
 // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
 // KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
 // KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
 // SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
 // SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
 //    https://www.khronos.org/registry/
 //    https://www.khronos.org/registry/
-// 
+//
 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -23,7 +23,7 @@
 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-// 
+//
 
 
 #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
 #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
 #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
 #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_

+ 171 - 0
src/libraries/glslang/SPIRV/NonSemanticShaderDebugInfo100.h

@@ -0,0 +1,171 @@
+// Copyright (c) 2018 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 SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
+#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+    NonSemanticShaderDebugInfo100Version = 100,
+    NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff
+};
+enum {
+    NonSemanticShaderDebugInfo100Revision = 6,
+    NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100Instructions {
+    NonSemanticShaderDebugInfo100DebugInfoNone = 0,
+    NonSemanticShaderDebugInfo100DebugCompilationUnit = 1,
+    NonSemanticShaderDebugInfo100DebugTypeBasic = 2,
+    NonSemanticShaderDebugInfo100DebugTypePointer = 3,
+    NonSemanticShaderDebugInfo100DebugTypeQualifier = 4,
+    NonSemanticShaderDebugInfo100DebugTypeArray = 5,
+    NonSemanticShaderDebugInfo100DebugTypeVector = 6,
+    NonSemanticShaderDebugInfo100DebugTypedef = 7,
+    NonSemanticShaderDebugInfo100DebugTypeFunction = 8,
+    NonSemanticShaderDebugInfo100DebugTypeEnum = 9,
+    NonSemanticShaderDebugInfo100DebugTypeComposite = 10,
+    NonSemanticShaderDebugInfo100DebugTypeMember = 11,
+    NonSemanticShaderDebugInfo100DebugTypeInheritance = 12,
+    NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13,
+    NonSemanticShaderDebugInfo100DebugTypeTemplate = 14,
+    NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15,
+    NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16,
+    NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17,
+    NonSemanticShaderDebugInfo100DebugGlobalVariable = 18,
+    NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19,
+    NonSemanticShaderDebugInfo100DebugFunction = 20,
+    NonSemanticShaderDebugInfo100DebugLexicalBlock = 21,
+    NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22,
+    NonSemanticShaderDebugInfo100DebugScope = 23,
+    NonSemanticShaderDebugInfo100DebugNoScope = 24,
+    NonSemanticShaderDebugInfo100DebugInlinedAt = 25,
+    NonSemanticShaderDebugInfo100DebugLocalVariable = 26,
+    NonSemanticShaderDebugInfo100DebugInlinedVariable = 27,
+    NonSemanticShaderDebugInfo100DebugDeclare = 28,
+    NonSemanticShaderDebugInfo100DebugValue = 29,
+    NonSemanticShaderDebugInfo100DebugOperation = 30,
+    NonSemanticShaderDebugInfo100DebugExpression = 31,
+    NonSemanticShaderDebugInfo100DebugMacroDef = 32,
+    NonSemanticShaderDebugInfo100DebugMacroUndef = 33,
+    NonSemanticShaderDebugInfo100DebugImportedEntity = 34,
+    NonSemanticShaderDebugInfo100DebugSource = 35,
+    NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101,
+    NonSemanticShaderDebugInfo100DebugSourceContinued = 102,
+    NonSemanticShaderDebugInfo100DebugLine = 103,
+    NonSemanticShaderDebugInfo100DebugNoLine = 104,
+    NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105,
+    NonSemanticShaderDebugInfo100DebugStoragePath = 106,
+    NonSemanticShaderDebugInfo100DebugEntryPoint = 107,
+    NonSemanticShaderDebugInfo100DebugTypeMatrix = 108,
+    NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff
+};
+
+
+enum NonSemanticShaderDebugInfo100DebugInfoFlags {
+    NonSemanticShaderDebugInfo100None = 0x0000,
+    NonSemanticShaderDebugInfo100FlagIsProtected = 0x01,
+    NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02,
+    NonSemanticShaderDebugInfo100FlagIsPublic = 0x03,
+    NonSemanticShaderDebugInfo100FlagIsLocal = 0x04,
+    NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08,
+    NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10,
+    NonSemanticShaderDebugInfo100FlagArtificial = 0x20,
+    NonSemanticShaderDebugInfo100FlagExplicit = 0x40,
+    NonSemanticShaderDebugInfo100FlagPrototyped = 0x80,
+    NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100,
+    NonSemanticShaderDebugInfo100FlagStaticMember = 0x200,
+    NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400,
+    NonSemanticShaderDebugInfo100FlagLValueReference = 0x800,
+    NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000,
+    NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000,
+    NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000,
+    NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000,
+    NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000,
+    NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000,
+    NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100BuildIdentifierFlags {
+    NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01,
+    NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding {
+    NonSemanticShaderDebugInfo100Unspecified = 0,
+    NonSemanticShaderDebugInfo100Address = 1,
+    NonSemanticShaderDebugInfo100Boolean = 2,
+    NonSemanticShaderDebugInfo100Float = 3,
+    NonSemanticShaderDebugInfo100Signed = 4,
+    NonSemanticShaderDebugInfo100SignedChar = 5,
+    NonSemanticShaderDebugInfo100Unsigned = 6,
+    NonSemanticShaderDebugInfo100UnsignedChar = 7,
+    NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100DebugCompositeType {
+    NonSemanticShaderDebugInfo100Class = 0,
+    NonSemanticShaderDebugInfo100Structure = 1,
+    NonSemanticShaderDebugInfo100Union = 2,
+    NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100DebugTypeQualifier {
+    NonSemanticShaderDebugInfo100ConstType = 0,
+    NonSemanticShaderDebugInfo100VolatileType = 1,
+    NonSemanticShaderDebugInfo100RestrictType = 2,
+    NonSemanticShaderDebugInfo100AtomicType = 3,
+    NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100DebugOperation {
+    NonSemanticShaderDebugInfo100Deref = 0,
+    NonSemanticShaderDebugInfo100Plus = 1,
+    NonSemanticShaderDebugInfo100Minus = 2,
+    NonSemanticShaderDebugInfo100PlusUconst = 3,
+    NonSemanticShaderDebugInfo100BitPiece = 4,
+    NonSemanticShaderDebugInfo100Swap = 5,
+    NonSemanticShaderDebugInfo100Xderef = 6,
+    NonSemanticShaderDebugInfo100StackValue = 7,
+    NonSemanticShaderDebugInfo100Constu = 8,
+    NonSemanticShaderDebugInfo100Fragment = 9,
+    NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff
+};
+
+enum NonSemanticShaderDebugInfo100DebugImportedEntity {
+    NonSemanticShaderDebugInfo100ImportedModule = 0,
+    NonSemanticShaderDebugInfo100ImportedDeclaration = 1,
+    NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_

+ 43 - 17
src/libraries/glslang/SPIRV/SPVRemapper.cpp

@@ -36,10 +36,6 @@
 #include "SPVRemapper.h"
 #include "SPVRemapper.h"
 #include "doc.h"
 #include "doc.h"
 
 
-#if !defined (use_cpp11)
-// ... not supported before C++11
-#else // defined (use_cpp11)
-
 #include <algorithm>
 #include <algorithm>
 #include <cassert>
 #include <cassert>
 #include "../glslang/Include/Common.h"
 #include "../glslang/Include/Common.h"
@@ -160,15 +156,29 @@ namespace spv {
     }
     }
 
 
     // Is this an opcode we should remove when using --strip?
     // Is this an opcode we should remove when using --strip?
-    bool spirvbin_t::isStripOp(spv::Op opCode) const
+    bool spirvbin_t::isStripOp(spv::Op opCode, unsigned start) const
     {
     {
         switch (opCode) {
         switch (opCode) {
         case spv::OpSource:
         case spv::OpSource:
         case spv::OpSourceExtension:
         case spv::OpSourceExtension:
         case spv::OpName:
         case spv::OpName:
         case spv::OpMemberName:
         case spv::OpMemberName:
-        case spv::OpLine:           return true;
-        default:                    return false;
+        case spv::OpLine :
+        {
+            const std::string name = literalString(start + 2);
+
+            std::vector<std::string>::const_iterator it;
+            for (it = stripWhiteList.begin(); it < stripWhiteList.end(); it++)
+            {
+                if (name.find(*it) != std::string::npos) {
+                    return false;
+                }
+            }
+
+            return true;
+        }
+        default :
+            return false;
         }
         }
     }
     }
 
 
@@ -297,15 +307,21 @@ namespace spv {
     std::string spirvbin_t::literalString(unsigned word) const
     std::string spirvbin_t::literalString(unsigned word) const
     {
     {
         std::string literal;
         std::string literal;
+        const spirword_t * pos = spv.data() + word;
 
 
         literal.reserve(16);
         literal.reserve(16);
 
 
-        const char* bytes = reinterpret_cast<const char*>(spv.data() + word);
-
-        while (bytes && *bytes)
-            literal += *bytes++;
-
-        return literal;
+        do {
+            spirword_t word = *pos;
+            for (int i = 0; i < 4; i++) {
+                char c = word & 0xff;
+                if (c == '\0')
+                    return literal;
+                literal += c;
+                word >>= 8;
+            }
+            pos++;
+        } while (true);
     }
     }
 
 
     void spirvbin_t::applyMap()
     void spirvbin_t::applyMap()
@@ -366,7 +382,7 @@ namespace spv {
         process(
         process(
             [&](spv::Op opCode, unsigned start) {
             [&](spv::Op opCode, unsigned start) {
                 // remember opcodes we want to strip later
                 // remember opcodes we want to strip later
-                if (isStripOp(opCode))
+                if (isStripOp(opCode, start))
                     stripInst(start);
                     stripInst(start);
                 return true;
                 return true;
             },
             },
@@ -664,6 +680,7 @@ namespace spv {
             case spv::OperandKernelEnqueueFlags:
             case spv::OperandKernelEnqueueFlags:
             case spv::OperandKernelProfilingInfo:
             case spv::OperandKernelProfilingInfo:
             case spv::OperandCapability:
             case spv::OperandCapability:
+            case spv::OperandCooperativeMatrixOperands:
                 ++word;
                 ++word;
                 break;
                 break;
 
 
@@ -1488,14 +1505,23 @@ namespace spv {
     }
     }
 
 
     // remap from a memory image
     // remap from a memory image
-    void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, std::uint32_t opts)
+    void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, const std::vector<std::string>& whiteListStrings,
+                           std::uint32_t opts)
     {
     {
+        stripWhiteList = whiteListStrings;
         spv.swap(in_spv);
         spv.swap(in_spv);
         remap(opts);
         remap(opts);
         spv.swap(in_spv);
         spv.swap(in_spv);
     }
     }
 
 
-} // namespace SPV
+    // remap from a memory image - legacy interface without white list
+    void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, std::uint32_t opts)
+    {
+      stripWhiteList.clear();
+      spv.swap(in_spv);
+      remap(opts);
+      spv.swap(in_spv);
+    }
 
 
-#endif // defined (use_cpp11)
+} // namespace SPV
 
 

+ 9 - 29
src/libraries/glslang/SPIRV/SPVRemapper.h

@@ -43,12 +43,6 @@
 
 
 namespace spv {
 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 || (defined(_MSC_VER) && _MSC_VER >= 1700)
-#   define use_cpp11 1
-#endif
-
 class spirvbin_base_t
 class spirvbin_base_t
 {
 {
 public:
 public:
@@ -74,27 +68,6 @@ public:
 
 
 } // namespace SPV
 } // namespace SPV
 
 
-#if !defined (use_cpp11)
-#include <cstdio>
-#include <cstdint>
-
-namespace spv {
-class spirvbin_t : public spirvbin_base_t
-{
-public:
-    spirvbin_t(int /*verbose = 0*/) { }
-
-    void remap(std::vector<std::uint32_t>& /*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 <functional>
 #include <cstdint>
 #include <cstdint>
 #include <unordered_map>
 #include <unordered_map>
@@ -104,9 +77,9 @@ public:
 #include <cassert>
 #include <cassert>
 
 
 #include "spirv.hpp"
 #include "spirv.hpp"
-#include "spvIR.h"
 
 
 namespace spv {
 namespace spv {
+const Id NoResult = 0;
 
 
 // class to hold SPIR-V binary data for remapping, DCE, and debug stripping
 // class to hold SPIR-V binary data for remapping, DCE, and debug stripping
 class spirvbin_t : public spirvbin_base_t
 class spirvbin_t : public spirvbin_base_t
@@ -118,6 +91,10 @@ public:
    virtual ~spirvbin_t() { }
    virtual ~spirvbin_t() { }
 
 
    // remap on an existing binary in memory
    // remap on an existing binary in memory
+   void remap(std::vector<std::uint32_t>& spv, const std::vector<std::string>& whiteListStrings,
+              std::uint32_t opts = DO_EVERYTHING);
+
+   // remap on an existing binary in memory - legacy interface without white list
    void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
    void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
 
 
    // Type for error/log handler functions
    // Type for error/log handler functions
@@ -180,6 +157,8 @@ private:
    unsigned typeSizeInWords(spv::Id id)    const;
    unsigned typeSizeInWords(spv::Id id)    const;
    unsigned idTypeSizeInWords(spv::Id id)  const;
    unsigned idTypeSizeInWords(spv::Id id)  const;
 
 
+   bool isStripOp(spv::Op opCode, unsigned start) const;
+
    spv::Id&        asId(unsigned word)                { return spv[word]; }
    spv::Id&        asId(unsigned word)                { return spv[word]; }
    const spv::Id&  asId(unsigned word)          const { return spv[word]; }
    const spv::Id&  asId(unsigned word)          const { return spv[word]; }
    spv::Op         asOpCode(unsigned word)      const { return opOpCode(spv[word]); }
    spv::Op         asOpCode(unsigned word)      const { return opOpCode(spv[word]); }
@@ -249,6 +228,8 @@ private:
 
 
    std::vector<spirword_t> spv;      // SPIR words
    std::vector<spirword_t> spv;      // SPIR words
 
 
+   std::vector<std::string> stripWhiteList;
+
    namemap_t               nameMap;  // ID names from OpName
    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
    // Since we want to also do binary ops, we can't use std::vector<bool>.  we could use
@@ -300,5 +281,4 @@ private:
 
 
 } // namespace SPV
 } // namespace SPV
 
 
-#endif // defined (use_cpp11)
 #endif // SPIRVREMAPPER_H
 #endif // SPIRVREMAPPER_H

File diff suppressed because it is too large
+ 674 - 48
src/libraries/glslang/SPIRV/SpvBuilder.cpp


+ 121 - 24
src/libraries/glslang/SPIRV/SpvBuilder.h

@@ -50,6 +50,10 @@
 #include "Logger.h"
 #include "Logger.h"
 #include "spirv.hpp"
 #include "spirv.hpp"
 #include "spvIR.h"
 #include "spvIR.h"
+namespace spv {
+    #include "GLSL.ext.KHR.h"
+    #include "NonSemanticShaderDebugInfo100.h"
+}
 
 
 #include <algorithm>
 #include <algorithm>
 #include <map>
 #include <map>
@@ -82,7 +86,7 @@ public:
 
 
     void setSource(spv::SourceLanguage lang, int version)
     void setSource(spv::SourceLanguage lang, int version)
     {
     {
-        source = lang;
+        sourceLang = lang;
         sourceVersion = version;
         sourceVersion = version;
     }
     }
     spv::Id getStringId(const std::string& str)
     spv::Id getStringId(const std::string& str)
@@ -99,14 +103,32 @@ public:
         stringIds[file_c_str] = strId;
         stringIds[file_c_str] = strId;
         return strId;
         return strId;
     }
     }
+    spv::Id getSourceFile() const
+    {
+        return sourceFileStringId;
+    }
     void setSourceFile(const std::string& file)
     void setSourceFile(const std::string& file)
     {
     {
         sourceFileStringId = getStringId(file);
         sourceFileStringId = getStringId(file);
+        currentFileId = sourceFileStringId;
     }
     }
     void setSourceText(const std::string& text) { sourceText = text; }
     void setSourceText(const std::string& text) { sourceText = text; }
     void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); }
     void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); }
     void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
     void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
     void setEmitOpLines() { emitOpLines = true; }
     void setEmitOpLines() { emitOpLines = true; }
+    void setEmitNonSemanticShaderDebugInfo(bool const emit)
+    {
+        emitNonSemanticShaderDebugInfo = emit;
+
+        if(emit)
+        {
+            importNonSemanticShaderDebugInfoInstructions();
+        }
+    }
+    void setEmitNonSemanticShaderDebugSource(bool const src)
+    {
+        emitNonSemanticShaderDebugSource = src;
+    }
     void addExtension(const char* ext) { extensions.insert(ext); }
     void addExtension(const char* ext) { extensions.insert(ext); }
     void removeExtension(const char* ext)
     void removeExtension(const char* ext)
     {
     {
@@ -159,6 +181,7 @@ public:
     void setLine(int line, const char* filename);
     void setLine(int line, const char* filename);
     // Low-level OpLine. See setLine() for a layered helper.
     // Low-level OpLine. See setLine() for a layered helper.
     void addLine(Id fileName, int line, int column);
     void addLine(Id fileName, int line, int column);
+    void addDebugScopeAndLine(Id fileName, int line, int column);
 
 
     // For creating new types (will return old type if the requested one was already made).
     // For creating new types (will return old type if the requested one was already made).
     Id makeVoidType();
     Id makeVoidType();
@@ -170,7 +193,7 @@ public:
     Id makeIntType(int width) { return makeIntegerType(width, true); }
     Id makeIntType(int width) { return makeIntegerType(width, true); }
     Id makeUintType(int width) { return makeIntegerType(width, false); }
     Id makeUintType(int width) { return makeIntegerType(width, false); }
     Id makeFloatType(int width);
     Id makeFloatType(int width);
-    Id makeStructType(const std::vector<Id>& members, const char*);
+    Id makeStructType(const std::vector<Id>& members, const char* name, bool const compilerGenerated = true);
     Id makeStructResultType(Id type0, Id type1);
     Id makeStructResultType(Id type0, Id type1);
     Id makeVectorType(Id component, int size);
     Id makeVectorType(Id component, int size);
     Id makeMatrixType(Id component, int cols, int rows);
     Id makeMatrixType(Id component, int cols, int rows);
@@ -180,13 +203,51 @@ public:
     Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
     Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
     Id makeSamplerType();
     Id makeSamplerType();
     Id makeSampledImageType(Id imageType);
     Id makeSampledImageType(Id imageType);
-    Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
+    Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use);
+    Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols);
+    Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType);
     Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
     Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
 
 
+    // SPIR-V NonSemantic Shader DebugInfo Instructions
+    struct DebugTypeLoc {
+        std::string name {};
+        int line {0};
+        int column {0};
+    };
+    std::unordered_map<Id, DebugTypeLoc> debugTypeLocs;
+    Id makeDebugInfoNone();
+    Id makeBoolDebugType(int const size);
+    Id makeIntegerDebugType(int const width, bool const hasSign);
+    Id makeFloatDebugType(int const width);
+    Id makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType);
+    Id makeArrayDebugType(Id const baseType, Id const componentCount);
+    Id makeVectorDebugType(Id const baseType, int const componentCount);
+    Id makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor = true);
+    Id makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc);
+    Id makeCompositeDebugType(std::vector<Id> const& memberTypes, char const*const name,
+        NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false);
+    Id makePointerDebugType(StorageClass storageClass, Id const baseType);
+    Id makeDebugSource(const Id fileName);
+    Id makeDebugCompilationUnit();
+    Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable);
+    Id createDebugLocalVariable(Id type, char const*const name, size_t const argNumber = 0);
+    Id makeDebugExpression();
+    Id makeDebugDeclare(Id const debugLocalVariable, Id const pointer);
+    Id makeDebugValue(Id const debugLocalVariable, Id const value);
+    Id makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTypes);
+    Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId);
+    Id makeDebugLexicalBlock(uint32_t line);
+    std::string unmangleFunctionName(std::string const& name) const;
+    void setupDebugFunctionEntry(Function* function, const char* name, int line, 
+                                 const std::vector<Id>& paramTypes,
+                                 const std::vector<char const*>& paramNames);
+
     // accelerationStructureNV type
     // accelerationStructureNV type
     Id makeAccelerationStructureType();
     Id makeAccelerationStructureType();
     // rayQueryEXT type
     // rayQueryEXT type
     Id makeRayQueryType();
     Id makeRayQueryType();
+    // hitObjectNV type
+    Id makeHitObjectNVType();
 
 
     // For querying about types.
     // For querying about types.
     Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
     Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
@@ -204,6 +265,7 @@ public:
     ImageFormat getImageTypeFormat(Id typeId) const
     ImageFormat getImageTypeFormat(Id typeId) const
         { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
         { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
     Id getResultingAccessChainType() const;
     Id getResultingAccessChainType() const;
+    Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); }
 
 
     bool isPointer(Id resultId)      const { return isPointerType(getTypeId(resultId)); }
     bool isPointer(Id resultId)      const { return isPointerType(getTypeId(resultId)); }
     bool isScalar(Id resultId)       const { return isScalarType(getTypeId(resultId)); }
     bool isScalar(Id resultId)       const { return isScalarType(getTypeId(resultId)); }
@@ -228,11 +290,10 @@ public:
     bool isMatrixType(Id typeId)       const { return getTypeClass(typeId) == OpTypeMatrix; }
     bool isMatrixType(Id typeId)       const { return getTypeClass(typeId) == OpTypeMatrix; }
     bool isStructType(Id typeId)       const { return getTypeClass(typeId) == OpTypeStruct; }
     bool isStructType(Id typeId)       const { return getTypeClass(typeId) == OpTypeStruct; }
     bool isArrayType(Id typeId)        const { return getTypeClass(typeId) == OpTypeArray; }
     bool isArrayType(Id typeId)        const { return getTypeClass(typeId) == OpTypeArray; }
-#ifdef GLSLANG_WEB
-    bool isCooperativeMatrixType(Id typeId)const { return false; }
-#else
-    bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
-#endif
+    bool isCooperativeMatrixType(Id typeId)const
+    {
+        return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV;
+    }
     bool isAggregateType(Id typeId)    const
     bool isAggregateType(Id typeId)    const
         { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
         { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
     bool isImageType(Id typeId)        const { return getTypeClass(typeId) == OpTypeImage; }
     bool isImageType(Id typeId)        const { return getTypeClass(typeId) == OpTypeImage; }
@@ -257,6 +318,8 @@ public:
     // See if a resultId is valid for use as an initializer.
     // See if a resultId is valid for use as an initializer.
     bool isValidInitializer(Id resultId) const { return isConstant(resultId) || isGlobalVariable(resultId); }
     bool isValidInitializer(Id resultId) const { return isConstant(resultId) || isGlobalVariable(resultId); }
 
 
+    bool isRayTracingOpCode(Op opcode) const;
+
     int getScalarTypeWidth(Id typeId) const
     int getScalarTypeWidth(Id typeId) const
     {
     {
         Id scalarTypeId = getScalarTypeId(typeId);
         Id scalarTypeId = getScalarTypeId(typeId);
@@ -318,6 +381,8 @@ public:
     Id makeFloat16Constant(float f16, bool specConstant = false);
     Id makeFloat16Constant(float f16, bool specConstant = false);
     Id makeFpConstant(Id type, double d, bool specConstant = false);
     Id makeFpConstant(Id type, double d, bool specConstant = false);
 
 
+    Id importNonSemanticShaderDebugInfoInstructions();
+
     // Turn the array of constants into a proper spv constant of the requested type.
     // Turn the array of constants into a proper spv constant of the requested type.
     Id makeCompositeConstant(Id type, const std::vector<Id>& comps, bool specConst = false);
     Id makeCompositeConstant(Id type, const std::vector<Id>& comps, bool specConst = false);
 
 
@@ -332,6 +397,7 @@ public:
     void addDecoration(Id, Decoration, const char*);
     void addDecoration(Id, Decoration, const char*);
     void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
     void addDecoration(Id, Decoration, const std::vector<unsigned>& literals);
     void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
     void addDecoration(Id, Decoration, const std::vector<const char*>& strings);
+    void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType);
     void addDecorationId(Id id, Decoration, Id idDecoration);
     void addDecorationId(Id id, Decoration, Id idDecoration);
     void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
     void addDecorationId(Id id, Decoration, const std::vector<Id>& operandIds);
     void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
     void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
@@ -340,7 +406,12 @@ public:
     void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<const char*>& strings);
     void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector<const char*>& strings);
 
 
     // At the end of what block do the next create*() instructions go?
     // At the end of what block do the next create*() instructions go?
-    void setBuildPoint(Block* bp) { buildPoint = bp; }
+    // Also reset current last DebugScope and current source line to unknown
+    void setBuildPoint(Block* bp) {
+        buildPoint = bp;
+        lastDebugScopeId = NoResult;
+        currentLine = 0;
+    }
     Block* getBuildPoint() const { return buildPoint; }
     Block* getBuildPoint() const { return buildPoint; }
 
 
     // Make the entry-point function. The returned pointer is only valid
     // Make the entry-point function. The returned pointer is only valid
@@ -350,13 +421,23 @@ public:
     // Make a shader-style function, and create its entry block if entry is non-zero.
     // Make a shader-style function, and create its entry block if entry is non-zero.
     // Return the function, pass back the entry.
     // Return the function, pass back the entry.
     // The returned pointer is only valid for the lifetime of this builder.
     // 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<std::vector<Decoration>>& precisions, Block **entry = 0);
+    Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
+                                const std::vector<Id>& paramTypes,
+                                const std::vector<std::vector<Decoration>>& precisions, Block** entry = nullptr);
 
 
     // Create a return. An 'implicit' return is one not appearing in the source
     // 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.
     // code.  In the case of an implicit return, no post-return block is inserted.
     void makeReturn(bool implicit, Id retVal = 0);
     void makeReturn(bool implicit, Id retVal = 0);
 
 
+    // Initialize state and generate instructions for new lexical scope
+    void enterScope(uint32_t line);
+
+    // Set state and generate instructions to exit current lexical scope
+    void leaveScope();
+
+    // Prepare builder for generation of instructions for a function.
+    void enterFunction(Function const* function);
+
     // Generate all the code needed to finish up a function.
     // Generate all the code needed to finish up a function.
     void leaveFunction();
     void leaveFunction();
 
 
@@ -364,9 +445,13 @@ public:
     // discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT
     // discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT
     void makeStatementTerminator(spv::Op opcode, const char *name);
     void makeStatementTerminator(spv::Op opcode, const char *name);
 
 
+    // Create block terminator instruction for statements that have input operands
+    // such as OpEmitMeshTasksEXT
+    void makeStatementTerminator(spv::Op opcode, const std::vector<Id>& operands, const char* name);
+
     // Create a global or function local or IO variable.
     // Create a global or function local or IO variable.
-    Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,
-        Id initializer = NoResult);
+    Id createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name = nullptr,
+        Id initializer = NoResult, bool const compilerGenerated = true);
 
 
     // Create an intermediate with an undefined value.
     // Create an intermediate with an undefined value.
     Id createUndefined(Id type);
     Id createUndefined(Id type);
@@ -386,8 +471,10 @@ public:
     // Create an OpArrayLength instruction
     // Create an OpArrayLength instruction
     Id createArrayLength(Id base, unsigned int member);
     Id createArrayLength(Id base, unsigned int member);
 
 
+    // Create an OpCooperativeMatrixLengthKHR instruction
+    Id createCooperativeMatrixLengthKHR(Id type);
     // Create an OpCooperativeMatrixLengthNV instruction
     // Create an OpCooperativeMatrixLengthNV instruction
-    Id createCooperativeMatrixLength(Id type);
+    Id createCooperativeMatrixLengthNV(Id type);
 
 
     // Create an OpCompositeExtract instruction
     // Create an OpCompositeExtract instruction
     Id createCompositeExtract(Id composite, Id typeId, unsigned index);
     Id createCompositeExtract(Id composite, Id typeId, unsigned index);
@@ -622,11 +709,6 @@ public:
         // Accumulate whether anything in the chain of structures has coherent decorations.
         // Accumulate whether anything in the chain of structures has coherent decorations.
         struct CoherentFlags {
         struct CoherentFlags {
             CoherentFlags() { clear(); }
             CoherentFlags() { clear(); }
-#ifdef GLSLANG_WEB
-            void clear() { }
-            bool isVolatile() const { return false; }
-            CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
-#else
             bool isVolatile() const { return volatil; }
             bool isVolatile() const { return volatil; }
             bool isNonUniform() const { return nonUniform; }
             bool isNonUniform() const { return nonUniform; }
             bool anyCoherent() const {
             bool anyCoherent() const {
@@ -671,7 +753,6 @@ public:
                 nonUniform |= other.nonUniform;
                 nonUniform |= other.nonUniform;
                 return *this;
                 return *this;
             }
             }
-#endif
         };
         };
         CoherentFlags coherentFlags;
         CoherentFlags coherentFlags;
     };
     };
@@ -752,19 +833,17 @@ public:
 
 
     // Add capabilities, extensions, remove unneeded decorations, etc.,
     // Add capabilities, extensions, remove unneeded decorations, etc.,
     // based on the resulting SPIR-V.
     // based on the resulting SPIR-V.
-    void postProcess();
+    void postProcess(bool compileOnly);
 
 
     // Prune unreachable blocks in the CFG and remove unneeded decorations.
     // Prune unreachable blocks in the CFG and remove unneeded decorations.
     void postProcessCFG();
     void postProcessCFG();
 
 
-#ifndef GLSLANG_WEB
     // Add capabilities, extensions based on instructions in the module.
     // Add capabilities, extensions based on instructions in the module.
     void postProcessFeatures();
     void postProcessFeatures();
     // Hook to visit each instruction in a block in a function
     // Hook to visit each instruction in a block in a function
     void postProcess(Instruction&);
     void postProcess(Instruction&);
     // Hook to visit each non-32-bit sized float/int operation in a block.
     // Hook to visit each non-32-bit sized float/int operation in a block.
     void postProcessType(const Instruction&, spv::Id typeId);
     void postProcessType(const Instruction&, spv::Id typeId);
-#endif
 
 
     void dump(std::vector<unsigned int>&) const;
     void dump(std::vector<unsigned int>&) const;
 
 
@@ -801,13 +880,23 @@ public:
         const;
         const;
 
 
     unsigned int spvVersion;     // the version of SPIR-V to emit in the header
     unsigned int spvVersion;     // the version of SPIR-V to emit in the header
-    SourceLanguage source;
+    SourceLanguage sourceLang;
     int sourceVersion;
     int sourceVersion;
     spv::Id sourceFileStringId;
     spv::Id sourceFileStringId;
+    spv::Id nonSemanticShaderCompilationUnitId {0};
+    spv::Id nonSemanticShaderDebugInfo {0};
+    spv::Id debugInfoNone {0};
+    spv::Id debugExpression {0}; // Debug expression with zero operations.
     std::string sourceText;
     std::string sourceText;
     int currentLine;
     int currentLine;
     const char* currentFile;
     const char* currentFile;
+    spv::Id currentFileId;
+    std::stack<spv::Id> currentDebugScopeId;
+    spv::Id lastDebugScopeId;
     bool emitOpLines;
     bool emitOpLines;
+    bool emitNonSemanticShaderDebugInfo;
+    bool restoreNonSemanticShaderDebugInfo;
+    bool emitNonSemanticShaderDebugSource;
     std::set<std::string> extensions;
     std::set<std::string> extensions;
     std::vector<const char*> sourceExtensions;
     std::vector<const char*> sourceExtensions;
     std::vector<const char*> moduleProcesses;
     std::vector<const char*> moduleProcesses;
@@ -841,6 +930,8 @@ public:
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
     // map type opcodes to type instructions
     // map type opcodes to type instructions
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
+    // map type opcodes to debug type instructions
+    std::unordered_map<unsigned int, std::vector<Instruction*>> groupedDebugTypes;
     // list of OpConstantNull instructions
     // list of OpConstantNull instructions
     std::vector<Instruction*> nullConstants;
     std::vector<Instruction*> nullConstants;
 
 
@@ -856,6 +947,12 @@ public:
     // map from include file name ids to their contents
     // map from include file name ids to their contents
     std::map<spv::Id, const std::string*> includeFiles;
     std::map<spv::Id, const std::string*> includeFiles;
 
 
+    // map from core id to debug id
+    std::map <spv::Id, spv::Id> debugId;
+
+    // map from file name string id to DebugSource id
+    std::unordered_map<spv::Id, spv::Id> debugSourceId;
+
     // The stream for outputting warnings and errors.
     // The stream for outputting warnings and errors.
     SpvBuildLogger* logger;
     SpvBuildLogger* logger;
 };  // end Builder class
 };  // end Builder class

+ 9 - 9
src/libraries/glslang/SPIRV/SpvPostProcess.cpp

@@ -52,11 +52,12 @@ namespace spv {
     #include "GLSL.ext.EXT.h"
     #include "GLSL.ext.EXT.h"
     #include "GLSL.ext.AMD.h"
     #include "GLSL.ext.AMD.h"
     #include "GLSL.ext.NV.h"
     #include "GLSL.ext.NV.h"
+    #include "GLSL.ext.ARM.h"
+    #include "GLSL.ext.QCOM.h"
 }
 }
 
 
 namespace spv {
 namespace spv {
 
 
-#ifndef GLSLANG_WEB
 // Hook to visit each operand type and result type of an instruction.
 // Hook to visit each operand type and result type of an instruction.
 // Will be called multiple times for one instruction, once for each typed
 // Will be called multiple times for one instruction, once for each typed
 // operand and the result.
 // operand and the result.
@@ -333,7 +334,6 @@ void Builder::postProcess(Instruction& inst)
         }
         }
     }
     }
 }
 }
-#endif
 
 
 // comment in header
 // comment in header
 void Builder::postProcessCFG()
 void Builder::postProcessCFG()
@@ -394,7 +394,6 @@ void Builder::postProcessCFG()
         decorations.end());
         decorations.end());
 }
 }
 
 
-#ifndef GLSLANG_WEB
 // comment in header
 // comment in header
 void Builder::postProcessFeatures() {
 void Builder::postProcessFeatures() {
     // Add per-instruction capabilities, extensions, etc.,
     // Add per-instruction capabilities, extensions, etc.,
@@ -482,14 +481,15 @@ void Builder::postProcessFeatures() {
         }
         }
     }
     }
 }
 }
-#endif
 
 
 // comment in header
 // comment in header
-void Builder::postProcess() {
-  postProcessCFG();
-#ifndef GLSLANG_WEB
-  postProcessFeatures();
-#endif
+void Builder::postProcess(bool compileOnly)
+{
+    // postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint
+    if (!compileOnly)
+        postProcessCFG();
+
+    postProcessFeatures();
 }
 }
 
 
 }; // end spv namespace
 }; // end spv namespace

+ 53 - 20
src/libraries/glslang/SPIRV/SpvTools.cpp

@@ -68,26 +68,8 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
         }
         }
     case glslang::EShTargetVulkan_1_2:
     case glslang::EShTargetVulkan_1_2:
         return spv_target_env::SPV_ENV_VULKAN_1_2;
         return spv_target_env::SPV_ENV_VULKAN_1_2;
-    case glslang::EShTargetUniversal:
-        switch (spvVersion.spv) {
-        case EShTargetSpv_1_0:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
-        case EShTargetSpv_1_1:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_1;
-        case EShTargetSpv_1_2:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_2;
-        case EShTargetSpv_1_3:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_3;
-        case EShTargetSpv_1_4:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_4;
-        case EShTargetSpv_1_5:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_5;
-        case EShTargetSpv_1_6:
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
-        default:
-            logger->missingFunctionality("Target version for SPIRV-Tools validator");
-            return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
-        }
+    case glslang::EShTargetVulkan_1_3:
+        return spv_target_env::SPV_ENV_VULKAN_1_3;
     default:
     default:
         break;
         break;
     }
     }
@@ -230,6 +212,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
     optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
     optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
     if (options->optimizeSize) {
     if (options->optimizeSize) {
         optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
         optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
+        optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsSafePass());
     }
     }
     optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
     optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
     optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
     optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
@@ -240,6 +223,56 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
     optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
     optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
 }
 }
 
 
+bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                       std::unordered_set<uint32_t>* live_locs,
+                                       std::unordered_set<uint32_t>* live_builtins,
+                                       spv::SpvBuildLogger*)
+{
+  spvtools::Optimizer optimizer(target_env);
+  optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
+
+  optimizer.RegisterPass(spvtools::CreateAnalyzeLiveInputPass(live_locs, live_builtins));
+
+  spvtools::OptimizerOptions spvOptOptions;
+  optimizer.SetTargetEnv(target_env);
+  spvOptOptions.set_run_validator(false);
+  return optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
+}
+
+void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                         std::unordered_set<uint32_t>* live_locs,
+                                         std::unordered_set<uint32_t>* live_builtins,
+                                         spv::SpvBuildLogger*)
+{
+  spvtools::Optimizer optimizer(target_env);
+  optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
+
+  optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputStoresPass(live_locs, live_builtins));
+  optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
+  optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputComponentsPass());
+  optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
+
+  spvtools::OptimizerOptions spvOptOptions;
+  optimizer.SetTargetEnv(target_env);
+  spvOptOptions.set_run_validator(false);
+  optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
+}
+
+void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                            spv::SpvBuildLogger*)
+{
+  spvtools::Optimizer optimizer(target_env);
+  optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
+
+  optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
+  optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
+
+  spvtools::OptimizerOptions spvOptOptions;
+  optimizer.SetTargetEnv(target_env);
+  spvOptOptions.set_run_validator(false);
+  optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
+}
+
 // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V.  This is implicitly done by
 // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V.  This is implicitly done by
 // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
 // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
 // optimization is disabled.
 // optimization is disabled.

+ 20 - 11
src/libraries/glslang/SPIRV/SpvTools.h

@@ -48,23 +48,16 @@
 #endif
 #endif
 
 
 #include "../glslang/MachineIndependent/localintermediate.h"
 #include "../glslang/MachineIndependent/localintermediate.h"
+#include "GlslangToSpv.h"
 #include "Logger.h"
 #include "Logger.h"
 
 
 namespace glslang {
 namespace glslang {
 
 
-struct SpvOptions {
-    SpvOptions() : generateDebugInfo(false), stripDebugInfo(false), disableOptimizer(true),
-        optimizeSize(false), disassemble(false), validate(false) { }
-    bool generateDebugInfo;
-    bool stripDebugInfo;
-    bool disableOptimizer;
-    bool optimizeSize;
-    bool disassemble;
-    bool validate;
-};
-
 #if ENABLE_OPT
 #if ENABLE_OPT
 
 
+// Translate glslang's view of target versioning to what SPIRV-Tools uses.
+spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
+
 // Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
 // Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
 void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
 void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
 
 
@@ -80,6 +73,22 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
 void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
 void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
                          spv::SpvBuildLogger*, const SpvOptions*);
                          spv::SpvBuildLogger*, const SpvOptions*);
 
 
+// Apply the SPIRV-Tools EliminateDeadInputComponents pass to generated SPIR-V. Put result in |spirv|.
+void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                            spv::SpvBuildLogger*);
+
+// Apply the SPIRV-Tools AnalyzeDeadOutputStores pass to generated SPIR-V. Put result in |live_locs|.
+// Return true if the result is valid.
+bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                       std::unordered_set<uint32_t>* live_locs,
+                                       std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
+
+// Apply the SPIRV-Tools EliminateDeadOutputStores and AggressiveDeadCodeElimination passes to generated SPIR-V using
+// |live_locs|. Put result in |spirv|.
+void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
+                                         std::unordered_set<uint32_t>* live_locs,
+                                         std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
+
 // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V.  This is implicitly done by
 // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V.  This is implicitly done by
 // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
 // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
 // optimization is disabled.
 // optimization is disabled.

+ 94 - 17
src/libraries/glslang/SPIRV/disassemble.cpp

@@ -43,6 +43,7 @@
 #include <stack>
 #include <stack>
 #include <sstream>
 #include <sstream>
 #include <cstring>
 #include <cstring>
+#include <utility>
 
 
 #include "disassemble.h"
 #include "disassemble.h"
 #include "doc.h"
 #include "doc.h"
@@ -53,6 +54,9 @@ namespace spv {
         #include "GLSL.std.450.h"
         #include "GLSL.std.450.h"
         #include "GLSL.ext.AMD.h"
         #include "GLSL.ext.AMD.h"
         #include "GLSL.ext.NV.h"
         #include "GLSL.ext.NV.h"
+        #include "GLSL.ext.ARM.h"
+        #include "NonSemanticShaderDebugInfo100.h"
+        #include "GLSL.ext.QCOM.h"
     }
     }
 }
 }
 const char* GlslStd450DebugNames[spv::GLSLstd450Count];
 const char* GlslStd450DebugNames[spv::GLSLstd450Count];
@@ -61,6 +65,7 @@ namespace spv {
 
 
 static const char* GLSLextAMDGetDebugNames(const char*, unsigned);
 static const char* GLSLextAMDGetDebugNames(const char*, unsigned);
 static const char* GLSLextNVGetDebugNames(const char*, unsigned);
 static const char* GLSLextNVGetDebugNames(const char*, unsigned);
+static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned);
 
 
 static void Kill(std::ostream& out, const char* message)
 static void Kill(std::ostream& out, const char* message)
 {
 {
@@ -75,6 +80,7 @@ enum ExtInstSet {
     GLSLextNVInst,
     GLSLextNVInst,
     OpenCLExtInst,
     OpenCLExtInst,
     NonSemanticDebugPrintfExtInst,
     NonSemanticDebugPrintfExtInst,
+    NonSemanticShaderDebugInfo100
 };
 };
 
 
 // Container class for a single instance of a SPIR-V stream, with methods for disassembly.
 // Container class for a single instance of a SPIR-V stream, with methods for disassembly.
@@ -100,6 +106,7 @@ protected:
     void outputMask(OperandClass operandClass, unsigned mask);
     void outputMask(OperandClass operandClass, unsigned mask);
     void disassembleImmediates(int numOperands);
     void disassembleImmediates(int numOperands);
     void disassembleIds(int numOperands);
     void disassembleIds(int numOperands);
+    std::pair<int, std::string> decodeString();
     int disassembleString();
     int disassembleString();
     void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
     void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
 
 
@@ -290,31 +297,44 @@ void SpirvStream::disassembleIds(int numOperands)
     }
     }
 }
 }
 
 
-// return the number of operands consumed by the string
-int SpirvStream::disassembleString()
+// decode string from words at current position (non-consuming)
+std::pair<int, std::string> SpirvStream::decodeString()
 {
 {
-    int startWord = word;
-
-    out << " \"";
-
-    const char* wordString;
+    std::string res;
+    int wordPos = word;
+    char c;
     bool done = false;
     bool done = false;
+
     do {
     do {
-        unsigned int content = stream[word];
-        wordString = (const char*)&content;
+        unsigned int content = stream[wordPos];
         for (int charCount = 0; charCount < 4; ++charCount) {
         for (int charCount = 0; charCount < 4; ++charCount) {
-            if (*wordString == 0) {
+            c = content & 0xff;
+            content >>= 8;
+            if (c == '\0') {
                 done = true;
                 done = true;
                 break;
                 break;
             }
             }
-            out << *(wordString++);
+            res += c;
         }
         }
-        ++word;
-    } while (! done);
+        ++wordPos;
+    } while(! done);
+
+    return std::make_pair(wordPos - word, res);
+}
+
+// return the number of operands consumed by the string
+int SpirvStream::disassembleString()
+{
+    out << " \"";
 
 
+    std::pair<int, std::string> decoderes = decodeString();
+
+    out << decoderes.second;
     out << "\"";
     out << "\"";
 
 
-    return word - startWord;
+    word += decoderes.first;
+
+    return decoderes.first;
 }
 }
 
 
 void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
 void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
@@ -331,7 +351,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
             nextNestedControl = 0;
             nextNestedControl = 0;
         }
         }
     } else if (opCode == OpExtInstImport) {
     } else if (opCode == OpExtInstImport) {
-        idDescriptor[resultId] = (const char*)(&stream[word]);
+        idDescriptor[resultId] = decodeString().second;
     }
     }
     else {
     else {
         if (resultId != 0 && idDescriptor[resultId].size() == 0) {
         if (resultId != 0 && idDescriptor[resultId].size() == 0) {
@@ -428,7 +448,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
             --numOperands;
             --numOperands;
             // Get names for printing "(XXX)" for readability, *after* this id
             // Get names for printing "(XXX)" for readability, *after* this id
             if (opCode == OpName)
             if (opCode == OpName)
-                idDescriptor[stream[word - 1]] = (const char*)(&stream[word]);
+                idDescriptor[stream[word - 1]] = decodeString().second;
             break;
             break;
         case OperandVariableIds:
         case OperandVariableIds:
             disassembleIds(numOperands);
             disassembleIds(numOperands);
@@ -486,6 +506,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
                     extInstSet = OpenCLExtInst;
                     extInstSet = OpenCLExtInst;
                 } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
                 } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
                     extInstSet = NonSemanticDebugPrintfExtInst;
                     extInstSet = NonSemanticDebugPrintfExtInst;
+                } else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) {
+                    extInstSet = NonSemanticShaderDebugInfo100;
                 } else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
                 } else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
                            strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
                            strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
                            strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
                            strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
@@ -494,7 +516,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
                 } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
                 } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
                           strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 ||
                           strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 ||
                           strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 ||
                           strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 ||
-                          strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || 
+                          strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 ||
                           strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 ||
                           strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 ||
                           strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) {
                           strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) {
                     extInstSet = GLSLextNVInst;
                     extInstSet = GLSLextNVInst;
@@ -511,6 +533,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
                     out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
                     out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
                 } else if (extInstSet == NonSemanticDebugPrintfExtInst) {
                 } else if (extInstSet == NonSemanticDebugPrintfExtInst) {
                     out << "(DebugPrintf)";
                     out << "(DebugPrintf)";
+                } else if (extInstSet == NonSemanticShaderDebugInfo100) {
+                    out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")";
                 }
                 }
             }
             }
             break;
             break;
@@ -734,6 +758,59 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
     return "Bad";
     return "Bad";
 }
 }
 
 
+static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint)
+{
+    switch (entrypoint) {
+        case NonSemanticShaderDebugInfo100DebugInfoNone:                        return "DebugInfoNone";
+        case NonSemanticShaderDebugInfo100DebugCompilationUnit:                 return "DebugCompilationUnit";
+        case NonSemanticShaderDebugInfo100DebugTypeBasic:                       return "DebugTypeBasic";
+        case NonSemanticShaderDebugInfo100DebugTypePointer:                     return "DebugTypePointer";
+        case NonSemanticShaderDebugInfo100DebugTypeQualifier:                   return "DebugTypeQualifier";
+        case NonSemanticShaderDebugInfo100DebugTypeArray:                       return "DebugTypeArray";
+        case NonSemanticShaderDebugInfo100DebugTypeVector:                      return "DebugTypeVector";
+        case NonSemanticShaderDebugInfo100DebugTypedef:                         return "DebugTypedef";
+        case NonSemanticShaderDebugInfo100DebugTypeFunction:                    return "DebugTypeFunction";
+        case NonSemanticShaderDebugInfo100DebugTypeEnum:                        return "DebugTypeEnum";
+        case NonSemanticShaderDebugInfo100DebugTypeComposite:                   return "DebugTypeComposite";
+        case NonSemanticShaderDebugInfo100DebugTypeMember:                      return "DebugTypeMember";
+        case NonSemanticShaderDebugInfo100DebugTypeInheritance:                 return "DebugTypeInheritance";
+        case NonSemanticShaderDebugInfo100DebugTypePtrToMember:                 return "DebugTypePtrToMember";
+        case NonSemanticShaderDebugInfo100DebugTypeTemplate:                    return "DebugTypeTemplate";
+        case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter:           return "DebugTypeTemplateParameter";
+        case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter:   return "DebugTypeTemplateTemplateParameter";
+        case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack:       return "DebugTypeTemplateParameterPack";
+        case NonSemanticShaderDebugInfo100DebugGlobalVariable:                  return "DebugGlobalVariable";
+        case NonSemanticShaderDebugInfo100DebugFunctionDeclaration:             return "DebugFunctionDeclaration";
+        case NonSemanticShaderDebugInfo100DebugFunction:                        return "DebugFunction";
+        case NonSemanticShaderDebugInfo100DebugLexicalBlock:                    return "DebugLexicalBlock";
+        case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator:       return "DebugLexicalBlockDiscriminator";
+        case NonSemanticShaderDebugInfo100DebugScope:                           return "DebugScope";
+        case NonSemanticShaderDebugInfo100DebugNoScope:                         return "DebugNoScope";
+        case NonSemanticShaderDebugInfo100DebugInlinedAt:                       return "DebugInlinedAt";
+        case NonSemanticShaderDebugInfo100DebugLocalVariable:                   return "DebugLocalVariable";
+        case NonSemanticShaderDebugInfo100DebugInlinedVariable:                 return "DebugInlinedVariable";
+        case NonSemanticShaderDebugInfo100DebugDeclare:                         return "DebugDeclare";
+        case NonSemanticShaderDebugInfo100DebugValue:                           return "DebugValue";
+        case NonSemanticShaderDebugInfo100DebugOperation:                       return "DebugOperation";
+        case NonSemanticShaderDebugInfo100DebugExpression:                      return "DebugExpression";
+        case NonSemanticShaderDebugInfo100DebugMacroDef:                        return "DebugMacroDef";
+        case NonSemanticShaderDebugInfo100DebugMacroUndef:                      return "DebugMacroUndef";
+        case NonSemanticShaderDebugInfo100DebugImportedEntity:                  return "DebugImportedEntity";
+        case NonSemanticShaderDebugInfo100DebugSource:                          return "DebugSource";
+        case NonSemanticShaderDebugInfo100DebugFunctionDefinition:              return "DebugFunctionDefinition";
+        case NonSemanticShaderDebugInfo100DebugSourceContinued:                 return "DebugSourceContinued";
+        case NonSemanticShaderDebugInfo100DebugLine:                            return "DebugLine";
+        case NonSemanticShaderDebugInfo100DebugNoLine:                          return "DebugNoLine";
+        case NonSemanticShaderDebugInfo100DebugBuildIdentifier:                 return "DebugBuildIdentifier";
+        case NonSemanticShaderDebugInfo100DebugStoragePath:                     return "DebugStoragePath";
+        case NonSemanticShaderDebugInfo100DebugEntryPoint:                      return "DebugEntryPoint";
+        case NonSemanticShaderDebugInfo100DebugTypeMatrix:                      return "DebugTypeMatrix";
+        default:                                                                return "Bad";
+    }
+
+    return "Bad";
+}
+
 void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
 void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
 {
 {
     SpirvStream SpirvStream(out, stream);
     SpirvStream SpirvStream(out, stream);

+ 1773 - 1372
src/libraries/glslang/SPIRV/doc.cpp

@@ -45,6 +45,7 @@
 #include <cstdio>
 #include <cstdio>
 #include <cstring>
 #include <cstring>
 #include <algorithm>
 #include <algorithm>
+#include <mutex>
 
 
 namespace spv {
 namespace spv {
     extern "C" {
     extern "C" {
@@ -53,6 +54,8 @@ namespace spv {
         #include "GLSL.ext.EXT.h"
         #include "GLSL.ext.EXT.h"
         #include "GLSL.ext.AMD.h"
         #include "GLSL.ext.AMD.h"
         #include "GLSL.ext.NV.h"
         #include "GLSL.ext.NV.h"
+        #include "GLSL.ext.ARM.h"
+        #include "GLSL.ext.QCOM.h"
     }
     }
 }
 }
 
 
@@ -97,6 +100,8 @@ const char* ExecutionModelString(int model)
     case 6:  return "Kernel";
     case 6:  return "Kernel";
     case ExecutionModelTaskNV: return "TaskNV";
     case ExecutionModelTaskNV: return "TaskNV";
     case ExecutionModelMeshNV: return "MeshNV";
     case ExecutionModelMeshNV: return "MeshNV";
+    case ExecutionModelTaskEXT: return "TaskEXT";
+    case ExecutionModelMeshEXT: return "MeshEXT";
 
 
     default: return "Bad";
     default: return "Bad";
 
 
@@ -173,28 +178,32 @@ const char* ExecutionModeString(int mode)
     case 31: return "ContractionOff";
     case 31: return "ContractionOff";
     case 32: return "Bad";
     case 32: return "Bad";
 
 
-    case ExecutionModeInitializer:              return "Initializer";
-    case ExecutionModeFinalizer:                return "Finalizer";
-    case ExecutionModeSubgroupSize:             return "SubgroupSize";
-    case ExecutionModeSubgroupsPerWorkgroup:    return "SubgroupsPerWorkgroup";
-    case ExecutionModeSubgroupsPerWorkgroupId:  return "SubgroupsPerWorkgroupId";
-    case ExecutionModeLocalSizeId:              return "LocalSizeId";
-    case ExecutionModeLocalSizeHintId:          return "LocalSizeHintId";
-
-    case ExecutionModePostDepthCoverage:        return "PostDepthCoverage";
-    case ExecutionModeDenormPreserve:           return "DenormPreserve";
-    case ExecutionModeDenormFlushToZero:        return "DenormFlushToZero";
-    case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve";
-    case ExecutionModeRoundingModeRTE:          return "RoundingModeRTE";
-    case ExecutionModeRoundingModeRTZ:          return "RoundingModeRTZ";
-    case ExecutionModeStencilRefReplacingEXT:   return "StencilRefReplacingEXT";
+    case ExecutionModeInitializer:                   return "Initializer";
+    case ExecutionModeFinalizer:                     return "Finalizer";
+    case ExecutionModeSubgroupSize:                  return "SubgroupSize";
+    case ExecutionModeSubgroupsPerWorkgroup:         return "SubgroupsPerWorkgroup";
+    case ExecutionModeSubgroupsPerWorkgroupId:       return "SubgroupsPerWorkgroupId";
+    case ExecutionModeLocalSizeId:                   return "LocalSizeId";
+    case ExecutionModeLocalSizeHintId:               return "LocalSizeHintId";
+
+    case ExecutionModePostDepthCoverage:             return "PostDepthCoverage";
+    case ExecutionModeDenormPreserve:                return "DenormPreserve";
+    case ExecutionModeDenormFlushToZero:             return "DenormFlushToZero";
+    case ExecutionModeSignedZeroInfNanPreserve:      return "SignedZeroInfNanPreserve";
+    case ExecutionModeRoundingModeRTE:               return "RoundingModeRTE";
+    case ExecutionModeRoundingModeRTZ:               return "RoundingModeRTZ";
+    case ExecutionModeEarlyAndLateFragmentTestsAMD:  return "EarlyAndLateFragmentTestsAMD";
+    case ExecutionModeStencilRefUnchangedFrontAMD:   return "StencilRefUnchangedFrontAMD";
+    case ExecutionModeStencilRefLessFrontAMD:        return "StencilRefLessFrontAMD";
+    case ExecutionModeStencilRefGreaterBackAMD:      return "StencilRefGreaterBackAMD";
+    case ExecutionModeStencilRefReplacingEXT:        return "StencilRefReplacingEXT";
     case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow";
     case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow";
 
 
-    case ExecutionModeOutputLinesNV:            return "OutputLinesNV";
-    case ExecutionModeOutputPrimitivesNV:       return "OutputPrimitivesNV";
-    case ExecutionModeOutputTrianglesNV:        return "OutputTrianglesNV";
-    case ExecutionModeDerivativeGroupQuadsNV:   return "DerivativeGroupQuadsNV";
-    case ExecutionModeDerivativeGroupLinearNV:  return "DerivativeGroupLinearNV";
+    case ExecutionModeOutputLinesNV:                 return "OutputLinesNV";
+    case ExecutionModeOutputPrimitivesNV:            return "OutputPrimitivesNV";
+    case ExecutionModeOutputTrianglesNV:             return "OutputTrianglesNV";
+    case ExecutionModeDerivativeGroupQuadsNV:        return "DerivativeGroupQuadsNV";
+    case ExecutionModeDerivativeGroupLinearNV:       return "DerivativeGroupLinearNV";
 
 
     case ExecutionModePixelInterlockOrderedEXT:         return "PixelInterlockOrderedEXT";
     case ExecutionModePixelInterlockOrderedEXT:         return "PixelInterlockOrderedEXT";
     case ExecutionModePixelInterlockUnorderedEXT:       return "PixelInterlockUnorderedEXT";
     case ExecutionModePixelInterlockUnorderedEXT:       return "PixelInterlockUnorderedEXT";
@@ -208,6 +217,10 @@ const char* ExecutionModeString(int mode)
     case ExecutionModeNoGlobalOffsetINTEL:      return "NoGlobalOffsetINTEL";
     case ExecutionModeNoGlobalOffsetINTEL:      return "NoGlobalOffsetINTEL";
     case ExecutionModeNumSIMDWorkitemsINTEL:    return "NumSIMDWorkitemsINTEL";
     case ExecutionModeNumSIMDWorkitemsINTEL:    return "NumSIMDWorkitemsINTEL";
 
 
+    case ExecutionModeNonCoherentColorAttachmentReadEXT:        return "NonCoherentColorAttachmentReadEXT";
+    case ExecutionModeNonCoherentDepthAttachmentReadEXT:        return "NonCoherentDepthAttachmentReadEXT";
+    case ExecutionModeNonCoherentStencilAttachmentReadEXT:      return "NonCoherentStencilAttachmentReadEXT";
+
     case ExecutionModeCeiling:
     case ExecutionModeCeiling:
     default: return "Bad";
     default: return "Bad";
     }
     }
@@ -238,7 +251,9 @@ const char* StorageClassString(int StorageClass)
     case StorageClassIncomingCallableDataKHR:  return "IncomingCallableDataKHR";
     case StorageClassIncomingCallableDataKHR:  return "IncomingCallableDataKHR";
 
 
     case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
     case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
-
+    case StorageClassTaskPayloadWorkgroupEXT:  return "TaskPayloadWorkgroupEXT";
+    case StorageClassHitObjectAttributeNV:     return "HitObjectAttributeNV";
+    case StorageClassTileImageEXT:             return "TileImageEXT";
     default: return "Bad";
     default: return "Bad";
     }
     }
 }
 }
@@ -297,7 +312,9 @@ const char* DecorationString(int decoration)
     case DecorationCeiling:
     case DecorationCeiling:
     default:  return "Bad";
     default:  return "Bad";
 
 
-    case DecorationExplicitInterpAMD: return "ExplicitInterpAMD";
+    case DecorationWeightTextureQCOM:           return "DecorationWeightTextureQCOM";
+    case DecorationBlockMatchTextureQCOM:       return "DecorationBlockMatchTextureQCOM";
+    case DecorationExplicitInterpAMD:           return "ExplicitInterpAMD";
     case DecorationOverrideCoverageNV:          return "OverrideCoverageNV";
     case DecorationOverrideCoverageNV:          return "OverrideCoverageNV";
     case DecorationPassthroughNV:               return "PassthroughNV";
     case DecorationPassthroughNV:               return "PassthroughNV";
     case DecorationViewportRelativeNV:          return "ViewportRelativeNV";
     case DecorationViewportRelativeNV:          return "ViewportRelativeNV";
@@ -305,13 +322,16 @@ const char* DecorationString(int decoration)
     case DecorationPerPrimitiveNV:              return "PerPrimitiveNV";
     case DecorationPerPrimitiveNV:              return "PerPrimitiveNV";
     case DecorationPerViewNV:                   return "PerViewNV";
     case DecorationPerViewNV:                   return "PerViewNV";
     case DecorationPerTaskNV:                   return "PerTaskNV";
     case DecorationPerTaskNV:                   return "PerTaskNV";
-    case DecorationPerVertexNV:                 return "PerVertexNV";
+
+    case DecorationPerVertexKHR:                return "PerVertexKHR";
 
 
     case DecorationNonUniformEXT:           return "DecorationNonUniformEXT";
     case DecorationNonUniformEXT:           return "DecorationNonUniformEXT";
     case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
     case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
     case DecorationHlslSemanticGOOGLE:      return "DecorationHlslSemanticGOOGLE";
     case DecorationHlslSemanticGOOGLE:      return "DecorationHlslSemanticGOOGLE";
     case DecorationRestrictPointerEXT:      return "DecorationRestrictPointerEXT";
     case DecorationRestrictPointerEXT:      return "DecorationRestrictPointerEXT";
     case DecorationAliasedPointerEXT:       return "DecorationAliasedPointerEXT";
     case DecorationAliasedPointerEXT:       return "DecorationAliasedPointerEXT";
+
+    case DecorationHitObjectShaderRecordBufferNV:  return "DecorationHitObjectShaderRecordBufferNV";
     }
     }
 }
 }
 
 
@@ -392,6 +412,12 @@ const char* BuiltInString(int builtIn)
     case BuiltInObjectRayDirectionKHR:       return "ObjectRayDirectionKHR";
     case BuiltInObjectRayDirectionKHR:       return "ObjectRayDirectionKHR";
     case BuiltInRayTminKHR:                  return "RayTminKHR";
     case BuiltInRayTminKHR:                  return "RayTminKHR";
     case BuiltInRayTmaxKHR:                  return "RayTmaxKHR";
     case BuiltInRayTmaxKHR:                  return "RayTmaxKHR";
+    case BuiltInCullMaskKHR:                 return "CullMaskKHR";
+    case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR";
+    case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV";
+    case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV";
+    case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV";
+    case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV";
     case BuiltInInstanceCustomIndexKHR:      return "InstanceCustomIndexKHR";
     case BuiltInInstanceCustomIndexKHR:      return "InstanceCustomIndexKHR";
     case BuiltInRayGeometryIndexKHR:         return "RayGeometryIndexKHR";
     case BuiltInRayGeometryIndexKHR:         return "RayGeometryIndexKHR";
     case BuiltInObjectToWorldKHR:            return "ObjectToWorldKHR";
     case BuiltInObjectToWorldKHR:            return "ObjectToWorldKHR";
@@ -406,8 +432,8 @@ const char* BuiltInString(int builtIn)
     case BuiltInViewportMaskPerViewNV:       return "ViewportMaskPerViewNV";
     case BuiltInViewportMaskPerViewNV:       return "ViewportMaskPerViewNV";
 //    case BuiltInFragmentSizeNV:             return "FragmentSizeNV";        // superseded by BuiltInFragSizeEXT
 //    case BuiltInFragmentSizeNV:             return "FragmentSizeNV";        // superseded by BuiltInFragSizeEXT
 //    case BuiltInInvocationsPerPixelNV:      return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
 //    case BuiltInInvocationsPerPixelNV:      return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
-    case BuiltInBaryCoordNV:                 return "BaryCoordNV";
-    case BuiltInBaryCoordNoPerspNV:          return "BaryCoordNoPerspNV";
+    case BuiltInBaryCoordKHR:                return "BaryCoordKHR";
+    case BuiltInBaryCoordNoPerspKHR:         return "BaryCoordNoPerspKHR";
 
 
     case BuiltInFragSizeEXT:                 return "FragSizeEXT";
     case BuiltInFragSizeEXT:                 return "FragSizeEXT";
     case BuiltInFragInvocationCountEXT:      return "FragInvocationCountEXT";
     case BuiltInFragInvocationCountEXT:      return "FragInvocationCountEXT";
@@ -427,6 +453,15 @@ const char* BuiltInString(int builtIn)
     case BuiltInWarpIDNV:               return "WarpIDNV";
     case BuiltInWarpIDNV:               return "WarpIDNV";
     case BuiltInSMIDNV:                 return "SMIDNV";
     case BuiltInSMIDNV:                 return "SMIDNV";
     case BuiltInCurrentRayTimeNV:       return "CurrentRayTimeNV";
     case BuiltInCurrentRayTimeNV:       return "CurrentRayTimeNV";
+    case BuiltInPrimitivePointIndicesEXT:        return "PrimitivePointIndicesEXT";
+    case BuiltInPrimitiveLineIndicesEXT:         return "PrimitiveLineIndicesEXT";
+    case BuiltInPrimitiveTriangleIndicesEXT:     return "PrimitiveTriangleIndicesEXT";
+    case BuiltInCullPrimitiveEXT:                return "CullPrimitiveEXT";
+    case BuiltInCoreCountARM:           return "CoreCountARM";
+    case BuiltInCoreIDARM:              return "CoreIDARM";
+    case BuiltInCoreMaxIDARM:           return "CoreMaxIDARM";
+    case BuiltInWarpIDARM:              return "WarpIDARM";
+    case BuiltInWarpMaxIDARM:           return "BuiltInWarpMaxIDARM";
 
 
     default: return "Bad";
     default: return "Bad";
     }
     }
@@ -442,6 +477,7 @@ const char* DimensionString(int dim)
     case 4:  return "Rect";
     case 4:  return "Rect";
     case 5:  return "Buffer";
     case 5:  return "Buffer";
     case 6:  return "SubpassData";
     case 6:  return "SubpassData";
+    case DimTileImageDataEXT:  return "TileImageDataEXT";
 
 
     default: return "Bad";
     default: return "Bad";
     }
     }
@@ -556,7 +592,7 @@ const char* ImageChannelOrderString(int format)
     case 17: return "sRGBA";
     case 17: return "sRGBA";
     case 18: return "sBGRA";
     case 18: return "sBGRA";
 
 
-    default: 
+    default:
         return "Bad";
         return "Bad";
     }
     }
 }
 }
@@ -761,6 +797,21 @@ const char* MemoryAccessString(int mem)
     }
     }
 }
 }
 
 
+const int CooperativeMatrixOperandsCeiling = 6;
+
+const char* CooperativeMatrixOperandsString(int op)
+{
+    switch (op) {
+    case CooperativeMatrixOperandsMatrixASignedComponentsKHRShift:  return "ASignedComponentsKHR";
+    case CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift:  return "BSignedComponentsKHR";
+    case CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift:  return "CSignedComponentsKHR";
+    case CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift:  return "ResultSignedComponentsKHR";
+    case CooperativeMatrixOperandsSaturatingAccumulationKHRShift:   return "SaturatingAccumulationKHR";
+
+    default: return "Bad";
+    }
+}
+
 const char* ScopeString(int mem)
 const char* ScopeString(int mem)
 {
 {
     switch (mem) {
     switch (mem) {
@@ -842,7 +893,7 @@ const char* CapabilityString(int info)
     case 22: return "Int16";
     case 22: return "Int16";
     case 23: return "TessellationPointSize";
     case 23: return "TessellationPointSize";
     case 24: return "GeometryPointSize";
     case 24: return "GeometryPointSize";
-    case 25: return "ImageGatherExtended"; 
+    case 25: return "ImageGatherExtended";
     case 26: return "Bad";
     case 26: return "Bad";
     case 27: return "StorageImageMultisample";
     case 27: return "StorageImageMultisample";
     case 28: return "UniformBufferArrayDynamicIndexing";
     case 28: return "UniformBufferArrayDynamicIndexing";
@@ -925,14 +976,20 @@ const char* CapabilityString(int info)
     case CapabilityRayTracingNV:                    return "RayTracingNV";
     case CapabilityRayTracingNV:                    return "RayTracingNV";
     case CapabilityRayTracingMotionBlurNV:          return "RayTracingMotionBlurNV";
     case CapabilityRayTracingMotionBlurNV:          return "RayTracingMotionBlurNV";
     case CapabilityRayTracingKHR:                   return "RayTracingKHR";
     case CapabilityRayTracingKHR:                   return "RayTracingKHR";
+    case CapabilityRayCullMaskKHR:                  return "RayCullMaskKHR";
     case CapabilityRayQueryKHR:                     return "RayQueryKHR";
     case CapabilityRayQueryKHR:                     return "RayQueryKHR";
     case CapabilityRayTracingProvisionalKHR:        return "RayTracingProvisionalKHR";
     case CapabilityRayTracingProvisionalKHR:        return "RayTracingProvisionalKHR";
     case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
     case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
+    case CapabilityRayTracingPositionFetchKHR:      return "RayTracingPositionFetchKHR";
+    case CapabilityDisplacementMicromapNV:           return "DisplacementMicromapNV";
+    case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV";
+    case CapabilityRayQueryPositionFetchKHR:        return "RayQueryPositionFetchKHR";
     case CapabilityComputeDerivativeGroupQuadsNV:   return "ComputeDerivativeGroupQuadsNV";
     case CapabilityComputeDerivativeGroupQuadsNV:   return "ComputeDerivativeGroupQuadsNV";
     case CapabilityComputeDerivativeGroupLinearNV:  return "ComputeDerivativeGroupLinearNV";
     case CapabilityComputeDerivativeGroupLinearNV:  return "ComputeDerivativeGroupLinearNV";
-    case CapabilityFragmentBarycentricNV:           return "FragmentBarycentricNV";
+    case CapabilityFragmentBarycentricKHR:          return "FragmentBarycentricKHR";
     case CapabilityMeshShadingNV:                   return "MeshShadingNV";
     case CapabilityMeshShadingNV:                   return "MeshShadingNV";
     case CapabilityImageFootprintNV:                return "ImageFootprintNV";
     case CapabilityImageFootprintNV:                return "ImageFootprintNV";
+    case CapabilityMeshShadingEXT:                  return "MeshShadingEXT";
 //    case CapabilityShadingRateNV:                   return "ShadingRateNV";  // superseded by FragmentDensityEXT
 //    case CapabilityShadingRateNV:                   return "ShadingRateNV";  // superseded by FragmentDensityEXT
     case CapabilitySampleMaskOverrideCoverageNV:    return "SampleMaskOverrideCoverageNV";
     case CapabilitySampleMaskOverrideCoverageNV:    return "SampleMaskOverrideCoverageNV";
     case CapabilityFragmentDensityEXT:              return "FragmentDensityEXT";
     case CapabilityFragmentDensityEXT:              return "FragmentDensityEXT";
@@ -960,12 +1017,17 @@ const char* CapabilityString(int info)
     case CapabilityVariablePointers:                    return "VariablePointers";
     case CapabilityVariablePointers:                    return "VariablePointers";
 
 
     case CapabilityCooperativeMatrixNV:     return "CooperativeMatrixNV";
     case CapabilityCooperativeMatrixNV:     return "CooperativeMatrixNV";
+    case CapabilityCooperativeMatrixKHR:    return "CooperativeMatrixKHR";
     case CapabilityShaderSMBuiltinsNV:      return "ShaderSMBuiltinsNV";
     case CapabilityShaderSMBuiltinsNV:      return "ShaderSMBuiltinsNV";
 
 
     case CapabilityFragmentShaderSampleInterlockEXT:        return "CapabilityFragmentShaderSampleInterlockEXT";
     case CapabilityFragmentShaderSampleInterlockEXT:        return "CapabilityFragmentShaderSampleInterlockEXT";
     case CapabilityFragmentShaderPixelInterlockEXT:         return "CapabilityFragmentShaderPixelInterlockEXT";
     case CapabilityFragmentShaderPixelInterlockEXT:         return "CapabilityFragmentShaderPixelInterlockEXT";
     case CapabilityFragmentShaderShadingRateInterlockEXT:   return "CapabilityFragmentShaderShadingRateInterlockEXT";
     case CapabilityFragmentShaderShadingRateInterlockEXT:   return "CapabilityFragmentShaderShadingRateInterlockEXT";
 
 
+    case CapabilityTileImageColorReadAccessEXT:           return "TileImageColorReadAccessEXT";
+    case CapabilityTileImageDepthReadAccessEXT:           return "TileImageDepthReadAccessEXT";
+    case CapabilityTileImageStencilReadAccessEXT:         return "TileImageStencilReadAccessEXT";
+
     case CapabilityFragmentShadingRateKHR:                  return "FragmentShadingRateKHR";
     case CapabilityFragmentShadingRateKHR:                  return "FragmentShadingRateKHR";
 
 
     case CapabilityDemoteToHelperInvocationEXT:             return "DemoteToHelperInvocationEXT";
     case CapabilityDemoteToHelperInvocationEXT:             return "DemoteToHelperInvocationEXT";
@@ -984,6 +1046,13 @@ const char* CapabilityString(int info)
     case CapabilityWorkgroupMemoryExplicitLayoutKHR:            return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
     case CapabilityWorkgroupMemoryExplicitLayoutKHR:            return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
     case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR:  return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
     case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR:  return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
     case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
     case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
+    case CapabilityCoreBuiltinsARM:                             return "CoreBuiltinsARM";
+
+    case CapabilityShaderInvocationReorderNV:                return "ShaderInvocationReorderNV";
+
+    case CapabilityTextureSampleWeightedQCOM:           return "TextureSampleWeightedQCOM";
+    case CapabilityTextureBoxFilterQCOM:                return "TextureBoxFilterQCOM";
+    case CapabilityTextureBlockMatchQCOM:               return "TextureBlockMatchQCOM";
 
 
     default: return "Bad";
     default: return "Bad";
     }
     }
@@ -1400,6 +1469,8 @@ const char* OpcodeString(int op)
     case OpGroupNonUniformPartitionNV:       return "OpGroupNonUniformPartitionNV";
     case OpGroupNonUniformPartitionNV:       return "OpGroupNonUniformPartitionNV";
     case OpImageSampleFootprintNV:           return "OpImageSampleFootprintNV";
     case OpImageSampleFootprintNV:           return "OpImageSampleFootprintNV";
     case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
     case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
+    case OpEmitMeshTasksEXT:                 return "OpEmitMeshTasksEXT";
+    case OpSetMeshOutputsEXT:                return "OpSetMeshOutputsEXT";
 
 
     case OpTypeRayQueryKHR:                                                   return "OpTypeRayQueryKHR";
     case OpTypeRayQueryKHR:                                                   return "OpTypeRayQueryKHR";
     case OpRayQueryInitializeKHR:                                             return "OpRayQueryInitializeKHR";
     case OpRayQueryInitializeKHR:                                             return "OpRayQueryInitializeKHR";
@@ -1425,18 +1496,70 @@ const char* OpcodeString(int op)
     case OpRayQueryGetWorldRayOriginKHR:                                      return "OpRayQueryGetWorldRayOriginKHR";
     case OpRayQueryGetWorldRayOriginKHR:                                      return "OpRayQueryGetWorldRayOriginKHR";
     case OpRayQueryGetIntersectionObjectToWorldKHR:                           return "OpRayQueryGetIntersectionObjectToWorldKHR";
     case OpRayQueryGetIntersectionObjectToWorldKHR:                           return "OpRayQueryGetIntersectionObjectToWorldKHR";
     case OpRayQueryGetIntersectionWorldToObjectKHR:                           return "OpRayQueryGetIntersectionWorldToObjectKHR";
     case OpRayQueryGetIntersectionWorldToObjectKHR:                           return "OpRayQueryGetIntersectionWorldToObjectKHR";
+    case OpRayQueryGetIntersectionTriangleVertexPositionsKHR:                 return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR";
 
 
     case OpTypeCooperativeMatrixNV:         return "OpTypeCooperativeMatrixNV";
     case OpTypeCooperativeMatrixNV:         return "OpTypeCooperativeMatrixNV";
     case OpCooperativeMatrixLoadNV:         return "OpCooperativeMatrixLoadNV";
     case OpCooperativeMatrixLoadNV:         return "OpCooperativeMatrixLoadNV";
     case OpCooperativeMatrixStoreNV:        return "OpCooperativeMatrixStoreNV";
     case OpCooperativeMatrixStoreNV:        return "OpCooperativeMatrixStoreNV";
     case OpCooperativeMatrixMulAddNV:       return "OpCooperativeMatrixMulAddNV";
     case OpCooperativeMatrixMulAddNV:       return "OpCooperativeMatrixMulAddNV";
     case OpCooperativeMatrixLengthNV:       return "OpCooperativeMatrixLengthNV";
     case OpCooperativeMatrixLengthNV:       return "OpCooperativeMatrixLengthNV";
+    case OpTypeCooperativeMatrixKHR:        return "OpTypeCooperativeMatrixKHR";
+    case OpCooperativeMatrixLoadKHR:        return "OpCooperativeMatrixLoadKHR";
+    case OpCooperativeMatrixStoreKHR:       return "OpCooperativeMatrixStoreKHR";
+    case OpCooperativeMatrixMulAddKHR:      return "OpCooperativeMatrixMulAddKHR";
+    case OpCooperativeMatrixLengthKHR:      return "OpCooperativeMatrixLengthKHR";
     case OpDemoteToHelperInvocationEXT:     return "OpDemoteToHelperInvocationEXT";
     case OpDemoteToHelperInvocationEXT:     return "OpDemoteToHelperInvocationEXT";
     case OpIsHelperInvocationEXT:           return "OpIsHelperInvocationEXT";
     case OpIsHelperInvocationEXT:           return "OpIsHelperInvocationEXT";
 
 
     case OpBeginInvocationInterlockEXT:     return "OpBeginInvocationInterlockEXT";
     case OpBeginInvocationInterlockEXT:     return "OpBeginInvocationInterlockEXT";
     case OpEndInvocationInterlockEXT:       return "OpEndInvocationInterlockEXT";
     case OpEndInvocationInterlockEXT:       return "OpEndInvocationInterlockEXT";
 
 
+    case OpTypeHitObjectNV:                     return "OpTypeHitObjectNV";
+    case OpHitObjectTraceRayNV:                 return "OpHitObjectTraceRayNV";
+    case OpHitObjectTraceRayMotionNV:           return "OpHitObjectTraceRayMotionNV";
+    case OpHitObjectRecordHitNV:                return "OpHitObjectRecordHitNV";
+    case OpHitObjectRecordHitMotionNV:          return "OpHitObjectRecordHitMotionNV";
+    case OpHitObjectRecordHitWithIndexNV:       return "OpHitObjectRecordHitWithIndexNV";
+    case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV";
+    case OpHitObjectRecordMissNV:               return "OpHitObjectRecordMissNV";
+    case OpHitObjectRecordMissMotionNV:         return "OpHitObjectRecordMissMotionNV";
+    case OpHitObjectRecordEmptyNV:              return "OpHitObjectRecordEmptyNV";
+    case OpHitObjectExecuteShaderNV:            return "OpHitObjectExecuteShaderNV";
+    case OpReorderThreadWithHintNV:             return "OpReorderThreadWithHintNV";
+    case OpReorderThreadWithHitObjectNV:        return "OpReorderThreadWithHitObjectNV";
+    case OpHitObjectGetCurrentTimeNV:           return "OpHitObjectGetCurrentTimeNV";
+    case OpHitObjectGetAttributesNV:            return "OpHitObjectGetAttributesNV";
+    case OpHitObjectGetHitKindNV:               return "OpHitObjectGetFrontFaceNV";
+    case OpHitObjectGetPrimitiveIndexNV:        return "OpHitObjectGetPrimitiveIndexNV";
+    case OpHitObjectGetGeometryIndexNV:         return "OpHitObjectGetGeometryIndexNV";
+    case OpHitObjectGetInstanceIdNV:            return "OpHitObjectGetInstanceIdNV";
+    case OpHitObjectGetInstanceCustomIndexNV:   return "OpHitObjectGetInstanceCustomIndexNV";
+    case OpHitObjectGetObjectRayDirectionNV:    return "OpHitObjectGetObjectRayDirectionNV";
+    case OpHitObjectGetObjectRayOriginNV:       return "OpHitObjectGetObjectRayOriginNV";
+    case OpHitObjectGetWorldRayDirectionNV:     return "OpHitObjectGetWorldRayDirectionNV";
+    case OpHitObjectGetWorldRayOriginNV:        return "OpHitObjectGetWorldRayOriginNV";
+    case OpHitObjectGetWorldToObjectNV:         return "OpHitObjectGetWorldToObjectNV";
+    case OpHitObjectGetObjectToWorldNV:         return "OpHitObjectGetObjectToWorldNV";
+    case OpHitObjectGetRayTMaxNV:               return "OpHitObjectGetRayTMaxNV";
+    case OpHitObjectGetRayTMinNV:               return "OpHitObjectGetRayTMinNV";
+    case OpHitObjectIsEmptyNV:                  return "OpHitObjectIsEmptyNV";
+    case OpHitObjectIsHitNV:                    return "OpHitObjectIsHitNV";
+    case OpHitObjectIsMissNV:                   return "OpHitObjectIsMissNV";
+    case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
+    case OpHitObjectGetShaderRecordBufferHandleNV:   return "OpHitObjectGetShaderRecordBufferHandleNV";
+
+    case OpFetchMicroTriangleVertexBarycentricNV:       return "OpFetchMicroTriangleVertexBarycentricNV";
+    case OpFetchMicroTriangleVertexPositionNV:    return "OpFetchMicroTriangleVertexPositionNV";
+
+    case OpColorAttachmentReadEXT:          return "OpColorAttachmentReadEXT";
+    case OpDepthAttachmentReadEXT:          return "OpDepthAttachmentReadEXT";
+    case OpStencilAttachmentReadEXT:        return "OpStencilAttachmentReadEXT";
+
+    case OpImageSampleWeightedQCOM:         return "OpImageSampleWeightedQCOM";
+    case OpImageBoxFilterQCOM:              return "OpImageBoxFilterQCOM";
+    case OpImageBlockMatchSADQCOM:          return "OpImageBlockMatchSADQCOM";
+    case OpImageBlockMatchSSDQCOM:          return "OpImageBlockMatchSSDQCOM";
+
     default:
     default:
         return "Bad";
         return "Bad";
     }
     }
@@ -1456,1553 +1579,1831 @@ EnumParameters LoopControlParams[FunctionControlCeiling];
 EnumParameters SelectionControlParams[SelectControlCeiling];
 EnumParameters SelectionControlParams[SelectControlCeiling];
 EnumParameters FunctionControlParams[FunctionControlCeiling];
 EnumParameters FunctionControlParams[FunctionControlCeiling];
 EnumParameters MemoryAccessParams[MemoryAccessCeiling];
 EnumParameters MemoryAccessParams[MemoryAccessCeiling];
+EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling];
 
 
 // Set up all the parameterizing descriptions of the opcodes, operands, etc.
 // Set up all the parameterizing descriptions of the opcodes, operands, etc.
 void Parameterize()
 void Parameterize()
 {
 {
     // only do this once.
     // 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[OpExecutionModeId].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[OpDecorateId].setResultAndType(false, false);
-    InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false);
-    InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
-    InstructionDesc[OpMemberDecorateStringGOOGLE].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[OpTerminateInvocation].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);
-    InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
-    InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
-    InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
-    InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
-    InstructionDesc[OpEndInvocationInterlockEXT].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(0, SourceString, 0);
-    OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr);
-    OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr);
-    OperandClassParams[OperandMemory].set(0, MemoryString, nullptr);
-    OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams);
-    OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands);
-    OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr);
-    OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr);
-    OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr);
-    OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr);
-    OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr);
-    OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr);
-    OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr);
-    OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
-    OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true);
-    OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr);
-    OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr);
-    OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr);
-    OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr);
-    OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams);
-    OperandClassParams[OperandDecoration].setOperands(DecorationOperands);
-    OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr);
-    OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true);
-    OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true);
-    OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
-    OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true);
-    OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
-    OperandClassParams[OperandScope].set(0, ScopeString, nullptr);
-    OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr);
-    OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
-    OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
-    OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
-    OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0);
-
-    // 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'");
+    static std::once_flag initialized;
+    std::call_once(initialized, [](){
+
+        // 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[OpExecutionModeId].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[OpDecorateId].setResultAndType(false, false);
+        InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false);
+        InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
+        InstructionDesc[OpMemberDecorateStringGOOGLE].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[OpTerminateInvocation].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);
+        InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
+        InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
+        InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
+        InstructionDesc[OpTypeCooperativeMatrixKHR].setResultAndType(true, false);
+        InstructionDesc[OpCooperativeMatrixStoreKHR].setResultAndType(false, false);
+        InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
+        InstructionDesc[OpEndInvocationInterlockEXT].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(0, SourceString, nullptr);
+        OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr);
+        OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr);
+        OperandClassParams[OperandMemory].set(0, MemoryString, nullptr);
+        OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams);
+        OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands);
+        OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr);
+        OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr);
+        OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr);
+        OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr);
+        OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr);
+        OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr);
+        OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr);
+        OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
+        OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true);
+        OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr);
+        OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr);
+        OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr);
+        OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr);
+        OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams);
+        OperandClassParams[OperandDecoration].setOperands(DecorationOperands);
+        OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr);
+        OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true);
+        OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true);
+        OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
+        OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true);
+        OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
+        OperandClassParams[OperandScope].set(0, ScopeString, nullptr);
+        OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr);
+        OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
+        OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
+        OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
+        OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true);
+        OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr);
+
+        // 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[OpExecutionModeId].operands.push(OperandId, "'Entry Point'");
+        InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'");
+        InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "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].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].operands.push(OperandId, "'Element Type'");
+
+        InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
+
+        InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
+
+        InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
+        InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
+
+        InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'");
+        InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, "");
+
+        InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
+
+        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[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[OpExecutionModeId].operands.push(OperandId, "'Entry Point'");
-    InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'");
-    InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "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[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
+        InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
+        InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
 
 
-    InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'");
-    InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'");
+        InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
 
 
-    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[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
 
 
-    InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'");
+        InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
+        InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
 
 
-    InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'");
-    InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'");
+        InstructionDesc[OpVariable].operands.push(OperandStorage, "");
+        InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true);
 
 
-    InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'");
+        InstructionDesc[OpFunction].operands.push(OperandFunction, "");
+        InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
 
 
-    InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
+        InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'");
+        InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n...");
 
 
-    InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
+        InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'");
+        InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
+        InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
 
 
-    InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
-    InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
+        InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
+        InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpLoad].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'");
-    InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, "");
+        InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
+        InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true);
+        InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpStore].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
+        InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
 
 
-    InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'");
-    InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n...");
+        InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
+        InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
+        InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
 
 
-    InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'");
+        InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'");
+        InstructionDesc[OpDecorateId].operands.push(OperandDecoration, "");
+        InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <<Decoration,'Decoration'>>.");
 
 
-    InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
+        InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
+        InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
+        InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
 
 
-    InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
-    InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
-    InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
+        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[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
+        InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
+        InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
+        InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
+        InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
 
 
-    InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
+        InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
+        InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
 
 
-    InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
-    InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
+        InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
+        InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
 
 
-    InstructionDesc[OpVariable].operands.push(OperandStorage, "");
-    InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true);
+        InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
 
 
-    InstructionDesc[OpFunction].operands.push(OperandFunction, "");
-    InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
+        InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'");
+        InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'");
 
 
-    InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'");
-    InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n...");
+        InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'");
+        InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'");
+        InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'");
 
 
-    InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'");
-    InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
-    InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
+        InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'");
 
 
-    InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
-    InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
-    InstructionDesc[OpLoad].operands.push(OperandId, "", true);
+        InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'");
+        InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'");
 
 
-    InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
-    InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true);
-    InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true);
-    InstructionDesc[OpStore].operands.push(OperandId, "", true);
+        InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'");
+        InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'");
+        InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'");
 
 
-    InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
+        InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
-    InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
-    InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
+        InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
+        InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
+        InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true);
 
 
-    InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'");
-    InstructionDesc[OpDecorateId].operands.push(OperandDecoration, "");
-    InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <<Decoration,'Decoration'>>.");
+        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[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[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[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[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[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[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[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[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[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[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[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[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[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
-    InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
-    InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
+        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[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[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[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
-    InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
-    InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
-    InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
+        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[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
-    InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
+        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[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
-    InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
+        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[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
-    InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
+        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[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'");
-    InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'");
-    InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'");
+        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[OpVectorShuffle].operands.push(OperandId, "'Vector 1'");
-    InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'");
-    InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'");
+        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[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'");
+        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[OpCompositeExtract].operands.push(OperandId, "'Composite'");
-    InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'");
+        InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'");
 
 
-    InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'");
-    InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'");
-    InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'");
+        InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
 
 
-    InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
 
 
-    InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
-    InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
-    InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true);
+        InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
 
 
-    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[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[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[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[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[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[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[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[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[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[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[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[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[OpImageQueryLevels].operands.push(OperandId, "'Image'");
 
 
-    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[OpImageQuerySamples].operands.push(OperandId, "'Image'");
 
 
-    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[OpImageQueryFormat].operands.push(OperandId, "'Image'");
 
 
-    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[OpImageQueryOrder].operands.push(OperandId, "'Image'");
 
 
-    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[OpAccessChain].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
 
 
-    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[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
 
 
-    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[OpPtrAccessChain].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
+        InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
 
 
-    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[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'");
+        InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
 
 
-    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[OpSNegate].operands.push(OperandId, "'Operand'");
 
 
-    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[OpFNegate].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'");
+        InstructionDesc[OpNot].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
-    InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
+        InstructionDesc[OpAny].operands.push(OperandId, "'Vector'");
 
 
-    InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpAll].operands.push(OperandId, "'Vector'");
 
 
-    InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
-    InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
+        InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'");
 
 
-    InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'");
 
 
-    InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
 
 
-    InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
 
 
-    InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
 
 
-    InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+        InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
 
 
-    InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+        InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
 
 
-    InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
-    InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+        InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
 
 
-    InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'");
-    InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+        InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
 
 
-    InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
 
 
-    InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
 
 
-    InstructionDesc[OpNot].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
 
 
-    InstructionDesc[OpAny].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
 
 
-    InstructionDesc[OpAll].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
 
 
-    InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'");
+        InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
 
 
-    InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'");
+        InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
+        InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
 
 
-    InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
+        InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
 
 
-    InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
+        InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
+        InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
 
 
-    InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
+        InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
 
 
-    InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
+        InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
 
 
-    InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
+        InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
 
 
-    InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
 
 
-    InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
+        InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
+        InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
 
 
-    InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
+        InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
 
 
-    InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
+        InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
 
 
-    InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
+        InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
+        InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
 
 
-    InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
+        InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
+        InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
+        InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
+        InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
+        InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
+        InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
-    InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
+        InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
-    InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
+        InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
-    InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
+        InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
-    InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
+        InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
 
 
-    InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
+        InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
 
 
-    InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
 
 
-    InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
+        InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
 
 
-    InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
+        InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
 
 
-    InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
+        InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
 
 
-    InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
+        InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
 
 
-    InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
 
 
-    InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
 
 
-    InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
 
 
-    InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
-    InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
+        InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
-    InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
+        InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
-    InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
+        InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
-    InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
+        InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
-    InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
+        InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
 
 
-    InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
-    InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
+        InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
-    InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
+        InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'");
+        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[OpUMulExtended].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
+        InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
 
 
-    InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
+        InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
 
 
-    InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
+        InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
 
 
-    InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
+        InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
 
 
-    InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
+        InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
+        InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
+        InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
 
 
-    InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
+        InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'");
 
 
-    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[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
-    InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
-    
-    InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
-    InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
-    InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
-    
-    InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
+        InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
-    InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
-    InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
+        InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+        InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
 
 
-    InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
 
 
-    InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
 
 
-    InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
 
 
-    InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
-    InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+        InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
+        InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
 
 
-    InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
+        InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
+        InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
 
 
-    InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
+        InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
+        InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
 
 
-    InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
+        InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
 
 
-    InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
+        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[OpDPdyFine].operands.push(OperandId, "'P'");
+        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[OpFwidthFine].operands.push(OperandId, "'P'");
+        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[OpDPdxCoarse].operands.push(OperandId, "'P'");
+        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[OpDPdyCoarse].operands.push(OperandId, "'P'");
+        InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
 
 
-    InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
+        InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
 
 
-    InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
+        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[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
+        InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+        InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'");
 
 
-    InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
-    InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
+        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[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
-    InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
+        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[OpImageTexelPointer].operands.push(OperandId, "'Image'");
-    InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
-    InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
+        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[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
+        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[OpAtomicStore].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'");
-    InstructionDesc[OpAtomicStore].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[OpAtomicExchange].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'");
-    InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+        InstructionDesc[OpAtomicFMinEXT].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[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+        InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'");
 
 
-    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[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[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'");
+
+        InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
+        InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'");
+        InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
+        InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, "");
+
+        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[OpReturnValue].operands.push(OperandId, "'Value'");
+
+        InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
+
+        InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
+
+        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].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'");
+        InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'");
+
+        InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
+
+        InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
+
+        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].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].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].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].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].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].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].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].operands.push(OperandId, "'Reserve Id'");
+
+        InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
+        InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'");
+        InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+        InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
+        InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'");
+        InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+        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].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].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].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].operands.push(OperandId, "'GlobalWorkSize'");
+        InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
+        InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
+
+        InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
+        InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
+        InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
+
+        InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
+        InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
+
+        InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
+
+        InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
+
+        InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
+
+        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].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].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].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].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].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'");
+
+        InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'");
+
+        InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID");
+
+        InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit");
+
+        InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'");
+
+        InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask");
+
+        InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset");
+
+        InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset");
+
+        InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
+        InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
+        InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    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[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'");
-    InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    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[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true);
+
+        InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'");
+
+        InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
+        InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'");
+
+        InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");
+
+        InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'");
+
+        InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");
+
+        InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
+
+        InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'");
+
+        InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X");
+
+        InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
+        InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
+        InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X");
+
+        InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'");
+
+        InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
+        InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
+        InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
+
+        InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
+
+        InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
+
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpTraceNV].setResultAndType(false, false);
+
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'");
+        InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpTraceRayKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
+        InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
+
+        InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
+
+        InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
+        InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
+        InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
+
+        InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
+        InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData");
+        InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value");
+        InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true);
+
+        // Ray Query
+        InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
+        InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false);
+
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'");
+        InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'");
+        InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false);
+
+        InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true);
 
 
-    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[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true);
 
 
-    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[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true);
 
 
-    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[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true);
 
 
-    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[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'");
+        InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'");
+        InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].setResultAndType(true, true);
+
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'");
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true);
+        InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true);
+
+        InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
+        InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
 
 
-    InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'");
-    InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountX'");
+        InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountY'");
+        InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountZ'");
+        InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpEmitMeshTasksEXT].setResultAndType(false, false);
 
 
-    InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'");
-    InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'");
+        InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'vertexCount'");
+        InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'primitiveCount'");
+        InstructionDesc[OpSetMeshOutputsEXT].setResultAndType(false, false);
 
 
-    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[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'");
-    InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'");
-
-    InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
-    InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'");
-    InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
-    InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, "");
-
-    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[OpReturnValue].operands.push(OperandId, "'Value'");
-
-    InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
-
-    InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
-
-    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].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'");
-    InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'");
-
-    InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
-    InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
-
-    InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
-
-    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].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].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].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].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].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].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].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].operands.push(OperandId, "'Reserve Id'");
-
-    InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
-    InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'");
-    InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'");
-
-    InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
-    InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'");
-    InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'");
-
-    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].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].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].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].operands.push(OperandId, "'GlobalWorkSize'");
-    InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
-    InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
-
-    InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
-    InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
-    InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
-
-    InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
-    InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
-
-    InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
-
-    InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
-
-    InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
-
-    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].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].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].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].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].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'");
-
-    InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'");
-
-    InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID");
-
-    InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit");
-
-    InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'");
-
-    InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask");
-
-    InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset");
-
-    InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset");
-
-    InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true);
 
 
-    InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true);
+        InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
+        InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
+        InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'");
+        InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'");
 
 
-    InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true);
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'");
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'");
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'");
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true);
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'");
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'");
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'");
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'");
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true);
+        InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'");
+        InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'");
+        InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'");
 
 
-    InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true);
-
-    InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'");
-
-    InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'");
-
-    InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");
-
-    InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'");
-
-    InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
-    InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");
-
-    InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
-
-    InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'");
-
-    InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X");
-
-    InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
-    InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
-    InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X");
-
-    InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'");
-    InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'");
-
-    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
-    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
-    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
-
-    InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
-
-    InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
-
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
-    InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
-    InstructionDesc[OpTraceNV].setResultAndType(false, false);
-
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'");
-    InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'");
-    InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false);
-
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'");
-    InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'");
-    InstructionDesc[OpTraceRayKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
-    InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
-
-    InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
-
-    InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
-
-    InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
-    
-    InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
-    InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
-    InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
-
-    InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
-    InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData");
-    InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value");
-    InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true);
-
-    // Ray Query
-    InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
-    InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false);
-
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'");
-    InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'");
-    InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'");
-    InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false);
-
-    InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true);
+        InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
 
 
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true);
+        InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Component Type'");
+        InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Scope'");
+        InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Rows'");
+        InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Columns'");
+        InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Use'");
 
 
-    InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true);
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Memory Layout'");
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Stride'");
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'");
-    InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
-    InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
-
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'");
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true);
-    InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true);
-    
-    InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
-    InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
-
-    InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
-    InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
-    InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'");
-    InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'");
-
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'");
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'");
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'");
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true);
-    InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true);
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Pointer'");
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Object'");
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Memory Layout'");
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Stride'");
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandLiteralNumber, "", true);
+        InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "", true);
 
 
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'");
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'");
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'");
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'");
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'");
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true);
-    InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true);
+        InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'A'");
+        InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'B'");
+        InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'C'");
+        InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true);
 
 
-    InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'");
-    InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'");
-    InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'");
-
-    InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
-
-    InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
-
-    InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
+        InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'");
+
+        InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
+
+        InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
+
+        InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false);
+
+        InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true);
+
+        InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'");
+        InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'");
+        InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false);
+
+        InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'");
+        InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'");
+        InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true);
+
+        InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'");
+        InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'");
+        InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'");
+        InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'");
+        InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'");
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'");
+        InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false);
+
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
+        InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
+
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Instance ID'");
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Geometry Index'");
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Primitive Index'");
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Barycentrics'");
+        InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].setResultAndType(true, true);
+
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Acceleration Structure'");
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Instance ID'");
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Geometry Index'");
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Primitive Index'");
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Barycentrics'");
+        InstructionDesc[OpFetchMicroTriangleVertexPositionNV].setResultAndType(true, true);
+
+        InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'");
+        InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
+        InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
+        InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
+
+        InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'source texture'");
+        InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'texture coordinates'");
+        InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'weights texture'");
+        InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandImageOperands, "", true);
+        InstructionDesc[OpImageSampleWeightedQCOM].setResultAndType(true, true);
+
+        InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'source texture'");
+        InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'texture coordinates'");
+        InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'box size'");
+        InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandImageOperands, "", true);
+        InstructionDesc[OpImageBoxFilterQCOM].setResultAndType(true, true);
+
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target texture'");
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target coordinates'");
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference texture'");
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference coordinates'");
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'block size'");
+        InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandImageOperands, "", true);
+        InstructionDesc[OpImageBlockMatchSADQCOM].setResultAndType(true, true);
+
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target texture'");
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target coordinates'");
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference texture'");
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference coordinates'");
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'block size'");
+        InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandImageOperands, "", true);
+        InstructionDesc[OpImageBlockMatchSSDQCOM].setResultAndType(true, true);
+    });
 }
 }
 
 
 }; // end spv namespace
 }; // end spv namespace

+ 6 - 5
src/libraries/glslang/SPIRV/doc.h

@@ -156,6 +156,7 @@ enum OperandClass {
     OperandKernelEnqueueFlags,
     OperandKernelEnqueueFlags,
     OperandKernelProfilingInfo,
     OperandKernelProfilingInfo,
     OperandCapability,
     OperandCapability,
+    OperandCooperativeMatrixOperands,
 
 
     OperandOpcode,
     OperandOpcode,
 
 
@@ -190,15 +191,15 @@ protected:
 // Parameterize an enumerant
 // Parameterize an enumerant
 class EnumParameters {
 class EnumParameters {
 public:
 public:
-    EnumParameters() : desc(0) { }
+    EnumParameters() : desc(nullptr) { }
     const char* desc;
     const char* desc;
 };
 };
 
 
 // Parameterize a set of enumerants that form an enum
 // Parameterize a set of enumerants that form an enum
 class EnumDefinition : public EnumParameters {
 class EnumDefinition : public EnumParameters {
 public:
 public:
-    EnumDefinition() : 
-        ceiling(0), bitmask(false), getName(0), enumParams(0), operandParams(0) { }
+    EnumDefinition() :
+        ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { }
     void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false)
     void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false)
     {
     {
         ceiling = ceil;
         ceiling = ceil;
@@ -239,8 +240,8 @@ public:
     OperandParameters operands;
     OperandParameters operands;
 
 
 protected:
 protected:
-    int typePresent   : 1;
-    int resultPresent : 1;
+    bool typePresent   : 1;
+    bool resultPresent : 1;
 };
 };
 
 
 // The set of objects that hold all the instruction/operand
 // The set of objects that hold all the instruction/operand

+ 0 - 13
src/libraries/glslang/SPIRV/hex_float.h

@@ -23,19 +23,6 @@
 #include <limits>
 #include <limits>
 #include <sstream>
 #include <sstream>
 
 
-#if defined(_MSC_VER) && _MSC_VER < 1800
-namespace std {
-bool isnan(double f)
-{
-  return ::_isnan(f) != 0;
-}
-bool isinf(double f)
-{
-  return ::_finite(f) == 0;
-}
-}
-#endif
-
 #include "bitutils.h"
 #include "bitutils.h"
 
 
 namespace spvutils {
 namespace spvutils {

+ 2796 - 2314
src/libraries/glslang/SPIRV/spirv.hpp

@@ -1,2314 +1,2796 @@
-// Copyright (c) 2014-2020 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#, D
-// 
-// - 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']
-// - C# will use enum classes in the Specification class located in the "Spv" namespace,
-//     e.g.: Spv.Specification.SourceLanguage.GLSL
-// - D will have tokens under the "spv" module, 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 0x10500
-#define SPV_REVISION 4
-
-static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010500;
-static const unsigned int Revision = 4;
-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,
-    SourceLanguageMax = 0x7fffffff,
-};
-
-enum ExecutionModel {
-    ExecutionModelVertex = 0,
-    ExecutionModelTessellationControl = 1,
-    ExecutionModelTessellationEvaluation = 2,
-    ExecutionModelGeometry = 3,
-    ExecutionModelFragment = 4,
-    ExecutionModelGLCompute = 5,
-    ExecutionModelKernel = 6,
-    ExecutionModelTaskNV = 5267,
-    ExecutionModelMeshNV = 5268,
-    ExecutionModelRayGenerationKHR = 5313,
-    ExecutionModelRayGenerationNV = 5313,
-    ExecutionModelIntersectionKHR = 5314,
-    ExecutionModelIntersectionNV = 5314,
-    ExecutionModelAnyHitKHR = 5315,
-    ExecutionModelAnyHitNV = 5315,
-    ExecutionModelClosestHitKHR = 5316,
-    ExecutionModelClosestHitNV = 5316,
-    ExecutionModelMissKHR = 5317,
-    ExecutionModelMissNV = 5317,
-    ExecutionModelCallableKHR = 5318,
-    ExecutionModelCallableNV = 5318,
-    ExecutionModelMax = 0x7fffffff,
-};
-
-enum AddressingModel {
-    AddressingModelLogical = 0,
-    AddressingModelPhysical32 = 1,
-    AddressingModelPhysical64 = 2,
-    AddressingModelPhysicalStorageBuffer64 = 5348,
-    AddressingModelPhysicalStorageBuffer64EXT = 5348,
-    AddressingModelMax = 0x7fffffff,
-};
-
-enum MemoryModel {
-    MemoryModelSimple = 0,
-    MemoryModelGLSL450 = 1,
-    MemoryModelOpenCL = 2,
-    MemoryModelVulkan = 3,
-    MemoryModelVulkanKHR = 3,
-    MemoryModelMax = 0x7fffffff,
-};
-
-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,
-    ExecutionModeInitializer = 33,
-    ExecutionModeFinalizer = 34,
-    ExecutionModeSubgroupSize = 35,
-    ExecutionModeSubgroupsPerWorkgroup = 36,
-    ExecutionModeSubgroupsPerWorkgroupId = 37,
-    ExecutionModeLocalSizeId = 38,
-    ExecutionModeLocalSizeHintId = 39,
-    ExecutionModeSubgroupUniformControlFlowKHR = 4421,
-    ExecutionModePostDepthCoverage = 4446,
-    ExecutionModeDenormPreserve = 4459,
-    ExecutionModeDenormFlushToZero = 4460,
-    ExecutionModeSignedZeroInfNanPreserve = 4461,
-    ExecutionModeRoundingModeRTE = 4462,
-    ExecutionModeRoundingModeRTZ = 4463,
-    ExecutionModeStencilRefReplacingEXT = 5027,
-    ExecutionModeOutputLinesNV = 5269,
-    ExecutionModeOutputPrimitivesNV = 5270,
-    ExecutionModeDerivativeGroupQuadsNV = 5289,
-    ExecutionModeDerivativeGroupLinearNV = 5290,
-    ExecutionModeOutputTrianglesNV = 5298,
-    ExecutionModePixelInterlockOrderedEXT = 5366,
-    ExecutionModePixelInterlockUnorderedEXT = 5367,
-    ExecutionModeSampleInterlockOrderedEXT = 5368,
-    ExecutionModeSampleInterlockUnorderedEXT = 5369,
-    ExecutionModeShadingRateInterlockOrderedEXT = 5370,
-    ExecutionModeShadingRateInterlockUnorderedEXT = 5371,
-    ExecutionModeSharedLocalMemorySizeINTEL = 5618,
-    ExecutionModeRoundingModeRTPINTEL = 5620,
-    ExecutionModeRoundingModeRTNINTEL = 5621,
-    ExecutionModeFloatingPointModeALTINTEL = 5622,
-    ExecutionModeFloatingPointModeIEEEINTEL = 5623,
-    ExecutionModeMaxWorkgroupSizeINTEL = 5893,
-    ExecutionModeMaxWorkDimINTEL = 5894,
-    ExecutionModeNoGlobalOffsetINTEL = 5895,
-    ExecutionModeNumSIMDWorkitemsINTEL = 5896,
-    ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
-    ExecutionModeMax = 0x7fffffff,
-};
-
-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,
-    StorageClassStorageBuffer = 12,
-    StorageClassCallableDataKHR = 5328,
-    StorageClassCallableDataNV = 5328,
-    StorageClassIncomingCallableDataKHR = 5329,
-    StorageClassIncomingCallableDataNV = 5329,
-    StorageClassRayPayloadKHR = 5338,
-    StorageClassRayPayloadNV = 5338,
-    StorageClassHitAttributeKHR = 5339,
-    StorageClassHitAttributeNV = 5339,
-    StorageClassIncomingRayPayloadKHR = 5342,
-    StorageClassIncomingRayPayloadNV = 5342,
-    StorageClassShaderRecordBufferKHR = 5343,
-    StorageClassShaderRecordBufferNV = 5343,
-    StorageClassPhysicalStorageBuffer = 5349,
-    StorageClassPhysicalStorageBufferEXT = 5349,
-    StorageClassCodeSectionINTEL = 5605,
-    StorageClassDeviceOnlyINTEL = 5936,
-    StorageClassHostOnlyINTEL = 5937,
-    StorageClassMax = 0x7fffffff,
-};
-
-enum Dim {
-    Dim1D = 0,
-    Dim2D = 1,
-    Dim3D = 2,
-    DimCube = 3,
-    DimRect = 4,
-    DimBuffer = 5,
-    DimSubpassData = 6,
-    DimMax = 0x7fffffff,
-};
-
-enum SamplerAddressingMode {
-    SamplerAddressingModeNone = 0,
-    SamplerAddressingModeClampToEdge = 1,
-    SamplerAddressingModeClamp = 2,
-    SamplerAddressingModeRepeat = 3,
-    SamplerAddressingModeRepeatMirrored = 4,
-    SamplerAddressingModeMax = 0x7fffffff,
-};
-
-enum SamplerFilterMode {
-    SamplerFilterModeNearest = 0,
-    SamplerFilterModeLinear = 1,
-    SamplerFilterModeMax = 0x7fffffff,
-};
-
-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,
-    ImageFormatR64ui = 40,
-    ImageFormatR64i = 41,
-    ImageFormatMax = 0x7fffffff,
-};
-
-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,
-    ImageChannelOrderABGR = 19,
-    ImageChannelOrderMax = 0x7fffffff,
-};
-
-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,
-    ImageChannelDataTypeMax = 0x7fffffff,
-};
-
-enum ImageOperandsShift {
-    ImageOperandsBiasShift = 0,
-    ImageOperandsLodShift = 1,
-    ImageOperandsGradShift = 2,
-    ImageOperandsConstOffsetShift = 3,
-    ImageOperandsOffsetShift = 4,
-    ImageOperandsConstOffsetsShift = 5,
-    ImageOperandsSampleShift = 6,
-    ImageOperandsMinLodShift = 7,
-    ImageOperandsMakeTexelAvailableShift = 8,
-    ImageOperandsMakeTexelAvailableKHRShift = 8,
-    ImageOperandsMakeTexelVisibleShift = 9,
-    ImageOperandsMakeTexelVisibleKHRShift = 9,
-    ImageOperandsNonPrivateTexelShift = 10,
-    ImageOperandsNonPrivateTexelKHRShift = 10,
-    ImageOperandsVolatileTexelShift = 11,
-    ImageOperandsVolatileTexelKHRShift = 11,
-    ImageOperandsSignExtendShift = 12,
-    ImageOperandsZeroExtendShift = 13,
-    ImageOperandsMax = 0x7fffffff,
-};
-
-enum ImageOperandsMask {
-    ImageOperandsMaskNone = 0,
-    ImageOperandsBiasMask = 0x00000001,
-    ImageOperandsLodMask = 0x00000002,
-    ImageOperandsGradMask = 0x00000004,
-    ImageOperandsConstOffsetMask = 0x00000008,
-    ImageOperandsOffsetMask = 0x00000010,
-    ImageOperandsConstOffsetsMask = 0x00000020,
-    ImageOperandsSampleMask = 0x00000040,
-    ImageOperandsMinLodMask = 0x00000080,
-    ImageOperandsMakeTexelAvailableMask = 0x00000100,
-    ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
-    ImageOperandsMakeTexelVisibleMask = 0x00000200,
-    ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
-    ImageOperandsNonPrivateTexelMask = 0x00000400,
-    ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
-    ImageOperandsVolatileTexelMask = 0x00000800,
-    ImageOperandsVolatileTexelKHRMask = 0x00000800,
-    ImageOperandsSignExtendMask = 0x00001000,
-    ImageOperandsZeroExtendMask = 0x00002000,
-};
-
-enum FPFastMathModeShift {
-    FPFastMathModeNotNaNShift = 0,
-    FPFastMathModeNotInfShift = 1,
-    FPFastMathModeNSZShift = 2,
-    FPFastMathModeAllowRecipShift = 3,
-    FPFastMathModeFastShift = 4,
-    FPFastMathModeAllowContractFastINTELShift = 16,
-    FPFastMathModeAllowReassocINTELShift = 17,
-    FPFastMathModeMax = 0x7fffffff,
-};
-
-enum FPFastMathModeMask {
-    FPFastMathModeMaskNone = 0,
-    FPFastMathModeNotNaNMask = 0x00000001,
-    FPFastMathModeNotInfMask = 0x00000002,
-    FPFastMathModeNSZMask = 0x00000004,
-    FPFastMathModeAllowRecipMask = 0x00000008,
-    FPFastMathModeFastMask = 0x00000010,
-    FPFastMathModeAllowContractFastINTELMask = 0x00010000,
-    FPFastMathModeAllowReassocINTELMask = 0x00020000,
-};
-
-enum FPRoundingMode {
-    FPRoundingModeRTE = 0,
-    FPRoundingModeRTZ = 1,
-    FPRoundingModeRTP = 2,
-    FPRoundingModeRTN = 3,
-    FPRoundingModeMax = 0x7fffffff,
-};
-
-enum LinkageType {
-    LinkageTypeExport = 0,
-    LinkageTypeImport = 1,
-    LinkageTypeLinkOnceODR = 2,
-    LinkageTypeMax = 0x7fffffff,
-};
-
-enum AccessQualifier {
-    AccessQualifierReadOnly = 0,
-    AccessQualifierWriteOnly = 1,
-    AccessQualifierReadWrite = 2,
-    AccessQualifierMax = 0x7fffffff,
-};
-
-enum FunctionParameterAttribute {
-    FunctionParameterAttributeZext = 0,
-    FunctionParameterAttributeSext = 1,
-    FunctionParameterAttributeByVal = 2,
-    FunctionParameterAttributeSret = 3,
-    FunctionParameterAttributeNoAlias = 4,
-    FunctionParameterAttributeNoCapture = 5,
-    FunctionParameterAttributeNoWrite = 6,
-    FunctionParameterAttributeNoReadWrite = 7,
-    FunctionParameterAttributeMax = 0x7fffffff,
-};
-
-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,
-    DecorationUniformId = 27,
-    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,
-    DecorationMaxByteOffset = 45,
-    DecorationAlignmentId = 46,
-    DecorationMaxByteOffsetId = 47,
-    DecorationNoSignedWrap = 4469,
-    DecorationNoUnsignedWrap = 4470,
-    DecorationExplicitInterpAMD = 4999,
-    DecorationOverrideCoverageNV = 5248,
-    DecorationPassthroughNV = 5250,
-    DecorationViewportRelativeNV = 5252,
-    DecorationSecondaryViewportRelativeNV = 5256,
-    DecorationPerPrimitiveNV = 5271,
-    DecorationPerViewNV = 5272,
-    DecorationPerTaskNV = 5273,
-    DecorationPerVertexNV = 5285,
-    DecorationNonUniform = 5300,
-    DecorationNonUniformEXT = 5300,
-    DecorationRestrictPointer = 5355,
-    DecorationRestrictPointerEXT = 5355,
-    DecorationAliasedPointer = 5356,
-    DecorationAliasedPointerEXT = 5356,
-    DecorationSIMTCallINTEL = 5599,
-    DecorationReferencedIndirectlyINTEL = 5602,
-    DecorationClobberINTEL = 5607,
-    DecorationSideEffectsINTEL = 5608,
-    DecorationVectorComputeVariableINTEL = 5624,
-    DecorationFuncParamIOKindINTEL = 5625,
-    DecorationVectorComputeFunctionINTEL = 5626,
-    DecorationStackCallINTEL = 5627,
-    DecorationGlobalVariableOffsetINTEL = 5628,
-    DecorationCounterBuffer = 5634,
-    DecorationHlslCounterBufferGOOGLE = 5634,
-    DecorationHlslSemanticGOOGLE = 5635,
-    DecorationUserSemantic = 5635,
-    DecorationUserTypeGOOGLE = 5636,
-    DecorationFunctionRoundingModeINTEL = 5822,
-    DecorationFunctionDenormModeINTEL = 5823,
-    DecorationRegisterINTEL = 5825,
-    DecorationMemoryINTEL = 5826,
-    DecorationNumbanksINTEL = 5827,
-    DecorationBankwidthINTEL = 5828,
-    DecorationMaxPrivateCopiesINTEL = 5829,
-    DecorationSinglepumpINTEL = 5830,
-    DecorationDoublepumpINTEL = 5831,
-    DecorationMaxReplicatesINTEL = 5832,
-    DecorationSimpleDualPortINTEL = 5833,
-    DecorationMergeINTEL = 5834,
-    DecorationBankBitsINTEL = 5835,
-    DecorationForcePow2DepthINTEL = 5836,
-    DecorationBurstCoalesceINTEL = 5899,
-    DecorationCacheSizeINTEL = 5900,
-    DecorationDontStaticallyCoalesceINTEL = 5901,
-    DecorationPrefetchINTEL = 5902,
-    DecorationStallEnableINTEL = 5905,
-    DecorationFuseLoopsInFunctionINTEL = 5907,
-    DecorationBufferLocationINTEL = 5921,
-    DecorationIOPipeStorageINTEL = 5944,
-    DecorationFunctionFloatingPointModeINTEL = 6080,
-    DecorationSingleElementVectorINTEL = 6085,
-    DecorationVectorComputeCallableFunctionINTEL = 6087,
-    DecorationMax = 0x7fffffff,
-};
-
-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,
-    BuiltInSubgroupEqMask = 4416,
-    BuiltInSubgroupEqMaskKHR = 4416,
-    BuiltInSubgroupGeMask = 4417,
-    BuiltInSubgroupGeMaskKHR = 4417,
-    BuiltInSubgroupGtMask = 4418,
-    BuiltInSubgroupGtMaskKHR = 4418,
-    BuiltInSubgroupLeMask = 4419,
-    BuiltInSubgroupLeMaskKHR = 4419,
-    BuiltInSubgroupLtMask = 4420,
-    BuiltInSubgroupLtMaskKHR = 4420,
-    BuiltInBaseVertex = 4424,
-    BuiltInBaseInstance = 4425,
-    BuiltInDrawIndex = 4426,
-    BuiltInPrimitiveShadingRateKHR = 4432,
-    BuiltInDeviceIndex = 4438,
-    BuiltInViewIndex = 4440,
-    BuiltInShadingRateKHR = 4444,
-    BuiltInBaryCoordNoPerspAMD = 4992,
-    BuiltInBaryCoordNoPerspCentroidAMD = 4993,
-    BuiltInBaryCoordNoPerspSampleAMD = 4994,
-    BuiltInBaryCoordSmoothAMD = 4995,
-    BuiltInBaryCoordSmoothCentroidAMD = 4996,
-    BuiltInBaryCoordSmoothSampleAMD = 4997,
-    BuiltInBaryCoordPullModelAMD = 4998,
-    BuiltInFragStencilRefEXT = 5014,
-    BuiltInViewportMaskNV = 5253,
-    BuiltInSecondaryPositionNV = 5257,
-    BuiltInSecondaryViewportMaskNV = 5258,
-    BuiltInPositionPerViewNV = 5261,
-    BuiltInViewportMaskPerViewNV = 5262,
-    BuiltInFullyCoveredEXT = 5264,
-    BuiltInTaskCountNV = 5274,
-    BuiltInPrimitiveCountNV = 5275,
-    BuiltInPrimitiveIndicesNV = 5276,
-    BuiltInClipDistancePerViewNV = 5277,
-    BuiltInCullDistancePerViewNV = 5278,
-    BuiltInLayerPerViewNV = 5279,
-    BuiltInMeshViewCountNV = 5280,
-    BuiltInMeshViewIndicesNV = 5281,
-    BuiltInBaryCoordNV = 5286,
-    BuiltInBaryCoordNoPerspNV = 5287,
-    BuiltInFragSizeEXT = 5292,
-    BuiltInFragmentSizeNV = 5292,
-    BuiltInFragInvocationCountEXT = 5293,
-    BuiltInInvocationsPerPixelNV = 5293,
-    BuiltInLaunchIdKHR = 5319,
-    BuiltInLaunchIdNV = 5319,
-    BuiltInLaunchSizeKHR = 5320,
-    BuiltInLaunchSizeNV = 5320,
-    BuiltInWorldRayOriginKHR = 5321,
-    BuiltInWorldRayOriginNV = 5321,
-    BuiltInWorldRayDirectionKHR = 5322,
-    BuiltInWorldRayDirectionNV = 5322,
-    BuiltInObjectRayOriginKHR = 5323,
-    BuiltInObjectRayOriginNV = 5323,
-    BuiltInObjectRayDirectionKHR = 5324,
-    BuiltInObjectRayDirectionNV = 5324,
-    BuiltInRayTminKHR = 5325,
-    BuiltInRayTminNV = 5325,
-    BuiltInRayTmaxKHR = 5326,
-    BuiltInRayTmaxNV = 5326,
-    BuiltInInstanceCustomIndexKHR = 5327,
-    BuiltInInstanceCustomIndexNV = 5327,
-    BuiltInObjectToWorldKHR = 5330,
-    BuiltInObjectToWorldNV = 5330,
-    BuiltInWorldToObjectKHR = 5331,
-    BuiltInWorldToObjectNV = 5331,
-    BuiltInHitTNV = 5332,
-    BuiltInHitKindKHR = 5333,
-    BuiltInHitKindNV = 5333,
-    BuiltInCurrentRayTimeNV = 5334,
-    BuiltInIncomingRayFlagsKHR = 5351,
-    BuiltInIncomingRayFlagsNV = 5351,
-    BuiltInRayGeometryIndexKHR = 5352,
-    BuiltInWarpsPerSMNV = 5374,
-    BuiltInSMCountNV = 5375,
-    BuiltInWarpIDNV = 5376,
-    BuiltInSMIDNV = 5377,
-    BuiltInMax = 0x7fffffff,
-};
-
-enum SelectionControlShift {
-    SelectionControlFlattenShift = 0,
-    SelectionControlDontFlattenShift = 1,
-    SelectionControlMax = 0x7fffffff,
-};
-
-enum SelectionControlMask {
-    SelectionControlMaskNone = 0,
-    SelectionControlFlattenMask = 0x00000001,
-    SelectionControlDontFlattenMask = 0x00000002,
-};
-
-enum LoopControlShift {
-    LoopControlUnrollShift = 0,
-    LoopControlDontUnrollShift = 1,
-    LoopControlDependencyInfiniteShift = 2,
-    LoopControlDependencyLengthShift = 3,
-    LoopControlMinIterationsShift = 4,
-    LoopControlMaxIterationsShift = 5,
-    LoopControlIterationMultipleShift = 6,
-    LoopControlPeelCountShift = 7,
-    LoopControlPartialCountShift = 8,
-    LoopControlInitiationIntervalINTELShift = 16,
-    LoopControlMaxConcurrencyINTELShift = 17,
-    LoopControlDependencyArrayINTELShift = 18,
-    LoopControlPipelineEnableINTELShift = 19,
-    LoopControlLoopCoalesceINTELShift = 20,
-    LoopControlMaxInterleavingINTELShift = 21,
-    LoopControlSpeculatedIterationsINTELShift = 22,
-    LoopControlNoFusionINTELShift = 23,
-    LoopControlMax = 0x7fffffff,
-};
-
-enum LoopControlMask {
-    LoopControlMaskNone = 0,
-    LoopControlUnrollMask = 0x00000001,
-    LoopControlDontUnrollMask = 0x00000002,
-    LoopControlDependencyInfiniteMask = 0x00000004,
-    LoopControlDependencyLengthMask = 0x00000008,
-    LoopControlMinIterationsMask = 0x00000010,
-    LoopControlMaxIterationsMask = 0x00000020,
-    LoopControlIterationMultipleMask = 0x00000040,
-    LoopControlPeelCountMask = 0x00000080,
-    LoopControlPartialCountMask = 0x00000100,
-    LoopControlInitiationIntervalINTELMask = 0x00010000,
-    LoopControlMaxConcurrencyINTELMask = 0x00020000,
-    LoopControlDependencyArrayINTELMask = 0x00040000,
-    LoopControlPipelineEnableINTELMask = 0x00080000,
-    LoopControlLoopCoalesceINTELMask = 0x00100000,
-    LoopControlMaxInterleavingINTELMask = 0x00200000,
-    LoopControlSpeculatedIterationsINTELMask = 0x00400000,
-    LoopControlNoFusionINTELMask = 0x00800000,
-};
-
-enum FunctionControlShift {
-    FunctionControlInlineShift = 0,
-    FunctionControlDontInlineShift = 1,
-    FunctionControlPureShift = 2,
-    FunctionControlConstShift = 3,
-    FunctionControlMax = 0x7fffffff,
-};
-
-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,
-    MemorySemanticsOutputMemoryShift = 12,
-    MemorySemanticsOutputMemoryKHRShift = 12,
-    MemorySemanticsMakeAvailableShift = 13,
-    MemorySemanticsMakeAvailableKHRShift = 13,
-    MemorySemanticsMakeVisibleShift = 14,
-    MemorySemanticsMakeVisibleKHRShift = 14,
-    MemorySemanticsVolatileShift = 15,
-    MemorySemanticsMax = 0x7fffffff,
-};
-
-enum MemorySemanticsMask {
-    MemorySemanticsMaskNone = 0,
-    MemorySemanticsAcquireMask = 0x00000002,
-    MemorySemanticsReleaseMask = 0x00000004,
-    MemorySemanticsAcquireReleaseMask = 0x00000008,
-    MemorySemanticsSequentiallyConsistentMask = 0x00000010,
-    MemorySemanticsUniformMemoryMask = 0x00000040,
-    MemorySemanticsSubgroupMemoryMask = 0x00000080,
-    MemorySemanticsWorkgroupMemoryMask = 0x00000100,
-    MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
-    MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
-    MemorySemanticsImageMemoryMask = 0x00000800,
-    MemorySemanticsOutputMemoryMask = 0x00001000,
-    MemorySemanticsOutputMemoryKHRMask = 0x00001000,
-    MemorySemanticsMakeAvailableMask = 0x00002000,
-    MemorySemanticsMakeAvailableKHRMask = 0x00002000,
-    MemorySemanticsMakeVisibleMask = 0x00004000,
-    MemorySemanticsMakeVisibleKHRMask = 0x00004000,
-    MemorySemanticsVolatileMask = 0x00008000,
-};
-
-enum MemoryAccessShift {
-    MemoryAccessVolatileShift = 0,
-    MemoryAccessAlignedShift = 1,
-    MemoryAccessNontemporalShift = 2,
-    MemoryAccessMakePointerAvailableShift = 3,
-    MemoryAccessMakePointerAvailableKHRShift = 3,
-    MemoryAccessMakePointerVisibleShift = 4,
-    MemoryAccessMakePointerVisibleKHRShift = 4,
-    MemoryAccessNonPrivatePointerShift = 5,
-    MemoryAccessNonPrivatePointerKHRShift = 5,
-    MemoryAccessMax = 0x7fffffff,
-};
-
-enum MemoryAccessMask {
-    MemoryAccessMaskNone = 0,
-    MemoryAccessVolatileMask = 0x00000001,
-    MemoryAccessAlignedMask = 0x00000002,
-    MemoryAccessNontemporalMask = 0x00000004,
-    MemoryAccessMakePointerAvailableMask = 0x00000008,
-    MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
-    MemoryAccessMakePointerVisibleMask = 0x00000010,
-    MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
-    MemoryAccessNonPrivatePointerMask = 0x00000020,
-    MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
-};
-
-enum Scope {
-    ScopeCrossDevice = 0,
-    ScopeDevice = 1,
-    ScopeWorkgroup = 2,
-    ScopeSubgroup = 3,
-    ScopeInvocation = 4,
-    ScopeQueueFamily = 5,
-    ScopeQueueFamilyKHR = 5,
-    ScopeShaderCallKHR = 6,
-    ScopeMax = 0x7fffffff,
-};
-
-enum GroupOperation {
-    GroupOperationReduce = 0,
-    GroupOperationInclusiveScan = 1,
-    GroupOperationExclusiveScan = 2,
-    GroupOperationClusteredReduce = 3,
-    GroupOperationPartitionedReduceNV = 6,
-    GroupOperationPartitionedInclusiveScanNV = 7,
-    GroupOperationPartitionedExclusiveScanNV = 8,
-    GroupOperationMax = 0x7fffffff,
-};
-
-enum KernelEnqueueFlags {
-    KernelEnqueueFlagsNoWait = 0,
-    KernelEnqueueFlagsWaitKernel = 1,
-    KernelEnqueueFlagsWaitWorkGroup = 2,
-    KernelEnqueueFlagsMax = 0x7fffffff,
-};
-
-enum KernelProfilingInfoShift {
-    KernelProfilingInfoCmdExecTimeShift = 0,
-    KernelProfilingInfoMax = 0x7fffffff,
-};
-
-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,
-    CapabilitySubgroupDispatch = 58,
-    CapabilityNamedBarrier = 59,
-    CapabilityPipeStorage = 60,
-    CapabilityGroupNonUniform = 61,
-    CapabilityGroupNonUniformVote = 62,
-    CapabilityGroupNonUniformArithmetic = 63,
-    CapabilityGroupNonUniformBallot = 64,
-    CapabilityGroupNonUniformShuffle = 65,
-    CapabilityGroupNonUniformShuffleRelative = 66,
-    CapabilityGroupNonUniformClustered = 67,
-    CapabilityGroupNonUniformQuad = 68,
-    CapabilityShaderLayer = 69,
-    CapabilityShaderViewportIndex = 70,
-    CapabilityFragmentShadingRateKHR = 4422,
-    CapabilitySubgroupBallotKHR = 4423,
-    CapabilityDrawParameters = 4427,
-    CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428,
-    CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429,
-    CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430,
-    CapabilitySubgroupVoteKHR = 4431,
-    CapabilityStorageBuffer16BitAccess = 4433,
-    CapabilityStorageUniformBufferBlock16 = 4433,
-    CapabilityStorageUniform16 = 4434,
-    CapabilityUniformAndStorageBuffer16BitAccess = 4434,
-    CapabilityStoragePushConstant16 = 4435,
-    CapabilityStorageInputOutput16 = 4436,
-    CapabilityDeviceGroup = 4437,
-    CapabilityMultiView = 4439,
-    CapabilityVariablePointersStorageBuffer = 4441,
-    CapabilityVariablePointers = 4442,
-    CapabilityAtomicStorageOps = 4445,
-    CapabilitySampleMaskPostDepthCoverage = 4447,
-    CapabilityStorageBuffer8BitAccess = 4448,
-    CapabilityUniformAndStorageBuffer8BitAccess = 4449,
-    CapabilityStoragePushConstant8 = 4450,
-    CapabilityDenormPreserve = 4464,
-    CapabilityDenormFlushToZero = 4465,
-    CapabilitySignedZeroInfNanPreserve = 4466,
-    CapabilityRoundingModeRTE = 4467,
-    CapabilityRoundingModeRTZ = 4468,
-    CapabilityRayQueryProvisionalKHR = 4471,
-    CapabilityRayQueryKHR = 4472,
-    CapabilityRayTraversalPrimitiveCullingKHR = 4478,
-    CapabilityRayTracingKHR = 4479,
-    CapabilityFloat16ImageAMD = 5008,
-    CapabilityImageGatherBiasLodAMD = 5009,
-    CapabilityFragmentMaskAMD = 5010,
-    CapabilityStencilExportEXT = 5013,
-    CapabilityImageReadWriteLodAMD = 5015,
-    CapabilityInt64ImageEXT = 5016,
-    CapabilityShaderClockKHR = 5055,
-    CapabilitySampleMaskOverrideCoverageNV = 5249,
-    CapabilityGeometryShaderPassthroughNV = 5251,
-    CapabilityShaderViewportIndexLayerEXT = 5254,
-    CapabilityShaderViewportIndexLayerNV = 5254,
-    CapabilityShaderViewportMaskNV = 5255,
-    CapabilityShaderStereoViewNV = 5259,
-    CapabilityPerViewAttributesNV = 5260,
-    CapabilityFragmentFullyCoveredEXT = 5265,
-    CapabilityMeshShadingNV = 5266,
-    CapabilityImageFootprintNV = 5282,
-    CapabilityFragmentBarycentricNV = 5284,
-    CapabilityComputeDerivativeGroupQuadsNV = 5288,
-    CapabilityFragmentDensityEXT = 5291,
-    CapabilityShadingRateNV = 5291,
-    CapabilityGroupNonUniformPartitionedNV = 5297,
-    CapabilityShaderNonUniform = 5301,
-    CapabilityShaderNonUniformEXT = 5301,
-    CapabilityRuntimeDescriptorArray = 5302,
-    CapabilityRuntimeDescriptorArrayEXT = 5302,
-    CapabilityInputAttachmentArrayDynamicIndexing = 5303,
-    CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
-    CapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
-    CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
-    CapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
-    CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
-    CapabilityUniformBufferArrayNonUniformIndexing = 5306,
-    CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
-    CapabilitySampledImageArrayNonUniformIndexing = 5307,
-    CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
-    CapabilityStorageBufferArrayNonUniformIndexing = 5308,
-    CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
-    CapabilityStorageImageArrayNonUniformIndexing = 5309,
-    CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
-    CapabilityInputAttachmentArrayNonUniformIndexing = 5310,
-    CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
-    CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
-    CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
-    CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
-    CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
-    CapabilityRayTracingNV = 5340,
-    CapabilityRayTracingMotionBlurNV = 5341,
-    CapabilityVulkanMemoryModel = 5345,
-    CapabilityVulkanMemoryModelKHR = 5345,
-    CapabilityVulkanMemoryModelDeviceScope = 5346,
-    CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
-    CapabilityPhysicalStorageBufferAddresses = 5347,
-    CapabilityPhysicalStorageBufferAddressesEXT = 5347,
-    CapabilityComputeDerivativeGroupLinearNV = 5350,
-    CapabilityRayTracingProvisionalKHR = 5353,
-    CapabilityCooperativeMatrixNV = 5357,
-    CapabilityFragmentShaderSampleInterlockEXT = 5363,
-    CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
-    CapabilityShaderSMBuiltinsNV = 5373,
-    CapabilityFragmentShaderPixelInterlockEXT = 5378,
-    CapabilityDemoteToHelperInvocation = 5379,
-    CapabilityDemoteToHelperInvocationEXT = 5379,
-    CapabilitySubgroupShuffleINTEL = 5568,
-    CapabilitySubgroupBufferBlockIOINTEL = 5569,
-    CapabilitySubgroupImageBlockIOINTEL = 5570,
-    CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
-    CapabilityRoundToInfinityINTEL = 5582,
-    CapabilityFloatingPointModeINTEL = 5583,
-    CapabilityIntegerFunctions2INTEL = 5584,
-    CapabilityFunctionPointersINTEL = 5603,
-    CapabilityIndirectReferencesINTEL = 5604,
-    CapabilityAsmINTEL = 5606,
-    CapabilityAtomicFloat32MinMaxEXT = 5612,
-    CapabilityAtomicFloat64MinMaxEXT = 5613,
-    CapabilityAtomicFloat16MinMaxEXT = 5616,
-    CapabilityVectorComputeINTEL = 5617,
-    CapabilityVectorAnyINTEL = 5619,
-    CapabilityExpectAssumeKHR = 5629,
-    CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
-    CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
-    CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
-    CapabilityVariableLengthArrayINTEL = 5817,
-    CapabilityFunctionFloatControlINTEL = 5821,
-    CapabilityFPGAMemoryAttributesINTEL = 5824,
-    CapabilityFPFastMathModeINTEL = 5837,
-    CapabilityArbitraryPrecisionIntegersINTEL = 5844,
-    CapabilityUnstructuredLoopControlsINTEL = 5886,
-    CapabilityFPGALoopControlsINTEL = 5888,
-    CapabilityKernelAttributesINTEL = 5892,
-    CapabilityFPGAKernelAttributesINTEL = 5897,
-    CapabilityFPGAMemoryAccessesINTEL = 5898,
-    CapabilityFPGAClusterAttributesINTEL = 5904,
-    CapabilityLoopFuseINTEL = 5906,
-    CapabilityFPGABufferLocationINTEL = 5920,
-    CapabilityUSMStorageClassesINTEL = 5935,
-    CapabilityIOPipesINTEL = 5943,
-    CapabilityBlockingPipesINTEL = 5945,
-    CapabilityFPGARegINTEL = 5948,
-    CapabilityAtomicFloat32AddEXT = 6033,
-    CapabilityAtomicFloat64AddEXT = 6034,
-    CapabilityLongConstantCompositeINTEL = 6089,
-    CapabilityAtomicFloat16AddEXT = 6095,
-    CapabilityMax = 0x7fffffff,
-};
-
-enum RayFlagsShift {
-    RayFlagsOpaqueKHRShift = 0,
-    RayFlagsNoOpaqueKHRShift = 1,
-    RayFlagsTerminateOnFirstHitKHRShift = 2,
-    RayFlagsSkipClosestHitShaderKHRShift = 3,
-    RayFlagsCullBackFacingTrianglesKHRShift = 4,
-    RayFlagsCullFrontFacingTrianglesKHRShift = 5,
-    RayFlagsCullOpaqueKHRShift = 6,
-    RayFlagsCullNoOpaqueKHRShift = 7,
-    RayFlagsSkipTrianglesKHRShift = 8,
-    RayFlagsSkipAABBsKHRShift = 9,
-    RayFlagsMax = 0x7fffffff,
-};
-
-enum RayFlagsMask {
-    RayFlagsMaskNone = 0,
-    RayFlagsOpaqueKHRMask = 0x00000001,
-    RayFlagsNoOpaqueKHRMask = 0x00000002,
-    RayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
-    RayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
-    RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
-    RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
-    RayFlagsCullOpaqueKHRMask = 0x00000040,
-    RayFlagsCullNoOpaqueKHRMask = 0x00000080,
-    RayFlagsSkipTrianglesKHRMask = 0x00000100,
-    RayFlagsSkipAABBsKHRMask = 0x00000200,
-};
-
-enum RayQueryIntersection {
-    RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
-    RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
-    RayQueryIntersectionMax = 0x7fffffff,
-};
-
-enum RayQueryCommittedIntersectionType {
-    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
-    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
-    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
-    RayQueryCommittedIntersectionTypeMax = 0x7fffffff,
-};
-
-enum RayQueryCandidateIntersectionType {
-    RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
-    RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
-    RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
-};
-
-enum FragmentShadingRateShift {
-    FragmentShadingRateVertical2PixelsShift = 0,
-    FragmentShadingRateVertical4PixelsShift = 1,
-    FragmentShadingRateHorizontal2PixelsShift = 2,
-    FragmentShadingRateHorizontal4PixelsShift = 3,
-    FragmentShadingRateMax = 0x7fffffff,
-};
-
-enum FragmentShadingRateMask {
-    FragmentShadingRateMaskNone = 0,
-    FragmentShadingRateVertical2PixelsMask = 0x00000001,
-    FragmentShadingRateVertical4PixelsMask = 0x00000002,
-    FragmentShadingRateHorizontal2PixelsMask = 0x00000004,
-    FragmentShadingRateHorizontal4PixelsMask = 0x00000008,
-};
-
-enum FPDenormMode {
-    FPDenormModePreserve = 0,
-    FPDenormModeFlushToZero = 1,
-    FPDenormModeMax = 0x7fffffff,
-};
-
-enum FPOperationMode {
-    FPOperationModeIEEE = 0,
-    FPOperationModeALT = 1,
-    FPOperationModeMax = 0x7fffffff,
-};
-
-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,
-    OpSizeOf = 321,
-    OpTypePipeStorage = 322,
-    OpConstantPipeStorage = 323,
-    OpCreatePipeFromPipeStorage = 324,
-    OpGetKernelLocalSizeForSubgroupCount = 325,
-    OpGetKernelMaxNumSubgroups = 326,
-    OpTypeNamedBarrier = 327,
-    OpNamedBarrierInitialize = 328,
-    OpMemoryNamedBarrier = 329,
-    OpModuleProcessed = 330,
-    OpExecutionModeId = 331,
-    OpDecorateId = 332,
-    OpGroupNonUniformElect = 333,
-    OpGroupNonUniformAll = 334,
-    OpGroupNonUniformAny = 335,
-    OpGroupNonUniformAllEqual = 336,
-    OpGroupNonUniformBroadcast = 337,
-    OpGroupNonUniformBroadcastFirst = 338,
-    OpGroupNonUniformBallot = 339,
-    OpGroupNonUniformInverseBallot = 340,
-    OpGroupNonUniformBallotBitExtract = 341,
-    OpGroupNonUniformBallotBitCount = 342,
-    OpGroupNonUniformBallotFindLSB = 343,
-    OpGroupNonUniformBallotFindMSB = 344,
-    OpGroupNonUniformShuffle = 345,
-    OpGroupNonUniformShuffleXor = 346,
-    OpGroupNonUniformShuffleUp = 347,
-    OpGroupNonUniformShuffleDown = 348,
-    OpGroupNonUniformIAdd = 349,
-    OpGroupNonUniformFAdd = 350,
-    OpGroupNonUniformIMul = 351,
-    OpGroupNonUniformFMul = 352,
-    OpGroupNonUniformSMin = 353,
-    OpGroupNonUniformUMin = 354,
-    OpGroupNonUniformFMin = 355,
-    OpGroupNonUniformSMax = 356,
-    OpGroupNonUniformUMax = 357,
-    OpGroupNonUniformFMax = 358,
-    OpGroupNonUniformBitwiseAnd = 359,
-    OpGroupNonUniformBitwiseOr = 360,
-    OpGroupNonUniformBitwiseXor = 361,
-    OpGroupNonUniformLogicalAnd = 362,
-    OpGroupNonUniformLogicalOr = 363,
-    OpGroupNonUniformLogicalXor = 364,
-    OpGroupNonUniformQuadBroadcast = 365,
-    OpGroupNonUniformQuadSwap = 366,
-    OpCopyLogical = 400,
-    OpPtrEqual = 401,
-    OpPtrNotEqual = 402,
-    OpPtrDiff = 403,
-    OpTerminateInvocation = 4416,
-    OpSubgroupBallotKHR = 4421,
-    OpSubgroupFirstInvocationKHR = 4422,
-    OpSubgroupAllKHR = 4428,
-    OpSubgroupAnyKHR = 4429,
-    OpSubgroupAllEqualKHR = 4430,
-    OpSubgroupReadInvocationKHR = 4432,
-    OpTraceRayKHR = 4445,
-    OpExecuteCallableKHR = 4446,
-    OpConvertUToAccelerationStructureKHR = 4447,
-    OpIgnoreIntersectionKHR = 4448,
-    OpTerminateRayKHR = 4449,
-    OpTypeRayQueryKHR = 4472,
-    OpRayQueryInitializeKHR = 4473,
-    OpRayQueryTerminateKHR = 4474,
-    OpRayQueryGenerateIntersectionKHR = 4475,
-    OpRayQueryConfirmIntersectionKHR = 4476,
-    OpRayQueryProceedKHR = 4477,
-    OpRayQueryGetIntersectionTypeKHR = 4479,
-    OpGroupIAddNonUniformAMD = 5000,
-    OpGroupFAddNonUniformAMD = 5001,
-    OpGroupFMinNonUniformAMD = 5002,
-    OpGroupUMinNonUniformAMD = 5003,
-    OpGroupSMinNonUniformAMD = 5004,
-    OpGroupFMaxNonUniformAMD = 5005,
-    OpGroupUMaxNonUniformAMD = 5006,
-    OpGroupSMaxNonUniformAMD = 5007,
-    OpFragmentMaskFetchAMD = 5011,
-    OpFragmentFetchAMD = 5012,
-    OpReadClockKHR = 5056,
-    OpImageSampleFootprintNV = 5283,
-    OpGroupNonUniformPartitionNV = 5296,
-    OpWritePackedPrimitiveIndices4x8NV = 5299,
-    OpReportIntersectionKHR = 5334,
-    OpReportIntersectionNV = 5334,
-    OpIgnoreIntersectionNV = 5335,
-    OpTerminateRayNV = 5336,
-    OpTraceNV = 5337,
-    OpTraceMotionNV = 5338,
-    OpTraceRayMotionNV = 5339,
-    OpTypeAccelerationStructureKHR = 5341,
-    OpTypeAccelerationStructureNV = 5341,
-    OpExecuteCallableNV = 5344,
-    OpTypeCooperativeMatrixNV = 5358,
-    OpCooperativeMatrixLoadNV = 5359,
-    OpCooperativeMatrixStoreNV = 5360,
-    OpCooperativeMatrixMulAddNV = 5361,
-    OpCooperativeMatrixLengthNV = 5362,
-    OpBeginInvocationInterlockEXT = 5364,
-    OpEndInvocationInterlockEXT = 5365,
-    OpDemoteToHelperInvocationEXT = 5380,
-    OpIsHelperInvocationEXT = 5381,
-    OpSubgroupShuffleINTEL = 5571,
-    OpSubgroupShuffleDownINTEL = 5572,
-    OpSubgroupShuffleUpINTEL = 5573,
-    OpSubgroupShuffleXorINTEL = 5574,
-    OpSubgroupBlockReadINTEL = 5575,
-    OpSubgroupBlockWriteINTEL = 5576,
-    OpSubgroupImageBlockReadINTEL = 5577,
-    OpSubgroupImageBlockWriteINTEL = 5578,
-    OpSubgroupImageMediaBlockReadINTEL = 5580,
-    OpSubgroupImageMediaBlockWriteINTEL = 5581,
-    OpUCountLeadingZerosINTEL = 5585,
-    OpUCountTrailingZerosINTEL = 5586,
-    OpAbsISubINTEL = 5587,
-    OpAbsUSubINTEL = 5588,
-    OpIAddSatINTEL = 5589,
-    OpUAddSatINTEL = 5590,
-    OpIAverageINTEL = 5591,
-    OpUAverageINTEL = 5592,
-    OpIAverageRoundedINTEL = 5593,
-    OpUAverageRoundedINTEL = 5594,
-    OpISubSatINTEL = 5595,
-    OpUSubSatINTEL = 5596,
-    OpIMul32x16INTEL = 5597,
-    OpUMul32x16INTEL = 5598,
-    OpConstFunctionPointerINTEL = 5600,
-    OpFunctionPointerCallINTEL = 5601,
-    OpAsmTargetINTEL = 5609,
-    OpAsmINTEL = 5610,
-    OpAsmCallINTEL = 5611,
-    OpAtomicFMinEXT = 5614,
-    OpAtomicFMaxEXT = 5615,
-    OpAssumeTrueKHR = 5630,
-    OpExpectKHR = 5631,
-    OpDecorateString = 5632,
-    OpDecorateStringGOOGLE = 5632,
-    OpMemberDecorateString = 5633,
-    OpMemberDecorateStringGOOGLE = 5633,
-    OpVmeImageINTEL = 5699,
-    OpTypeVmeImageINTEL = 5700,
-    OpTypeAvcImePayloadINTEL = 5701,
-    OpTypeAvcRefPayloadINTEL = 5702,
-    OpTypeAvcSicPayloadINTEL = 5703,
-    OpTypeAvcMcePayloadINTEL = 5704,
-    OpTypeAvcMceResultINTEL = 5705,
-    OpTypeAvcImeResultINTEL = 5706,
-    OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707,
-    OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708,
-    OpTypeAvcImeSingleReferenceStreaminINTEL = 5709,
-    OpTypeAvcImeDualReferenceStreaminINTEL = 5710,
-    OpTypeAvcRefResultINTEL = 5711,
-    OpTypeAvcSicResultINTEL = 5712,
-    OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713,
-    OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714,
-    OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715,
-    OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716,
-    OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717,
-    OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718,
-    OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719,
-    OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720,
-    OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721,
-    OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722,
-    OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723,
-    OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724,
-    OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725,
-    OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726,
-    OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727,
-    OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728,
-    OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729,
-    OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730,
-    OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731,
-    OpSubgroupAvcMceConvertToImePayloadINTEL = 5732,
-    OpSubgroupAvcMceConvertToImeResultINTEL = 5733,
-    OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734,
-    OpSubgroupAvcMceConvertToRefResultINTEL = 5735,
-    OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736,
-    OpSubgroupAvcMceConvertToSicResultINTEL = 5737,
-    OpSubgroupAvcMceGetMotionVectorsINTEL = 5738,
-    OpSubgroupAvcMceGetInterDistortionsINTEL = 5739,
-    OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740,
-    OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741,
-    OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742,
-    OpSubgroupAvcMceGetInterDirectionsINTEL = 5743,
-    OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744,
-    OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745,
-    OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746,
-    OpSubgroupAvcImeInitializeINTEL = 5747,
-    OpSubgroupAvcImeSetSingleReferenceINTEL = 5748,
-    OpSubgroupAvcImeSetDualReferenceINTEL = 5749,
-    OpSubgroupAvcImeRefWindowSizeINTEL = 5750,
-    OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751,
-    OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752,
-    OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753,
-    OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754,
-    OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755,
-    OpSubgroupAvcImeSetWeightedSadINTEL = 5756,
-    OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757,
-    OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758,
-    OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759,
-    OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760,
-    OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761,
-    OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762,
-    OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763,
-    OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764,
-    OpSubgroupAvcImeConvertToMceResultINTEL = 5765,
-    OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766,
-    OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767,
-    OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768,
-    OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769,
-    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770,
-    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771,
-    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772,
-    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773,
-    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774,
-    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775,
-    OpSubgroupAvcImeGetBorderReachedINTEL = 5776,
-    OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777,
-    OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778,
-    OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779,
-    OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780,
-    OpSubgroupAvcFmeInitializeINTEL = 5781,
-    OpSubgroupAvcBmeInitializeINTEL = 5782,
-    OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783,
-    OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784,
-    OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785,
-    OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786,
-    OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787,
-    OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788,
-    OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789,
-    OpSubgroupAvcRefConvertToMceResultINTEL = 5790,
-    OpSubgroupAvcSicInitializeINTEL = 5791,
-    OpSubgroupAvcSicConfigureSkcINTEL = 5792,
-    OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793,
-    OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794,
-    OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795,
-    OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796,
-    OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797,
-    OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798,
-    OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799,
-    OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800,
-    OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801,
-    OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802,
-    OpSubgroupAvcSicEvaluateIpeINTEL = 5803,
-    OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804,
-    OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805,
-    OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806,
-    OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807,
-    OpSubgroupAvcSicConvertToMceResultINTEL = 5808,
-    OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809,
-    OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810,
-    OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811,
-    OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812,
-    OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813,
-    OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
-    OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
-    OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
-    OpVariableLengthArrayINTEL = 5818,
-    OpSaveMemoryINTEL = 5819,
-    OpRestoreMemoryINTEL = 5820,
-    OpLoopControlINTEL = 5887,
-    OpPtrCastToCrossWorkgroupINTEL = 5934,
-    OpCrossWorkgroupCastToPtrINTEL = 5938,
-    OpReadPipeBlockingINTEL = 5946,
-    OpWritePipeBlockingINTEL = 5947,
-    OpFPGARegINTEL = 5949,
-    OpRayQueryGetRayTMinKHR = 6016,
-    OpRayQueryGetRayFlagsKHR = 6017,
-    OpRayQueryGetIntersectionTKHR = 6018,
-    OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
-    OpRayQueryGetIntersectionInstanceIdKHR = 6020,
-    OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
-    OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
-    OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
-    OpRayQueryGetIntersectionBarycentricsKHR = 6024,
-    OpRayQueryGetIntersectionFrontFaceKHR = 6025,
-    OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
-    OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
-    OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
-    OpRayQueryGetWorldRayDirectionKHR = 6029,
-    OpRayQueryGetWorldRayOriginKHR = 6030,
-    OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
-    OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
-    OpAtomicFAddEXT = 6035,
-    OpTypeBufferSurfaceINTEL = 6086,
-    OpTypeStructContinuedINTEL = 6090,
-    OpConstantCompositeContinuedINTEL = 6091,
-    OpSpecConstantCompositeContinuedINTEL = 6092,
-    OpMax = 0x7fffffff,
-};
-
-#ifdef SPV_ENABLE_UTILITY_CODE
-inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
-    *hasResult = *hasResultType = false;
-    switch (opcode) {
-    default: /* unknown opcode */ break;
-    case OpNop: *hasResult = false; *hasResultType = false; break;
-    case OpUndef: *hasResult = true; *hasResultType = true; break;
-    case OpSourceContinued: *hasResult = false; *hasResultType = false; break;
-    case OpSource: *hasResult = false; *hasResultType = false; break;
-    case OpSourceExtension: *hasResult = false; *hasResultType = false; break;
-    case OpName: *hasResult = false; *hasResultType = false; break;
-    case OpMemberName: *hasResult = false; *hasResultType = false; break;
-    case OpString: *hasResult = true; *hasResultType = false; break;
-    case OpLine: *hasResult = false; *hasResultType = false; break;
-    case OpExtension: *hasResult = false; *hasResultType = false; break;
-    case OpExtInstImport: *hasResult = true; *hasResultType = false; break;
-    case OpExtInst: *hasResult = true; *hasResultType = true; break;
-    case OpMemoryModel: *hasResult = false; *hasResultType = false; break;
-    case OpEntryPoint: *hasResult = false; *hasResultType = false; break;
-    case OpExecutionMode: *hasResult = false; *hasResultType = false; break;
-    case OpCapability: *hasResult = false; *hasResultType = false; break;
-    case OpTypeVoid: *hasResult = true; *hasResultType = false; break;
-    case OpTypeBool: *hasResult = true; *hasResultType = false; break;
-    case OpTypeInt: *hasResult = true; *hasResultType = false; break;
-    case OpTypeFloat: *hasResult = true; *hasResultType = false; break;
-    case OpTypeVector: *hasResult = true; *hasResultType = false; break;
-    case OpTypeMatrix: *hasResult = true; *hasResultType = false; break;
-    case OpTypeImage: *hasResult = true; *hasResultType = false; break;
-    case OpTypeSampler: *hasResult = true; *hasResultType = false; break;
-    case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break;
-    case OpTypeArray: *hasResult = true; *hasResultType = false; break;
-    case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break;
-    case OpTypeStruct: *hasResult = true; *hasResultType = false; break;
-    case OpTypeOpaque: *hasResult = true; *hasResultType = false; break;
-    case OpTypePointer: *hasResult = true; *hasResultType = false; break;
-    case OpTypeFunction: *hasResult = true; *hasResultType = false; break;
-    case OpTypeEvent: *hasResult = true; *hasResultType = false; break;
-    case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break;
-    case OpTypeReserveId: *hasResult = true; *hasResultType = false; break;
-    case OpTypeQueue: *hasResult = true; *hasResultType = false; break;
-    case OpTypePipe: *hasResult = true; *hasResultType = false; break;
-    case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break;
-    case OpConstantTrue: *hasResult = true; *hasResultType = true; break;
-    case OpConstantFalse: *hasResult = true; *hasResultType = true; break;
-    case OpConstant: *hasResult = true; *hasResultType = true; break;
-    case OpConstantComposite: *hasResult = true; *hasResultType = true; break;
-    case OpConstantSampler: *hasResult = true; *hasResultType = true; break;
-    case OpConstantNull: *hasResult = true; *hasResultType = true; break;
-    case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break;
-    case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break;
-    case OpSpecConstant: *hasResult = true; *hasResultType = true; break;
-    case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break;
-    case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break;
-    case OpFunction: *hasResult = true; *hasResultType = true; break;
-    case OpFunctionParameter: *hasResult = true; *hasResultType = true; break;
-    case OpFunctionEnd: *hasResult = false; *hasResultType = false; break;
-    case OpFunctionCall: *hasResult = true; *hasResultType = true; break;
-    case OpVariable: *hasResult = true; *hasResultType = true; break;
-    case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break;
-    case OpLoad: *hasResult = true; *hasResultType = true; break;
-    case OpStore: *hasResult = false; *hasResultType = false; break;
-    case OpCopyMemory: *hasResult = false; *hasResultType = false; break;
-    case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break;
-    case OpAccessChain: *hasResult = true; *hasResultType = true; break;
-    case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break;
-    case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break;
-    case OpArrayLength: *hasResult = true; *hasResultType = true; break;
-    case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break;
-    case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break;
-    case OpDecorate: *hasResult = false; *hasResultType = false; break;
-    case OpMemberDecorate: *hasResult = false; *hasResultType = false; break;
-    case OpDecorationGroup: *hasResult = true; *hasResultType = false; break;
-    case OpGroupDecorate: *hasResult = false; *hasResultType = false; break;
-    case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break;
-    case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break;
-    case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break;
-    case OpVectorShuffle: *hasResult = true; *hasResultType = true; break;
-    case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break;
-    case OpCompositeExtract: *hasResult = true; *hasResultType = true; break;
-    case OpCompositeInsert: *hasResult = true; *hasResultType = true; break;
-    case OpCopyObject: *hasResult = true; *hasResultType = true; break;
-    case OpTranspose: *hasResult = true; *hasResultType = true; break;
-    case OpSampledImage: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageFetch: *hasResult = true; *hasResultType = true; break;
-    case OpImageGather: *hasResult = true; *hasResultType = true; break;
-    case OpImageDrefGather: *hasResult = true; *hasResultType = true; break;
-    case OpImageRead: *hasResult = true; *hasResultType = true; break;
-    case OpImageWrite: *hasResult = false; *hasResultType = false; break;
-    case OpImage: *hasResult = true; *hasResultType = true; break;
-    case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break;
-    case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break;
-    case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageQuerySize: *hasResult = true; *hasResultType = true; break;
-    case OpImageQueryLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break;
-    case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break;
-    case OpConvertFToU: *hasResult = true; *hasResultType = true; break;
-    case OpConvertFToS: *hasResult = true; *hasResultType = true; break;
-    case OpConvertSToF: *hasResult = true; *hasResultType = true; break;
-    case OpConvertUToF: *hasResult = true; *hasResultType = true; break;
-    case OpUConvert: *hasResult = true; *hasResultType = true; break;
-    case OpSConvert: *hasResult = true; *hasResultType = true; break;
-    case OpFConvert: *hasResult = true; *hasResultType = true; break;
-    case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break;
-    case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break;
-    case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break;
-    case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break;
-    case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break;
-    case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break;
-    case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break;
-    case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break;
-    case OpBitcast: *hasResult = true; *hasResultType = true; break;
-    case OpSNegate: *hasResult = true; *hasResultType = true; break;
-    case OpFNegate: *hasResult = true; *hasResultType = true; break;
-    case OpIAdd: *hasResult = true; *hasResultType = true; break;
-    case OpFAdd: *hasResult = true; *hasResultType = true; break;
-    case OpISub: *hasResult = true; *hasResultType = true; break;
-    case OpFSub: *hasResult = true; *hasResultType = true; break;
-    case OpIMul: *hasResult = true; *hasResultType = true; break;
-    case OpFMul: *hasResult = true; *hasResultType = true; break;
-    case OpUDiv: *hasResult = true; *hasResultType = true; break;
-    case OpSDiv: *hasResult = true; *hasResultType = true; break;
-    case OpFDiv: *hasResult = true; *hasResultType = true; break;
-    case OpUMod: *hasResult = true; *hasResultType = true; break;
-    case OpSRem: *hasResult = true; *hasResultType = true; break;
-    case OpSMod: *hasResult = true; *hasResultType = true; break;
-    case OpFRem: *hasResult = true; *hasResultType = true; break;
-    case OpFMod: *hasResult = true; *hasResultType = true; break;
-    case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break;
-    case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break;
-    case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break;
-    case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break;
-    case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break;
-    case OpOuterProduct: *hasResult = true; *hasResultType = true; break;
-    case OpDot: *hasResult = true; *hasResultType = true; break;
-    case OpIAddCarry: *hasResult = true; *hasResultType = true; break;
-    case OpISubBorrow: *hasResult = true; *hasResultType = true; break;
-    case OpUMulExtended: *hasResult = true; *hasResultType = true; break;
-    case OpSMulExtended: *hasResult = true; *hasResultType = true; break;
-    case OpAny: *hasResult = true; *hasResultType = true; break;
-    case OpAll: *hasResult = true; *hasResultType = true; break;
-    case OpIsNan: *hasResult = true; *hasResultType = true; break;
-    case OpIsInf: *hasResult = true; *hasResultType = true; break;
-    case OpIsFinite: *hasResult = true; *hasResultType = true; break;
-    case OpIsNormal: *hasResult = true; *hasResultType = true; break;
-    case OpSignBitSet: *hasResult = true; *hasResultType = true; break;
-    case OpLessOrGreater: *hasResult = true; *hasResultType = true; break;
-    case OpOrdered: *hasResult = true; *hasResultType = true; break;
-    case OpUnordered: *hasResult = true; *hasResultType = true; break;
-    case OpLogicalEqual: *hasResult = true; *hasResultType = true; break;
-    case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break;
-    case OpLogicalOr: *hasResult = true; *hasResultType = true; break;
-    case OpLogicalAnd: *hasResult = true; *hasResultType = true; break;
-    case OpLogicalNot: *hasResult = true; *hasResultType = true; break;
-    case OpSelect: *hasResult = true; *hasResultType = true; break;
-    case OpIEqual: *hasResult = true; *hasResultType = true; break;
-    case OpINotEqual: *hasResult = true; *hasResultType = true; break;
-    case OpUGreaterThan: *hasResult = true; *hasResultType = true; break;
-    case OpSGreaterThan: *hasResult = true; *hasResultType = true; break;
-    case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpULessThan: *hasResult = true; *hasResultType = true; break;
-    case OpSLessThan: *hasResult = true; *hasResultType = true; break;
-    case OpULessThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
-    case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break;
-    case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break;
-    case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break;
-    case OpBitwiseOr: *hasResult = true; *hasResultType = true; break;
-    case OpBitwiseXor: *hasResult = true; *hasResultType = true; break;
-    case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break;
-    case OpNot: *hasResult = true; *hasResultType = true; break;
-    case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break;
-    case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break;
-    case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break;
-    case OpBitReverse: *hasResult = true; *hasResultType = true; break;
-    case OpBitCount: *hasResult = true; *hasResultType = true; break;
-    case OpDPdx: *hasResult = true; *hasResultType = true; break;
-    case OpDPdy: *hasResult = true; *hasResultType = true; break;
-    case OpFwidth: *hasResult = true; *hasResultType = true; break;
-    case OpDPdxFine: *hasResult = true; *hasResultType = true; break;
-    case OpDPdyFine: *hasResult = true; *hasResultType = true; break;
-    case OpFwidthFine: *hasResult = true; *hasResultType = true; break;
-    case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break;
-    case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break;
-    case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break;
-    case OpEmitVertex: *hasResult = false; *hasResultType = false; break;
-    case OpEndPrimitive: *hasResult = false; *hasResultType = false; break;
-    case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break;
-    case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break;
-    case OpControlBarrier: *hasResult = false; *hasResultType = false; break;
-    case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break;
-    case OpAtomicLoad: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicStore: *hasResult = false; *hasResultType = false; break;
-    case OpAtomicExchange: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicISub: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicSMin: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicUMin: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicSMax: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicUMax: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicAnd: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicOr: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicXor: *hasResult = true; *hasResultType = true; break;
-    case OpPhi: *hasResult = true; *hasResultType = true; break;
-    case OpLoopMerge: *hasResult = false; *hasResultType = false; break;
-    case OpSelectionMerge: *hasResult = false; *hasResultType = false; break;
-    case OpLabel: *hasResult = true; *hasResultType = false; break;
-    case OpBranch: *hasResult = false; *hasResultType = false; break;
-    case OpBranchConditional: *hasResult = false; *hasResultType = false; break;
-    case OpSwitch: *hasResult = false; *hasResultType = false; break;
-    case OpKill: *hasResult = false; *hasResultType = false; break;
-    case OpReturn: *hasResult = false; *hasResultType = false; break;
-    case OpReturnValue: *hasResult = false; *hasResultType = false; break;
-    case OpUnreachable: *hasResult = false; *hasResultType = false; break;
-    case OpLifetimeStart: *hasResult = false; *hasResultType = false; break;
-    case OpLifetimeStop: *hasResult = false; *hasResultType = false; break;
-    case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break;
-    case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break;
-    case OpGroupAll: *hasResult = true; *hasResultType = true; break;
-    case OpGroupAny: *hasResult = true; *hasResultType = true; break;
-    case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break;
-    case OpGroupIAdd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFAdd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupUMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupSMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFMax: *hasResult = true; *hasResultType = true; break;
-    case OpGroupUMax: *hasResult = true; *hasResultType = true; break;
-    case OpGroupSMax: *hasResult = true; *hasResultType = true; break;
-    case OpReadPipe: *hasResult = true; *hasResultType = true; break;
-    case OpWritePipe: *hasResult = true; *hasResultType = true; break;
-    case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break;
-    case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break;
-    case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break;
-    case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break;
-    case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break;
-    case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break;
-    case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break;
-    case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break;
-    case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break;
-    case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break;
-    case OpRetainEvent: *hasResult = false; *hasResultType = false; break;
-    case OpReleaseEvent: *hasResult = false; *hasResultType = false; break;
-    case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break;
-    case OpIsValidEvent: *hasResult = true; *hasResultType = true; break;
-    case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break;
-    case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break;
-    case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break;
-    case OpBuildNDRange: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseGather: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break;
-    case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break;
-    case OpNoLine: *hasResult = false; *hasResultType = false; break;
-    case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break;
-    case OpImageSparseRead: *hasResult = true; *hasResultType = true; break;
-    case OpSizeOf: *hasResult = true; *hasResultType = true; break;
-    case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break;
-    case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break;
-    case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break;
-    case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break;
-    case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break;
-    case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break;
-    case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break;
-    case OpModuleProcessed: *hasResult = false; *hasResultType = false; break;
-    case OpExecutionModeId: *hasResult = false; *hasResultType = false; break;
-    case OpDecorateId: *hasResult = false; *hasResultType = false; break;
-    case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break;
-    case OpCopyLogical: *hasResult = true; *hasResultType = true; break;
-    case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
-    case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
-    case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
-    case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
-    case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
-    case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
-    case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
-    case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
-    case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
-    case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
-    case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
-    case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
-    case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
-    case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
-    case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
-    case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
-    case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
-    case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
-    case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
-    case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
-    case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
-    case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
-    case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
-    case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
-    case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
-    case OpTraceNV: *hasResult = false; *hasResultType = false; break;
-    case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
-    case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
-    case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
-    case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
-    case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
-    case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
-    case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
-    case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
-    case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
-    case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
-    case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
-    case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
-    case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
-    case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
-    case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
-    case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
-    case OpExpectKHR: *hasResult = true; *hasResultType = true; break;
-    case OpDecorateString: *hasResult = false; *hasResultType = false; break;
-    case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
-    case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
-    case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
-    case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
-    case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break;
-    case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
-    case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
-    }
-}
-#endif /* SPV_ENABLE_UTILITY_CODE */
-
-// 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)); }
-inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
-inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
-
-}  // end namespace spv
-
-#endif  // #ifndef spirv_HPP
+// Copyright (c) 2014-2020 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#, D, Beef
+//
+// - 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']
+// - C# will use enum classes in the Specification class located in the "Spv" namespace,
+//     e.g.: Spv.Specification.SourceLanguage.GLSL
+// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
+// - Beef will use enum classes in the Specification class located in the "Spv" namespace,
+//     e.g.: Spv.Specification.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 0x10600
+#define SPV_REVISION 1
+
+static const unsigned int MagicNumber = 0x07230203;
+static const unsigned int Version = 0x00010600;
+static const unsigned int Revision = 1;
+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,
+    SourceLanguageCPP_for_OpenCL = 6,
+    SourceLanguageSYCL = 7,
+    SourceLanguageMax = 0x7fffffff,
+};
+
+enum ExecutionModel {
+    ExecutionModelVertex = 0,
+    ExecutionModelTessellationControl = 1,
+    ExecutionModelTessellationEvaluation = 2,
+    ExecutionModelGeometry = 3,
+    ExecutionModelFragment = 4,
+    ExecutionModelGLCompute = 5,
+    ExecutionModelKernel = 6,
+    ExecutionModelTaskNV = 5267,
+    ExecutionModelMeshNV = 5268,
+    ExecutionModelRayGenerationKHR = 5313,
+    ExecutionModelRayGenerationNV = 5313,
+    ExecutionModelIntersectionKHR = 5314,
+    ExecutionModelIntersectionNV = 5314,
+    ExecutionModelAnyHitKHR = 5315,
+    ExecutionModelAnyHitNV = 5315,
+    ExecutionModelClosestHitKHR = 5316,
+    ExecutionModelClosestHitNV = 5316,
+    ExecutionModelMissKHR = 5317,
+    ExecutionModelMissNV = 5317,
+    ExecutionModelCallableKHR = 5318,
+    ExecutionModelCallableNV = 5318,
+    ExecutionModelTaskEXT = 5364,
+    ExecutionModelMeshEXT = 5365,
+    ExecutionModelMax = 0x7fffffff,
+};
+
+enum AddressingModel {
+    AddressingModelLogical = 0,
+    AddressingModelPhysical32 = 1,
+    AddressingModelPhysical64 = 2,
+    AddressingModelPhysicalStorageBuffer64 = 5348,
+    AddressingModelPhysicalStorageBuffer64EXT = 5348,
+    AddressingModelMax = 0x7fffffff,
+};
+
+enum MemoryModel {
+    MemoryModelSimple = 0,
+    MemoryModelGLSL450 = 1,
+    MemoryModelOpenCL = 2,
+    MemoryModelVulkan = 3,
+    MemoryModelVulkanKHR = 3,
+    MemoryModelMax = 0x7fffffff,
+};
+
+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,
+    ExecutionModeInitializer = 33,
+    ExecutionModeFinalizer = 34,
+    ExecutionModeSubgroupSize = 35,
+    ExecutionModeSubgroupsPerWorkgroup = 36,
+    ExecutionModeSubgroupsPerWorkgroupId = 37,
+    ExecutionModeLocalSizeId = 38,
+    ExecutionModeLocalSizeHintId = 39,
+    ExecutionModeNonCoherentColorAttachmentReadEXT = 4169,
+    ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170,
+    ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171,
+    ExecutionModeSubgroupUniformControlFlowKHR = 4421,
+    ExecutionModePostDepthCoverage = 4446,
+    ExecutionModeDenormPreserve = 4459,
+    ExecutionModeDenormFlushToZero = 4460,
+    ExecutionModeSignedZeroInfNanPreserve = 4461,
+    ExecutionModeRoundingModeRTE = 4462,
+    ExecutionModeRoundingModeRTZ = 4463,
+    ExecutionModeEarlyAndLateFragmentTestsAMD = 5017,
+    ExecutionModeStencilRefReplacingEXT = 5027,
+    ExecutionModeStencilRefUnchangedFrontAMD = 5079,
+    ExecutionModeStencilRefGreaterFrontAMD = 5080,
+    ExecutionModeStencilRefLessFrontAMD = 5081,
+    ExecutionModeStencilRefUnchangedBackAMD = 5082,
+    ExecutionModeStencilRefGreaterBackAMD = 5083,
+    ExecutionModeStencilRefLessBackAMD = 5084,
+    ExecutionModeOutputLinesEXT = 5269,
+    ExecutionModeOutputLinesNV = 5269,
+    ExecutionModeOutputPrimitivesEXT = 5270,
+    ExecutionModeOutputPrimitivesNV = 5270,
+    ExecutionModeDerivativeGroupQuadsNV = 5289,
+    ExecutionModeDerivativeGroupLinearNV = 5290,
+    ExecutionModeOutputTrianglesEXT = 5298,
+    ExecutionModeOutputTrianglesNV = 5298,
+    ExecutionModePixelInterlockOrderedEXT = 5366,
+    ExecutionModePixelInterlockUnorderedEXT = 5367,
+    ExecutionModeSampleInterlockOrderedEXT = 5368,
+    ExecutionModeSampleInterlockUnorderedEXT = 5369,
+    ExecutionModeShadingRateInterlockOrderedEXT = 5370,
+    ExecutionModeShadingRateInterlockUnorderedEXT = 5371,
+    ExecutionModeSharedLocalMemorySizeINTEL = 5618,
+    ExecutionModeRoundingModeRTPINTEL = 5620,
+    ExecutionModeRoundingModeRTNINTEL = 5621,
+    ExecutionModeFloatingPointModeALTINTEL = 5622,
+    ExecutionModeFloatingPointModeIEEEINTEL = 5623,
+    ExecutionModeMaxWorkgroupSizeINTEL = 5893,
+    ExecutionModeMaxWorkDimINTEL = 5894,
+    ExecutionModeNoGlobalOffsetINTEL = 5895,
+    ExecutionModeNumSIMDWorkitemsINTEL = 5896,
+    ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
+    ExecutionModeStreamingInterfaceINTEL = 6154,
+    ExecutionModeNamedBarrierCountINTEL = 6417,
+    ExecutionModeMax = 0x7fffffff,
+};
+
+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,
+    StorageClassStorageBuffer = 12,
+    StorageClassTileImageEXT = 4172,
+    StorageClassCallableDataKHR = 5328,
+    StorageClassCallableDataNV = 5328,
+    StorageClassIncomingCallableDataKHR = 5329,
+    StorageClassIncomingCallableDataNV = 5329,
+    StorageClassRayPayloadKHR = 5338,
+    StorageClassRayPayloadNV = 5338,
+    StorageClassHitAttributeKHR = 5339,
+    StorageClassHitAttributeNV = 5339,
+    StorageClassIncomingRayPayloadKHR = 5342,
+    StorageClassIncomingRayPayloadNV = 5342,
+    StorageClassShaderRecordBufferKHR = 5343,
+    StorageClassShaderRecordBufferNV = 5343,
+    StorageClassPhysicalStorageBuffer = 5349,
+    StorageClassPhysicalStorageBufferEXT = 5349,
+    StorageClassHitObjectAttributeNV = 5385,
+    StorageClassTaskPayloadWorkgroupEXT = 5402,
+    StorageClassCodeSectionINTEL = 5605,
+    StorageClassDeviceOnlyINTEL = 5936,
+    StorageClassHostOnlyINTEL = 5937,
+    StorageClassMax = 0x7fffffff,
+};
+
+enum Dim {
+    Dim1D = 0,
+    Dim2D = 1,
+    Dim3D = 2,
+    DimCube = 3,
+    DimRect = 4,
+    DimBuffer = 5,
+    DimSubpassData = 6,
+    DimTileImageDataEXT = 4173,
+    DimMax = 0x7fffffff,
+};
+
+enum SamplerAddressingMode {
+    SamplerAddressingModeNone = 0,
+    SamplerAddressingModeClampToEdge = 1,
+    SamplerAddressingModeClamp = 2,
+    SamplerAddressingModeRepeat = 3,
+    SamplerAddressingModeRepeatMirrored = 4,
+    SamplerAddressingModeMax = 0x7fffffff,
+};
+
+enum SamplerFilterMode {
+    SamplerFilterModeNearest = 0,
+    SamplerFilterModeLinear = 1,
+    SamplerFilterModeMax = 0x7fffffff,
+};
+
+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,
+    ImageFormatR64ui = 40,
+    ImageFormatR64i = 41,
+    ImageFormatMax = 0x7fffffff,
+};
+
+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,
+    ImageChannelOrderABGR = 19,
+    ImageChannelOrderMax = 0x7fffffff,
+};
+
+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,
+    ImageChannelDataTypeMax = 0x7fffffff,
+};
+
+enum ImageOperandsShift {
+    ImageOperandsBiasShift = 0,
+    ImageOperandsLodShift = 1,
+    ImageOperandsGradShift = 2,
+    ImageOperandsConstOffsetShift = 3,
+    ImageOperandsOffsetShift = 4,
+    ImageOperandsConstOffsetsShift = 5,
+    ImageOperandsSampleShift = 6,
+    ImageOperandsMinLodShift = 7,
+    ImageOperandsMakeTexelAvailableShift = 8,
+    ImageOperandsMakeTexelAvailableKHRShift = 8,
+    ImageOperandsMakeTexelVisibleShift = 9,
+    ImageOperandsMakeTexelVisibleKHRShift = 9,
+    ImageOperandsNonPrivateTexelShift = 10,
+    ImageOperandsNonPrivateTexelKHRShift = 10,
+    ImageOperandsVolatileTexelShift = 11,
+    ImageOperandsVolatileTexelKHRShift = 11,
+    ImageOperandsSignExtendShift = 12,
+    ImageOperandsZeroExtendShift = 13,
+    ImageOperandsNontemporalShift = 14,
+    ImageOperandsOffsetsShift = 16,
+    ImageOperandsMax = 0x7fffffff,
+};
+
+enum ImageOperandsMask {
+    ImageOperandsMaskNone = 0,
+    ImageOperandsBiasMask = 0x00000001,
+    ImageOperandsLodMask = 0x00000002,
+    ImageOperandsGradMask = 0x00000004,
+    ImageOperandsConstOffsetMask = 0x00000008,
+    ImageOperandsOffsetMask = 0x00000010,
+    ImageOperandsConstOffsetsMask = 0x00000020,
+    ImageOperandsSampleMask = 0x00000040,
+    ImageOperandsMinLodMask = 0x00000080,
+    ImageOperandsMakeTexelAvailableMask = 0x00000100,
+    ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
+    ImageOperandsMakeTexelVisibleMask = 0x00000200,
+    ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
+    ImageOperandsNonPrivateTexelMask = 0x00000400,
+    ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
+    ImageOperandsVolatileTexelMask = 0x00000800,
+    ImageOperandsVolatileTexelKHRMask = 0x00000800,
+    ImageOperandsSignExtendMask = 0x00001000,
+    ImageOperandsZeroExtendMask = 0x00002000,
+    ImageOperandsNontemporalMask = 0x00004000,
+    ImageOperandsOffsetsMask = 0x00010000,
+};
+
+enum FPFastMathModeShift {
+    FPFastMathModeNotNaNShift = 0,
+    FPFastMathModeNotInfShift = 1,
+    FPFastMathModeNSZShift = 2,
+    FPFastMathModeAllowRecipShift = 3,
+    FPFastMathModeFastShift = 4,
+    FPFastMathModeAllowContractFastINTELShift = 16,
+    FPFastMathModeAllowReassocINTELShift = 17,
+    FPFastMathModeMax = 0x7fffffff,
+};
+
+enum FPFastMathModeMask {
+    FPFastMathModeMaskNone = 0,
+    FPFastMathModeNotNaNMask = 0x00000001,
+    FPFastMathModeNotInfMask = 0x00000002,
+    FPFastMathModeNSZMask = 0x00000004,
+    FPFastMathModeAllowRecipMask = 0x00000008,
+    FPFastMathModeFastMask = 0x00000010,
+    FPFastMathModeAllowContractFastINTELMask = 0x00010000,
+    FPFastMathModeAllowReassocINTELMask = 0x00020000,
+};
+
+enum FPRoundingMode {
+    FPRoundingModeRTE = 0,
+    FPRoundingModeRTZ = 1,
+    FPRoundingModeRTP = 2,
+    FPRoundingModeRTN = 3,
+    FPRoundingModeMax = 0x7fffffff,
+};
+
+enum LinkageType {
+    LinkageTypeExport = 0,
+    LinkageTypeImport = 1,
+    LinkageTypeLinkOnceODR = 2,
+    LinkageTypeMax = 0x7fffffff,
+};
+
+enum AccessQualifier {
+    AccessQualifierReadOnly = 0,
+    AccessQualifierWriteOnly = 1,
+    AccessQualifierReadWrite = 2,
+    AccessQualifierMax = 0x7fffffff,
+};
+
+enum FunctionParameterAttribute {
+    FunctionParameterAttributeZext = 0,
+    FunctionParameterAttributeSext = 1,
+    FunctionParameterAttributeByVal = 2,
+    FunctionParameterAttributeSret = 3,
+    FunctionParameterAttributeNoAlias = 4,
+    FunctionParameterAttributeNoCapture = 5,
+    FunctionParameterAttributeNoWrite = 6,
+    FunctionParameterAttributeNoReadWrite = 7,
+    FunctionParameterAttributeRuntimeAlignedINTEL = 5940,
+    FunctionParameterAttributeMax = 0x7fffffff,
+};
+
+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,
+    DecorationUniformId = 27,
+    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,
+    DecorationMaxByteOffset = 45,
+    DecorationAlignmentId = 46,
+    DecorationMaxByteOffsetId = 47,
+    DecorationNoSignedWrap = 4469,
+    DecorationNoUnsignedWrap = 4470,
+    DecorationWeightTextureQCOM = 4487,
+    DecorationBlockMatchTextureQCOM = 4488,
+    DecorationExplicitInterpAMD = 4999,
+    DecorationOverrideCoverageNV = 5248,
+    DecorationPassthroughNV = 5250,
+    DecorationViewportRelativeNV = 5252,
+    DecorationSecondaryViewportRelativeNV = 5256,
+    DecorationPerPrimitiveEXT = 5271,
+    DecorationPerPrimitiveNV = 5271,
+    DecorationPerViewNV = 5272,
+    DecorationPerTaskNV = 5273,
+    DecorationPerVertexKHR = 5285,
+    DecorationPerVertexNV = 5285,
+    DecorationNonUniform = 5300,
+    DecorationNonUniformEXT = 5300,
+    DecorationRestrictPointer = 5355,
+    DecorationRestrictPointerEXT = 5355,
+    DecorationAliasedPointer = 5356,
+    DecorationAliasedPointerEXT = 5356,
+    DecorationHitObjectShaderRecordBufferNV = 5386,
+    DecorationBindlessSamplerNV = 5398,
+    DecorationBindlessImageNV = 5399,
+    DecorationBoundSamplerNV = 5400,
+    DecorationBoundImageNV = 5401,
+    DecorationSIMTCallINTEL = 5599,
+    DecorationReferencedIndirectlyINTEL = 5602,
+    DecorationClobberINTEL = 5607,
+    DecorationSideEffectsINTEL = 5608,
+    DecorationVectorComputeVariableINTEL = 5624,
+    DecorationFuncParamIOKindINTEL = 5625,
+    DecorationVectorComputeFunctionINTEL = 5626,
+    DecorationStackCallINTEL = 5627,
+    DecorationGlobalVariableOffsetINTEL = 5628,
+    DecorationCounterBuffer = 5634,
+    DecorationHlslCounterBufferGOOGLE = 5634,
+    DecorationHlslSemanticGOOGLE = 5635,
+    DecorationUserSemantic = 5635,
+    DecorationUserTypeGOOGLE = 5636,
+    DecorationFunctionRoundingModeINTEL = 5822,
+    DecorationFunctionDenormModeINTEL = 5823,
+    DecorationRegisterINTEL = 5825,
+    DecorationMemoryINTEL = 5826,
+    DecorationNumbanksINTEL = 5827,
+    DecorationBankwidthINTEL = 5828,
+    DecorationMaxPrivateCopiesINTEL = 5829,
+    DecorationSinglepumpINTEL = 5830,
+    DecorationDoublepumpINTEL = 5831,
+    DecorationMaxReplicatesINTEL = 5832,
+    DecorationSimpleDualPortINTEL = 5833,
+    DecorationMergeINTEL = 5834,
+    DecorationBankBitsINTEL = 5835,
+    DecorationForcePow2DepthINTEL = 5836,
+    DecorationBurstCoalesceINTEL = 5899,
+    DecorationCacheSizeINTEL = 5900,
+    DecorationDontStaticallyCoalesceINTEL = 5901,
+    DecorationPrefetchINTEL = 5902,
+    DecorationStallEnableINTEL = 5905,
+    DecorationFuseLoopsInFunctionINTEL = 5907,
+    DecorationMathOpDSPModeINTEL = 5909,
+    DecorationAliasScopeINTEL = 5914,
+    DecorationNoAliasINTEL = 5915,
+    DecorationInitiationIntervalINTEL = 5917,
+    DecorationMaxConcurrencyINTEL = 5918,
+    DecorationPipelineEnableINTEL = 5919,
+    DecorationBufferLocationINTEL = 5921,
+    DecorationIOPipeStorageINTEL = 5944,
+    DecorationFunctionFloatingPointModeINTEL = 6080,
+    DecorationSingleElementVectorINTEL = 6085,
+    DecorationVectorComputeCallableFunctionINTEL = 6087,
+    DecorationMediaBlockIOINTEL = 6140,
+    DecorationConduitKernelArgumentINTEL = 6175,
+    DecorationRegisterMapKernelArgumentINTEL = 6176,
+    DecorationMMHostInterfaceAddressWidthINTEL = 6177,
+    DecorationMMHostInterfaceDataWidthINTEL = 6178,
+    DecorationMMHostInterfaceLatencyINTEL = 6179,
+    DecorationMMHostInterfaceReadWriteModeINTEL = 6180,
+    DecorationMMHostInterfaceMaxBurstINTEL = 6181,
+    DecorationMMHostInterfaceWaitRequestINTEL = 6182,
+    DecorationStableKernelArgumentINTEL = 6183,
+    DecorationMax = 0x7fffffff,
+};
+
+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,
+    BuiltInCoreIDARM = 4160,
+    BuiltInCoreCountARM = 4161,
+    BuiltInCoreMaxIDARM = 4162,
+    BuiltInWarpIDARM = 4163,
+    BuiltInWarpMaxIDARM = 4164,
+    BuiltInSubgroupEqMask = 4416,
+    BuiltInSubgroupEqMaskKHR = 4416,
+    BuiltInSubgroupGeMask = 4417,
+    BuiltInSubgroupGeMaskKHR = 4417,
+    BuiltInSubgroupGtMask = 4418,
+    BuiltInSubgroupGtMaskKHR = 4418,
+    BuiltInSubgroupLeMask = 4419,
+    BuiltInSubgroupLeMaskKHR = 4419,
+    BuiltInSubgroupLtMask = 4420,
+    BuiltInSubgroupLtMaskKHR = 4420,
+    BuiltInBaseVertex = 4424,
+    BuiltInBaseInstance = 4425,
+    BuiltInDrawIndex = 4426,
+    BuiltInPrimitiveShadingRateKHR = 4432,
+    BuiltInDeviceIndex = 4438,
+    BuiltInViewIndex = 4440,
+    BuiltInShadingRateKHR = 4444,
+    BuiltInBaryCoordNoPerspAMD = 4992,
+    BuiltInBaryCoordNoPerspCentroidAMD = 4993,
+    BuiltInBaryCoordNoPerspSampleAMD = 4994,
+    BuiltInBaryCoordSmoothAMD = 4995,
+    BuiltInBaryCoordSmoothCentroidAMD = 4996,
+    BuiltInBaryCoordSmoothSampleAMD = 4997,
+    BuiltInBaryCoordPullModelAMD = 4998,
+    BuiltInFragStencilRefEXT = 5014,
+    BuiltInViewportMaskNV = 5253,
+    BuiltInSecondaryPositionNV = 5257,
+    BuiltInSecondaryViewportMaskNV = 5258,
+    BuiltInPositionPerViewNV = 5261,
+    BuiltInViewportMaskPerViewNV = 5262,
+    BuiltInFullyCoveredEXT = 5264,
+    BuiltInTaskCountNV = 5274,
+    BuiltInPrimitiveCountNV = 5275,
+    BuiltInPrimitiveIndicesNV = 5276,
+    BuiltInClipDistancePerViewNV = 5277,
+    BuiltInCullDistancePerViewNV = 5278,
+    BuiltInLayerPerViewNV = 5279,
+    BuiltInMeshViewCountNV = 5280,
+    BuiltInMeshViewIndicesNV = 5281,
+    BuiltInBaryCoordKHR = 5286,
+    BuiltInBaryCoordNV = 5286,
+    BuiltInBaryCoordNoPerspKHR = 5287,
+    BuiltInBaryCoordNoPerspNV = 5287,
+    BuiltInFragSizeEXT = 5292,
+    BuiltInFragmentSizeNV = 5292,
+    BuiltInFragInvocationCountEXT = 5293,
+    BuiltInInvocationsPerPixelNV = 5293,
+    BuiltInPrimitivePointIndicesEXT = 5294,
+    BuiltInPrimitiveLineIndicesEXT = 5295,
+    BuiltInPrimitiveTriangleIndicesEXT = 5296,
+    BuiltInCullPrimitiveEXT = 5299,
+    BuiltInLaunchIdKHR = 5319,
+    BuiltInLaunchIdNV = 5319,
+    BuiltInLaunchSizeKHR = 5320,
+    BuiltInLaunchSizeNV = 5320,
+    BuiltInWorldRayOriginKHR = 5321,
+    BuiltInWorldRayOriginNV = 5321,
+    BuiltInWorldRayDirectionKHR = 5322,
+    BuiltInWorldRayDirectionNV = 5322,
+    BuiltInObjectRayOriginKHR = 5323,
+    BuiltInObjectRayOriginNV = 5323,
+    BuiltInObjectRayDirectionKHR = 5324,
+    BuiltInObjectRayDirectionNV = 5324,
+    BuiltInRayTminKHR = 5325,
+    BuiltInRayTminNV = 5325,
+    BuiltInRayTmaxKHR = 5326,
+    BuiltInRayTmaxNV = 5326,
+    BuiltInInstanceCustomIndexKHR = 5327,
+    BuiltInInstanceCustomIndexNV = 5327,
+    BuiltInObjectToWorldKHR = 5330,
+    BuiltInObjectToWorldNV = 5330,
+    BuiltInWorldToObjectKHR = 5331,
+    BuiltInWorldToObjectNV = 5331,
+    BuiltInHitTNV = 5332,
+    BuiltInHitKindKHR = 5333,
+    BuiltInHitKindNV = 5333,
+    BuiltInCurrentRayTimeNV = 5334,
+    BuiltInHitTriangleVertexPositionsKHR = 5335,
+    BuiltInHitMicroTriangleVertexPositionsNV = 5337,
+    BuiltInHitMicroTriangleVertexBarycentricsNV = 5344,
+    BuiltInHitKindFrontFacingMicroTriangleNV = 5405,
+    BuiltInHitKindBackFacingMicroTriangleNV = 5406,
+    BuiltInIncomingRayFlagsKHR = 5351,
+    BuiltInIncomingRayFlagsNV = 5351,
+    BuiltInRayGeometryIndexKHR = 5352,
+    BuiltInWarpsPerSMNV = 5374,
+    BuiltInSMCountNV = 5375,
+    BuiltInWarpIDNV = 5376,
+    BuiltInSMIDNV = 5377,
+    BuiltInCullMaskKHR = 6021,
+    BuiltInMax = 0x7fffffff,
+};
+
+enum SelectionControlShift {
+    SelectionControlFlattenShift = 0,
+    SelectionControlDontFlattenShift = 1,
+    SelectionControlMax = 0x7fffffff,
+};
+
+enum SelectionControlMask {
+    SelectionControlMaskNone = 0,
+    SelectionControlFlattenMask = 0x00000001,
+    SelectionControlDontFlattenMask = 0x00000002,
+};
+
+enum LoopControlShift {
+    LoopControlUnrollShift = 0,
+    LoopControlDontUnrollShift = 1,
+    LoopControlDependencyInfiniteShift = 2,
+    LoopControlDependencyLengthShift = 3,
+    LoopControlMinIterationsShift = 4,
+    LoopControlMaxIterationsShift = 5,
+    LoopControlIterationMultipleShift = 6,
+    LoopControlPeelCountShift = 7,
+    LoopControlPartialCountShift = 8,
+    LoopControlInitiationIntervalINTELShift = 16,
+    LoopControlMaxConcurrencyINTELShift = 17,
+    LoopControlDependencyArrayINTELShift = 18,
+    LoopControlPipelineEnableINTELShift = 19,
+    LoopControlLoopCoalesceINTELShift = 20,
+    LoopControlMaxInterleavingINTELShift = 21,
+    LoopControlSpeculatedIterationsINTELShift = 22,
+    LoopControlNoFusionINTELShift = 23,
+    LoopControlLoopCountINTELShift = 24,
+    LoopControlMaxReinvocationDelayINTELShift = 25,
+    LoopControlMax = 0x7fffffff,
+};
+
+enum LoopControlMask {
+    LoopControlMaskNone = 0,
+    LoopControlUnrollMask = 0x00000001,
+    LoopControlDontUnrollMask = 0x00000002,
+    LoopControlDependencyInfiniteMask = 0x00000004,
+    LoopControlDependencyLengthMask = 0x00000008,
+    LoopControlMinIterationsMask = 0x00000010,
+    LoopControlMaxIterationsMask = 0x00000020,
+    LoopControlIterationMultipleMask = 0x00000040,
+    LoopControlPeelCountMask = 0x00000080,
+    LoopControlPartialCountMask = 0x00000100,
+    LoopControlInitiationIntervalINTELMask = 0x00010000,
+    LoopControlMaxConcurrencyINTELMask = 0x00020000,
+    LoopControlDependencyArrayINTELMask = 0x00040000,
+    LoopControlPipelineEnableINTELMask = 0x00080000,
+    LoopControlLoopCoalesceINTELMask = 0x00100000,
+    LoopControlMaxInterleavingINTELMask = 0x00200000,
+    LoopControlSpeculatedIterationsINTELMask = 0x00400000,
+    LoopControlNoFusionINTELMask = 0x00800000,
+    LoopControlLoopCountINTELMask = 0x01000000,
+    LoopControlMaxReinvocationDelayINTELMask = 0x02000000,
+};
+
+enum FunctionControlShift {
+    FunctionControlInlineShift = 0,
+    FunctionControlDontInlineShift = 1,
+    FunctionControlPureShift = 2,
+    FunctionControlConstShift = 3,
+    FunctionControlOptNoneINTELShift = 16,
+    FunctionControlMax = 0x7fffffff,
+};
+
+enum FunctionControlMask {
+    FunctionControlMaskNone = 0,
+    FunctionControlInlineMask = 0x00000001,
+    FunctionControlDontInlineMask = 0x00000002,
+    FunctionControlPureMask = 0x00000004,
+    FunctionControlConstMask = 0x00000008,
+    FunctionControlOptNoneINTELMask = 0x00010000,
+};
+
+enum MemorySemanticsShift {
+    MemorySemanticsAcquireShift = 1,
+    MemorySemanticsReleaseShift = 2,
+    MemorySemanticsAcquireReleaseShift = 3,
+    MemorySemanticsSequentiallyConsistentShift = 4,
+    MemorySemanticsUniformMemoryShift = 6,
+    MemorySemanticsSubgroupMemoryShift = 7,
+    MemorySemanticsWorkgroupMemoryShift = 8,
+    MemorySemanticsCrossWorkgroupMemoryShift = 9,
+    MemorySemanticsAtomicCounterMemoryShift = 10,
+    MemorySemanticsImageMemoryShift = 11,
+    MemorySemanticsOutputMemoryShift = 12,
+    MemorySemanticsOutputMemoryKHRShift = 12,
+    MemorySemanticsMakeAvailableShift = 13,
+    MemorySemanticsMakeAvailableKHRShift = 13,
+    MemorySemanticsMakeVisibleShift = 14,
+    MemorySemanticsMakeVisibleKHRShift = 14,
+    MemorySemanticsVolatileShift = 15,
+    MemorySemanticsMax = 0x7fffffff,
+};
+
+enum MemorySemanticsMask {
+    MemorySemanticsMaskNone = 0,
+    MemorySemanticsAcquireMask = 0x00000002,
+    MemorySemanticsReleaseMask = 0x00000004,
+    MemorySemanticsAcquireReleaseMask = 0x00000008,
+    MemorySemanticsSequentiallyConsistentMask = 0x00000010,
+    MemorySemanticsUniformMemoryMask = 0x00000040,
+    MemorySemanticsSubgroupMemoryMask = 0x00000080,
+    MemorySemanticsWorkgroupMemoryMask = 0x00000100,
+    MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
+    MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
+    MemorySemanticsImageMemoryMask = 0x00000800,
+    MemorySemanticsOutputMemoryMask = 0x00001000,
+    MemorySemanticsOutputMemoryKHRMask = 0x00001000,
+    MemorySemanticsMakeAvailableMask = 0x00002000,
+    MemorySemanticsMakeAvailableKHRMask = 0x00002000,
+    MemorySemanticsMakeVisibleMask = 0x00004000,
+    MemorySemanticsMakeVisibleKHRMask = 0x00004000,
+    MemorySemanticsVolatileMask = 0x00008000,
+};
+
+enum MemoryAccessShift {
+    MemoryAccessVolatileShift = 0,
+    MemoryAccessAlignedShift = 1,
+    MemoryAccessNontemporalShift = 2,
+    MemoryAccessMakePointerAvailableShift = 3,
+    MemoryAccessMakePointerAvailableKHRShift = 3,
+    MemoryAccessMakePointerVisibleShift = 4,
+    MemoryAccessMakePointerVisibleKHRShift = 4,
+    MemoryAccessNonPrivatePointerShift = 5,
+    MemoryAccessNonPrivatePointerKHRShift = 5,
+    MemoryAccessAliasScopeINTELMaskShift = 16,
+    MemoryAccessNoAliasINTELMaskShift = 17,
+    MemoryAccessMax = 0x7fffffff,
+};
+
+enum MemoryAccessMask {
+    MemoryAccessMaskNone = 0,
+    MemoryAccessVolatileMask = 0x00000001,
+    MemoryAccessAlignedMask = 0x00000002,
+    MemoryAccessNontemporalMask = 0x00000004,
+    MemoryAccessMakePointerAvailableMask = 0x00000008,
+    MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
+    MemoryAccessMakePointerVisibleMask = 0x00000010,
+    MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
+    MemoryAccessNonPrivatePointerMask = 0x00000020,
+    MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
+    MemoryAccessAliasScopeINTELMaskMask = 0x00010000,
+    MemoryAccessNoAliasINTELMaskMask = 0x00020000,
+};
+
+enum Scope {
+    ScopeCrossDevice = 0,
+    ScopeDevice = 1,
+    ScopeWorkgroup = 2,
+    ScopeSubgroup = 3,
+    ScopeInvocation = 4,
+    ScopeQueueFamily = 5,
+    ScopeQueueFamilyKHR = 5,
+    ScopeShaderCallKHR = 6,
+    ScopeMax = 0x7fffffff,
+};
+
+enum GroupOperation {
+    GroupOperationReduce = 0,
+    GroupOperationInclusiveScan = 1,
+    GroupOperationExclusiveScan = 2,
+    GroupOperationClusteredReduce = 3,
+    GroupOperationPartitionedReduceNV = 6,
+    GroupOperationPartitionedInclusiveScanNV = 7,
+    GroupOperationPartitionedExclusiveScanNV = 8,
+    GroupOperationMax = 0x7fffffff,
+};
+
+enum KernelEnqueueFlags {
+    KernelEnqueueFlagsNoWait = 0,
+    KernelEnqueueFlagsWaitKernel = 1,
+    KernelEnqueueFlagsWaitWorkGroup = 2,
+    KernelEnqueueFlagsMax = 0x7fffffff,
+};
+
+enum KernelProfilingInfoShift {
+    KernelProfilingInfoCmdExecTimeShift = 0,
+    KernelProfilingInfoMax = 0x7fffffff,
+};
+
+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,
+    CapabilitySubgroupDispatch = 58,
+    CapabilityNamedBarrier = 59,
+    CapabilityPipeStorage = 60,
+    CapabilityGroupNonUniform = 61,
+    CapabilityGroupNonUniformVote = 62,
+    CapabilityGroupNonUniformArithmetic = 63,
+    CapabilityGroupNonUniformBallot = 64,
+    CapabilityGroupNonUniformShuffle = 65,
+    CapabilityGroupNonUniformShuffleRelative = 66,
+    CapabilityGroupNonUniformClustered = 67,
+    CapabilityGroupNonUniformQuad = 68,
+    CapabilityShaderLayer = 69,
+    CapabilityShaderViewportIndex = 70,
+    CapabilityUniformDecoration = 71,
+    CapabilityCoreBuiltinsARM = 4165,
+    CapabilityTileImageColorReadAccessEXT = 4166,
+    CapabilityTileImageDepthReadAccessEXT = 4167,
+    CapabilityTileImageStencilReadAccessEXT = 4168,
+    CapabilityFragmentShadingRateKHR = 4422,
+    CapabilitySubgroupBallotKHR = 4423,
+    CapabilityDrawParameters = 4427,
+    CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428,
+    CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429,
+    CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430,
+    CapabilitySubgroupVoteKHR = 4431,
+    CapabilityStorageBuffer16BitAccess = 4433,
+    CapabilityStorageUniformBufferBlock16 = 4433,
+    CapabilityStorageUniform16 = 4434,
+    CapabilityUniformAndStorageBuffer16BitAccess = 4434,
+    CapabilityStoragePushConstant16 = 4435,
+    CapabilityStorageInputOutput16 = 4436,
+    CapabilityDeviceGroup = 4437,
+    CapabilityMultiView = 4439,
+    CapabilityVariablePointersStorageBuffer = 4441,
+    CapabilityVariablePointers = 4442,
+    CapabilityAtomicStorageOps = 4445,
+    CapabilitySampleMaskPostDepthCoverage = 4447,
+    CapabilityStorageBuffer8BitAccess = 4448,
+    CapabilityUniformAndStorageBuffer8BitAccess = 4449,
+    CapabilityStoragePushConstant8 = 4450,
+    CapabilityDenormPreserve = 4464,
+    CapabilityDenormFlushToZero = 4465,
+    CapabilitySignedZeroInfNanPreserve = 4466,
+    CapabilityRoundingModeRTE = 4467,
+    CapabilityRoundingModeRTZ = 4468,
+    CapabilityRayQueryProvisionalKHR = 4471,
+    CapabilityRayQueryKHR = 4472,
+    CapabilityRayTraversalPrimitiveCullingKHR = 4478,
+    CapabilityRayTracingKHR = 4479,
+    CapabilityTextureSampleWeightedQCOM = 4484,
+    CapabilityTextureBoxFilterQCOM = 4485,
+    CapabilityTextureBlockMatchQCOM = 4486,
+    CapabilityFloat16ImageAMD = 5008,
+    CapabilityImageGatherBiasLodAMD = 5009,
+    CapabilityFragmentMaskAMD = 5010,
+    CapabilityStencilExportEXT = 5013,
+    CapabilityImageReadWriteLodAMD = 5015,
+    CapabilityInt64ImageEXT = 5016,
+    CapabilityShaderClockKHR = 5055,
+    CapabilitySampleMaskOverrideCoverageNV = 5249,
+    CapabilityGeometryShaderPassthroughNV = 5251,
+    CapabilityShaderViewportIndexLayerEXT = 5254,
+    CapabilityShaderViewportIndexLayerNV = 5254,
+    CapabilityShaderViewportMaskNV = 5255,
+    CapabilityShaderStereoViewNV = 5259,
+    CapabilityPerViewAttributesNV = 5260,
+    CapabilityFragmentFullyCoveredEXT = 5265,
+    CapabilityMeshShadingNV = 5266,
+    CapabilityImageFootprintNV = 5282,
+    CapabilityMeshShadingEXT = 5283,
+    CapabilityFragmentBarycentricKHR = 5284,
+    CapabilityFragmentBarycentricNV = 5284,
+    CapabilityComputeDerivativeGroupQuadsNV = 5288,
+    CapabilityFragmentDensityEXT = 5291,
+    CapabilityShadingRateNV = 5291,
+    CapabilityGroupNonUniformPartitionedNV = 5297,
+    CapabilityShaderNonUniform = 5301,
+    CapabilityShaderNonUniformEXT = 5301,
+    CapabilityRuntimeDescriptorArray = 5302,
+    CapabilityRuntimeDescriptorArrayEXT = 5302,
+    CapabilityInputAttachmentArrayDynamicIndexing = 5303,
+    CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
+    CapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
+    CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
+    CapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
+    CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
+    CapabilityUniformBufferArrayNonUniformIndexing = 5306,
+    CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
+    CapabilitySampledImageArrayNonUniformIndexing = 5307,
+    CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
+    CapabilityStorageBufferArrayNonUniformIndexing = 5308,
+    CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
+    CapabilityStorageImageArrayNonUniformIndexing = 5309,
+    CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
+    CapabilityInputAttachmentArrayNonUniformIndexing = 5310,
+    CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
+    CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
+    CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
+    CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
+    CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
+    CapabilityRayTracingPositionFetchKHR = 5336,
+    CapabilityRayTracingNV = 5340,
+    CapabilityRayTracingMotionBlurNV = 5341,
+    CapabilityVulkanMemoryModel = 5345,
+    CapabilityVulkanMemoryModelKHR = 5345,
+    CapabilityVulkanMemoryModelDeviceScope = 5346,
+    CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
+    CapabilityPhysicalStorageBufferAddresses = 5347,
+    CapabilityPhysicalStorageBufferAddressesEXT = 5347,
+    CapabilityComputeDerivativeGroupLinearNV = 5350,
+    CapabilityRayTracingProvisionalKHR = 5353,
+    CapabilityCooperativeMatrixNV = 5357,
+    CapabilityFragmentShaderSampleInterlockEXT = 5363,
+    CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
+    CapabilityShaderSMBuiltinsNV = 5373,
+    CapabilityFragmentShaderPixelInterlockEXT = 5378,
+    CapabilityDemoteToHelperInvocation = 5379,
+    CapabilityDemoteToHelperInvocationEXT = 5379,
+    CapabilityDisplacementMicromapNV = 5380,
+    CapabilityRayTracingDisplacementMicromapNV = 5409,
+    CapabilityRayTracingOpacityMicromapEXT = 5381,
+    CapabilityShaderInvocationReorderNV = 5383,
+    CapabilityBindlessTextureNV = 5390,
+    CapabilityRayQueryPositionFetchKHR = 5391,
+    CapabilitySubgroupShuffleINTEL = 5568,
+    CapabilitySubgroupBufferBlockIOINTEL = 5569,
+    CapabilitySubgroupImageBlockIOINTEL = 5570,
+    CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
+    CapabilityRoundToInfinityINTEL = 5582,
+    CapabilityFloatingPointModeINTEL = 5583,
+    CapabilityIntegerFunctions2INTEL = 5584,
+    CapabilityFunctionPointersINTEL = 5603,
+    CapabilityIndirectReferencesINTEL = 5604,
+    CapabilityAsmINTEL = 5606,
+    CapabilityAtomicFloat32MinMaxEXT = 5612,
+    CapabilityAtomicFloat64MinMaxEXT = 5613,
+    CapabilityAtomicFloat16MinMaxEXT = 5616,
+    CapabilityVectorComputeINTEL = 5617,
+    CapabilityVectorAnyINTEL = 5619,
+    CapabilityExpectAssumeKHR = 5629,
+    CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
+    CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
+    CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
+    CapabilityVariableLengthArrayINTEL = 5817,
+    CapabilityFunctionFloatControlINTEL = 5821,
+    CapabilityFPGAMemoryAttributesINTEL = 5824,
+    CapabilityFPFastMathModeINTEL = 5837,
+    CapabilityArbitraryPrecisionIntegersINTEL = 5844,
+    CapabilityArbitraryPrecisionFloatingPointINTEL = 5845,
+    CapabilityUnstructuredLoopControlsINTEL = 5886,
+    CapabilityFPGALoopControlsINTEL = 5888,
+    CapabilityKernelAttributesINTEL = 5892,
+    CapabilityFPGAKernelAttributesINTEL = 5897,
+    CapabilityFPGAMemoryAccessesINTEL = 5898,
+    CapabilityFPGAClusterAttributesINTEL = 5904,
+    CapabilityLoopFuseINTEL = 5906,
+    CapabilityFPGADSPControlINTEL = 5908,
+    CapabilityMemoryAccessAliasingINTEL = 5910,
+    CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
+    CapabilityFPGABufferLocationINTEL = 5920,
+    CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
+    CapabilityUSMStorageClassesINTEL = 5935,
+    CapabilityRuntimeAlignedAttributeINTEL = 5939,
+    CapabilityIOPipesINTEL = 5943,
+    CapabilityBlockingPipesINTEL = 5945,
+    CapabilityFPGARegINTEL = 5948,
+    CapabilityDotProductInputAll = 6016,
+    CapabilityDotProductInputAllKHR = 6016,
+    CapabilityDotProductInput4x8Bit = 6017,
+    CapabilityDotProductInput4x8BitKHR = 6017,
+    CapabilityDotProductInput4x8BitPacked = 6018,
+    CapabilityDotProductInput4x8BitPackedKHR = 6018,
+    CapabilityDotProduct = 6019,
+    CapabilityDotProductKHR = 6019,
+    CapabilityRayCullMaskKHR = 6020,
+    CapabilityCooperativeMatrixKHR = 6022,
+    CapabilityBitInstructions = 6025,
+    CapabilityGroupNonUniformRotateKHR = 6026,
+    CapabilityAtomicFloat32AddEXT = 6033,
+    CapabilityAtomicFloat64AddEXT = 6034,
+    CapabilityLongConstantCompositeINTEL = 6089,
+    CapabilityOptNoneINTEL = 6094,
+    CapabilityAtomicFloat16AddEXT = 6095,
+    CapabilityDebugInfoModuleINTEL = 6114,
+    CapabilitySplitBarrierINTEL = 6141,
+    CapabilityFPGAArgumentInterfacesINTEL = 6174,
+    CapabilityGroupUniformArithmeticKHR = 6400,
+    CapabilityMax = 0x7fffffff,
+};
+
+enum RayFlagsShift {
+    RayFlagsOpaqueKHRShift = 0,
+    RayFlagsNoOpaqueKHRShift = 1,
+    RayFlagsTerminateOnFirstHitKHRShift = 2,
+    RayFlagsSkipClosestHitShaderKHRShift = 3,
+    RayFlagsCullBackFacingTrianglesKHRShift = 4,
+    RayFlagsCullFrontFacingTrianglesKHRShift = 5,
+    RayFlagsCullOpaqueKHRShift = 6,
+    RayFlagsCullNoOpaqueKHRShift = 7,
+    RayFlagsSkipTrianglesKHRShift = 8,
+    RayFlagsSkipAABBsKHRShift = 9,
+    RayFlagsForceOpacityMicromap2StateEXTShift = 10,
+    RayFlagsMax = 0x7fffffff,
+};
+
+enum RayFlagsMask {
+    RayFlagsMaskNone = 0,
+    RayFlagsOpaqueKHRMask = 0x00000001,
+    RayFlagsNoOpaqueKHRMask = 0x00000002,
+    RayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
+    RayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
+    RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
+    RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
+    RayFlagsCullOpaqueKHRMask = 0x00000040,
+    RayFlagsCullNoOpaqueKHRMask = 0x00000080,
+    RayFlagsSkipTrianglesKHRMask = 0x00000100,
+    RayFlagsSkipAABBsKHRMask = 0x00000200,
+    RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
+};
+
+enum RayQueryIntersection {
+    RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
+    RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
+    RayQueryIntersectionMax = 0x7fffffff,
+};
+
+enum RayQueryCommittedIntersectionType {
+    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
+    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
+    RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
+    RayQueryCommittedIntersectionTypeMax = 0x7fffffff,
+};
+
+enum RayQueryCandidateIntersectionType {
+    RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
+    RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
+    RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
+};
+
+enum FragmentShadingRateShift {
+    FragmentShadingRateVertical2PixelsShift = 0,
+    FragmentShadingRateVertical4PixelsShift = 1,
+    FragmentShadingRateHorizontal2PixelsShift = 2,
+    FragmentShadingRateHorizontal4PixelsShift = 3,
+    FragmentShadingRateMax = 0x7fffffff,
+};
+
+enum FragmentShadingRateMask {
+    FragmentShadingRateMaskNone = 0,
+    FragmentShadingRateVertical2PixelsMask = 0x00000001,
+    FragmentShadingRateVertical4PixelsMask = 0x00000002,
+    FragmentShadingRateHorizontal2PixelsMask = 0x00000004,
+    FragmentShadingRateHorizontal4PixelsMask = 0x00000008,
+};
+
+enum FPDenormMode {
+    FPDenormModePreserve = 0,
+    FPDenormModeFlushToZero = 1,
+    FPDenormModeMax = 0x7fffffff,
+};
+
+enum FPOperationMode {
+    FPOperationModeIEEE = 0,
+    FPOperationModeALT = 1,
+    FPOperationModeMax = 0x7fffffff,
+};
+
+enum QuantizationModes {
+    QuantizationModesTRN = 0,
+    QuantizationModesTRN_ZERO = 1,
+    QuantizationModesRND = 2,
+    QuantizationModesRND_ZERO = 3,
+    QuantizationModesRND_INF = 4,
+    QuantizationModesRND_MIN_INF = 5,
+    QuantizationModesRND_CONV = 6,
+    QuantizationModesRND_CONV_ODD = 7,
+    QuantizationModesMax = 0x7fffffff,
+};
+
+enum OverflowModes {
+    OverflowModesWRAP = 0,
+    OverflowModesSAT = 1,
+    OverflowModesSAT_ZERO = 2,
+    OverflowModesSAT_SYM = 3,
+    OverflowModesMax = 0x7fffffff,
+};
+
+enum PackedVectorFormat {
+    PackedVectorFormatPackedVectorFormat4x8Bit = 0,
+    PackedVectorFormatPackedVectorFormat4x8BitKHR = 0,
+    PackedVectorFormatMax = 0x7fffffff,
+};
+
+enum CooperativeMatrixOperandsShift {
+    CooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0,
+    CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1,
+    CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2,
+    CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3,
+    CooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4,
+    CooperativeMatrixOperandsMax = 0x7fffffff,
+};
+
+enum CooperativeMatrixOperandsMask {
+    CooperativeMatrixOperandsMaskNone = 0,
+    CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001,
+    CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002,
+    CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004,
+    CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008,
+    CooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010,
+};
+
+enum CooperativeMatrixLayout {
+    CooperativeMatrixLayoutRowMajorKHR = 0,
+    CooperativeMatrixLayoutColumnMajorKHR = 1,
+    CooperativeMatrixLayoutMax = 0x7fffffff,
+};
+
+enum CooperativeMatrixUse {
+    CooperativeMatrixUseMatrixAKHR = 0,
+    CooperativeMatrixUseMatrixBKHR = 1,
+    CooperativeMatrixUseMatrixAccumulatorKHR = 2,
+    CooperativeMatrixUseMax = 0x7fffffff,
+};
+
+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,
+    OpSizeOf = 321,
+    OpTypePipeStorage = 322,
+    OpConstantPipeStorage = 323,
+    OpCreatePipeFromPipeStorage = 324,
+    OpGetKernelLocalSizeForSubgroupCount = 325,
+    OpGetKernelMaxNumSubgroups = 326,
+    OpTypeNamedBarrier = 327,
+    OpNamedBarrierInitialize = 328,
+    OpMemoryNamedBarrier = 329,
+    OpModuleProcessed = 330,
+    OpExecutionModeId = 331,
+    OpDecorateId = 332,
+    OpGroupNonUniformElect = 333,
+    OpGroupNonUniformAll = 334,
+    OpGroupNonUniformAny = 335,
+    OpGroupNonUniformAllEqual = 336,
+    OpGroupNonUniformBroadcast = 337,
+    OpGroupNonUniformBroadcastFirst = 338,
+    OpGroupNonUniformBallot = 339,
+    OpGroupNonUniformInverseBallot = 340,
+    OpGroupNonUniformBallotBitExtract = 341,
+    OpGroupNonUniformBallotBitCount = 342,
+    OpGroupNonUniformBallotFindLSB = 343,
+    OpGroupNonUniformBallotFindMSB = 344,
+    OpGroupNonUniformShuffle = 345,
+    OpGroupNonUniformShuffleXor = 346,
+    OpGroupNonUniformShuffleUp = 347,
+    OpGroupNonUniformShuffleDown = 348,
+    OpGroupNonUniformIAdd = 349,
+    OpGroupNonUniformFAdd = 350,
+    OpGroupNonUniformIMul = 351,
+    OpGroupNonUniformFMul = 352,
+    OpGroupNonUniformSMin = 353,
+    OpGroupNonUniformUMin = 354,
+    OpGroupNonUniformFMin = 355,
+    OpGroupNonUniformSMax = 356,
+    OpGroupNonUniformUMax = 357,
+    OpGroupNonUniformFMax = 358,
+    OpGroupNonUniformBitwiseAnd = 359,
+    OpGroupNonUniformBitwiseOr = 360,
+    OpGroupNonUniformBitwiseXor = 361,
+    OpGroupNonUniformLogicalAnd = 362,
+    OpGroupNonUniformLogicalOr = 363,
+    OpGroupNonUniformLogicalXor = 364,
+    OpGroupNonUniformQuadBroadcast = 365,
+    OpGroupNonUniformQuadSwap = 366,
+    OpCopyLogical = 400,
+    OpPtrEqual = 401,
+    OpPtrNotEqual = 402,
+    OpPtrDiff = 403,
+    OpColorAttachmentReadEXT = 4160,
+    OpDepthAttachmentReadEXT = 4161,
+    OpStencilAttachmentReadEXT = 4162,
+    OpTerminateInvocation = 4416,
+    OpSubgroupBallotKHR = 4421,
+    OpSubgroupFirstInvocationKHR = 4422,
+    OpSubgroupAllKHR = 4428,
+    OpSubgroupAnyKHR = 4429,
+    OpSubgroupAllEqualKHR = 4430,
+    OpGroupNonUniformRotateKHR = 4431,
+    OpSubgroupReadInvocationKHR = 4432,
+    OpTraceRayKHR = 4445,
+    OpExecuteCallableKHR = 4446,
+    OpConvertUToAccelerationStructureKHR = 4447,
+    OpIgnoreIntersectionKHR = 4448,
+    OpTerminateRayKHR = 4449,
+    OpSDot = 4450,
+    OpSDotKHR = 4450,
+    OpUDot = 4451,
+    OpUDotKHR = 4451,
+    OpSUDot = 4452,
+    OpSUDotKHR = 4452,
+    OpSDotAccSat = 4453,
+    OpSDotAccSatKHR = 4453,
+    OpUDotAccSat = 4454,
+    OpUDotAccSatKHR = 4454,
+    OpSUDotAccSat = 4455,
+    OpSUDotAccSatKHR = 4455,
+    OpTypeCooperativeMatrixKHR = 4456,
+    OpCooperativeMatrixLoadKHR = 4457,
+    OpCooperativeMatrixStoreKHR = 4458,
+    OpCooperativeMatrixMulAddKHR = 4459,
+    OpCooperativeMatrixLengthKHR = 4460,
+    OpTypeRayQueryKHR = 4472,
+    OpRayQueryInitializeKHR = 4473,
+    OpRayQueryTerminateKHR = 4474,
+    OpRayQueryGenerateIntersectionKHR = 4475,
+    OpRayQueryConfirmIntersectionKHR = 4476,
+    OpRayQueryProceedKHR = 4477,
+    OpRayQueryGetIntersectionTypeKHR = 4479,
+    OpImageSampleWeightedQCOM = 4480,
+    OpImageBoxFilterQCOM = 4481,
+    OpImageBlockMatchSSDQCOM = 4482,
+    OpImageBlockMatchSADQCOM = 4483,
+    OpGroupIAddNonUniformAMD = 5000,
+    OpGroupFAddNonUniformAMD = 5001,
+    OpGroupFMinNonUniformAMD = 5002,
+    OpGroupUMinNonUniformAMD = 5003,
+    OpGroupSMinNonUniformAMD = 5004,
+    OpGroupFMaxNonUniformAMD = 5005,
+    OpGroupUMaxNonUniformAMD = 5006,
+    OpGroupSMaxNonUniformAMD = 5007,
+    OpFragmentMaskFetchAMD = 5011,
+    OpFragmentFetchAMD = 5012,
+    OpReadClockKHR = 5056,
+    OpHitObjectRecordHitMotionNV = 5249,
+    OpHitObjectRecordHitWithIndexMotionNV = 5250,
+    OpHitObjectRecordMissMotionNV = 5251,
+    OpHitObjectGetWorldToObjectNV = 5252,
+    OpHitObjectGetObjectToWorldNV = 5253,
+    OpHitObjectGetObjectRayDirectionNV = 5254,
+    OpHitObjectGetObjectRayOriginNV = 5255,
+    OpHitObjectTraceRayMotionNV = 5256,
+    OpHitObjectGetShaderRecordBufferHandleNV = 5257,
+    OpHitObjectGetShaderBindingTableRecordIndexNV = 5258,
+    OpHitObjectRecordEmptyNV = 5259,
+    OpHitObjectTraceRayNV = 5260,
+    OpHitObjectRecordHitNV = 5261,
+    OpHitObjectRecordHitWithIndexNV = 5262,
+    OpHitObjectRecordMissNV = 5263,
+    OpHitObjectExecuteShaderNV = 5264,
+    OpHitObjectGetCurrentTimeNV = 5265,
+    OpHitObjectGetAttributesNV = 5266,
+    OpHitObjectGetHitKindNV = 5267,
+    OpHitObjectGetPrimitiveIndexNV = 5268,
+    OpHitObjectGetGeometryIndexNV = 5269,
+    OpHitObjectGetInstanceIdNV = 5270,
+    OpHitObjectGetInstanceCustomIndexNV = 5271,
+    OpHitObjectGetWorldRayDirectionNV = 5272,
+    OpHitObjectGetWorldRayOriginNV = 5273,
+    OpHitObjectGetRayTMaxNV = 5274,
+    OpHitObjectGetRayTMinNV = 5275,
+    OpHitObjectIsEmptyNV = 5276,
+    OpHitObjectIsHitNV = 5277,
+    OpHitObjectIsMissNV = 5278,
+    OpReorderThreadWithHitObjectNV = 5279,
+    OpReorderThreadWithHintNV = 5280,
+    OpTypeHitObjectNV = 5281,
+    OpImageSampleFootprintNV = 5283,
+    OpEmitMeshTasksEXT = 5294,
+    OpSetMeshOutputsEXT = 5295,
+    OpGroupNonUniformPartitionNV = 5296,
+    OpWritePackedPrimitiveIndices4x8NV = 5299,
+    OpFetchMicroTriangleVertexPositionNV = 5300,
+    OpFetchMicroTriangleVertexBarycentricNV = 5301,
+    OpReportIntersectionKHR = 5334,
+    OpReportIntersectionNV = 5334,
+    OpIgnoreIntersectionNV = 5335,
+    OpTerminateRayNV = 5336,
+    OpTraceNV = 5337,
+    OpTraceMotionNV = 5338,
+    OpTraceRayMotionNV = 5339,
+    OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
+    OpTypeAccelerationStructureKHR = 5341,
+    OpTypeAccelerationStructureNV = 5341,
+    OpExecuteCallableNV = 5344,
+    OpTypeCooperativeMatrixNV = 5358,
+    OpCooperativeMatrixLoadNV = 5359,
+    OpCooperativeMatrixStoreNV = 5360,
+    OpCooperativeMatrixMulAddNV = 5361,
+    OpCooperativeMatrixLengthNV = 5362,
+    OpBeginInvocationInterlockEXT = 5364,
+    OpEndInvocationInterlockEXT = 5365,
+    OpDemoteToHelperInvocation = 5380,
+    OpDemoteToHelperInvocationEXT = 5380,
+    OpIsHelperInvocationEXT = 5381,
+    OpConvertUToImageNV = 5391,
+    OpConvertUToSamplerNV = 5392,
+    OpConvertImageToUNV = 5393,
+    OpConvertSamplerToUNV = 5394,
+    OpConvertUToSampledImageNV = 5395,
+    OpConvertSampledImageToUNV = 5396,
+    OpSamplerImageAddressingModeNV = 5397,
+    OpSubgroupShuffleINTEL = 5571,
+    OpSubgroupShuffleDownINTEL = 5572,
+    OpSubgroupShuffleUpINTEL = 5573,
+    OpSubgroupShuffleXorINTEL = 5574,
+    OpSubgroupBlockReadINTEL = 5575,
+    OpSubgroupBlockWriteINTEL = 5576,
+    OpSubgroupImageBlockReadINTEL = 5577,
+    OpSubgroupImageBlockWriteINTEL = 5578,
+    OpSubgroupImageMediaBlockReadINTEL = 5580,
+    OpSubgroupImageMediaBlockWriteINTEL = 5581,
+    OpUCountLeadingZerosINTEL = 5585,
+    OpUCountTrailingZerosINTEL = 5586,
+    OpAbsISubINTEL = 5587,
+    OpAbsUSubINTEL = 5588,
+    OpIAddSatINTEL = 5589,
+    OpUAddSatINTEL = 5590,
+    OpIAverageINTEL = 5591,
+    OpUAverageINTEL = 5592,
+    OpIAverageRoundedINTEL = 5593,
+    OpUAverageRoundedINTEL = 5594,
+    OpISubSatINTEL = 5595,
+    OpUSubSatINTEL = 5596,
+    OpIMul32x16INTEL = 5597,
+    OpUMul32x16INTEL = 5598,
+    OpConstantFunctionPointerINTEL = 5600,
+    OpFunctionPointerCallINTEL = 5601,
+    OpAsmTargetINTEL = 5609,
+    OpAsmINTEL = 5610,
+    OpAsmCallINTEL = 5611,
+    OpAtomicFMinEXT = 5614,
+    OpAtomicFMaxEXT = 5615,
+    OpAssumeTrueKHR = 5630,
+    OpExpectKHR = 5631,
+    OpDecorateString = 5632,
+    OpDecorateStringGOOGLE = 5632,
+    OpMemberDecorateString = 5633,
+    OpMemberDecorateStringGOOGLE = 5633,
+    OpVmeImageINTEL = 5699,
+    OpTypeVmeImageINTEL = 5700,
+    OpTypeAvcImePayloadINTEL = 5701,
+    OpTypeAvcRefPayloadINTEL = 5702,
+    OpTypeAvcSicPayloadINTEL = 5703,
+    OpTypeAvcMcePayloadINTEL = 5704,
+    OpTypeAvcMceResultINTEL = 5705,
+    OpTypeAvcImeResultINTEL = 5706,
+    OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707,
+    OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708,
+    OpTypeAvcImeSingleReferenceStreaminINTEL = 5709,
+    OpTypeAvcImeDualReferenceStreaminINTEL = 5710,
+    OpTypeAvcRefResultINTEL = 5711,
+    OpTypeAvcSicResultINTEL = 5712,
+    OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713,
+    OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714,
+    OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715,
+    OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716,
+    OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717,
+    OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718,
+    OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719,
+    OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720,
+    OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721,
+    OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722,
+    OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723,
+    OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724,
+    OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725,
+    OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726,
+    OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727,
+    OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728,
+    OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729,
+    OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730,
+    OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731,
+    OpSubgroupAvcMceConvertToImePayloadINTEL = 5732,
+    OpSubgroupAvcMceConvertToImeResultINTEL = 5733,
+    OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734,
+    OpSubgroupAvcMceConvertToRefResultINTEL = 5735,
+    OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736,
+    OpSubgroupAvcMceConvertToSicResultINTEL = 5737,
+    OpSubgroupAvcMceGetMotionVectorsINTEL = 5738,
+    OpSubgroupAvcMceGetInterDistortionsINTEL = 5739,
+    OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740,
+    OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741,
+    OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742,
+    OpSubgroupAvcMceGetInterDirectionsINTEL = 5743,
+    OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744,
+    OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745,
+    OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746,
+    OpSubgroupAvcImeInitializeINTEL = 5747,
+    OpSubgroupAvcImeSetSingleReferenceINTEL = 5748,
+    OpSubgroupAvcImeSetDualReferenceINTEL = 5749,
+    OpSubgroupAvcImeRefWindowSizeINTEL = 5750,
+    OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751,
+    OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752,
+    OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753,
+    OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754,
+    OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755,
+    OpSubgroupAvcImeSetWeightedSadINTEL = 5756,
+    OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757,
+    OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758,
+    OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759,
+    OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760,
+    OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761,
+    OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762,
+    OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763,
+    OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764,
+    OpSubgroupAvcImeConvertToMceResultINTEL = 5765,
+    OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766,
+    OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767,
+    OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768,
+    OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769,
+    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770,
+    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771,
+    OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772,
+    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773,
+    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774,
+    OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775,
+    OpSubgroupAvcImeGetBorderReachedINTEL = 5776,
+    OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777,
+    OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778,
+    OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779,
+    OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780,
+    OpSubgroupAvcFmeInitializeINTEL = 5781,
+    OpSubgroupAvcBmeInitializeINTEL = 5782,
+    OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783,
+    OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784,
+    OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785,
+    OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786,
+    OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787,
+    OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788,
+    OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789,
+    OpSubgroupAvcRefConvertToMceResultINTEL = 5790,
+    OpSubgroupAvcSicInitializeINTEL = 5791,
+    OpSubgroupAvcSicConfigureSkcINTEL = 5792,
+    OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793,
+    OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794,
+    OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795,
+    OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796,
+    OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797,
+    OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798,
+    OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799,
+    OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800,
+    OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801,
+    OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802,
+    OpSubgroupAvcSicEvaluateIpeINTEL = 5803,
+    OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804,
+    OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805,
+    OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806,
+    OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807,
+    OpSubgroupAvcSicConvertToMceResultINTEL = 5808,
+    OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809,
+    OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810,
+    OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811,
+    OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812,
+    OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813,
+    OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
+    OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
+    OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+    OpVariableLengthArrayINTEL = 5818,
+    OpSaveMemoryINTEL = 5819,
+    OpRestoreMemoryINTEL = 5820,
+    OpArbitraryFloatSinCosPiINTEL = 5840,
+    OpArbitraryFloatCastINTEL = 5841,
+    OpArbitraryFloatCastFromIntINTEL = 5842,
+    OpArbitraryFloatCastToIntINTEL = 5843,
+    OpArbitraryFloatAddINTEL = 5846,
+    OpArbitraryFloatSubINTEL = 5847,
+    OpArbitraryFloatMulINTEL = 5848,
+    OpArbitraryFloatDivINTEL = 5849,
+    OpArbitraryFloatGTINTEL = 5850,
+    OpArbitraryFloatGEINTEL = 5851,
+    OpArbitraryFloatLTINTEL = 5852,
+    OpArbitraryFloatLEINTEL = 5853,
+    OpArbitraryFloatEQINTEL = 5854,
+    OpArbitraryFloatRecipINTEL = 5855,
+    OpArbitraryFloatRSqrtINTEL = 5856,
+    OpArbitraryFloatCbrtINTEL = 5857,
+    OpArbitraryFloatHypotINTEL = 5858,
+    OpArbitraryFloatSqrtINTEL = 5859,
+    OpArbitraryFloatLogINTEL = 5860,
+    OpArbitraryFloatLog2INTEL = 5861,
+    OpArbitraryFloatLog10INTEL = 5862,
+    OpArbitraryFloatLog1pINTEL = 5863,
+    OpArbitraryFloatExpINTEL = 5864,
+    OpArbitraryFloatExp2INTEL = 5865,
+    OpArbitraryFloatExp10INTEL = 5866,
+    OpArbitraryFloatExpm1INTEL = 5867,
+    OpArbitraryFloatSinINTEL = 5868,
+    OpArbitraryFloatCosINTEL = 5869,
+    OpArbitraryFloatSinCosINTEL = 5870,
+    OpArbitraryFloatSinPiINTEL = 5871,
+    OpArbitraryFloatCosPiINTEL = 5872,
+    OpArbitraryFloatASinINTEL = 5873,
+    OpArbitraryFloatASinPiINTEL = 5874,
+    OpArbitraryFloatACosINTEL = 5875,
+    OpArbitraryFloatACosPiINTEL = 5876,
+    OpArbitraryFloatATanINTEL = 5877,
+    OpArbitraryFloatATanPiINTEL = 5878,
+    OpArbitraryFloatATan2INTEL = 5879,
+    OpArbitraryFloatPowINTEL = 5880,
+    OpArbitraryFloatPowRINTEL = 5881,
+    OpArbitraryFloatPowNINTEL = 5882,
+    OpLoopControlINTEL = 5887,
+    OpAliasDomainDeclINTEL = 5911,
+    OpAliasScopeDeclINTEL = 5912,
+    OpAliasScopeListDeclINTEL = 5913,
+    OpFixedSqrtINTEL = 5923,
+    OpFixedRecipINTEL = 5924,
+    OpFixedRsqrtINTEL = 5925,
+    OpFixedSinINTEL = 5926,
+    OpFixedCosINTEL = 5927,
+    OpFixedSinCosINTEL = 5928,
+    OpFixedSinPiINTEL = 5929,
+    OpFixedCosPiINTEL = 5930,
+    OpFixedSinCosPiINTEL = 5931,
+    OpFixedLogINTEL = 5932,
+    OpFixedExpINTEL = 5933,
+    OpPtrCastToCrossWorkgroupINTEL = 5934,
+    OpCrossWorkgroupCastToPtrINTEL = 5938,
+    OpReadPipeBlockingINTEL = 5946,
+    OpWritePipeBlockingINTEL = 5947,
+    OpFPGARegINTEL = 5949,
+    OpRayQueryGetRayTMinKHR = 6016,
+    OpRayQueryGetRayFlagsKHR = 6017,
+    OpRayQueryGetIntersectionTKHR = 6018,
+    OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+    OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+    OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+    OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+    OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+    OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+    OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+    OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+    OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+    OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+    OpRayQueryGetWorldRayDirectionKHR = 6029,
+    OpRayQueryGetWorldRayOriginKHR = 6030,
+    OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+    OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
+    OpAtomicFAddEXT = 6035,
+    OpTypeBufferSurfaceINTEL = 6086,
+    OpTypeStructContinuedINTEL = 6090,
+    OpConstantCompositeContinuedINTEL = 6091,
+    OpSpecConstantCompositeContinuedINTEL = 6092,
+    OpControlBarrierArriveINTEL = 6142,
+    OpControlBarrierWaitINTEL = 6143,
+    OpGroupIMulKHR = 6401,
+    OpGroupFMulKHR = 6402,
+    OpGroupBitwiseAndKHR = 6403,
+    OpGroupBitwiseOrKHR = 6404,
+    OpGroupBitwiseXorKHR = 6405,
+    OpGroupLogicalAndKHR = 6406,
+    OpGroupLogicalOrKHR = 6407,
+    OpGroupLogicalXorKHR = 6408,
+    OpMax = 0x7fffffff,
+};
+
+#ifdef SPV_ENABLE_UTILITY_CODE
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif
+inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
+    *hasResult = *hasResultType = false;
+    switch (opcode) {
+    default: /* unknown opcode */ break;
+    case OpNop: *hasResult = false; *hasResultType = false; break;
+    case OpUndef: *hasResult = true; *hasResultType = true; break;
+    case OpSourceContinued: *hasResult = false; *hasResultType = false; break;
+    case OpSource: *hasResult = false; *hasResultType = false; break;
+    case OpSourceExtension: *hasResult = false; *hasResultType = false; break;
+    case OpName: *hasResult = false; *hasResultType = false; break;
+    case OpMemberName: *hasResult = false; *hasResultType = false; break;
+    case OpString: *hasResult = true; *hasResultType = false; break;
+    case OpLine: *hasResult = false; *hasResultType = false; break;
+    case OpExtension: *hasResult = false; *hasResultType = false; break;
+    case OpExtInstImport: *hasResult = true; *hasResultType = false; break;
+    case OpExtInst: *hasResult = true; *hasResultType = true; break;
+    case OpMemoryModel: *hasResult = false; *hasResultType = false; break;
+    case OpEntryPoint: *hasResult = false; *hasResultType = false; break;
+    case OpExecutionMode: *hasResult = false; *hasResultType = false; break;
+    case OpCapability: *hasResult = false; *hasResultType = false; break;
+    case OpTypeVoid: *hasResult = true; *hasResultType = false; break;
+    case OpTypeBool: *hasResult = true; *hasResultType = false; break;
+    case OpTypeInt: *hasResult = true; *hasResultType = false; break;
+    case OpTypeFloat: *hasResult = true; *hasResultType = false; break;
+    case OpTypeVector: *hasResult = true; *hasResultType = false; break;
+    case OpTypeMatrix: *hasResult = true; *hasResultType = false; break;
+    case OpTypeImage: *hasResult = true; *hasResultType = false; break;
+    case OpTypeSampler: *hasResult = true; *hasResultType = false; break;
+    case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break;
+    case OpTypeArray: *hasResult = true; *hasResultType = false; break;
+    case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break;
+    case OpTypeStruct: *hasResult = true; *hasResultType = false; break;
+    case OpTypeOpaque: *hasResult = true; *hasResultType = false; break;
+    case OpTypePointer: *hasResult = true; *hasResultType = false; break;
+    case OpTypeFunction: *hasResult = true; *hasResultType = false; break;
+    case OpTypeEvent: *hasResult = true; *hasResultType = false; break;
+    case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break;
+    case OpTypeReserveId: *hasResult = true; *hasResultType = false; break;
+    case OpTypeQueue: *hasResult = true; *hasResultType = false; break;
+    case OpTypePipe: *hasResult = true; *hasResultType = false; break;
+    case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break;
+    case OpConstantTrue: *hasResult = true; *hasResultType = true; break;
+    case OpConstantFalse: *hasResult = true; *hasResultType = true; break;
+    case OpConstant: *hasResult = true; *hasResultType = true; break;
+    case OpConstantComposite: *hasResult = true; *hasResultType = true; break;
+    case OpConstantSampler: *hasResult = true; *hasResultType = true; break;
+    case OpConstantNull: *hasResult = true; *hasResultType = true; break;
+    case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break;
+    case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break;
+    case OpSpecConstant: *hasResult = true; *hasResultType = true; break;
+    case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break;
+    case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break;
+    case OpFunction: *hasResult = true; *hasResultType = true; break;
+    case OpFunctionParameter: *hasResult = true; *hasResultType = true; break;
+    case OpFunctionEnd: *hasResult = false; *hasResultType = false; break;
+    case OpFunctionCall: *hasResult = true; *hasResultType = true; break;
+    case OpVariable: *hasResult = true; *hasResultType = true; break;
+    case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break;
+    case OpLoad: *hasResult = true; *hasResultType = true; break;
+    case OpStore: *hasResult = false; *hasResultType = false; break;
+    case OpCopyMemory: *hasResult = false; *hasResultType = false; break;
+    case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break;
+    case OpAccessChain: *hasResult = true; *hasResultType = true; break;
+    case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break;
+    case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break;
+    case OpArrayLength: *hasResult = true; *hasResultType = true; break;
+    case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break;
+    case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break;
+    case OpDecorate: *hasResult = false; *hasResultType = false; break;
+    case OpMemberDecorate: *hasResult = false; *hasResultType = false; break;
+    case OpDecorationGroup: *hasResult = true; *hasResultType = false; break;
+    case OpGroupDecorate: *hasResult = false; *hasResultType = false; break;
+    case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break;
+    case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break;
+    case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break;
+    case OpVectorShuffle: *hasResult = true; *hasResultType = true; break;
+    case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break;
+    case OpCompositeExtract: *hasResult = true; *hasResultType = true; break;
+    case OpCompositeInsert: *hasResult = true; *hasResultType = true; break;
+    case OpCopyObject: *hasResult = true; *hasResultType = true; break;
+    case OpTranspose: *hasResult = true; *hasResultType = true; break;
+    case OpSampledImage: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageFetch: *hasResult = true; *hasResultType = true; break;
+    case OpImageGather: *hasResult = true; *hasResultType = true; break;
+    case OpImageDrefGather: *hasResult = true; *hasResultType = true; break;
+    case OpImageRead: *hasResult = true; *hasResultType = true; break;
+    case OpImageWrite: *hasResult = false; *hasResultType = false; break;
+    case OpImage: *hasResult = true; *hasResultType = true; break;
+    case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break;
+    case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break;
+    case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageQuerySize: *hasResult = true; *hasResultType = true; break;
+    case OpImageQueryLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break;
+    case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break;
+    case OpConvertFToU: *hasResult = true; *hasResultType = true; break;
+    case OpConvertFToS: *hasResult = true; *hasResultType = true; break;
+    case OpConvertSToF: *hasResult = true; *hasResultType = true; break;
+    case OpConvertUToF: *hasResult = true; *hasResultType = true; break;
+    case OpUConvert: *hasResult = true; *hasResultType = true; break;
+    case OpSConvert: *hasResult = true; *hasResultType = true; break;
+    case OpFConvert: *hasResult = true; *hasResultType = true; break;
+    case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break;
+    case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break;
+    case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break;
+    case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break;
+    case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break;
+    case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break;
+    case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break;
+    case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break;
+    case OpBitcast: *hasResult = true; *hasResultType = true; break;
+    case OpSNegate: *hasResult = true; *hasResultType = true; break;
+    case OpFNegate: *hasResult = true; *hasResultType = true; break;
+    case OpIAdd: *hasResult = true; *hasResultType = true; break;
+    case OpFAdd: *hasResult = true; *hasResultType = true; break;
+    case OpISub: *hasResult = true; *hasResultType = true; break;
+    case OpFSub: *hasResult = true; *hasResultType = true; break;
+    case OpIMul: *hasResult = true; *hasResultType = true; break;
+    case OpFMul: *hasResult = true; *hasResultType = true; break;
+    case OpUDiv: *hasResult = true; *hasResultType = true; break;
+    case OpSDiv: *hasResult = true; *hasResultType = true; break;
+    case OpFDiv: *hasResult = true; *hasResultType = true; break;
+    case OpUMod: *hasResult = true; *hasResultType = true; break;
+    case OpSRem: *hasResult = true; *hasResultType = true; break;
+    case OpSMod: *hasResult = true; *hasResultType = true; break;
+    case OpFRem: *hasResult = true; *hasResultType = true; break;
+    case OpFMod: *hasResult = true; *hasResultType = true; break;
+    case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break;
+    case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break;
+    case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break;
+    case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break;
+    case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break;
+    case OpOuterProduct: *hasResult = true; *hasResultType = true; break;
+    case OpDot: *hasResult = true; *hasResultType = true; break;
+    case OpIAddCarry: *hasResult = true; *hasResultType = true; break;
+    case OpISubBorrow: *hasResult = true; *hasResultType = true; break;
+    case OpUMulExtended: *hasResult = true; *hasResultType = true; break;
+    case OpSMulExtended: *hasResult = true; *hasResultType = true; break;
+    case OpAny: *hasResult = true; *hasResultType = true; break;
+    case OpAll: *hasResult = true; *hasResultType = true; break;
+    case OpIsNan: *hasResult = true; *hasResultType = true; break;
+    case OpIsInf: *hasResult = true; *hasResultType = true; break;
+    case OpIsFinite: *hasResult = true; *hasResultType = true; break;
+    case OpIsNormal: *hasResult = true; *hasResultType = true; break;
+    case OpSignBitSet: *hasResult = true; *hasResultType = true; break;
+    case OpLessOrGreater: *hasResult = true; *hasResultType = true; break;
+    case OpOrdered: *hasResult = true; *hasResultType = true; break;
+    case OpUnordered: *hasResult = true; *hasResultType = true; break;
+    case OpLogicalEqual: *hasResult = true; *hasResultType = true; break;
+    case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpLogicalOr: *hasResult = true; *hasResultType = true; break;
+    case OpLogicalAnd: *hasResult = true; *hasResultType = true; break;
+    case OpLogicalNot: *hasResult = true; *hasResultType = true; break;
+    case OpSelect: *hasResult = true; *hasResultType = true; break;
+    case OpIEqual: *hasResult = true; *hasResultType = true; break;
+    case OpINotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpUGreaterThan: *hasResult = true; *hasResultType = true; break;
+    case OpSGreaterThan: *hasResult = true; *hasResultType = true; break;
+    case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpULessThan: *hasResult = true; *hasResultType = true; break;
+    case OpSLessThan: *hasResult = true; *hasResultType = true; break;
+    case OpULessThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break;
+    case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break;
+    case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break;
+    case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break;
+    case OpBitwiseOr: *hasResult = true; *hasResultType = true; break;
+    case OpBitwiseXor: *hasResult = true; *hasResultType = true; break;
+    case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break;
+    case OpNot: *hasResult = true; *hasResultType = true; break;
+    case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break;
+    case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break;
+    case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break;
+    case OpBitReverse: *hasResult = true; *hasResultType = true; break;
+    case OpBitCount: *hasResult = true; *hasResultType = true; break;
+    case OpDPdx: *hasResult = true; *hasResultType = true; break;
+    case OpDPdy: *hasResult = true; *hasResultType = true; break;
+    case OpFwidth: *hasResult = true; *hasResultType = true; break;
+    case OpDPdxFine: *hasResult = true; *hasResultType = true; break;
+    case OpDPdyFine: *hasResult = true; *hasResultType = true; break;
+    case OpFwidthFine: *hasResult = true; *hasResultType = true; break;
+    case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break;
+    case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break;
+    case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break;
+    case OpEmitVertex: *hasResult = false; *hasResultType = false; break;
+    case OpEndPrimitive: *hasResult = false; *hasResultType = false; break;
+    case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break;
+    case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break;
+    case OpControlBarrier: *hasResult = false; *hasResultType = false; break;
+    case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break;
+    case OpAtomicLoad: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicStore: *hasResult = false; *hasResultType = false; break;
+    case OpAtomicExchange: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicISub: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicSMin: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicUMin: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicSMax: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicUMax: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicAnd: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicOr: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicXor: *hasResult = true; *hasResultType = true; break;
+    case OpPhi: *hasResult = true; *hasResultType = true; break;
+    case OpLoopMerge: *hasResult = false; *hasResultType = false; break;
+    case OpSelectionMerge: *hasResult = false; *hasResultType = false; break;
+    case OpLabel: *hasResult = true; *hasResultType = false; break;
+    case OpBranch: *hasResult = false; *hasResultType = false; break;
+    case OpBranchConditional: *hasResult = false; *hasResultType = false; break;
+    case OpSwitch: *hasResult = false; *hasResultType = false; break;
+    case OpKill: *hasResult = false; *hasResultType = false; break;
+    case OpReturn: *hasResult = false; *hasResultType = false; break;
+    case OpReturnValue: *hasResult = false; *hasResultType = false; break;
+    case OpUnreachable: *hasResult = false; *hasResultType = false; break;
+    case OpLifetimeStart: *hasResult = false; *hasResultType = false; break;
+    case OpLifetimeStop: *hasResult = false; *hasResultType = false; break;
+    case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break;
+    case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break;
+    case OpGroupAll: *hasResult = true; *hasResultType = true; break;
+    case OpGroupAny: *hasResult = true; *hasResultType = true; break;
+    case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break;
+    case OpGroupIAdd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFAdd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupUMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupSMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFMax: *hasResult = true; *hasResultType = true; break;
+    case OpGroupUMax: *hasResult = true; *hasResultType = true; break;
+    case OpGroupSMax: *hasResult = true; *hasResultType = true; break;
+    case OpReadPipe: *hasResult = true; *hasResultType = true; break;
+    case OpWritePipe: *hasResult = true; *hasResultType = true; break;
+    case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break;
+    case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break;
+    case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break;
+    case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break;
+    case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break;
+    case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break;
+    case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break;
+    case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break;
+    case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break;
+    case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break;
+    case OpRetainEvent: *hasResult = false; *hasResultType = false; break;
+    case OpReleaseEvent: *hasResult = false; *hasResultType = false; break;
+    case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break;
+    case OpIsValidEvent: *hasResult = true; *hasResultType = true; break;
+    case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break;
+    case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break;
+    case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break;
+    case OpBuildNDRange: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseGather: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break;
+    case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break;
+    case OpNoLine: *hasResult = false; *hasResultType = false; break;
+    case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break;
+    case OpImageSparseRead: *hasResult = true; *hasResultType = true; break;
+    case OpSizeOf: *hasResult = true; *hasResultType = true; break;
+    case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break;
+    case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break;
+    case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break;
+    case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break;
+    case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break;
+    case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break;
+    case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break;
+    case OpModuleProcessed: *hasResult = false; *hasResultType = false; break;
+    case OpExecutionModeId: *hasResult = false; *hasResultType = false; break;
+    case OpDecorateId: *hasResult = false; *hasResultType = false; break;
+    case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break;
+    case OpCopyLogical: *hasResult = true; *hasResultType = true; break;
+    case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
+    case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
+    case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
+    case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
+    case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
+    case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
+    case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
+    case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
+    case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
+    case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
+    case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+    case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
+    case OpSDot: *hasResult = true; *hasResultType = true; break;
+    case OpUDot: *hasResult = true; *hasResultType = true; break;
+    case OpSUDot: *hasResult = true; *hasResultType = true; break;
+    case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
+    case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
+    case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
+    case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break;
+    case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
+    case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
+    case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
+    case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
+    case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
+    case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+    case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+    case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
+    case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
+    case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
+    case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break;
+    case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break;
+    case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break;
+    case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break;
+    case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break;
+    case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break;
+    case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
+    case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
+    case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
+    case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
+    case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
+    case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
+    case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
+    case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
+    case OpTraceNV: *hasResult = false; *hasResultType = false; break;
+    case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
+    case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
+    case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
+    case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
+    case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
+    case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
+    case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
+    case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
+    case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
+    case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break;
+    case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
+    case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
+    case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
+    case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
+    case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
+    case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
+    case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
+    case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
+    case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
+    case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
+    case OpExpectKHR: *hasResult = true; *hasResultType = true; break;
+    case OpDecorateString: *hasResult = false; *hasResultType = false; break;
+    case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
+    case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
+    case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
+    case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
+    case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break;
+    case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break;
+    case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
+    }
+}
+#endif /* SPV_ENABLE_UTILITY_CODE */
+
+// Overload bitwise operators for mask bit combining
+
+inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
+inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
+inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
+inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
+inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
+inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
+inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
+inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
+inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
+inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
+inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
+inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
+inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
+inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
+inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
+inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
+inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
+inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
+inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
+inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
+inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
+inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
+inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
+inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
+inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
+inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
+inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
+inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
+inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
+inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
+inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
+inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
+inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
+inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
+inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
+inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
+inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
+inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
+inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
+inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); }
+inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); }
+inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); }
+inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); }
+
+}  // end namespace spv
+
+#endif  // #ifndef spirv_HPP
+

+ 43 - 17
src/libraries/glslang/SPIRV/spvIR.h

@@ -97,6 +97,8 @@ public:
     explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
     explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
     virtual ~Instruction() {}
     virtual ~Instruction() {}
     void addIdOperand(Id id) {
     void addIdOperand(Id id) {
+        // ids can't be 0
+        assert(id);
         operands.push_back(id);
         operands.push_back(id);
         idOperand.push_back(true);
         idOperand.push_back(true);
     }
     }
@@ -111,27 +113,23 @@ public:
 
 
     void addStringOperand(const char* str)
     void addStringOperand(const char* str)
     {
     {
-        unsigned int word;
-        char* wordString = (char*)&word;
-        char* wordPtr = wordString;
-        int charCount = 0;
+        unsigned int word = 0;
+        unsigned int shiftAmount = 0;
         char c;
         char c;
+
         do {
         do {
             c = *(str++);
             c = *(str++);
-            *(wordPtr++) = c;
-            ++charCount;
-            if (charCount == 4) {
+            word |= ((unsigned int)c) << shiftAmount;
+            shiftAmount += 8;
+            if (shiftAmount == 32) {
                 addImmediateOperand(word);
                 addImmediateOperand(word);
-                wordPtr = wordString;
-                charCount = 0;
+                word = 0;
+                shiftAmount = 0;
             }
             }
         } while (c != 0);
         } while (c != 0);
 
 
         // deal with partial last word
         // deal with partial last word
-        if (charCount > 0) {
-            // pad with 0s
-            for (; charCount < 4; ++charCount)
-                *(wordPtr++) = 0;
+        if (shiftAmount > 0) {
             addImmediateOperand(word);
             addImmediateOperand(word);
         }
         }
     }
     }
@@ -325,7 +323,7 @@ void inReadableOrder(Block* root, std::function<void(Block*, ReachReason, Block*
 
 
 class Function {
 class Function {
 public:
 public:
-    Function(Id id, Id resultType, Id functionType, Id firstParam, Module& parent);
+    Function(Id id, Id resultType, Id functionType, Id firstParam, LinkageType linkage, const std::string& name, Module& parent);
     virtual ~Function()
     virtual ~Function()
     {
     {
         for (int i = 0; i < (int)parameterInstructions.size(); ++i)
         for (int i = 0; i < (int)parameterInstructions.size(); ++i)
@@ -353,6 +351,8 @@ public:
     const std::vector<Block*>& getBlocks() const { return blocks; }
     const std::vector<Block*>& getBlocks() const { return blocks; }
     void addLocalVariable(std::unique_ptr<Instruction> inst);
     void addLocalVariable(std::unique_ptr<Instruction> inst);
     Id getReturnType() const { return functionInstruction.getTypeId(); }
     Id getReturnType() const { return functionInstruction.getTypeId(); }
+    Id getFuncId() const { return functionInstruction.getResultId(); }
+    Id getFuncTypeId() const { return functionInstruction.getIdOperand(1); }
     void setReturnPrecision(Decoration precision)
     void setReturnPrecision(Decoration precision)
     {
     {
         if (precision == DecorationRelaxedPrecision)
         if (precision == DecorationRelaxedPrecision)
@@ -361,6 +361,14 @@ public:
     Decoration getReturnPrecision() const
     Decoration getReturnPrecision() const
         { return reducedPrecisionReturn ? DecorationRelaxedPrecision : NoPrecision; }
         { return reducedPrecisionReturn ? DecorationRelaxedPrecision : NoPrecision; }
 
 
+    void setDebugLineInfo(Id fileName, int line, int column) {
+        lineInstruction = std::unique_ptr<Instruction>{new Instruction(OpLine)};
+        lineInstruction->addIdOperand(fileName);
+        lineInstruction->addImmediateOperand(line);
+        lineInstruction->addImmediateOperand(column);
+    }
+    bool hasDebugLineInfo() const { return lineInstruction != nullptr; }
+
     void setImplicitThis() { implicitThis = true; }
     void setImplicitThis() { implicitThis = true; }
     bool hasImplicitThis() const { return implicitThis; }
     bool hasImplicitThis() const { return implicitThis; }
 
 
@@ -377,6 +385,11 @@ public:
 
 
     void dump(std::vector<unsigned int>& out) const
     void dump(std::vector<unsigned int>& out) const
     {
     {
+        // OpLine
+        if (lineInstruction != nullptr) {
+            lineInstruction->dump(out);
+        }
+
         // OpFunction
         // OpFunction
         functionInstruction.dump(out);
         functionInstruction.dump(out);
 
 
@@ -390,17 +403,23 @@ public:
         end.dump(out);
         end.dump(out);
     }
     }
 
 
+    LinkageType getLinkType() const { return linkType; }
+    const char* getExportName() const { return exportName.c_str(); }
+
 protected:
 protected:
     Function(const Function&);
     Function(const Function&);
     Function& operator=(Function&);
     Function& operator=(Function&);
 
 
     Module& parent;
     Module& parent;
+    std::unique_ptr<Instruction> lineInstruction;
     Instruction functionInstruction;
     Instruction functionInstruction;
     std::vector<Instruction*> parameterInstructions;
     std::vector<Instruction*> parameterInstructions;
     std::vector<Block*> blocks;
     std::vector<Block*> blocks;
     bool implicitThis;  // true if this is a member function expecting to be passed a 'this' as the first argument
     bool implicitThis;  // true if this is a member function expecting to be passed a 'this' as the first argument
     bool reducedPrecisionReturn;
     bool reducedPrecisionReturn;
     std::set<int> reducedPrecisionParams;  // list of parameter indexes that need a relaxed precision arg
     std::set<int> reducedPrecisionParams;  // list of parameter indexes that need a relaxed precision arg
+    LinkageType linkType;
+    std::string exportName;
 };
 };
 
 
 //
 //
@@ -460,9 +479,11 @@ protected:
 // Add both
 // Add both
 // - the OpFunction instruction
 // - the OpFunction instruction
 // - all the OpFunctionParameter instructions
 // - all the OpFunctionParameter instructions
-__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent)
-    : parent(parent), functionInstruction(id, resultType, OpFunction), implicitThis(false),
-      reducedPrecisionReturn(false)
+__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, LinkageType linkage, const std::string& name, Module& parent)
+    : parent(parent), lineInstruction(nullptr),
+      functionInstruction(id, resultType, OpFunction), implicitThis(false),
+      reducedPrecisionReturn(false),
+      linkType(linkage)
 {
 {
     // OpFunction
     // OpFunction
     functionInstruction.addImmediateOperand(FunctionControlMaskNone);
     functionInstruction.addImmediateOperand(FunctionControlMaskNone);
@@ -478,6 +499,11 @@ __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParam
         parent.mapInstruction(param);
         parent.mapInstruction(param);
         parameterInstructions.push_back(param);
         parameterInstructions.push_back(param);
     }
     }
+
+    // If importing/exporting, save the function name (without the mangled parameters) for the linkage decoration
+    if (linkType != LinkageTypeMax) {
+        exportName = name.substr(0, name.find_first_of('('));
+    }
 }
 }
 
 
 __inline void Function::addLocalVariable(std::unique_ptr<Instruction> inst)
 __inline void Function::addLocalVariable(std::unique_ptr<Instruction> inst)

+ 4 - 15
src/libraries/glslang/OGLCompilersDLL/InitializeDll.h → src/libraries/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl

@@ -1,5 +1,9 @@
 //
 //
 // Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
 // Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
+// Copyright (C) 2013-2016 LunarG, Inc.
+// Copyright (C) 2016-2020 Google, Inc.
+// Modifications Copyright(C) 2021 Advanced Micro Devices, Inc.All rights reserved.
+//
 // All rights reserved.
 // All rights reserved.
 //
 //
 // Redistribution and use in source and binary forms, with or without
 // Redistribution and use in source and binary forms, with or without
@@ -31,19 +35,4 @@
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
-#ifndef __INITIALIZEDLL_H
-#define __INITIALIZEDLL_H
-
-#include "../glslang/OSDependent/osinclude.h"
-
-namespace glslang {
-
-bool InitProcess();
-bool InitThread();
-bool DetachThread();  // not called from standalone, perhaps other tools rely on parts of it
-bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it
-
-} // end namespace glslang
-
-#endif // __INITIALIZEDLL_H
 
 

+ 2 - 6
src/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp

@@ -41,10 +41,9 @@
 //
 //
 class TGenericCompiler : public TCompiler {
 class TGenericCompiler : public TCompiler {
 public:
 public:
-    TGenericCompiler(EShLanguage l, int dOptions) : TCompiler(l, infoSink), debugOptions(dOptions) { }
+    TGenericCompiler(EShLanguage l) : TCompiler(l, infoSink) {}
     virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile);
     virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile);
     TInfoSink infoSink;
     TInfoSink infoSink;
-    int debugOptions;
 };
 };
 
 
 //
 //
@@ -52,10 +51,7 @@ public:
 // compile object used by higher level code.  It returns
 // compile object used by higher level code.  It returns
 // a subclass of TCompiler.
 // a subclass of TCompiler.
 //
 //
-TCompiler* ConstructCompiler(EShLanguage language, int debugOptions)
-{
-    return new TGenericCompiler(language, debugOptions);
-}
+TCompiler* ConstructCompiler(EShLanguage language, int) { return new TGenericCompiler(language); }
 
 
 //
 //
 // Delete the compiler made by ConstructCompiler
 // Delete the compiler made by ConstructCompiler

+ 3 - 7
src/libraries/glslang/glslang/GenericCodeGen/Link.cpp

@@ -44,11 +44,10 @@
 //
 //
 class TGenericLinker : public TLinker {
 class TGenericLinker : public TLinker {
 public:
 public:
-    TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { }
+    TGenericLinker(EShExecutable e) : TLinker(e, infoSink) {}
     bool link(TCompilerList&, TUniformMap*) { return true; }
     bool link(TCompilerList&, TUniformMap*) { return true; }
     void getAttributeBindings(ShBindingTable const **) const { }
     void getAttributeBindings(ShBindingTable const **) const { }
     TInfoSink infoSink;
     TInfoSink infoSink;
-    int debugOptions;
 };
 };
 
 
 //
 //
@@ -60,10 +59,7 @@ public:
     virtual int getLocation(const char*) { return 0; }
     virtual int getLocation(const char*) { return 0; }
 };
 };
 
 
-TShHandleBase* ConstructLinker(EShExecutable executable, int debugOptions)
-{
-    return new TGenericLinker(executable, debugOptions);
-}
+TShHandleBase* ConstructLinker(EShExecutable executable, int) { return new TGenericLinker(executable); }
 
 
 void DeleteLinker(TShHandleBase* linker)
 void DeleteLinker(TShHandleBase* linker)
 {
 {
@@ -82,7 +78,7 @@ void DeleteUniformMap(TUniformMap* map)
 
 
 TShHandleBase* ConstructBindings()
 TShHandleBase* ConstructBindings()
 {
 {
-    return 0;
+    return nullptr;
 }
 }
 
 
 void DeleteBindingList(TShHandleBase* bindingList)
 void DeleteBindingList(TShHandleBase* bindingList)

+ 46 - 13
src/libraries/glslang/glslang/Include/BaseTypes.h

@@ -65,10 +65,10 @@ enum TBasicType {
     EbtAccStruct,
     EbtAccStruct,
     EbtReference,
     EbtReference,
     EbtRayQuery,
     EbtRayQuery,
-#ifndef GLSLANG_WEB
+    EbtHitObjectNV,
+    EbtCoopmat,
     // SPIR-V type defined by spirv_type
     // SPIR-V type defined by spirv_type
     EbtSpirvType,
     EbtSpirvType,
-#endif
 
 
     // HLSL types that live only temporarily.
     // HLSL types that live only temporarily.
     EbtString,
     EbtString,
@@ -95,15 +95,16 @@ enum TStorageQualifier {
     EvqUniform,       // read only, shared with app
     EvqUniform,       // read only, shared with app
     EvqBuffer,        // read/write, shared with app
     EvqBuffer,        // read/write, shared with app
     EvqShared,        // compute shader's read/write 'shared' qualifier
     EvqShared,        // compute shader's read/write 'shared' qualifier
-#ifndef GLSLANG_WEB
     EvqSpirvStorageClass, // spirv_storage_class
     EvqSpirvStorageClass, // spirv_storage_class
-#endif
 
 
     EvqPayload,
     EvqPayload,
     EvqPayloadIn,
     EvqPayloadIn,
     EvqHitAttr,
     EvqHitAttr,
     EvqCallableData,
     EvqCallableData,
     EvqCallableDataIn,
     EvqCallableDataIn,
+    EvqHitObjectAttrNV,
+
+    EvqtaskPayloadSharedEXT,
 
 
     // parameters
     // parameters
     EvqIn,            // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
     EvqIn,            // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
@@ -128,6 +129,9 @@ enum TStorageQualifier {
     // built-ins written by fragment shader
     // built-ins written by fragment shader
     EvqFragColor,
     EvqFragColor,
     EvqFragDepth,
     EvqFragDepth,
+    EvqFragStencil,
+
+    EvqTileImageEXT,
 
 
     // end of list
     // end of list
     EvqLast
     EvqLast
@@ -263,6 +267,7 @@ enum TBuiltInVariable {
     EbvObjectRayDirection,
     EbvObjectRayDirection,
     EbvRayTmin,
     EbvRayTmin,
     EbvRayTmax,
     EbvRayTmax,
+    EbvCullMask,
     EbvHitT,
     EbvHitT,
     EbvHitKind,
     EbvHitKind,
     EbvObjectToWorld,
     EbvObjectToWorld,
@@ -274,6 +279,8 @@ enum TBuiltInVariable {
     // barycentrics
     // barycentrics
     EbvBaryCoordNV,
     EbvBaryCoordNV,
     EbvBaryCoordNoPerspNV,
     EbvBaryCoordNoPerspNV,
+    EbvBaryCoordEXT,
+    EbvBaryCoordNoPerspEXT,
     // mesh shaders
     // mesh shaders
     EbvTaskCountNV,
     EbvTaskCountNV,
     EbvPrimitiveCountNV,
     EbvPrimitiveCountNV,
@@ -284,6 +291,17 @@ enum TBuiltInVariable {
     EbvMeshViewCountNV,
     EbvMeshViewCountNV,
     EbvMeshViewIndicesNV,
     EbvMeshViewIndicesNV,
 
 
+    EbvMicroTrianglePositionNV,
+    EbvMicroTriangleBaryNV,
+    EbvHitKindFrontFacingMicroTriangleNV,
+    EbvHitKindBackFacingMicroTriangleNV,
+
+    //GL_EXT_mesh_shader
+    EbvPrimitivePointIndicesEXT,
+    EbvPrimitiveLineIndicesEXT,
+    EbvPrimitiveTriangleIndicesEXT,
+    EbvCullPrimitiveEXT,
+
     // sm builtins
     // sm builtins
     EbvWarpsPerSM,
     EbvWarpsPerSM,
     EbvSMCount,
     EbvSMCount,
@@ -305,6 +323,15 @@ enum TBuiltInVariable {
     EbvByteAddressBuffer,
     EbvByteAddressBuffer,
     EbvRWByteAddressBuffer,
     EbvRWByteAddressBuffer,
 
 
+    // ARM specific core builtins
+    EbvCoreCountARM,
+    EbvCoreIDARM,
+    EbvCoreMaxIDARM,
+    EbvWarpIDARM,
+    EbvWarpMaxIDARM,
+
+    EbvPositionFetch,
+
     EbvLast
     EbvLast
 };
 };
 
 
@@ -317,10 +344,6 @@ enum TPrecisionQualifier {
     EpqHigh
     EpqHigh
 };
 };
 
 
-#ifdef GLSLANG_WEB
-__inline const char* GetStorageQualifierString(TStorageQualifier q) { return ""; }
-__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { return ""; }
-#else
 // These will show up in error messages
 // These will show up in error messages
 __inline const char* GetStorageQualifierString(TStorageQualifier q)
 __inline const char* GetStorageQualifierString(TStorageQualifier q)
 {
 {
@@ -329,9 +352,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
     case EvqGlobal:         return "global";         break;
     case EvqGlobal:         return "global";         break;
     case EvqConst:          return "const";          break;
     case EvqConst:          return "const";          break;
     case EvqConstReadOnly:  return "const (read only)"; break;
     case EvqConstReadOnly:  return "const (read only)"; break;
-#ifndef GLSLANG_WEB
     case EvqSpirvStorageClass: return "spirv_storage_class"; break;
     case EvqSpirvStorageClass: return "spirv_storage_class"; break;
-#endif
     case EvqVaryingIn:      return "in";             break;
     case EvqVaryingIn:      return "in";             break;
     case EvqVaryingOut:     return "out";            break;
     case EvqVaryingOut:     return "out";            break;
     case EvqUniform:        return "uniform";        break;
     case EvqUniform:        return "uniform";        break;
@@ -350,11 +371,14 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
     case EvqPointCoord:     return "gl_PointCoord";  break;
     case EvqPointCoord:     return "gl_PointCoord";  break;
     case EvqFragColor:      return "fragColor";      break;
     case EvqFragColor:      return "fragColor";      break;
     case EvqFragDepth:      return "gl_FragDepth";   break;
     case EvqFragDepth:      return "gl_FragDepth";   break;
+    case EvqFragStencil:    return "gl_FragStencilRefARB"; break;
     case EvqPayload:        return "rayPayloadNV";     break;
     case EvqPayload:        return "rayPayloadNV";     break;
     case EvqPayloadIn:      return "rayPayloadInNV";   break;
     case EvqPayloadIn:      return "rayPayloadInNV";   break;
     case EvqHitAttr:        return "hitAttributeNV";   break;
     case EvqHitAttr:        return "hitAttributeNV";   break;
     case EvqCallableData:   return "callableDataNV";   break;
     case EvqCallableData:   return "callableDataNV";   break;
     case EvqCallableDataIn: return "callableDataInNV"; break;
     case EvqCallableDataIn: return "callableDataInNV"; break;
+    case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break;
+    case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break;
     default:                return "unknown qualifier";
     default:                return "unknown qualifier";
     }
     }
 }
 }
@@ -478,8 +502,10 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
     case EbvWorldToObject:              return "WorldToObjectNV";
     case EbvWorldToObject:              return "WorldToObjectNV";
     case EbvCurrentRayTimeNV:           return "CurrentRayTimeNV";
     case EbvCurrentRayTimeNV:           return "CurrentRayTimeNV";
 
 
-    case EbvBaryCoordNV:                return "BaryCoordNV";
-    case EbvBaryCoordNoPerspNV:         return "BaryCoordNoPerspNV";
+    case EbvBaryCoordEXT:
+    case EbvBaryCoordNV:                return "BaryCoordKHR";
+    case EbvBaryCoordNoPerspEXT:
+    case EbvBaryCoordNoPerspNV:         return "BaryCoordNoPerspKHR";
 
 
     case EbvTaskCountNV:                return "TaskCountNV";
     case EbvTaskCountNV:                return "TaskCountNV";
     case EbvPrimitiveCountNV:           return "PrimitiveCountNV";
     case EbvPrimitiveCountNV:           return "PrimitiveCountNV";
@@ -489,6 +515,11 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
     case EbvLayerPerViewNV:             return "LayerPerViewNV";
     case EbvLayerPerViewNV:             return "LayerPerViewNV";
     case EbvMeshViewCountNV:            return "MeshViewCountNV";
     case EbvMeshViewCountNV:            return "MeshViewCountNV";
     case EbvMeshViewIndicesNV:          return "MeshViewIndicesNV";
     case EbvMeshViewIndicesNV:          return "MeshViewIndicesNV";
+    // GL_EXT_mesh_shader
+    case EbvPrimitivePointIndicesEXT:    return "PrimitivePointIndicesEXT";
+    case EbvPrimitiveLineIndicesEXT:     return "PrimitiveLineIndicesEXT";
+    case EbvPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT";
+    case EbvCullPrimitiveEXT:            return "CullPrimitiveEXT";
 
 
     case EbvWarpsPerSM:                 return "WarpsPerSMNV";
     case EbvWarpsPerSM:                 return "WarpsPerSMNV";
     case EbvSMCount:                    return "SMCountNV";
     case EbvSMCount:                    return "SMCountNV";
@@ -498,6 +529,9 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
     case EbvShadingRateKHR:             return "ShadingRateKHR";
     case EbvShadingRateKHR:             return "ShadingRateKHR";
     case EbvPrimitiveShadingRateKHR:    return "PrimitiveShadingRateKHR";
     case EbvPrimitiveShadingRateKHR:    return "PrimitiveShadingRateKHR";
 
 
+    case EbvHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV";
+    case EbvHitKindBackFacingMicroTriangleNV:  return "HitKindBackFacingMicroTriangleNV";
+
     default:                      return "unknown built-in variable";
     default:                      return "unknown built-in variable";
     }
     }
 }
 }
@@ -512,7 +546,6 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
     default:        return "unknown precision qualifier";
     default:        return "unknown precision qualifier";
     }
     }
 }
 }
-#endif
 
 
 __inline bool isTypeSignedInt(TBasicType type)
 __inline bool isTypeSignedInt(TBasicType type)
 {
 {

+ 4 - 47
src/libraries/glslang/glslang/Include/Common.h

@@ -44,6 +44,7 @@
 #else
 #else
 #include <cmath>
 #include <cmath>
 #endif
 #endif
+#include <cstdint>
 #include <cstdio>
 #include <cstdio>
 #include <cstdlib>
 #include <cstdlib>
 #include <list>
 #include <list>
@@ -54,7 +55,7 @@
 #include <unordered_set>
 #include <unordered_set>
 #include <vector>
 #include <vector>
 
 
-#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700)
+#if defined(__ANDROID__)
 #include <sstream>
 #include <sstream>
 namespace std {
 namespace std {
 template<typename T>
 template<typename T>
@@ -66,7 +67,7 @@ std::string to_string(const T& val) {
 }
 }
 #endif
 #endif
 
 
-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || MINGW_HAS_SECURE_API
+#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API
     #include <basetsd.h>
     #include <basetsd.h>
     #ifndef snprintf
     #ifndef snprintf
     #define snprintf sprintf_s
     #define snprintf sprintf_s
@@ -82,22 +83,6 @@ std::string to_string(const T& val) {
     #define UINT_PTR uintptr_t
     #define UINT_PTR uintptr_t
 #endif
 #endif
 
 
-#if defined(_MSC_VER) && _MSC_VER < 1800
-    #include <stdlib.h>
-    inline long long int strtoll (const char* str, char** endptr, int base)
-    {
-        return _strtoi64(str, endptr, base);
-    }
-    inline unsigned long long int strtoull (const char* str, char** endptr, int base)
-    {
-        return _strtoui64(str, endptr, base);
-    }
-    inline long long int atoll (const char* str)
-    {
-        return strtoll(str, NULL, 10);
-    }
-#endif
-
 #if defined(_MSC_VER)
 #if defined(_MSC_VER)
 #define strdup _strdup
 #define strdup _strdup
 #endif
 #endif
@@ -218,7 +203,7 @@ template <class T> T Max(const T a, const T b) { return a > b ? a : b; }
 //
 //
 // Create a TString object from an integer.
 // Create a TString object from an integer.
 //
 //
-#if defined _MSC_VER || MINGW_HAS_SECURE_API
+#if defined(_MSC_VER) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API)
 inline const TString String(const int i, const int base = 10)
 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
     char text[16];     // 32 bit ints are at most 10 digits in base 10
@@ -307,34 +292,6 @@ template <class T> int IntLog2(T n)
     return result;
     return result;
 }
 }
 
 
-inline bool IsInfinity(double x) {
-#ifdef _MSC_VER
-    switch (_fpclass(x)) {
-    case _FPCLASS_NINF:
-    case _FPCLASS_PINF:
-        return true;
-    default:
-        return false;
-    }
-#else
-    return std::isinf(x);
-#endif
-}
-
-inline bool IsNan(double x) {
-#ifdef _MSC_VER
-    switch (_fpclass(x)) {
-    case _FPCLASS_SNAN:
-    case _FPCLASS_QNAN:
-        return true;
-    default:
-        return false;
-    }
-#else
-  return std::isnan(x);
-#endif
-}
-
 } // end namespace glslang
 } // end namespace glslang
 
 
 #endif // _COMMON_INCLUDED_
 #endif // _COMMON_INCLUDED_

+ 1 - 37
src/libraries/glslang/glslang/Include/ConstantUnion.h

@@ -234,7 +234,6 @@ public:
 
 
             break;
             break;
 
 
-#ifndef GLSLANG_WEB
         case EbtInt16:
         case EbtInt16:
             if (constant.i16Const == i16Const)
             if (constant.i16Const == i16Const)
                 return true;
                 return true;
@@ -265,7 +264,6 @@ public:
                 return true;
                 return true;
 
 
             break;
             break;
-#endif
         default:
         default:
             assert(false && "Default missing");
             assert(false && "Default missing");
         }
         }
@@ -347,7 +345,6 @@ public:
                 return true;
                 return true;
 
 
             return false;
             return false;
-#ifndef GLSLANG_WEB
         case EbtInt8:
         case EbtInt8:
             if (i8Const > constant.i8Const)
             if (i8Const > constant.i8Const)
                 return true;
                 return true;
@@ -378,7 +375,6 @@ public:
                 return true;
                 return true;
 
 
             return false;
             return false;
-#endif
         default:
         default:
             assert(false && "Default missing");
             assert(false && "Default missing");
             return false;
             return false;
@@ -389,7 +385,6 @@ public:
     {
     {
         assert(type == constant.type);
         assert(type == constant.type);
         switch (type) {
         switch (type) {
-#ifndef GLSLANG_WEB
         case EbtInt8:
         case EbtInt8:
             if (i8Const < constant.i8Const)
             if (i8Const < constant.i8Const)
                 return true;
                 return true;
@@ -419,7 +414,6 @@ public:
                 return true;
                 return true;
 
 
             return false;
             return false;
-#endif
         case EbtDouble:
         case EbtDouble:
             if (dConst < constant.dConst)
             if (dConst < constant.dConst)
                 return true;
                 return true;
@@ -449,14 +443,12 @@ public:
         case EbtInt:    returnValue.setIConst(iConst + constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst + constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst + constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst + constant.uConst); break;
         case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break;
         case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const + constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const + constant.i8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const + constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const + constant.i16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const + constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const + constant.i64Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const + constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const + constant.u8Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break;
-#endif
         default: assert(false && "Default missing");
         default: assert(false && "Default missing");
         }
         }
 
 
@@ -471,14 +463,12 @@ public:
         case EbtInt:    returnValue.setIConst(iConst - constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst - constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst - constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst - constant.uConst); break;
         case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break;
         case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const - constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const - constant.i8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const - constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const - constant.i16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const - constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const - constant.i64Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const - constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const - constant.u8Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break;
-#endif
         default: assert(false && "Default missing");
         default: assert(false && "Default missing");
         }
         }
 
 
@@ -493,14 +483,12 @@ public:
         case EbtInt:    returnValue.setIConst(iConst * constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst * constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst * constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst * constant.uConst); break;
         case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break;
         case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const * constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const * constant.i8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const * constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const * constant.i16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const * constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const * constant.i64Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const * constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const * constant.u8Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break;
-#endif
         default: assert(false && "Default missing");
         default: assert(false && "Default missing");
         }
         }
 
 
@@ -514,14 +502,12 @@ public:
         switch (type) {
         switch (type) {
         case EbtInt:    returnValue.setIConst(iConst % constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst % constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst % constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst % constant.uConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const % constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const % constant.i8Const); break;
-        case EbtInt16:  returnValue.setI8Const(i8Const % constant.i16Const); break;
+        case EbtInt16:  returnValue.setI16Const(i16Const % constant.i16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const % constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const % constant.i64Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const % constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const % constant.u8Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 
@@ -532,7 +518,6 @@ public:
     {
     {
         TConstUnion returnValue;
         TConstUnion returnValue;
         switch (type) {
         switch (type) {
-#ifndef GLSLANG_WEB
         case EbtInt8:
         case EbtInt8:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt8:   returnValue.setI8Const(i8Const >> constant.i8Const);  break;
             case EbtInt8:   returnValue.setI8Const(i8Const >> constant.i8Const);  break;
@@ -585,19 +570,16 @@ public:
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
-#endif
         case EbtInt:
         case EbtInt:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt:    returnValue.setIConst(iConst >> constant.iConst);   break;
             case EbtInt:    returnValue.setIConst(iConst >> constant.iConst);   break;
             case EbtUint:   returnValue.setIConst(iConst >> constant.uConst);   break;
             case EbtUint:   returnValue.setIConst(iConst >> constant.uConst);   break;
-#ifndef GLSLANG_WEB
             case EbtInt8:   returnValue.setIConst(iConst >> constant.i8Const);  break;
             case EbtInt8:   returnValue.setIConst(iConst >> constant.i8Const);  break;
             case EbtUint8:  returnValue.setIConst(iConst >> constant.u8Const);  break;
             case EbtUint8:  returnValue.setIConst(iConst >> constant.u8Const);  break;
             case EbtInt16:  returnValue.setIConst(iConst >> constant.i16Const); break;
             case EbtInt16:  returnValue.setIConst(iConst >> constant.i16Const); break;
             case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break;
             case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break;
             case EbtInt64:  returnValue.setIConst(iConst >> constant.i64Const); break;
             case EbtInt64:  returnValue.setIConst(iConst >> constant.i64Const); break;
             case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break;
             case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break;
-#endif
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
@@ -605,18 +587,15 @@ public:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt:    returnValue.setUConst(uConst >> constant.iConst);   break;
             case EbtInt:    returnValue.setUConst(uConst >> constant.iConst);   break;
             case EbtUint:   returnValue.setUConst(uConst >> constant.uConst);   break;
             case EbtUint:   returnValue.setUConst(uConst >> constant.uConst);   break;
-#ifndef GLSLANG_WEB
             case EbtInt8:   returnValue.setUConst(uConst >> constant.i8Const);  break;
             case EbtInt8:   returnValue.setUConst(uConst >> constant.i8Const);  break;
             case EbtUint8:  returnValue.setUConst(uConst >> constant.u8Const);  break;
             case EbtUint8:  returnValue.setUConst(uConst >> constant.u8Const);  break;
             case EbtInt16:  returnValue.setUConst(uConst >> constant.i16Const); break;
             case EbtInt16:  returnValue.setUConst(uConst >> constant.i16Const); break;
             case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break;
             case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break;
             case EbtInt64:  returnValue.setUConst(uConst >> constant.i64Const); break;
             case EbtInt64:  returnValue.setUConst(uConst >> constant.i64Const); break;
             case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break;
             case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break;
-#endif
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
-#ifndef GLSLANG_WEB
          case EbtInt64:
          case EbtInt64:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt8:   returnValue.setI64Const(i64Const >> constant.i8Const);  break;
             case EbtInt8:   returnValue.setI64Const(i64Const >> constant.i8Const);  break;
@@ -643,7 +622,6 @@ public:
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 
@@ -654,7 +632,6 @@ public:
     {
     {
         TConstUnion returnValue;
         TConstUnion returnValue;
         switch (type) {
         switch (type) {
-#ifndef GLSLANG_WEB
         case EbtInt8:
         case EbtInt8:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt8:   returnValue.setI8Const(i8Const << constant.i8Const);  break;
             case EbtInt8:   returnValue.setI8Const(i8Const << constant.i8Const);  break;
@@ -733,19 +710,16 @@ public:
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
-#endif
         case EbtInt:
         case EbtInt:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt:    returnValue.setIConst(iConst << constant.iConst);   break;
             case EbtInt:    returnValue.setIConst(iConst << constant.iConst);   break;
             case EbtUint:   returnValue.setIConst(iConst << constant.uConst);   break;
             case EbtUint:   returnValue.setIConst(iConst << constant.uConst);   break;
-#ifndef GLSLANG_WEB
             case EbtInt8:   returnValue.setIConst(iConst << constant.i8Const);  break;
             case EbtInt8:   returnValue.setIConst(iConst << constant.i8Const);  break;
             case EbtUint8:  returnValue.setIConst(iConst << constant.u8Const);  break;
             case EbtUint8:  returnValue.setIConst(iConst << constant.u8Const);  break;
             case EbtInt16:  returnValue.setIConst(iConst << constant.i16Const); break;
             case EbtInt16:  returnValue.setIConst(iConst << constant.i16Const); break;
             case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break;
             case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break;
             case EbtInt64:  returnValue.setIConst(iConst << constant.i64Const); break;
             case EbtInt64:  returnValue.setIConst(iConst << constant.i64Const); break;
             case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break;
             case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break;
-#endif
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
@@ -753,14 +727,12 @@ public:
             switch (constant.type) {
             switch (constant.type) {
             case EbtInt:    returnValue.setUConst(uConst << constant.iConst);   break;
             case EbtInt:    returnValue.setUConst(uConst << constant.iConst);   break;
             case EbtUint:   returnValue.setUConst(uConst << constant.uConst);   break;
             case EbtUint:   returnValue.setUConst(uConst << constant.uConst);   break;
-#ifndef GLSLANG_WEB
             case EbtInt8:   returnValue.setUConst(uConst << constant.i8Const);  break;
             case EbtInt8:   returnValue.setUConst(uConst << constant.i8Const);  break;
             case EbtUint8:  returnValue.setUConst(uConst << constant.u8Const);  break;
             case EbtUint8:  returnValue.setUConst(uConst << constant.u8Const);  break;
             case EbtInt16:  returnValue.setUConst(uConst << constant.i16Const); break;
             case EbtInt16:  returnValue.setUConst(uConst << constant.i16Const); break;
             case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break;
             case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break;
             case EbtInt64:  returnValue.setUConst(uConst << constant.i64Const); break;
             case EbtInt64:  returnValue.setUConst(uConst << constant.i64Const); break;
             case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break;
             case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break;
-#endif
             default:       assert(false && "Default missing");
             default:       assert(false && "Default missing");
             }
             }
             break;
             break;
@@ -777,14 +749,12 @@ public:
         switch (type) {
         switch (type) {
         case EbtInt:    returnValue.setIConst(iConst & constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst & constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst & constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst & constant.uConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const & constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const & constant.i8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const & constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const & constant.u8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const & constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const & constant.i16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const & constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const & constant.i64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 
@@ -798,14 +768,12 @@ public:
         switch (type) {
         switch (type) {
         case EbtInt:    returnValue.setIConst(iConst | constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst | constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst | constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst | constant.uConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const | constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const | constant.i8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const | constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const | constant.u8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const | constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const | constant.i16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const | constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const | constant.i64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 
@@ -819,14 +787,12 @@ public:
         switch (type) {
         switch (type) {
         case EbtInt:    returnValue.setIConst(iConst ^ constant.iConst); break;
         case EbtInt:    returnValue.setIConst(iConst ^ constant.iConst); break;
         case EbtUint:   returnValue.setUConst(uConst ^ constant.uConst); break;
         case EbtUint:   returnValue.setUConst(uConst ^ constant.uConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(i8Const ^ constant.i8Const); break;
         case EbtInt8:   returnValue.setI8Const(i8Const ^ constant.i8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const ^ constant.u8Const); break;
         case EbtUint8:  returnValue.setU8Const(u8Const ^ constant.u8Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const ^ constant.i16Const); break;
         case EbtInt16:  returnValue.setI16Const(i16Const ^ constant.i16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break;
         case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const ^ constant.i64Const); break;
         case EbtInt64:  returnValue.setI64Const(i64Const ^ constant.i64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break;
         case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 
@@ -839,14 +805,12 @@ public:
         switch (type) {
         switch (type) {
         case EbtInt:    returnValue.setIConst(~iConst); break;
         case EbtInt:    returnValue.setIConst(~iConst); break;
         case EbtUint:   returnValue.setUConst(~uConst); break;
         case EbtUint:   returnValue.setUConst(~uConst); break;
-#ifndef GLSLANG_WEB
         case EbtInt8:   returnValue.setI8Const(~i8Const); break;
         case EbtInt8:   returnValue.setI8Const(~i8Const); break;
         case EbtUint8:  returnValue.setU8Const(~u8Const); break;
         case EbtUint8:  returnValue.setU8Const(~u8Const); break;
         case EbtInt16:  returnValue.setI16Const(~i16Const); break;
         case EbtInt16:  returnValue.setI16Const(~i16Const); break;
         case EbtUint16: returnValue.setU16Const(~u16Const); break;
         case EbtUint16: returnValue.setU16Const(~u16Const); break;
         case EbtInt64:  returnValue.setI64Const(~i64Const); break;
         case EbtInt64:  returnValue.setI64Const(~i64Const); break;
         case EbtUint64: returnValue.setU64Const(~u64Const); break;
         case EbtUint64: returnValue.setU64Const(~u64Const); break;
-#endif
         default:     assert(false && "Default missing");
         default:     assert(false && "Default missing");
         }
         }
 
 

+ 1 - 1
src/libraries/glslang/glslang/Include/InitializeGlobals.h

@@ -37,7 +37,7 @@
 
 
 namespace glslang {
 namespace glslang {
 
 
-bool InitializePoolIndex();
+inline bool InitializePoolIndex() { return true; } // DEPRECATED: No need to call
 
 
 } // end namespace glslang
 } // end namespace glslang
 
 

+ 13 - 8
src/libraries/glslang/glslang/Include/PoolAlloc.h

@@ -37,7 +37,7 @@
 #ifndef _POOLALLOC_INCLUDED_
 #ifndef _POOLALLOC_INCLUDED_
 #define _POOLALLOC_INCLUDED_
 #define _POOLALLOC_INCLUDED_
 
 
-#ifdef _DEBUG
+#ifndef NDEBUG
 #  define GUARD_BLOCKS  // define to enable guard block sanity checking
 #  define GUARD_BLOCKS  // define to enable guard block sanity checking
 #endif
 #endif
 
 
@@ -74,7 +74,7 @@ namespace glslang {
 
 
 class TAllocation {
 class TAllocation {
 public:
 public:
-    TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) :
+    TAllocation(size_t size, unsigned char* mem, TAllocation* prev = nullptr) :
         size(size), mem(mem), prevAlloc(prev) {
         size(size), mem(mem), prevAlloc(prev) {
         // Allocations are bracketed:
         // Allocations are bracketed:
         //    [allocationHeader][initialGuardBlock][userData][finalGuardBlock]
         //    [allocationHeader][initialGuardBlock][userData][finalGuardBlock]
@@ -118,11 +118,16 @@ private:
     unsigned char* mem;           // beginning of our allocation (pts to header)
     unsigned char* mem;           // beginning of our allocation (pts to header)
     TAllocation* prevAlloc;       // prior allocation in the chain
     TAllocation* prevAlloc;       // prior allocation in the chain
 
 
-    const static unsigned char guardBlockBeginVal;
-    const static unsigned char guardBlockEndVal;
-    const static unsigned char userDataFill;
+    static inline constexpr unsigned char guardBlockBeginVal = 0xfb;
+    static inline constexpr unsigned char guardBlockEndVal = 0xfe;
+    static inline constexpr unsigned char userDataFill = 0xcd;
+
+#   ifdef GUARD_BLOCKS
+    static inline constexpr size_t guardBlockSize = 16;
+#   else
+    static inline constexpr size_t guardBlockSize = 0;
+#   endif
 
 
-    const static size_t guardBlockSize;
 #   ifdef GUARD_BLOCKS
 #   ifdef GUARD_BLOCKS
     inline static size_t headerSize() { return sizeof(TAllocation); }
     inline static size_t headerSize() { return sizeof(TAllocation); }
 #   else
 #   else
@@ -171,7 +176,7 @@ public:
     void popAll();
     void popAll();
 
 
     //
     //
-    // Call allocate() to actually acquire memory.  Returns 0 if no memory
+    // Call allocate() to actually acquire memory.  Returns nullptr if no memory
     // available, otherwise a properly aligned pointer to 'numBytes' of memory.
     // available, otherwise a properly aligned pointer to 'numBytes' of memory.
     //
     //
     void* allocate(size_t numBytes);
     void* allocate(size_t numBytes);
@@ -189,7 +194,7 @@ protected:
     struct tHeader {
     struct tHeader {
         tHeader(tHeader* nextPage, size_t pageCount) :
         tHeader(tHeader* nextPage, size_t pageCount) :
 #ifdef GUARD_BLOCKS
 #ifdef GUARD_BLOCKS
-        lastAllocation(0),
+        lastAllocation(nullptr),
 #endif
 #endif
         nextPage(nextPage), pageCount(pageCount) { }
         nextPage(nextPage), pageCount(pageCount) { }
 
 

+ 9 - 0
src/libraries/glslang/glslang/Include/ResourceLimits.h

@@ -142,6 +142,15 @@ struct TBuiltInResource {
     int maxTaskWorkGroupSizeY_NV;
     int maxTaskWorkGroupSizeY_NV;
     int maxTaskWorkGroupSizeZ_NV;
     int maxTaskWorkGroupSizeZ_NV;
     int maxMeshViewCountNV;
     int maxMeshViewCountNV;
+    int maxMeshOutputVerticesEXT;
+    int maxMeshOutputPrimitivesEXT;
+    int maxMeshWorkGroupSizeX_EXT;
+    int maxMeshWorkGroupSizeY_EXT;
+    int maxMeshWorkGroupSizeZ_EXT;
+    int maxTaskWorkGroupSizeX_EXT;
+    int maxTaskWorkGroupSizeY_EXT;
+    int maxTaskWorkGroupSizeZ_EXT;
+    int maxMeshViewCountEXT;
     int maxDualSourceDrawBuffersEXT;
     int maxDualSourceDrawBuffersEXT;
 
 
     TLimits limits;
     TLimits limits;

+ 8 - 8
src/libraries/glslang/glslang/Include/ShHandle.h

@@ -58,9 +58,9 @@ class TShHandleBase {
 public:
 public:
     TShHandleBase() { pool = new glslang::TPoolAllocator; }
     TShHandleBase() { pool = new glslang::TPoolAllocator; }
     virtual ~TShHandleBase() { delete pool; }
     virtual ~TShHandleBase() { delete pool; }
-    virtual TCompiler* getAsCompiler() { return 0; }
-    virtual TLinker* getAsLinker() { return 0; }
-    virtual TUniformMap* getAsUniformMap() { return 0; }
+    virtual TCompiler* getAsCompiler() { return nullptr; }
+    virtual TLinker* getAsLinker() { return nullptr; }
+    virtual TUniformMap* getAsUniformMap() { return nullptr; }
     virtual glslang::TPoolAllocator* getPool() const { return pool; }
     virtual glslang::TPoolAllocator* getPool() const { return pool; }
 private:
 private:
     glslang::TPoolAllocator* pool;
     glslang::TPoolAllocator* pool;
@@ -123,11 +123,11 @@ public:
         infoSink(iSink),
         infoSink(iSink),
         executable(e),
         executable(e),
         haveReturnableObjectCode(false),
         haveReturnableObjectCode(false),
-        appAttributeBindings(0),
-        fixedAttributeBindings(0),
-        excludedAttributes(0),
+        appAttributeBindings(nullptr),
+        fixedAttributeBindings(nullptr),
+        excludedAttributes(nullptr),
         excludedCount(0),
         excludedCount(0),
-        uniformBindings(0) { }
+        uniformBindings(nullptr) { }
     virtual TLinker* getAsLinker() { return this; }
     virtual TLinker* getAsLinker() { return this; }
     virtual ~TLinker() { }
     virtual ~TLinker() { }
     virtual bool link(TCompilerList&, TUniformMap*) = 0;
     virtual bool link(TCompilerList&, TUniformMap*) = 0;
@@ -137,7 +137,7 @@ public:
     virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
     virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
     virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
     virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
     virtual ShBindingTable* getUniformBindings() const  { return uniformBindings; }
     virtual ShBindingTable* getUniformBindings() const  { return uniformBindings; }
-    virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here
+    virtual const void* getObjectCode() const { return nullptr; } // a real compiler would be returning object code here
     virtual TInfoSink& getInfoSink() { return infoSink; }
     virtual TInfoSink& getInfoSink() { return infoSink; }
     TInfoSink& infoSink;
     TInfoSink& infoSink;
 protected:
 protected:

+ 19 - 7
src/libraries/glslang/glslang/Include/SpirvIntrinsics.h

@@ -35,12 +35,11 @@
 
 
 #pragma once
 #pragma once
 
 
-#ifndef GLSLANG_WEB
-
 //
 //
 // GL_EXT_spirv_intrinsics
 // GL_EXT_spirv_intrinsics
 //
 //
 #include "Common.h"
 #include "Common.h"
+#include <variant>
 
 
 namespace glslang {
 namespace glslang {
 
 
@@ -98,12 +97,27 @@ struct TSpirvInstruction {
 struct TSpirvTypeParameter {
 struct TSpirvTypeParameter {
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
 
 
-    TSpirvTypeParameter(const TIntermConstantUnion* arg) { constant = arg; }
+    TSpirvTypeParameter(const TIntermConstantUnion* arg) { value = arg; }
+    TSpirvTypeParameter(const TType* arg) { value = arg; }
 
 
-    bool operator==(const TSpirvTypeParameter& rhs) const { return constant == rhs.constant; }
+    const TIntermConstantUnion* getAsConstant() const
+    {
+        if (value.index() == 0)
+            return std::get<const TIntermConstantUnion*>(value);
+        return nullptr;
+    }
+    const TType* getAsType() const
+    {
+        if (value.index() == 1)
+            return std::get<const TType*>(value);
+        return nullptr;
+    }
+
+    bool operator==(const TSpirvTypeParameter& rhs) const;
     bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
     bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
 
 
-    const TIntermConstantUnion* constant;
+    // Parameter value: constant expression or type specifier
+    std::variant<const TIntermConstantUnion*, const TType*> value;
 };
 };
 
 
 typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
 typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
@@ -124,5 +138,3 @@ struct TSpirvType {
 };
 };
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // GLSLANG_WEB

File diff suppressed because it is too large
+ 216 - 216
src/libraries/glslang/glslang/Include/Types.h


+ 25 - 4
src/libraries/glslang/glslang/Include/arrays.h

@@ -147,6 +147,15 @@ struct TSmallArrayVector {
             sizes->erase(sizes->begin());
             sizes->erase(sizes->begin());
     }
     }
 
 
+    void pop_back()
+    {
+        assert(sizes != nullptr && sizes->size() > 0);
+        if (sizes->size() == 1)
+            dealloc();
+        else
+            sizes->resize(sizes->size() - 1);
+    }
+
     // 'this' should currently not be holding anything, and copyNonFront
     // 'this' should currently not be holding anything, and copyNonFront
     // will make it hold a copy of all but the first element of rhs.
     // 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
     // (This would be useful for making a type that is dereferenced by
@@ -222,7 +231,7 @@ protected:
 struct TArraySizes {
 struct TArraySizes {
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
 
 
-    TArraySizes() : implicitArraySize(1), variablyIndexed(false) { }
+    TArraySizes() : implicitArraySize(0), implicitlySized(true), variablyIndexed(false){ }
 
 
     // For breaking into two non-shared copies, independently modifiable.
     // For breaking into two non-shared copies, independently modifiable.
     TArraySizes& operator=(const TArraySizes& from)
     TArraySizes& operator=(const TArraySizes& from)
@@ -230,6 +239,7 @@ struct TArraySizes {
         implicitArraySize = from.implicitArraySize;
         implicitArraySize = from.implicitArraySize;
         variablyIndexed = from.variablyIndexed;
         variablyIndexed = from.variablyIndexed;
         sizes = from.sizes;
         sizes = from.sizes;
+        implicitlySized = from.implicitlySized;
 
 
         return *this;
         return *this;
     }
     }
@@ -256,11 +266,17 @@ struct TArraySizes {
     void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); }
     void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); }
     void addInnerSize(TArraySize pair) {
     void addInnerSize(TArraySize pair) {
         sizes.push_back(pair.size, pair.node);
         sizes.push_back(pair.size, pair.node);
+        implicitlySized = false;
     }
     }
     void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); }
     void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); }
-    void changeOuterSize(int s) { sizes.changeFront((unsigned)s); }
-    int getImplicitSize() const { return implicitArraySize; }
-    void updateImplicitSize(int s) { implicitArraySize = std::max(implicitArraySize, s); }
+    void changeOuterSize(int s) {
+        sizes.changeFront((unsigned)s);
+        implicitlySized = false;
+    }
+    int getImplicitSize() const { return implicitArraySize > 0 ? implicitArraySize : 1; }
+    void updateImplicitSize(int s) {
+        implicitArraySize = (std::max)(implicitArraySize, s);
+    }
     bool isInnerUnsized() const
     bool isInnerUnsized() const
     {
     {
         for (int d = 1; d < sizes.size(); ++d) {
         for (int d = 1; d < sizes.size(); ++d) {
@@ -295,7 +311,11 @@ struct TArraySizes {
 
 
     bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); }
     bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); }
     bool isSized() const { return getOuterSize() != UnsizedArraySize; }
     bool isSized() const { return getOuterSize() != UnsizedArraySize; }
+    bool isImplicitlySized() const { return implicitlySized; }
+    bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; }
+    void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; }
     void dereference() { sizes.pop_front(); }
     void dereference() { sizes.pop_front(); }
+    void removeLastSize() { sizes.pop_back(); }
     void copyDereferenced(const TArraySizes& rhs)
     void copyDereferenced(const TArraySizes& rhs)
     {
     {
         assert(sizes.size() == 0);
         assert(sizes.size() == 0);
@@ -333,6 +353,7 @@ protected:
     // the implicit size of the array, if not variably indexed and
     // the implicit size of the array, if not variably indexed and
     // otherwise legal.
     // otherwise legal.
     int implicitArraySize;
     int implicitArraySize;
+    bool implicitlySized;
     bool variablyIndexed;  // true if array is indexed with a non compile-time constant
     bool variablyIndexed;  // true if array is indexed with a non compile-time constant
 };
 };
 
 

+ 0 - 253
src/libraries/glslang/glslang/Include/glslang_c_interface.h

@@ -1,253 +0,0 @@
-/**
-    This code is based on the glslang_c_interface implementation by Viktor Latypov
-**/
-
-/**
-BSD 2-Clause License
-
-Copyright (c) 2019, Viktor Latypov
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY 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 HOLDER 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_C_IFACE_H_INCLUDED
-#define GLSLANG_C_IFACE_H_INCLUDED
-
-#include <stdbool.h>
-#include <stdlib.h>
-
-#include "glslang_c_shader_types.h"
-
-typedef struct glslang_shader_s glslang_shader_t;
-typedef struct glslang_program_s glslang_program_t;
-
-/* TLimits counterpart */
-typedef struct glslang_limits_s {
-    bool non_inductive_for_loops;
-    bool while_loops;
-    bool do_while_loops;
-    bool general_uniform_indexing;
-    bool general_attribute_matrix_vector_indexing;
-    bool general_varying_indexing;
-    bool general_sampler_indexing;
-    bool general_variable_indexing;
-    bool general_constant_matrix_vector_indexing;
-} glslang_limits_t;
-
-/* TBuiltInResource counterpart */
-typedef struct glslang_resource_s {
-    int max_lights;
-    int max_clip_planes;
-    int max_texture_units;
-    int max_texture_coords;
-    int max_vertex_attribs;
-    int max_vertex_uniform_components;
-    int max_varying_floats;
-    int max_vertex_texture_image_units;
-    int max_combined_texture_image_units;
-    int max_texture_image_units;
-    int max_fragment_uniform_components;
-    int max_draw_buffers;
-    int max_vertex_uniform_vectors;
-    int max_varying_vectors;
-    int max_fragment_uniform_vectors;
-    int max_vertex_output_vectors;
-    int max_fragment_input_vectors;
-    int min_program_texel_offset;
-    int max_program_texel_offset;
-    int max_clip_distances;
-    int max_compute_work_group_count_x;
-    int max_compute_work_group_count_y;
-    int max_compute_work_group_count_z;
-    int max_compute_work_group_size_x;
-    int max_compute_work_group_size_y;
-    int max_compute_work_group_size_z;
-    int max_compute_uniform_components;
-    int max_compute_texture_image_units;
-    int max_compute_image_uniforms;
-    int max_compute_atomic_counters;
-    int max_compute_atomic_counter_buffers;
-    int max_varying_components;
-    int max_vertex_output_components;
-    int max_geometry_input_components;
-    int max_geometry_output_components;
-    int max_fragment_input_components;
-    int max_image_units;
-    int max_combined_image_units_and_fragment_outputs;
-    int max_combined_shader_output_resources;
-    int max_image_samples;
-    int max_vertex_image_uniforms;
-    int max_tess_control_image_uniforms;
-    int max_tess_evaluation_image_uniforms;
-    int max_geometry_image_uniforms;
-    int max_fragment_image_uniforms;
-    int max_combined_image_uniforms;
-    int max_geometry_texture_image_units;
-    int max_geometry_output_vertices;
-    int max_geometry_total_output_components;
-    int max_geometry_uniform_components;
-    int max_geometry_varying_components;
-    int max_tess_control_input_components;
-    int max_tess_control_output_components;
-    int max_tess_control_texture_image_units;
-    int max_tess_control_uniform_components;
-    int max_tess_control_total_output_components;
-    int max_tess_evaluation_input_components;
-    int max_tess_evaluation_output_components;
-    int max_tess_evaluation_texture_image_units;
-    int max_tess_evaluation_uniform_components;
-    int max_tess_patch_components;
-    int max_patch_vertices;
-    int max_tess_gen_level;
-    int max_viewports;
-    int max_vertex_atomic_counters;
-    int max_tess_control_atomic_counters;
-    int max_tess_evaluation_atomic_counters;
-    int max_geometry_atomic_counters;
-    int max_fragment_atomic_counters;
-    int max_combined_atomic_counters;
-    int max_atomic_counter_bindings;
-    int max_vertex_atomic_counter_buffers;
-    int max_tess_control_atomic_counter_buffers;
-    int max_tess_evaluation_atomic_counter_buffers;
-    int max_geometry_atomic_counter_buffers;
-    int max_fragment_atomic_counter_buffers;
-    int max_combined_atomic_counter_buffers;
-    int max_atomic_counter_buffer_size;
-    int max_transform_feedback_buffers;
-    int max_transform_feedback_interleaved_components;
-    int max_cull_distances;
-    int max_combined_clip_and_cull_distances;
-    int max_samples;
-    int max_mesh_output_vertices_nv;
-    int max_mesh_output_primitives_nv;
-    int max_mesh_work_group_size_x_nv;
-    int max_mesh_work_group_size_y_nv;
-    int max_mesh_work_group_size_z_nv;
-    int max_task_work_group_size_x_nv;
-    int max_task_work_group_size_y_nv;
-    int max_task_work_group_size_z_nv;
-    int max_mesh_view_count_nv;
-    int maxDualSourceDrawBuffersEXT;
-
-    glslang_limits_t limits;
-} glslang_resource_t;
-
-typedef struct glslang_input_s {
-    glslang_source_t language;
-    glslang_stage_t stage;
-    glslang_client_t client;
-    glslang_target_client_version_t client_version;
-    glslang_target_language_t target_language;
-    glslang_target_language_version_t target_language_version;
-    /** Shader source code */
-    const char* code;
-    int default_version;
-    glslang_profile_t default_profile;
-    int force_default_version_and_profile;
-    int forward_compatible;
-    glslang_messages_t messages;
-    const glslang_resource_t* resource;
-} glslang_input_t;
-
-/* Inclusion result structure allocated by C include_local/include_system callbacks */
-typedef struct glsl_include_result_s {
-    /* Header file name or NULL if inclusion failed */
-    const char* header_name;
-
-    /* Header contents or NULL */
-    const char* header_data;
-    size_t header_length;
-
-} glsl_include_result_t;
-
-/* Callback for local file inclusion */
-typedef glsl_include_result_t* (*glsl_include_local_func)(void* ctx, const char* header_name, const char* includer_name,
-                                                          size_t include_depth);
-
-/* Callback for system file inclusion */
-typedef glsl_include_result_t* (*glsl_include_system_func)(void* ctx, const char* header_name,
-                                                           const char* includer_name, size_t include_depth);
-
-/* Callback for include result destruction */
-typedef int (*glsl_free_include_result_func)(void* ctx, glsl_include_result_t* result);
-
-/* Collection of callbacks for GLSL preprocessor */
-typedef struct glsl_include_callbacks_s {
-    glsl_include_system_func include_system;
-    glsl_include_local_func include_local;
-    glsl_free_include_result_func free_include_result;
-} glsl_include_callbacks_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef GLSLANG_IS_SHARED_LIBRARY
-    #ifdef _WIN32
-        #ifdef GLSLANG_EXPORTING
-            #define GLSLANG_EXPORT __declspec(dllexport)
-        #else
-            #define GLSLANG_EXPORT __declspec(dllimport)
-        #endif
-    #elif __GNUC__ >= 4
-        #define GLSLANG_EXPORT __attribute__((visibility("default")))
-    #endif
-#endif // GLSLANG_IS_SHARED_LIBRARY
-
-#ifndef GLSLANG_EXPORT
-#define GLSLANG_EXPORT
-#endif
-
-GLSLANG_EXPORT int glslang_initialize_process();
-GLSLANG_EXPORT void glslang_finalize_process();
-
-GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input);
-GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader);
-GLSLANG_EXPORT void glslang_shader_shift_binding(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base);
-GLSLANG_EXPORT void glslang_shader_shift_binding_for_set(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base, unsigned int set);
-GLSLANG_EXPORT void glslang_shader_set_options(glslang_shader_t* shader, int options); // glslang_shader_options_t
-GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input);
-GLSLANG_EXPORT int glslang_shader_parse(glslang_shader_t* shader, const glslang_input_t* input);
-GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t* shader);
-GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader);
-GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader);
-
-GLSLANG_EXPORT glslang_program_t* glslang_program_create();
-GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program);
-GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader);
-GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t
-GLSLANG_EXPORT int glslang_program_map_io(glslang_program_t* program);
-GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage);
-GLSLANG_EXPORT size_t glslang_program_SPIRV_get_size(glslang_program_t* program);
-GLSLANG_EXPORT void glslang_program_SPIRV_get(glslang_program_t* program, unsigned int*);
-GLSLANG_EXPORT unsigned int* glslang_program_SPIRV_get_ptr(glslang_program_t* program);
-GLSLANG_EXPORT const char* glslang_program_SPIRV_get_messages(glslang_program_t* program);
-GLSLANG_EXPORT const char* glslang_program_get_info_log(glslang_program_t* program);
-GLSLANG_EXPORT const char* glslang_program_get_info_debug_log(glslang_program_t* program);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifdef GLSLANG_C_IFACE_INCLUDED */

+ 0 - 207
src/libraries/glslang/glslang/Include/glslang_c_shader_types.h

@@ -1,207 +0,0 @@
-/**
-    This code is based on the glslang_c_interface implementation by Viktor Latypov
-**/
-
-/**
-BSD 2-Clause License
-
-Copyright (c) 2019, Viktor Latypov
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY 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 HOLDER 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 C_SHADER_TYPES_H_INCLUDED
-#define C_SHADER_TYPES_H_INCLUDED
-
-#define LAST_ELEMENT_MARKER(x) x
-
-/* EShLanguage counterpart */
-typedef enum {
-    GLSLANG_STAGE_VERTEX,
-    GLSLANG_STAGE_TESSCONTROL,
-    GLSLANG_STAGE_TESSEVALUATION,
-    GLSLANG_STAGE_GEOMETRY,
-    GLSLANG_STAGE_FRAGMENT,
-    GLSLANG_STAGE_COMPUTE,
-    GLSLANG_STAGE_RAYGEN_NV,
-    GLSLANG_STAGE_INTERSECT_NV,
-    GLSLANG_STAGE_ANYHIT_NV,
-    GLSLANG_STAGE_CLOSESTHIT_NV,
-    GLSLANG_STAGE_MISS_NV,
-    GLSLANG_STAGE_CALLABLE_NV,
-    GLSLANG_STAGE_TASK_NV,
-    GLSLANG_STAGE_MESH_NV,
-    LAST_ELEMENT_MARKER(GLSLANG_STAGE_COUNT),
-} glslang_stage_t; // would be better as stage, but this is ancient now
-
-/* EShLanguageMask counterpart */
-typedef enum {
-    GLSLANG_STAGE_VERTEX_MASK = (1 << GLSLANG_STAGE_VERTEX),
-    GLSLANG_STAGE_TESSCONTROL_MASK = (1 << GLSLANG_STAGE_TESSCONTROL),
-    GLSLANG_STAGE_TESSEVALUATION_MASK = (1 << GLSLANG_STAGE_TESSEVALUATION),
-    GLSLANG_STAGE_GEOMETRY_MASK = (1 << GLSLANG_STAGE_GEOMETRY),
-    GLSLANG_STAGE_FRAGMENT_MASK = (1 << GLSLANG_STAGE_FRAGMENT),
-    GLSLANG_STAGE_COMPUTE_MASK = (1 << GLSLANG_STAGE_COMPUTE),
-    GLSLANG_STAGE_RAYGEN_NV_MASK = (1 << GLSLANG_STAGE_RAYGEN_NV),
-    GLSLANG_STAGE_INTERSECT_NV_MASK = (1 << GLSLANG_STAGE_INTERSECT_NV),
-    GLSLANG_STAGE_ANYHIT_NV_MASK = (1 << GLSLANG_STAGE_ANYHIT_NV),
-    GLSLANG_STAGE_CLOSESTHIT_NV_MASK = (1 << GLSLANG_STAGE_CLOSESTHIT_NV),
-    GLSLANG_STAGE_MISS_NV_MASK = (1 << GLSLANG_STAGE_MISS_NV),
-    GLSLANG_STAGE_CALLABLE_NV_MASK = (1 << GLSLANG_STAGE_CALLABLE_NV),
-    GLSLANG_STAGE_TASK_NV_MASK = (1 << GLSLANG_STAGE_TASK_NV),
-    GLSLANG_STAGE_MESH_NV_MASK = (1 << GLSLANG_STAGE_MESH_NV),
-    LAST_ELEMENT_MARKER(GLSLANG_STAGE_MASK_COUNT),
-} glslang_stage_mask_t;
-
-/* EShSource counterpart */
-typedef enum {
-    GLSLANG_SOURCE_NONE,
-    GLSLANG_SOURCE_GLSL,
-    GLSLANG_SOURCE_HLSL,
-    LAST_ELEMENT_MARKER(GLSLANG_SOURCE_COUNT),
-} glslang_source_t;
-
-/* EShClient counterpart */
-typedef enum {
-    GLSLANG_CLIENT_NONE,
-    GLSLANG_CLIENT_VULKAN,
-    GLSLANG_CLIENT_OPENGL,
-    LAST_ELEMENT_MARKER(GLSLANG_CLIENT_COUNT),
-} glslang_client_t;
-
-/* EShTargetLanguage counterpart */
-typedef enum {
-    GLSLANG_TARGET_NONE,
-    GLSLANG_TARGET_SPV,
-    LAST_ELEMENT_MARKER(GLSLANG_TARGET_COUNT),
-} glslang_target_language_t;
-
-/* SH_TARGET_ClientVersion counterpart */
-typedef enum {
-    GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
-    GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
-    GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
-    GLSLANG_TARGET_OPENGL_450 = 450,
-    LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4),
-} glslang_target_client_version_t;
-
-/* SH_TARGET_LanguageVersion counterpart */
-typedef enum {
-    GLSLANG_TARGET_SPV_1_0 = (1 << 16),
-    GLSLANG_TARGET_SPV_1_1 = (1 << 16) | (1 << 8),
-    GLSLANG_TARGET_SPV_1_2 = (1 << 16) | (2 << 8),
-    GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
-    GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
-    GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
-    GLSLANG_TARGET_SPV_1_6 = (1 << 16) | (6 << 8),
-    LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 7),
-} glslang_target_language_version_t;
-
-/* EShExecutable counterpart */
-typedef enum { GLSLANG_EX_VERTEX_FRAGMENT, GLSLANG_EX_FRAGMENT } glslang_executable_t;
-
-/* EShOptimizationLevel counterpart  */
-typedef enum {
-    GLSLANG_OPT_NO_GENERATION,
-    GLSLANG_OPT_NONE,
-    GLSLANG_OPT_SIMPLE,
-    GLSLANG_OPT_FULL,
-    LAST_ELEMENT_MARKER(GLSLANG_OPT_LEVEL_COUNT),
-} glslang_optimization_level_t;
-
-/* EShTextureSamplerTransformMode counterpart */
-typedef enum {
-    GLSLANG_TEX_SAMP_TRANS_KEEP,
-    GLSLANG_TEX_SAMP_TRANS_UPGRADE_TEXTURE_REMOVE_SAMPLER,
-    LAST_ELEMENT_MARKER(GLSLANG_TEX_SAMP_TRANS_COUNT),
-} glslang_texture_sampler_transform_mode_t;
-
-/* EShMessages counterpart */
-typedef enum {
-    GLSLANG_MSG_DEFAULT_BIT = 0,
-    GLSLANG_MSG_RELAXED_ERRORS_BIT = (1 << 0),
-    GLSLANG_MSG_SUPPRESS_WARNINGS_BIT = (1 << 1),
-    GLSLANG_MSG_AST_BIT = (1 << 2),
-    GLSLANG_MSG_SPV_RULES_BIT = (1 << 3),
-    GLSLANG_MSG_VULKAN_RULES_BIT = (1 << 4),
-    GLSLANG_MSG_ONLY_PREPROCESSOR_BIT = (1 << 5),
-    GLSLANG_MSG_READ_HLSL_BIT = (1 << 6),
-    GLSLANG_MSG_CASCADING_ERRORS_BIT = (1 << 7),
-    GLSLANG_MSG_KEEP_UNCALLED_BIT = (1 << 8),
-    GLSLANG_MSG_HLSL_OFFSETS_BIT = (1 << 9),
-    GLSLANG_MSG_DEBUG_INFO_BIT = (1 << 10),
-    GLSLANG_MSG_HLSL_ENABLE_16BIT_TYPES_BIT = (1 << 11),
-    GLSLANG_MSG_HLSL_LEGALIZATION_BIT = (1 << 12),
-    GLSLANG_MSG_HLSL_DX9_COMPATIBLE_BIT = (1 << 13),
-    GLSLANG_MSG_BUILTIN_SYMBOL_TABLE_BIT = (1 << 14),
-    LAST_ELEMENT_MARKER(GLSLANG_MSG_COUNT),
-} glslang_messages_t;
-
-/* EShReflectionOptions counterpart */
-typedef enum {
-    GLSLANG_REFLECTION_DEFAULT_BIT = 0,
-    GLSLANG_REFLECTION_STRICT_ARRAY_SUFFIX_BIT = (1 << 0),
-    GLSLANG_REFLECTION_BASIC_ARRAY_SUFFIX_BIT = (1 << 1),
-    GLSLANG_REFLECTION_INTERMEDIATE_IOO_BIT = (1 << 2),
-    GLSLANG_REFLECTION_SEPARATE_BUFFERS_BIT = (1 << 3),
-    GLSLANG_REFLECTION_ALL_BLOCK_VARIABLES_BIT = (1 << 4),
-    GLSLANG_REFLECTION_UNWRAP_IO_BLOCKS_BIT = (1 << 5),
-    GLSLANG_REFLECTION_ALL_IO_VARIABLES_BIT = (1 << 6),
-    GLSLANG_REFLECTION_SHARED_STD140_SSBO_BIT = (1 << 7),
-    GLSLANG_REFLECTION_SHARED_STD140_UBO_BIT = (1 << 8),
-    LAST_ELEMENT_MARKER(GLSLANG_REFLECTION_COUNT),
-} glslang_reflection_options_t;
-
-/* EProfile counterpart (from Versions.h) */
-typedef enum {
-    GLSLANG_BAD_PROFILE = 0,
-    GLSLANG_NO_PROFILE = (1 << 0),
-    GLSLANG_CORE_PROFILE = (1 << 1),
-    GLSLANG_COMPATIBILITY_PROFILE = (1 << 2),
-    GLSLANG_ES_PROFILE = (1 << 3),
-    LAST_ELEMENT_MARKER(GLSLANG_PROFILE_COUNT),
-} glslang_profile_t;
-
-/* Shader options */
-typedef enum {
-    GLSLANG_SHADER_DEFAULT_BIT = 0,
-    GLSLANG_SHADER_AUTO_MAP_BINDINGS = (1 << 0),
-    GLSLANG_SHADER_AUTO_MAP_LOCATIONS = (1 << 1),
-    GLSLANG_SHADER_VULKAN_RULES_RELAXED = (1 << 2),
-    LAST_ELEMENT_MARKER(GLSLANG_SHADER_COUNT),
-} glslang_shader_options_t;
-
-/* TResourceType counterpart */
-typedef enum {
-    GLSLANG_RESOURCE_TYPE_SAMPLER,
-    GLSLANG_RESOURCE_TYPE_TEXTURE,
-    GLSLANG_RESOURCE_TYPE_IMAGE,
-    GLSLANG_RESOURCE_TYPE_UBO,
-    GLSLANG_RESOURCE_TYPE_SSBO,
-    GLSLANG_RESOURCE_TYPE_UAV,
-    LAST_ELEMENT_MARKER(GLSLANG_RESOURCE_TYPE_COUNT),
-} glslang_resource_type_t;
-
-#undef LAST_ELEMENT_MARKER
-
-#endif

+ 110 - 68
src/libraries/glslang/glslang/Include/intermediate.h

@@ -48,14 +48,9 @@
 #ifndef __INTERMEDIATE_H
 #ifndef __INTERMEDIATE_H
 #define __INTERMEDIATE_H
 #define __INTERMEDIATE_H
 
 
-#if defined(_MSC_VER) && _MSC_VER >= 1900
-    #pragma warning(disable : 4464) // relative include path contains '..'
-    #pragma warning(disable : 5026) // 'glslang::TIntermUnary': move constructor was implicitly defined as deleted
-#endif
-
-#include "../Include/Common.h"
-#include "../Include/Types.h"
-#include "../Include/ConstantUnion.h"
+#include "Common.h"
+#include "Types.h"
+#include "ConstantUnion.h"
 
 
 namespace glslang {
 namespace glslang {
 
 
@@ -67,13 +62,12 @@ class TIntermediate;
 enum TOperator {
 enum TOperator {
     EOpNull,            // if in a node, should only mean a node is still being built
     EOpNull,            // if in a node, should only mean a node is still being built
     EOpSequence,        // denotes a list of statements, or parameters, etc.
     EOpSequence,        // denotes a list of statements, or parameters, etc.
+    EOpScope,           // Used by debugging to denote a scoped list of statements
     EOpLinkerObjects,   // for aggregate node of objects the linker may need, if not reference by the rest of the AST
     EOpLinkerObjects,   // for aggregate node of objects the linker may need, if not reference by the rest of the AST
     EOpFunctionCall,
     EOpFunctionCall,
     EOpFunction,        // For function definition
     EOpFunction,        // For function definition
     EOpParameters,      // an aggregate listing the parameters to a function
     EOpParameters,      // an aggregate listing the parameters to a function
-#ifndef GLSLANG_WEB
     EOpSpirvInst,
     EOpSpirvInst,
-#endif
 
 
     //
     //
     // Unary operators
     // Unary operators
@@ -91,6 +85,8 @@ enum TOperator {
 
 
     EOpCopyObject,
     EOpCopyObject,
 
 
+    EOpDeclare,        // Used by debugging to force declaration of variable in correct scope
+
     // (u)int* -> bool
     // (u)int* -> bool
     EOpConvInt8ToBool,
     EOpConvInt8ToBool,
     EOpConvUint8ToBool,
     EOpConvUint8ToBool,
@@ -626,6 +622,9 @@ enum TOperator {
     EOpCooperativeMatrixLoad,
     EOpCooperativeMatrixLoad,
     EOpCooperativeMatrixStore,
     EOpCooperativeMatrixStore,
     EOpCooperativeMatrixMulAdd,
     EOpCooperativeMatrixMulAdd,
+    EOpCooperativeMatrixLoadNV,
+    EOpCooperativeMatrixStoreNV,
+    EOpCooperativeMatrixMulAddNV,
 
 
     EOpBeginInvocationInterlock, // Fragment only
     EOpBeginInvocationInterlock, // Fragment only
     EOpEndInvocationInterlock, // Fragment only
     EOpEndInvocationInterlock, // Fragment only
@@ -763,7 +762,8 @@ enum TOperator {
     EOpConstructTextureSampler,
     EOpConstructTextureSampler,
     EOpConstructNonuniform,     // expected to be transformed away, not present in final AST
     EOpConstructNonuniform,     // expected to be transformed away, not present in final AST
     EOpConstructReference,
     EOpConstructReference,
-    EOpConstructCooperativeMatrix,
+    EOpConstructCooperativeMatrixNV,
+    EOpConstructCooperativeMatrixKHR,
     EOpConstructAccStruct,
     EOpConstructAccStruct,
     EOpConstructGuardEnd,
     EOpConstructGuardEnd,
 
 
@@ -824,6 +824,7 @@ enum TOperator {
     EOpSubpassLoadMS,
     EOpSubpassLoadMS,
     EOpSparseImageLoad,
     EOpSparseImageLoad,
     EOpSparseImageLoadLod,
     EOpSparseImageLoadLod,
+    EOpColorAttachmentReadEXT, // Fragment only
 
 
     EOpImageGuardEnd,
     EOpImageGuardEnd,
 
 
@@ -934,6 +935,8 @@ enum TOperator {
     EOpExecuteCallableNV,
     EOpExecuteCallableNV,
     EOpExecuteCallableKHR,
     EOpExecuteCallableKHR,
     EOpWritePackedPrimitiveIndices4x8NV,
     EOpWritePackedPrimitiveIndices4x8NV,
+    EOpEmitMeshTasksEXT,
+    EOpSetMeshOutputsEXT,
 
 
     //
     //
     // GL_EXT_ray_query operations
     // GL_EXT_ray_query operations
@@ -963,7 +966,44 @@ enum TOperator {
     EOpRayQueryGetIntersectionObjectToWorld,
     EOpRayQueryGetIntersectionObjectToWorld,
     EOpRayQueryGetIntersectionWorldToObject,
     EOpRayQueryGetIntersectionWorldToObject,
 
 
+    // 
+    // GL_NV_shader_invocation_reorder
     //
     //
+
+    EOpHitObjectTraceRayNV,
+    EOpHitObjectTraceRayMotionNV,
+    EOpHitObjectRecordHitNV,
+    EOpHitObjectRecordHitMotionNV,
+    EOpHitObjectRecordHitWithIndexNV,
+    EOpHitObjectRecordHitWithIndexMotionNV,
+    EOpHitObjectRecordMissNV,
+    EOpHitObjectRecordMissMotionNV,
+    EOpHitObjectRecordEmptyNV,
+    EOpHitObjectExecuteShaderNV,
+    EOpHitObjectIsEmptyNV,
+    EOpHitObjectIsMissNV,
+    EOpHitObjectIsHitNV,
+    EOpHitObjectGetRayTMinNV,
+    EOpHitObjectGetRayTMaxNV,
+    EOpHitObjectGetObjectRayOriginNV,
+    EOpHitObjectGetObjectRayDirectionNV,
+    EOpHitObjectGetWorldRayOriginNV,
+    EOpHitObjectGetWorldRayDirectionNV,
+    EOpHitObjectGetWorldToObjectNV,
+    EOpHitObjectGetObjectToWorldNV,
+    EOpHitObjectGetInstanceCustomIndexNV,
+    EOpHitObjectGetInstanceIdNV,
+    EOpHitObjectGetGeometryIndexNV,
+    EOpHitObjectGetPrimitiveIndexNV,
+    EOpHitObjectGetHitKindNV,
+    EOpHitObjectGetShaderBindingTableRecordIndexNV,
+    EOpHitObjectGetShaderRecordBufferHandleNV,
+    EOpHitObjectGetAttributesNV,
+    EOpHitObjectGetCurrentTimeNV,
+    EOpReorderThreadNV,
+    EOpFetchMicroTriangleVertexPositionNV,
+    EOpFetchMicroTriangleVertexBarycentricNV,
+
     // HLSL operations
     // HLSL operations
     //
     //
 
 
@@ -1050,6 +1090,24 @@ enum TOperator {
     // Shader Clock Ops
     // Shader Clock Ops
     EOpReadClockSubgroupKHR,
     EOpReadClockSubgroupKHR,
     EOpReadClockDeviceKHR,
     EOpReadClockDeviceKHR,
+
+    // GL_EXT_ray_tracing_position_fetch
+    EOpRayQueryGetIntersectionTriangleVertexPositionsEXT,
+
+    // Shader tile image ops
+    EOpStencilAttachmentReadEXT, // Fragment only
+    EOpDepthAttachmentReadEXT, // Fragment only
+
+    // Image processing
+    EOpImageSampleWeightedQCOM,
+    EOpImageBoxFilterQCOM,
+    EOpImageBlockMatchSADQCOM,
+    EOpImageBlockMatchSSDQCOM,
+};
+
+enum TLinkType {
+    ELinkNone,
+    ELinkExport,
 };
 };
 
 
 class TIntermTraverser;
 class TIntermTraverser;
@@ -1081,31 +1139,31 @@ public:
     virtual const glslang::TSourceLoc& getLoc() const { return loc; }
     virtual const glslang::TSourceLoc& getLoc() const { return loc; }
     virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; }
     virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; }
     virtual void traverse(glslang::TIntermTraverser*) = 0;
     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       glslang::TIntermLoop*          getAsLoopNode()            { 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 const glslang::TIntermLoop*          getAsLoopNode()      const { return 0; }
+    virtual       glslang::TIntermTyped*         getAsTyped()               { return nullptr; }
+    virtual       glslang::TIntermOperator*      getAsOperator()            { return nullptr; }
+    virtual       glslang::TIntermConstantUnion* getAsConstantUnion()       { return nullptr; }
+    virtual       glslang::TIntermAggregate*     getAsAggregate()           { return nullptr; }
+    virtual       glslang::TIntermUnary*         getAsUnaryNode()           { return nullptr; }
+    virtual       glslang::TIntermBinary*        getAsBinaryNode()          { return nullptr; }
+    virtual       glslang::TIntermSelection*     getAsSelectionNode()       { return nullptr; }
+    virtual       glslang::TIntermSwitch*        getAsSwitchNode()          { return nullptr; }
+    virtual       glslang::TIntermMethod*        getAsMethodNode()          { return nullptr; }
+    virtual       glslang::TIntermSymbol*        getAsSymbolNode()          { return nullptr; }
+    virtual       glslang::TIntermBranch*        getAsBranchNode()          { return nullptr; }
+    virtual       glslang::TIntermLoop*          getAsLoopNode()            { return nullptr; }
+
+    virtual const glslang::TIntermTyped*         getAsTyped()         const { return nullptr; }
+    virtual const glslang::TIntermOperator*      getAsOperator()      const { return nullptr; }
+    virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return nullptr; }
+    virtual const glslang::TIntermAggregate*     getAsAggregate()     const { return nullptr; }
+    virtual const glslang::TIntermUnary*         getAsUnaryNode()     const { return nullptr; }
+    virtual const glslang::TIntermBinary*        getAsBinaryNode()    const { return nullptr; }
+    virtual const glslang::TIntermSelection*     getAsSelectionNode() const { return nullptr; }
+    virtual const glslang::TIntermSwitch*        getAsSwitchNode()    const { return nullptr; }
+    virtual const glslang::TIntermMethod*        getAsMethodNode()    const { return nullptr; }
+    virtual const glslang::TIntermSymbol*        getAsSymbolNode()    const { return nullptr; }
+    virtual const glslang::TIntermBranch*        getAsBranchNode()    const { return nullptr; }
+    virtual const glslang::TIntermLoop*          getAsLoopNode()      const { return nullptr; }
     virtual ~TIntermNode() { }
     virtual ~TIntermNode() { }
 
 
 protected:
 protected:
@@ -1155,7 +1213,7 @@ public:
     virtual bool isIntegerDomain() const { return type.isIntegerDomain(); }
     virtual bool isIntegerDomain() const { return type.isIntegerDomain(); }
     bool isAtomic() const { return type.isAtomic(); }
     bool isAtomic() const { return type.isAtomic(); }
     bool isReference() const { return type.isReference(); }
     bool isReference() const { return type.isReference(); }
-    TString getCompleteString() const { return type.getCompleteString(); }
+    TString getCompleteString(bool enhanced = false) const { return type.getCompleteString(enhanced); }
 
 
 protected:
 protected:
     TIntermTyped& operator=(const TIntermTyped&);
     TIntermTyped& operator=(const TIntermTyped&);
@@ -1269,9 +1327,11 @@ public:
     virtual const TString& getMethodName() const { return method; }
     virtual const TString& getMethodName() const { return method; }
     virtual TIntermTyped* getObject() const { return object; }
     virtual TIntermTyped* getObject() const { return object; }
     virtual void traverse(TIntermTraverser*);
     virtual void traverse(TIntermTraverser*);
+    void setExport() { linkType = ELinkExport; }
 protected:
 protected:
     TIntermTyped* object;
     TIntermTyped* object;
     TString method;
     TString method;
+    TLinkType linkType;
 };
 };
 
 
 //
 //
@@ -1283,12 +1343,7 @@ public:
     // per process threadPoolAllocator, then it causes increased memory usage per compile
     // per process threadPoolAllocator, then it causes increased memory usage per compile
     // it is essential to use "symbol = sym" to assign to symbol
     // it is essential to use "symbol = sym" to assign to symbol
     TIntermSymbol(long long i, const TString& n, const TType& t)
     TIntermSymbol(long long i, const TString& n, const TType& t)
-        : TIntermTyped(t), id(i),
-#ifndef GLSLANG_WEB
-        flattenSubset(-1),
-#endif
-        constSubtree(nullptr)
-          { name = n; }
+        : TIntermTyped(t), id(i), flattenSubset(-1), constSubtree(nullptr) { name = n; }
     virtual long long getId() const { return id; }
     virtual long long getId() const { return id; }
     virtual void changeId(long long i) { id = i; }
     virtual void changeId(long long i) { id = i; }
     virtual const TString& getName() const { return name; }
     virtual const TString& getName() const { return name; }
@@ -1299,12 +1354,10 @@ public:
     const TConstUnionArray& getConstArray() const { return constArray; }
     const TConstUnionArray& getConstArray() const { return constArray; }
     void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; }
     void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; }
     TIntermTyped* getConstSubtree() const { return constSubtree; }
     TIntermTyped* getConstSubtree() const { return constSubtree; }
-#ifndef GLSLANG_WEB
     void setFlattenSubset(int subset) { flattenSubset = subset; }
     void setFlattenSubset(int subset) { flattenSubset = subset; }
     virtual const TString& getAccessName() const;
     virtual const TString& getAccessName() const;
 
 
     int getFlattenSubset() const { return flattenSubset; } // -1 means full object
     int getFlattenSubset() const { return flattenSubset; } // -1 means full object
-#endif
 
 
     // This is meant for cases where a node has already been constructed, and
     // This is meant for cases where a node has already been constructed, and
     // later on, it becomes necessary to switch to a different symbol.
     // later on, it becomes necessary to switch to a different symbol.
@@ -1312,9 +1365,7 @@ public:
 
 
 protected:
 protected:
     long long id;                // the unique id of the symbol this node represents
     long long id;                // the unique id of the symbol this node represents
-#ifndef GLSLANG_WEB
     int flattenSubset;           // how deeply the flattened object rooted at id has been dereferenced
     int flattenSubset;           // how deeply the flattened object rooted at id has been dereferenced
-#endif
     TString name;                // the name 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
     TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value
     TIntermTyped* constSubtree;
     TIntermTyped* constSubtree;
@@ -1353,6 +1404,7 @@ struct TCrackedTextureOp {
     bool subpass;
     bool subpass;
     bool lodClamp;
     bool lodClamp;
     bool fragMask;
     bool fragMask;
+    bool attachmentEXT;
 };
 };
 
 
 //
 //
@@ -1368,19 +1420,11 @@ public:
     bool isConstructor() const;
     bool isConstructor() const;
     bool isTexture()  const { return op > EOpTextureGuardBegin  && op < EOpTextureGuardEnd; }
     bool isTexture()  const { return op > EOpTextureGuardBegin  && op < EOpTextureGuardEnd; }
     bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
     bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
-#ifdef GLSLANG_WEB
-    bool isImage()          const { return false; }
-    bool isSparseTexture()  const { return false; }
-    bool isImageFootprint() const { return false; }
-    bool isSparseImage()    const { return false; }
-    bool isSubgroup()       const { return false; }
-#else
     bool isImage()    const { return op > EOpImageGuardBegin    && op < EOpImageGuardEnd; }
     bool isImage()    const { return op > EOpImageGuardBegin    && op < EOpImageGuardEnd; }
     bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
     bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
     bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; }
     bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; }
     bool isSparseImage()   const { return op == EOpSparseImageLoad; }
     bool isSparseImage()   const { return op == EOpSparseImageLoad; }
     bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; }
     bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; }
-#endif
 
 
     void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
     void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
     TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ?
     TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ?
@@ -1409,6 +1453,7 @@ public:
         cracked.gather = false;
         cracked.gather = false;
         cracked.grad = false;
         cracked.grad = false;
         cracked.subpass = false;
         cracked.subpass = false;
+        cracked.attachmentEXT = false;
         cracked.lodClamp = false;
         cracked.lodClamp = false;
         cracked.fragMask = false;
         cracked.fragMask = false;
 
 
@@ -1485,7 +1530,6 @@ public:
             cracked.offset = true;
             cracked.offset = true;
             cracked.proj = true;
             cracked.proj = true;
             break;
             break;
-#ifndef GLSLANG_WEB
         case EOpTextureClamp:
         case EOpTextureClamp:
         case EOpSparseTextureClamp:
         case EOpSparseTextureClamp:
             cracked.lodClamp = true;
             cracked.lodClamp = true;
@@ -1569,7 +1613,9 @@ public:
         case EOpSubpassLoadMS:
         case EOpSubpassLoadMS:
             cracked.subpass = true;
             cracked.subpass = true;
             break;
             break;
-#endif
+        case EOpColorAttachmentReadEXT:
+            cracked.attachmentEXT = true;
+            break;
         default:
         default:
             break;
             break;
         }
         }
@@ -1611,8 +1657,8 @@ protected:
 //
 //
 class TIntermUnary : public TIntermOperator {
 class TIntermUnary : public TIntermOperator {
 public:
 public:
-    TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {}
-    TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {}
+    TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(nullptr) {}
+    TIntermUnary(TOperator o) : TIntermOperator(o), operand(nullptr) {}
     virtual void traverse(TIntermTraverser*);
     virtual void traverse(TIntermTraverser*);
     virtual void setOperand(TIntermTyped* o) { operand = o; }
     virtual void setOperand(TIntermTyped* o) { operand = o; }
     virtual       TIntermTyped* getOperand() { return operand; }
     virtual       TIntermTyped* getOperand() { return operand; }
@@ -1620,15 +1666,11 @@ public:
     virtual       TIntermUnary* getAsUnaryNode()       { return this; }
     virtual       TIntermUnary* getAsUnaryNode()       { return this; }
     virtual const TIntermUnary* getAsUnaryNode() const { return this; }
     virtual const TIntermUnary* getAsUnaryNode() const { return this; }
     virtual void updatePrecision();
     virtual void updatePrecision();
-#ifndef GLSLANG_WEB
     void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
     void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
     const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
     const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
-#endif
 protected:
 protected:
     TIntermTyped* operand;
     TIntermTyped* operand;
-#ifndef GLSLANG_WEB
     TSpirvInstruction spirvInst;
     TSpirvInstruction spirvInst;
-#endif
 };
 };
 
 
 typedef TVector<TIntermNode*> TIntermSequence;
 typedef TVector<TIntermNode*> TIntermSequence;
@@ -1660,10 +1702,11 @@ public:
     bool getDebug() const { return debug; }
     bool getDebug() const { return debug; }
     void setPragmaTable(const TPragmaTable& pTable);
     void setPragmaTable(const TPragmaTable& pTable);
     const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
     const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
-#ifndef GLSLANG_WEB
     void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
     void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
     const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
     const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
-#endif
+
+    void setLinkType(TLinkType l) { linkType = l; }
+    TLinkType getLinkType() const { return linkType; }
 protected:
 protected:
     TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
     TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
     TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
     TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
@@ -1674,9 +1717,8 @@ protected:
     bool optimize;
     bool optimize;
     bool debug;
     bool debug;
     TPragmaTable* pragmaTable;
     TPragmaTable* pragmaTable;
-#ifndef GLSLANG_WEB
     TSpirvInstruction spirvInst;
     TSpirvInstruction spirvInst;
-#endif
+    TLinkType linkType = ELinkNone;
 };
 };
 
 
 //
 //
@@ -1814,7 +1856,7 @@ public:
 
 
     TIntermNode *getParentNode()
     TIntermNode *getParentNode()
     {
     {
-        return path.size() == 0 ? NULL : path.back();
+        return path.size() == 0 ? nullptr : path.back();
     }
     }
 
 
     const bool preVisit;
     const bool preVisit;

+ 11 - 25
src/libraries/glslang/glslang/MachineIndependent/Constant.cpp

@@ -177,7 +177,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
                     newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst());
                     newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst());
                 break;
                 break;
 
 
-#ifndef GLSLANG_WEB
             case EbtInt8:
             case EbtInt8:
                 if (rightUnionArray[i] == (signed char)0)
                 if (rightUnionArray[i] == (signed char)0)
                     newConstArray[i].setI8Const((signed char)0x7F);
                     newConstArray[i].setI8Const((signed char)0x7F);
@@ -212,9 +211,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
 
 
             case EbtInt64:
             case EbtInt64:
                 if (rightUnionArray[i] == 0ll)
                 if (rightUnionArray[i] == 0ll)
-                    newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll);
-                else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll)
-                    newConstArray[i].setI64Const((long long)-0x8000000000000000ll);
+                    newConstArray[i].setI64Const(LLONG_MAX);
+                else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN)
+                    newConstArray[i].setI64Const(LLONG_MIN);
                 else
                 else
                     newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const());
                     newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const());
                 break;
                 break;
@@ -226,8 +225,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
                     newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const());
                     newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const());
                 break;
                 break;
             default:
             default:
-                return 0;
-#endif
+                return nullptr;
             }
             }
         }
         }
         break;
         break;
@@ -266,7 +264,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
                         newConstArray[i].setIConst(0);
                         newConstArray[i].setIConst(0);
                         break;
                         break;
                     } else goto modulo_default;
                     } else goto modulo_default;
-#ifndef GLSLANG_WEB
                 case EbtInt64:
                 case EbtInt64:
                     if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) {
                     if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) {
                         newConstArray[i].setI64Const(0);
                         newConstArray[i].setI64Const(0);
@@ -277,7 +274,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
                         newConstArray[i].setIConst(0);
                         newConstArray[i].setIConst(0);
                         break;
                         break;
                     } else goto modulo_default;
                     } else goto modulo_default;
-#endif
                 default:
                 default:
                 modulo_default:
                 modulo_default:
                     newConstArray[i] = leftUnionArray[i] % rightUnionArray[i];
                     newConstArray[i] = leftUnionArray[i] % rightUnionArray[i];
@@ -354,7 +350,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
         break;
         break;
 
 
     default:
     default:
-        return 0;
+        return nullptr;
     }
     }
 
 
     TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType);
     TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType);
@@ -507,14 +503,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
                                     : -unionArray[i].getIConst());
                                     : -unionArray[i].getIConst());
                            break;
                            break;
             case EbtUint:  newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst())));  break;
             case EbtUint:  newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst())));  break;
-#ifndef GLSLANG_WEB
             case EbtInt8:  newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
             case EbtInt8:  newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
             case EbtUint8: newConstArray[i].setU8Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU8Const())));  break;
             case EbtUint8: newConstArray[i].setU8Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU8Const())));  break;
             case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break;
             case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break;
             case EbtUint16:newConstArray[i].setU16Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU16Const())));  break;
             case EbtUint16:newConstArray[i].setU16Const(static_cast<unsigned int>(-static_cast<signed int>(unionArray[i].getU16Const())));  break;
             case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break;
             case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break;
             case EbtUint64: newConstArray[i].setU64Const(static_cast<unsigned long long>(-static_cast<long long>(unionArray[i].getU64Const())));  break;
             case EbtUint64: newConstArray[i].setU64Const(static_cast<unsigned long long>(-static_cast<long long>(unionArray[i].getU64Const())));  break;
-#endif
             default:
             default:
                 return nullptr;
                 return nullptr;
             }
             }
@@ -634,12 +628,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
 
 
         case EOpIsNan:
         case EOpIsNan:
         {
         {
-            newConstArray[i].setBConst(IsNan(unionArray[i].getDConst()));
+            newConstArray[i].setBConst(std::isnan(unionArray[i].getDConst()));
             break;
             break;
         }
         }
         case EOpIsInf:
         case EOpIsInf:
         {
         {
-            newConstArray[i].setBConst(IsInfinity(unionArray[i].getDConst()));
+            newConstArray[i].setBConst(std::isinf(unionArray[i].getDConst()));
             break;
             break;
         }
         }
 
 
@@ -684,7 +678,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
         case EOpConvDoubleToInt:
         case EOpConvDoubleToInt:
             newConstArray[i].setIConst(static_cast<int>(unionArray[i].getDConst())); break;
             newConstArray[i].setIConst(static_cast<int>(unionArray[i].getDConst())); break;
 
 
-#ifndef GLSLANG_WEB
         case EOpConvInt8ToBool:
         case EOpConvInt8ToBool:
             newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break;
             newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break;
         case EOpConvUint8ToBool:
         case EOpConvUint8ToBool:
@@ -696,7 +689,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
         case EOpConvInt64ToBool:
         case EOpConvInt64ToBool:
             newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break;
             newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break;
         case EOpConvUint64ToBool:
         case EOpConvUint64ToBool:
-            newConstArray[i].setBConst(unionArray[i].getI64Const() != 0); break;
+            newConstArray[i].setBConst(unionArray[i].getU64Const() != 0); break;
         case EOpConvFloat16ToBool:
         case EOpConvFloat16ToBool:
             newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
             newConstArray[i].setBConst(unionArray[i].getDConst() != 0); break;
 
 
@@ -919,7 +912,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
         case EOpConvUint64ToPtr:
         case EOpConvUint64ToPtr:
         case EOpConstructReference:
         case EOpConstructReference:
             newConstArray[i].setU64Const(unionArray[i].getU64Const()); break;
             newConstArray[i].setU64Const(unionArray[i].getU64Const()); break;
-#endif
 
 
         // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
         // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
 
 
@@ -1066,7 +1058,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                 case EbtUint:
                 case EbtUint:
                     newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
                     newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
                     break;
                     break;
-#ifndef GLSLANG_WEB
                 case EbtInt8:
                 case EbtInt8:
                     newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
                     newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
                     break;
                     break;
@@ -1085,7 +1076,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                 case EbtUint64:
                 case EbtUint64:
                     newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
                     newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
                     break;
                     break;
-#endif
                 default: assert(false && "Default missing");
                 default: assert(false && "Default missing");
                 }
                 }
                 break;
                 break;
@@ -1102,7 +1092,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                 case EbtUint:
                 case EbtUint:
                     newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
                     newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
                     break;
                     break;
-#ifndef GLSLANG_WEB
                 case EbtInt8:
                 case EbtInt8:
                     newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
                     newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()));
                     break;
                     break;
@@ -1121,7 +1110,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                 case EbtUint64:
                 case EbtUint64:
                     newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
                     newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
                     break;
                     break;
-#endif
                 default: assert(false && "Default missing");
                 default: assert(false && "Default missing");
                 }
                 }
                 break;
                 break;
@@ -1137,7 +1125,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                     newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()),
                     newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()),
                                                                                                                    childConstUnions[2][arg2comp].getUConst()));
                                                                                                                    childConstUnions[2][arg2comp].getUConst()));
                     break;
                     break;
-#ifndef GLSLANG_WEB
                 case EbtInt8:
                 case EbtInt8:
                     newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()),
                     newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()),
                                                                                                                    childConstUnions[2][arg2comp].getI8Const()));
                                                                                                                    childConstUnions[2][arg2comp].getI8Const()));
@@ -1166,7 +1153,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
                     newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()),
                     newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()),
                                                                                                                        childConstUnions[2][arg2comp].getU64Const()));
                                                                                                                        childConstUnions[2][arg2comp].getU64Const()));
                     break;
                     break;
-#endif
                 default: assert(false && "Default missing");
                 default: assert(false && "Default missing");
                 }
                 }
                 break;
                 break;
@@ -1345,7 +1331,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons
 {
 {
     TType dereferencedType(node->getType(), index);
     TType dereferencedType(node->getType(), index);
     dereferencedType.getQualifier().storage = EvqConst;
     dereferencedType.getQualifier().storage = EvqConst;
-    TIntermTyped* result = 0;
+    TIntermTyped* result = nullptr;
     int size = dereferencedType.computeNumComponents();
     int size = dereferencedType.computeNumComponents();
 
 
     // arrays, vectors, matrices, all use simple multiplicative math
     // arrays, vectors, matrices, all use simple multiplicative math
@@ -1365,7 +1351,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons
 
 
     result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc);
     result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc);
 
 
-    if (result == 0)
+    if (result == nullptr)
         result = node;
         result = node;
     else
     else
         result->setType(dereferencedType);
         result->setType(dereferencedType);
@@ -1387,7 +1373,7 @@ TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TSwizzleSelectors<T
 
 
     TIntermTyped* result = addConstantUnion(constArray, node->getType(), loc);
     TIntermTyped* result = addConstantUnion(constArray, node->getType(), loc);
 
 
-    if (result == 0)
+    if (result == nullptr)
         result = node;
         result = node;
     else
     else
         result->setType(TType(node->getBasicType(), EvqConst, selectors.size()));
         result->setType(TType(node->getBasicType(), EvqConst, selectors.size()));

File diff suppressed because it is too large
+ 369 - 246
src/libraries/glslang/glslang/MachineIndependent/Initialize.cpp


+ 3 - 0
src/libraries/glslang/glslang/MachineIndependent/Initialize.h

@@ -107,6 +107,9 @@ protected:
     int dimMap[EsdNumDims];
     int dimMap[EsdNumDims];
 };
 };
 
 
+// change this back to false if depending on textual spellings of texturing calls when consuming the AST
+// Using PureOperatorBuiltins=false is deprecated.
+constexpr bool PureOperatorBuiltins = true;
 } // end namespace glslang
 } // end namespace glslang
 
 
 #endif // _INITIALIZE_INCLUDED_
 #endif // _INITIALIZE_INCLUDED_

+ 106 - 87
src/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp

@@ -352,7 +352,7 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT
 TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
 TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
     const TSourceLoc& loc)
     const TSourceLoc& loc)
 {
 {
-    if (child == 0)
+    if (child == nullptr)
         return nullptr;
         return nullptr;
 
 
     if (child->getType().getBasicType() == EbtBlock)
     if (child->getType().getBasicType() == EbtBlock)
@@ -388,7 +388,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
     case EOpConstructFloat:  newType = EbtFloat;  break;
     case EOpConstructFloat:  newType = EbtFloat;  break;
     case EOpConstructInt:    newType = EbtInt;    break;
     case EOpConstructInt:    newType = EbtInt;    break;
     case EOpConstructUint:   newType = EbtUint;   break;
     case EOpConstructUint:   newType = EbtUint;   break;
-#ifndef GLSLANG_WEB
     case EOpConstructInt8:   newType = EbtInt8;   break;
     case EOpConstructInt8:   newType = EbtInt8;   break;
     case EOpConstructUint8:  newType = EbtUint8;  break;
     case EOpConstructUint8:  newType = EbtUint8;  break;
     case EOpConstructInt16:  newType = EbtInt16;  break;
     case EOpConstructInt16:  newType = EbtInt16;  break;
@@ -397,7 +396,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
     case EOpConstructUint64: newType = EbtUint64; break;
     case EOpConstructUint64: newType = EbtUint64; break;
     case EOpConstructDouble: newType = EbtDouble; break;
     case EOpConstructDouble: newType = EbtDouble; break;
     case EOpConstructFloat16: newType = EbtFloat16; break;
     case EOpConstructFloat16: newType = EbtFloat16; break;
-#endif
     default: break; // some compilers want this
     default: break; // some compilers want this
     }
     }
 
 
@@ -569,7 +567,6 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
 bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const
 bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const
 {
 {
     switch (dst) {
     switch (dst) {
-#ifndef GLSLANG_WEB
     case EbtDouble:
     case EbtDouble:
         switch (src) {
         switch (src) {
         case EbtUint:    newOp = EOpConvUintToDouble;    break;
         case EbtUint:    newOp = EOpConvUintToDouble;    break;
@@ -587,13 +584,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
             return false;
             return false;
         }
         }
         break;
         break;
-#endif
     case EbtFloat:
     case EbtFloat:
         switch (src) {
         switch (src) {
         case EbtInt:     newOp = EOpConvIntToFloat;     break;
         case EbtInt:     newOp = EOpConvIntToFloat;     break;
         case EbtUint:    newOp = EOpConvUintToFloat;    break;
         case EbtUint:    newOp = EOpConvUintToFloat;    break;
         case EbtBool:    newOp = EOpConvBoolToFloat;    break;
         case EbtBool:    newOp = EOpConvBoolToFloat;    break;
-#ifndef GLSLANG_WEB
         case EbtDouble:  newOp = EOpConvDoubleToFloat;  break;
         case EbtDouble:  newOp = EOpConvDoubleToFloat;  break;
         case EbtInt8:    newOp = EOpConvInt8ToFloat;    break;
         case EbtInt8:    newOp = EOpConvInt8ToFloat;    break;
         case EbtUint8:   newOp = EOpConvUint8ToFloat;   break;
         case EbtUint8:   newOp = EOpConvUint8ToFloat;   break;
@@ -602,12 +597,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
         case EbtFloat16: newOp = EOpConvFloat16ToFloat; break;
         case EbtFloat16: newOp = EOpConvFloat16ToFloat; break;
         case EbtInt64:   newOp = EOpConvInt64ToFloat;   break;
         case EbtInt64:   newOp = EOpConvInt64ToFloat;   break;
         case EbtUint64:  newOp = EOpConvUint64ToFloat;  break;
         case EbtUint64:  newOp = EOpConvUint64ToFloat;  break;
-#endif
         default:
         default:
             return false;
             return false;
         }
         }
         break;
         break;
-#ifndef GLSLANG_WEB
     case EbtFloat16:
     case EbtFloat16:
         switch (src) {
         switch (src) {
         case EbtInt8:   newOp = EOpConvInt8ToFloat16;   break;
         case EbtInt8:   newOp = EOpConvInt8ToFloat16;   break;
@@ -625,13 +618,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
             return false;
             return false;
         }
         }
         break;
         break;
-#endif
     case EbtBool:
     case EbtBool:
         switch (src) {
         switch (src) {
         case EbtInt:     newOp = EOpConvIntToBool;     break;
         case EbtInt:     newOp = EOpConvIntToBool;     break;
         case EbtUint:    newOp = EOpConvUintToBool;    break;
         case EbtUint:    newOp = EOpConvUintToBool;    break;
         case EbtFloat:   newOp = EOpConvFloatToBool;   break;
         case EbtFloat:   newOp = EOpConvFloatToBool;   break;
-#ifndef GLSLANG_WEB
         case EbtDouble:  newOp = EOpConvDoubleToBool;  break;
         case EbtDouble:  newOp = EOpConvDoubleToBool;  break;
         case EbtInt8:    newOp = EOpConvInt8ToBool;    break;
         case EbtInt8:    newOp = EOpConvInt8ToBool;    break;
         case EbtUint8:   newOp = EOpConvUint8ToBool;   break;
         case EbtUint8:   newOp = EOpConvUint8ToBool;   break;
@@ -640,12 +631,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
         case EbtFloat16: newOp = EOpConvFloat16ToBool; break;
         case EbtFloat16: newOp = EOpConvFloat16ToBool; break;
         case EbtInt64:   newOp = EOpConvInt64ToBool;   break;
         case EbtInt64:   newOp = EOpConvInt64ToBool;   break;
         case EbtUint64:  newOp = EOpConvUint64ToBool;  break;
         case EbtUint64:  newOp = EOpConvUint64ToBool;  break;
-#endif
         default:
         default:
             return false;
             return false;
         }
         }
         break;
         break;
-#ifndef GLSLANG_WEB
     case EbtInt8:
     case EbtInt8:
         switch (src) {
         switch (src) {
         case EbtUint8:   newOp = EOpConvUint8ToInt8;   break;
         case EbtUint8:   newOp = EOpConvUint8ToInt8;   break;
@@ -715,14 +704,12 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
             return false;
             return false;
         }
         }
         break;
         break;
-#endif
 
 
     case EbtInt:
     case EbtInt:
         switch (src) {
         switch (src) {
         case EbtUint:    newOp = EOpConvUintToInt;    break;
         case EbtUint:    newOp = EOpConvUintToInt;    break;
         case EbtBool:    newOp = EOpConvBoolToInt;    break;
         case EbtBool:    newOp = EOpConvBoolToInt;    break;
         case EbtFloat:   newOp = EOpConvFloatToInt;   break;
         case EbtFloat:   newOp = EOpConvFloatToInt;   break;
-#ifndef GLSLANG_WEB
         case EbtInt8:    newOp = EOpConvInt8ToInt;    break;
         case EbtInt8:    newOp = EOpConvInt8ToInt;    break;
         case EbtUint8:   newOp = EOpConvUint8ToInt;   break;
         case EbtUint8:   newOp = EOpConvUint8ToInt;   break;
         case EbtInt16:   newOp = EOpConvInt16ToInt;   break;
         case EbtInt16:   newOp = EOpConvInt16ToInt;   break;
@@ -731,7 +718,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
         case EbtFloat16: newOp = EOpConvFloat16ToInt; break;
         case EbtFloat16: newOp = EOpConvFloat16ToInt; break;
         case EbtInt64:   newOp = EOpConvInt64ToInt;   break;
         case EbtInt64:   newOp = EOpConvInt64ToInt;   break;
         case EbtUint64:  newOp = EOpConvUint64ToInt;  break;
         case EbtUint64:  newOp = EOpConvUint64ToInt;  break;
-#endif
         default:
         default:
             return false;
             return false;
         }
         }
@@ -741,7 +727,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
         case EbtInt:     newOp = EOpConvIntToUint;     break;
         case EbtInt:     newOp = EOpConvIntToUint;     break;
         case EbtBool:    newOp = EOpConvBoolToUint;    break;
         case EbtBool:    newOp = EOpConvBoolToUint;    break;
         case EbtFloat:   newOp = EOpConvFloatToUint;   break;
         case EbtFloat:   newOp = EOpConvFloatToUint;   break;
-#ifndef GLSLANG_WEB
         case EbtInt8:    newOp = EOpConvInt8ToUint;    break;
         case EbtInt8:    newOp = EOpConvInt8ToUint;    break;
         case EbtUint8:   newOp = EOpConvUint8ToUint;   break;
         case EbtUint8:   newOp = EOpConvUint8ToUint;   break;
         case EbtInt16:   newOp = EOpConvInt16ToUint;   break;
         case EbtInt16:   newOp = EOpConvInt16ToUint;   break;
@@ -750,12 +735,15 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
         case EbtFloat16: newOp = EOpConvFloat16ToUint; break;
         case EbtFloat16: newOp = EOpConvFloat16ToUint; break;
         case EbtInt64:   newOp = EOpConvInt64ToUint;   break;
         case EbtInt64:   newOp = EOpConvInt64ToUint;   break;
         case EbtUint64:  newOp = EOpConvUint64ToUint;  break;
         case EbtUint64:  newOp = EOpConvUint64ToUint;  break;
-#endif
+        // For bindless texture type conversion, add a dummy convert op, just
+        // to generate a new TIntermTyped
+        // uvec2(any sampler type)
+        // uvec2(any image type)
+        case EbtSampler: newOp = EOpConvIntToUint;  break;
         default:
         default:
             return false;
             return false;
         }
         }
         break;
         break;
-#ifndef GLSLANG_WEB
     case EbtInt64:
     case EbtInt64:
         switch (src) {
         switch (src) {
         case EbtInt8:    newOp = EOpConvInt8ToInt64;    break;
         case EbtInt8:    newOp = EOpConvInt8ToInt64;    break;
@@ -790,7 +778,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
             return false;
             return false;
         }
         }
         break;
         break;
-#endif
     default:
     default:
         return false;
         return false;
     }
     }
@@ -806,7 +793,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
     // Add a new newNode for the conversion.
     // Add a new newNode for the conversion.
     //
     //
 
 
-#ifndef GLSLANG_WEB
     bool convertToIntTypes = (convertTo == EbtInt8  || convertTo == EbtUint8  ||
     bool convertToIntTypes = (convertTo == EbtInt8  || convertTo == EbtUint8  ||
                               convertTo == EbtInt16 || convertTo == EbtUint16 ||
                               convertTo == EbtInt16 || convertTo == EbtUint16 ||
                               convertTo == EbtInt   || convertTo == EbtUint   ||
                               convertTo == EbtInt   || convertTo == EbtUint   ||
@@ -843,7 +829,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
             return nullptr;
             return nullptr;
         }
         }
     }
     }
-#endif
 
 
     TIntermUnary* newNode = nullptr;
     TIntermUnary* newNode = nullptr;
     TOperator newOp = EOpNull;
     TOperator newOp = EOpNull;
@@ -855,13 +840,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped
     newNode = addUnaryNode(newOp, node, node->getLoc(), newType);
     newNode = addUnaryNode(newOp, node, node->getLoc(), newType);
 
 
     if (node->getAsConstantUnion()) {
     if (node->getAsConstantUnion()) {
-#ifndef GLSLANG_WEB
         // 8/16-bit storage extensions don't support 8/16-bit constants, so don't fold conversions
         // 8/16-bit storage extensions don't support 8/16-bit constants, so don't fold conversions
         // to those types
         // to those types
         if ((getArithemeticInt8Enabled() || !(convertTo == EbtInt8 || convertTo == EbtUint8)) &&
         if ((getArithemeticInt8Enabled() || !(convertTo == EbtInt8 || convertTo == EbtUint8)) &&
             (getArithemeticInt16Enabled() || !(convertTo == EbtInt16 || convertTo == EbtUint16)) &&
             (getArithemeticInt16Enabled() || !(convertTo == EbtInt16 || convertTo == EbtUint16)) &&
             (getArithemeticFloat16Enabled() || !(convertTo == EbtFloat16)))
             (getArithemeticFloat16Enabled() || !(convertTo == EbtFloat16)))
-#endif
         {
         {
             TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType);
             TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType);
             if (folded)
             if (folded)
@@ -1044,6 +1027,12 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     if (type.isArray() || node->getType().isArray())
     if (type.isArray() || node->getType().isArray())
         return nullptr;
         return nullptr;
 
 
+    // Reject implicit conversions to cooperative matrix types
+    if (node->getType().isCoopMat() &&
+        op != EOpConstructCooperativeMatrixNV &&
+        op != EOpConstructCooperativeMatrixKHR)
+        return nullptr;
+
     // Note: callers are responsible for other aspects of shape,
     // Note: callers are responsible for other aspects of shape,
     // like vector and matrix sizes.
     // like vector and matrix sizes.
 
 
@@ -1055,7 +1044,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     case EOpConstructFloat:
     case EOpConstructFloat:
     case EOpConstructInt:
     case EOpConstructInt:
     case EOpConstructUint:
     case EOpConstructUint:
-#ifndef GLSLANG_WEB
     case EOpConstructDouble:
     case EOpConstructDouble:
     case EOpConstructFloat16:
     case EOpConstructFloat16:
     case EOpConstructInt8:
     case EOpConstructInt8:
@@ -1066,8 +1054,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     case EOpConstructUint64:
     case EOpConstructUint64:
         break;
         break;
 
 
-#endif
-
     //
     //
     // Implicit conversions
     // Implicit conversions
     //
     //
@@ -1112,7 +1098,8 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
 
 
     case EOpSequence:
     case EOpSequence:
     case EOpConstructStruct:
     case EOpConstructStruct:
-    case EOpConstructCooperativeMatrix:
+    case EOpConstructCooperativeMatrixNV:
+    case EOpConstructCooperativeMatrixKHR:
 
 
         if (type.isReference() || node->getType().isReference()) {
         if (type.isReference() || node->getType().isReference()) {
             // types must match to assign a reference
             // types must match to assign a reference
@@ -1154,7 +1141,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     }
     }
 
 
     bool canPromoteConstant = true;
     bool canPromoteConstant = true;
-#ifndef GLSLANG_WEB
     // GL_EXT_shader_16bit_storage can't do OpConstantComposite with
     // GL_EXT_shader_16bit_storage can't do OpConstantComposite with
     // 16-bit types, so disable promotion for those types.
     // 16-bit types, so disable promotion for those types.
     // Many issues with this, from JohnK:
     // Many issues with this, from JohnK:
@@ -1182,7 +1168,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
     default:
     default:
         break;
         break;
     }
     }
-#endif
 
 
     if (canPromoteConstant && node->getAsConstantUnion())
     if (canPromoteConstant && node->getAsConstantUnion())
         return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion());
         return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion());
@@ -1479,10 +1464,6 @@ bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const
 
 
 bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
 bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
 {
 {
-#ifdef GLSLANG_WEB
-    return false;
-#endif
-
     switch (from) {
     switch (from) {
     case EbtInt:
     case EbtInt:
         switch(to) {
         switch(to) {
@@ -1563,10 +1544,6 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const
 
 
 bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const
 bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const
 {
 {
-#ifdef GLSLANG_WEB
-    return false;
-#endif
-
     if (to == EbtFloat && from == EbtFloat16) {
     if (to == EbtFloat && from == EbtFloat16) {
         return true;
         return true;
     } else {
     } else {
@@ -1587,7 +1564,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
             break;
             break;
         }
         }
         break;
         break;
-#ifndef GLSLANG_WEB
     case EbtInt8:
     case EbtInt8:
     case EbtUint8:
     case EbtUint8:
     case EbtInt16:
     case EbtInt16:
@@ -1607,7 +1583,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const
             return true;
             return true;
         }
         }
         break;
         break;
-#endif
     default:
     default:
         break;
         break;
     }
     }
@@ -1809,10 +1784,6 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
 
 
 static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType)
 static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType)
 {
 {
-#ifdef GLSLANG_WEB
-    return false;
-#endif
-
     switch(sintType) {
     switch(sintType) {
     case EbtInt8:
     case EbtInt8:
         switch(uintType) {
         switch(uintType) {
@@ -1873,11 +1844,6 @@ static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBas
 
 
 static TBasicType getCorrespondingUnsignedType(TBasicType type)
 static TBasicType getCorrespondingUnsignedType(TBasicType type)
 {
 {
-#ifdef GLSLANG_WEB
-    assert(type == EbtInt);
-    return EbtUint;
-#endif
-
     switch(type) {
     switch(type) {
     case EbtInt8:
     case EbtInt8:
         return EbtUint8;
         return EbtUint8;
@@ -2003,8 +1969,11 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
     if (type.getQualifier().isNonUniform())
     if (type.getQualifier().isNonUniform())
         return EOpConstructNonuniform;
         return EOpConstructNonuniform;
 
 
-    if (type.isCoopMat())
-        return EOpConstructCooperativeMatrix;
+    if (type.isCoopMatNV())
+        return EOpConstructCooperativeMatrixNV;
+
+    if (type.isCoopMatKHR())
+        return EOpConstructCooperativeMatrixKHR;
 
 
     switch (type.getBasicType()) {
     switch (type.getBasicType()) {
     case EbtStruct:
     case EbtStruct:
@@ -2167,7 +2136,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
             }
             }
         }
         }
         break;
         break;
-#ifndef GLSLANG_WEB
     case EbtDouble:
     case EbtDouble:
         if (type.getMatrixCols()) {
         if (type.getMatrixCols()) {
             switch (type.getMatrixCols()) {
             switch (type.getMatrixCols()) {
@@ -2306,7 +2274,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
     case EbtAccStruct:
     case EbtAccStruct:
         op = EOpConstructAccStruct;
         op = EOpConstructAccStruct;
         break;
         break;
-#endif
     default:
     default:
         break;
         break;
     }
     }
@@ -2350,6 +2317,40 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
     return aggNode;
     return aggNode;
 }
 }
 
 
+TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right)
+{
+    if (left == nullptr && right == nullptr)
+        return nullptr;
+
+    TIntermAggregate* aggNode = nullptr;
+    if (left != nullptr)
+        aggNode = left->getAsAggregate();
+    if (aggNode == nullptr || aggNode->getOp() != EOpNull) {
+        aggNode = new TIntermAggregate;
+        if (left != nullptr)
+            aggNode->getSequence().push_back(left);
+    }
+
+    TIntermAggregate* rhsagg = right->getAsAggregate();
+    if (rhsagg == nullptr || rhsagg->getOp() != EOpNull)
+        aggNode->getSequence().push_back(right);
+    else
+        aggNode->getSequence().insert(aggNode->getSequence().end(),
+                                      rhsagg->getSequence().begin(),
+                                      rhsagg->getSequence().end());
+
+    return aggNode;
+}
+
+TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& loc)
+{
+    TIntermAggregate* aggNode = mergeAggregate(left, right);
+    if (aggNode)
+        aggNode->setLoc(loc);
+
+    return aggNode;
+}
+
 //
 //
 // Turn an existing node into an aggregate.
 // Turn an existing node into an aggregate.
 //
 //
@@ -2623,6 +2624,18 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseT
 {
 {
     assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16);
     assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16);
 
 
+    if (isEsProfile() && (baseType == EbtFloat || baseType == EbtFloat16)) {
+        int exponent = 0;
+        frexp(d, &exponent);
+        int minExp = baseType == EbtFloat ? -126 : -14;
+        int maxExp = baseType == EbtFloat ? 127 : 15;
+        if (exponent > maxExp) { //overflow, d = inf
+            d = std::numeric_limits<double>::infinity();
+        } else if (exponent < minExp) { //underflow, d = 0.0;
+            d = 0.0;
+        }
+    }
+
     TConstUnionArray unionArray(1);
     TConstUnionArray unionArray(1);
     unionArray[0].setDConst(d);
     unionArray[0].setDConst(d);
 
 
@@ -2680,28 +2693,42 @@ TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors<selectorType>& selecto
 // 'swizzleOkay' says whether or not it is okay to consider a swizzle
 // 'swizzleOkay' says whether or not it is okay to consider a swizzle
 // a valid part of the dereference chain.
 // a valid part of the dereference chain.
 //
 //
-// 'BufferReferenceOk' says if type is buffer_reference, the routine stop to find the most left node.
+// 'bufferReferenceOk' says if type is buffer_reference, the routine will stop to find the most left node.
 //
 //
+// 'proc' is an optional function to run on each node that is processed during the traversal. 'proc' must
+// return true to continue the traversal, or false to end the traversal early.
 //
 //
 
 
-const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay , bool bufferReferenceOk)
+const TIntermTyped* TIntermediate::traverseLValueBase(const TIntermTyped* node, bool swizzleOkay,
+                                                      bool bufferReferenceOk,
+                                                      std::function<bool(const TIntermNode&)> proc)
 {
 {
     do {
     do {
         const TIntermBinary* binary = node->getAsBinaryNode();
         const TIntermBinary* binary = node->getAsBinaryNode();
-        if (binary == nullptr)
+        if (binary == nullptr) {
+            if (proc) {
+                proc(*node);
+            }
             return node;
             return node;
+        }
         TOperator op = binary->getOp();
         TOperator op = binary->getOp();
-        if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle && op != EOpMatrixSwizzle)
+        if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle &&
+            op != EOpMatrixSwizzle)
             return nullptr;
             return nullptr;
-        if (! swizzleOkay) {
+        if (!swizzleOkay) {
             if (op == EOpVectorSwizzle || op == EOpMatrixSwizzle)
             if (op == EOpVectorSwizzle || op == EOpMatrixSwizzle)
                 return nullptr;
                 return nullptr;
             if ((op == EOpIndexDirect || op == EOpIndexIndirect) &&
             if ((op == EOpIndexDirect || op == EOpIndexIndirect) &&
                 (binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) &&
                 (binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) &&
-                ! binary->getLeft()->getType().isArray())
+                !binary->getLeft()->getType().isArray())
                 return nullptr;
                 return nullptr;
         }
         }
-        node = node->getAsBinaryNode()->getLeft();
+        if (proc) {
+            if (!proc(*node)) {
+                return node;
+            }
+        }
+        node = binary->getLeft();
         if (bufferReferenceOk && node->isReference())
         if (bufferReferenceOk && node->isReference())
             return node;
             return node;
     } while (true);
     } while (true);
@@ -2733,10 +2760,10 @@ TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* init
     TIntermAggregate* loopSequence = (initializer == nullptr ||
     TIntermAggregate* loopSequence = (initializer == nullptr ||
                                       initializer->getAsAggregate() == nullptr) ? makeAggregate(initializer, loc)
                                       initializer->getAsAggregate() == nullptr) ? makeAggregate(initializer, loc)
                                                                                 : initializer->getAsAggregate();
                                                                                 : initializer->getAsAggregate();
-    if (loopSequence != nullptr && loopSequence->getOp() == EOpSequence)
+    if (loopSequence != nullptr && (loopSequence->getOp() == EOpSequence || loopSequence->getOp() == EOpScope))
         loopSequence->setOp(EOpNull);
         loopSequence->setOp(EOpNull);
     loopSequence = growAggregate(loopSequence, node);
     loopSequence = growAggregate(loopSequence, node);
-    loopSequence->setOperator(EOpSequence);
+    loopSequence->setOperator(getDebugInfo() ? EOpScope : EOpSequence);
 
 
     return loopSequence;
     return loopSequence;
 }
 }
@@ -2766,7 +2793,7 @@ void TIntermBranch::updatePrecision(TPrecisionQualifier parentPrecision)
         return;
         return;
 
 
     if (exp->getBasicType() == EbtInt || exp->getBasicType() == EbtUint ||
     if (exp->getBasicType() == EbtInt || exp->getBasicType() == EbtUint ||
-        exp->getBasicType() == EbtFloat || exp->getBasicType() == EbtFloat16) {
+        exp->getBasicType() == EbtFloat) {
         if (parentPrecision != EpqNone && exp->getQualifier().precision == EpqNone) {
         if (parentPrecision != EpqNone && exp->getQualifier().precision == EpqNone) {
             exp->propagatePrecision(parentPrecision);
             exp->propagatePrecision(parentPrecision);
         }
         }
@@ -2787,7 +2814,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
     if (aggRoot && aggRoot->getOp() == EOpNull)
     if (aggRoot && aggRoot->getOp() == EOpNull)
         aggRoot->setOperator(EOpSequence);
         aggRoot->setOperator(EOpSequence);
 
 
-#ifndef GLSLANG_WEB
     // Propagate 'noContraction' label in backward from 'precise' variables.
     // Propagate 'noContraction' label in backward from 'precise' variables.
     glslang::PropagateNoContraction(*this);
     glslang::PropagateNoContraction(*this);
 
 
@@ -2801,7 +2827,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
         assert(0);
         assert(0);
         break;
         break;
     }
     }
-#endif
 
 
     return true;
     return true;
 }
 }
@@ -2830,10 +2855,9 @@ void TIntermediate::addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguag
     //}
     //}
 
 
     if (language == EShLangVertex) {
     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_VertexID");
-        addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID");
+        if ((version < 140 && requestedExtensions.find(E_GL_EXT_draw_instanced) != requestedExtensions.end()) || version >= 140)
+            addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID");
     }
     }
 
 
     // Add a child to the root node for the linker objects
     // Add a child to the root node for the linker objects
@@ -3284,7 +3308,7 @@ bool TIntermediate::promoteUnary(TIntermUnary& node)
 void TIntermUnary::updatePrecision()
 void TIntermUnary::updatePrecision()
 {
 {
     if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
     if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
-        getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
+        getBasicType() == EbtFloat) {
         if (operand->getQualifier().precision > getQualifier().precision)
         if (operand->getQualifier().precision > getQualifier().precision)
             getQualifier().precision = operand->getQualifier().precision;
             getQualifier().precision = operand->getQualifier().precision;
     }
     }
@@ -3521,20 +3545,28 @@ bool TIntermediate::promoteBinary(TIntermBinary& node)
     }
     }
 
 
     if (left->getType().isCoopMat() || right->getType().isCoopMat()) {
     if (left->getType().isCoopMat() || right->getType().isCoopMat()) {
+        // Operations on two cooperative matrices must have identical types
         if (left->getType().isCoopMat() && right->getType().isCoopMat() &&
         if (left->getType().isCoopMat() && right->getType().isCoopMat() &&
-            *left->getType().getTypeParameters() != *right->getType().getTypeParameters()) {
+            left->getType() != right->getType()) {
             return false;
             return false;
         }
         }
         switch (op) {
         switch (op) {
         case EOpMul:
         case EOpMul:
         case EOpMulAssign:
         case EOpMulAssign:
-            if (left->getType().isCoopMat() && right->getType().isCoopMat()) {
+            // Mul not supported in NV_cooperative_matrix
+            if (left->getType().isCoopMatNV() && right->getType().isCoopMatNV()) {
                 return false;
                 return false;
             }
             }
-            if (op == EOpMulAssign && right->getType().isCoopMat()) {
+            // NV_cooperative_matrix supports MulAssign is for mat*=scalar only.
+            // KHR_cooperative_matrix supports it for mat*=mat as well.
+            if (op == EOpMulAssign && right->getType().isCoopMatNV()) {
                 return false;
                 return false;
             }
             }
-            node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar);
+            // Use MatrixTimesScalar if either operand is not a matrix. Otherwise use Mul.
+            if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) {
+                node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar);
+            }
+            // In case of scalar*matrix, take the result type from the matrix.
             if (right->getType().isCoopMat()) {
             if (right->getType().isCoopMat()) {
                 node.setType(right->getType());
                 node.setType(right->getType());
             }
             }
@@ -3785,7 +3817,7 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node)
 void TIntermAggregate::updatePrecision()
 void TIntermAggregate::updatePrecision()
 {
 {
     if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
     if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
-        getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
+        getBasicType() == EbtFloat) {
         TPrecisionQualifier maxPrecision = EpqNone;
         TPrecisionQualifier maxPrecision = EpqNone;
         TIntermSequence operands = getSequence();
         TIntermSequence operands = getSequence();
         for (unsigned int i = 0; i < operands.size(); ++i) {
         for (unsigned int i = 0; i < operands.size(); ++i) {
@@ -3807,7 +3839,7 @@ void TIntermAggregate::updatePrecision()
 void TIntermBinary::updatePrecision()
 void TIntermBinary::updatePrecision()
 {
 {
      if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
      if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
-         getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
+         getBasicType() == EbtFloat) {
        if (op == EOpRightShift || op == EOpLeftShift) {
        if (op == EOpRightShift || op == EOpLeftShift) {
          // For shifts get precision from left side only and thus no need to propagate
          // For shifts get precision from left side only and thus no need to propagate
          getQualifier().precision = left->getQualifier().precision;
          getQualifier().precision = left->getQualifier().precision;
@@ -3887,16 +3919,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
 #define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast<CType>(rightUnionArray[i].Get()))
 #define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast<CType>(rightUnionArray[i].Get()))
 #define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0)
 #define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0)
 
 
-#ifdef GLSLANG_WEB
-#define TO_ALL(Get)   \
-        switch (promoteTo) { \
-        case EbtFloat: PROMOTE(setDConst, double, Get); break; \
-        case EbtInt: PROMOTE(setIConst, int, Get); break; \
-        case EbtUint: PROMOTE(setUConst, unsigned int, Get); break; \
-        case EbtBool: PROMOTE_TO_BOOL(Get); break; \
-        default: return node; \
-        }
-#else
 #define TO_ALL(Get)   \
 #define TO_ALL(Get)   \
         switch (promoteTo) { \
         switch (promoteTo) { \
         case EbtFloat16: PROMOTE(setDConst, double, Get); break; \
         case EbtFloat16: PROMOTE(setDConst, double, Get); break; \
@@ -3913,14 +3935,12 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
         case EbtBool: PROMOTE_TO_BOOL(Get); break; \
         case EbtBool: PROMOTE_TO_BOOL(Get); break; \
         default: return node; \
         default: return node; \
         }
         }
-#endif
 
 
         switch (node->getType().getBasicType()) {
         switch (node->getType().getBasicType()) {
         case EbtFloat: TO_ALL(getDConst); break;
         case EbtFloat: TO_ALL(getDConst); break;
         case EbtInt: TO_ALL(getIConst); break;
         case EbtInt: TO_ALL(getIConst); break;
         case EbtUint: TO_ALL(getUConst); break;
         case EbtUint: TO_ALL(getUConst); break;
         case EbtBool: TO_ALL(getBConst); break;
         case EbtBool: TO_ALL(getBConst); break;
-#ifndef GLSLANG_WEB
         case EbtFloat16: TO_ALL(getDConst); break;
         case EbtFloat16: TO_ALL(getDConst); break;
         case EbtDouble: TO_ALL(getDConst); break;
         case EbtDouble: TO_ALL(getDConst); break;
         case EbtInt8: TO_ALL(getI8Const); break;
         case EbtInt8: TO_ALL(getI8Const); break;
@@ -3929,7 +3949,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
         case EbtUint8: TO_ALL(getU8Const); break;
         case EbtUint8: TO_ALL(getU8Const); break;
         case EbtUint16: TO_ALL(getU16Const); break;
         case EbtUint16: TO_ALL(getU16Const); break;
         case EbtUint64: TO_ALL(getU64Const); break;
         case EbtUint64: TO_ALL(getU64Const); break;
-#endif
         default: return node;
         default: return node;
         }
         }
     }
     }

+ 33 - 18
src/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp

@@ -67,13 +67,14 @@ void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReaso
     }
     }
 }
 }
 
 
-#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL)
-
 void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken,
 void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken,
                                      const char* szExtraInfoFormat, ...)
                                      const char* szExtraInfoFormat, ...)
 {
 {
     if (messages & EShMsgOnlyPreprocessor)
     if (messages & EShMsgOnlyPreprocessor)
         return;
         return;
+    // If enhanced msg readability, only print one error
+    if (messages & EShMsgEnhanced && numErrors > 0)
+        return;
     va_list args;
     va_list args;
     va_start(args, szExtraInfoFormat);
     va_start(args, szExtraInfoFormat);
     outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
     outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
@@ -115,8 +116,6 @@ void C_DECL TParseContextBase::ppWarn(const TSourceLoc& loc, const char* szReaso
     va_end(args);
     va_end(args);
 }
 }
 
 
-#endif
-
 //
 //
 // Both test and if necessary, spit out an error, to see if the node is really
 // 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.
 // an l-value that can be operated on this way.
@@ -137,7 +136,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
     case EvqConst:          message = "can't modify a const";        break;
     case EvqConst:          message = "can't modify a const";        break;
     case EvqConstReadOnly:  message = "can't modify a const";        break;
     case EvqConstReadOnly:  message = "can't modify a const";        break;
     case EvqUniform:        message = "can't modify a uniform";      break;
     case EvqUniform:        message = "can't modify a uniform";      break;
-#ifndef GLSLANG_WEB
     case EvqBuffer:
     case EvqBuffer:
         if (node->getQualifier().isReadOnly())
         if (node->getQualifier().isReadOnly())
             message = "can't modify a readonly buffer";
             message = "can't modify a readonly buffer";
@@ -148,7 +146,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
         if (language != EShLangIntersect)
         if (language != EShLangIntersect)
             message = "cannot modify hitAttributeNV in this stage";
             message = "cannot modify hitAttributeNV in this stage";
         break;
         break;
-#endif
 
 
     default:
     default:
         //
         //
@@ -156,12 +153,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
         //
         //
         switch (node->getBasicType()) {
         switch (node->getBasicType()) {
         case EbtSampler:
         case EbtSampler:
-            message = "can't modify a sampler";
+            if (extensionTurnedOn(E_GL_ARB_bindless_texture) == false)
+                message = "can't modify a sampler";
             break;
             break;
         case EbtVoid:
         case EbtVoid:
             message = "can't modify void";
             message = "can't modify void";
             break;
             break;
-#ifndef GLSLANG_WEB
         case EbtAtomicUint:
         case EbtAtomicUint:
             message = "can't modify an atomic_uint";
             message = "can't modify an atomic_uint";
             break;
             break;
@@ -171,7 +168,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
         case EbtRayQuery:
         case EbtRayQuery:
             message = "can't modify rayQueryEXT";
             message = "can't modify rayQueryEXT";
             break;
             break;
-#endif
+        case EbtHitObjectNV:
+            message = "can't modify hitObjectNV";
+            break;
         default:
         default:
             break;
             break;
         }
         }
@@ -209,7 +208,7 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
     //
     //
     // If we get here, we have an error and a message.
     // If we get here, we have an error and a message.
     //
     //
-    const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true);
+    const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true);
 
 
     if (symNode)
     if (symNode)
         error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message);
         error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message);
@@ -228,14 +227,14 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
 // Test for and give an error if the node can't be read from.
 // Test for and give an error if the node can't be read from.
 void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node)
 void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node)
 {
 {
-    TIntermBinary* binaryNode = node->getAsBinaryNode();
-    const TIntermSymbol* symNode = node->getAsSymbolNode();
-
     if (! node)
     if (! node)
         return;
         return;
 
 
+    TIntermBinary* binaryNode = node->getAsBinaryNode();
+    const TIntermSymbol* symNode = node->getAsSymbolNode();
+
     if (node->getQualifier().isWriteOnly()) {
     if (node->getQualifier().isWriteOnly()) {
-        const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true);
+        const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true);
 
 
         if (symNode != nullptr)
         if (symNode != nullptr)
             error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str());
             error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str());
@@ -627,10 +626,8 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
     if (symbol) {
     if (symbol) {
         if (memberType != symbol->getType()) {
         if (memberType != symbol->getType()) {
             TString err;
             TString err;
-            err += "\"" + memberType.getCompleteString() + "\"";
-            err += " versus ";
-            err += "\"" + symbol->getType().getCompleteString() + "\"";
-            error(loc, "Types must match:", memberType.getFieldName().c_str(), err.c_str());
+            err += "Redeclaration: already declared as \"" + symbol->getType().getCompleteString() + "\"";
+            error(loc, "", memberName.c_str(), err.c_str());
         }
         }
         return;
         return;
     }
     }
@@ -725,6 +722,24 @@ void TParseContextBase::finish()
     if (parsingBuiltins)
     if (parsingBuiltins)
         return;
         return;
 
 
+    for (const TString& relaxedSymbol : relaxedSymbols)
+    {
+        TSymbol* symbol = symbolTable.find(relaxedSymbol);
+        TType& type = symbol->getWritableType();
+        for (const TTypeLoc& typeLoc : *type.getStruct())
+        {
+            if (typeLoc.type->isOpaque())
+            {
+                typeLoc.type->getSampler() = TSampler{};
+                typeLoc.type->setBasicType(EbtInt);
+                TString fieldName("/*");
+                fieldName.append(typeLoc.type->getFieldName());
+                fieldName.append("*/");
+                typeLoc.type->setFieldName(fieldName);
+            }
+        }
+    }
+
     // Transfer the linkage symbols to AST nodes, preserving order.
     // Transfer the linkage symbols to AST nodes, preserving order.
     TIntermAggregate* linkage = new TIntermAggregate;
     TIntermAggregate* linkage = new TIntermAggregate;
     for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i)
     for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i)

File diff suppressed because it is too large
+ 309 - 124
src/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp


+ 19 - 16
src/libraries/glslang/glslang/MachineIndependent/ParseHelper.h

@@ -95,12 +95,15 @@ public:
             globalUniformSet(TQualifier::layoutSetEnd),
             globalUniformSet(TQualifier::layoutSetEnd),
             atomicCounterBlockSet(TQualifier::layoutSetEnd)
             atomicCounterBlockSet(TQualifier::layoutSetEnd)
     {
     {
+        // use storage buffer on SPIR-V 1.3 and up
+        if (spvVersion.spv >= EShTargetSpv_1_3)
+            intermediate.setUseStorageBuffer();
+
         if (entryPoint != nullptr)
         if (entryPoint != nullptr)
             sourceEntryPointName = *entryPoint;
             sourceEntryPointName = *entryPoint;
     }
     }
     virtual ~TParseContextBase() { }
     virtual ~TParseContextBase() { }
 
 
-#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL)
     virtual void C_DECL   error(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL   error(const TSourceLoc&, const char* szReason, const char* szToken,
                                 const char* szExtraInfoFormat, ...);
                                 const char* szExtraInfoFormat, ...);
     virtual void C_DECL    warn(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL    warn(const TSourceLoc&, const char* szReason, const char* szToken,
@@ -109,7 +112,6 @@ public:
                                 const char* szExtraInfoFormat, ...);
                                 const char* szExtraInfoFormat, ...);
     virtual void C_DECL  ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL  ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
                                 const char* szExtraInfoFormat, ...);
                                 const char* szExtraInfoFormat, ...);
-#endif
 
 
     virtual void setLimits(const TBuiltInResource&) = 0;
     virtual void setLimits(const TBuiltInResource&) = 0;
 
 
@@ -178,6 +180,7 @@ public:
     // Basic parsing state, easily accessible to the grammar
     // Basic parsing state, easily accessible to the grammar
 
 
     TSymbolTable& symbolTable;        // symbol table that goes with the current language, version, and profile
     TSymbolTable& symbolTable;        // symbol table that goes with the current language, version, and profile
+    TVector<TString> relaxedSymbols;
     int statementNestingLevel;        // 0 if outside all flow control or compound statements
     int statementNestingLevel;        // 0 if outside all flow control or compound statements
     int loopNestingLevel;             // 0 if outside all loops
     int loopNestingLevel;             // 0 if outside all loops
     int structNestingLevel;           // 0 if outside structures
     int structNestingLevel;           // 0 if outside structures
@@ -194,6 +197,7 @@ public:
     struct TPragma contextPragma;
     struct TPragma contextPragma;
     int beginInvocationInterlockCount;
     int beginInvocationInterlockCount;
     int endInvocationInterlockCount;
     int endInvocationInterlockCount;
+    bool compileOnly = false;
 
 
 protected:
 protected:
     TParseContextBase(TParseContextBase&);
     TParseContextBase(TParseContextBase&);
@@ -327,10 +331,8 @@ public:
     TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
     TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
     void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
     void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
 
 
-#ifndef GLSLANG_WEB
     void makeEditable(TSymbol*&) override;
     void makeEditable(TSymbol*&) override;
     void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
     void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
-#endif
     bool isIoResizeArray(const TType&) const;
     bool isIoResizeArray(const TType&) const;
     void fixIoArraySize(const TSourceLoc&, TType&);
     void fixIoArraySize(const TSourceLoc&, TType&);
     void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
     void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
@@ -366,6 +368,10 @@ public:
     TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
     TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
     // returns true if the variable was remapped to something else
     // returns true if the variable was remapped to something else
     bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&);
     bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&);
+    void vkRelaxedRemapUniformMembers(const TSourceLoc&, const TPublicType&, const TType&, const TString&);
+    void vkRelaxedRemapFunctionParameter(TFunction*, TParameter&, std::vector<int>* newParams = nullptr);
+    TIntermNode* vkRelaxedRemapFunctionArgument(const TSourceLoc&, TFunction*, TIntermTyped*);
+    TIntermTyped* vkRelaxedRemapDotDereference(const TSourceLoc&, TIntermTyped&, const TType&, const TString&);
 
 
     void assignError(const TSourceLoc&, const char* op, TString left, TString right);
     void assignError(const TSourceLoc&, const char* op, TString left, TString right);
     void unaryOpError(const TSourceLoc&, const char* op, TString operand);
     void unaryOpError(const TSourceLoc&, const char* op, TString operand);
@@ -378,7 +384,7 @@ public:
     void globalCheck(const TSourceLoc&, const char* token);
     void globalCheck(const TSourceLoc&, const char* token);
     bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
     bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
     bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
     bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
-    void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType);
+    void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool allowZero = false);
     bool arrayQualifierError(const TSourceLoc&, const TQualifier&);
     bool arrayQualifierError(const TSourceLoc&, const TQualifier&);
     bool arrayError(const TSourceLoc&, const TType&);
     bool arrayError(const TSourceLoc&, const TType&);
     void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
     void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
@@ -393,14 +399,14 @@ public:
     void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
     void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
     void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
     void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
     void memberQualifierCheck(glslang::TPublicType&);
     void memberQualifierCheck(glslang::TPublicType&);
-    void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false);
+    void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false, const TPublicType* publicType = nullptr);
     void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&);
     void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&);
     bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
     bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
     void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force);
     void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force);
     void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier);
     void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier);
     int computeSamplerTypeIndex(TSampler&);
     int computeSamplerTypeIndex(TSampler&);
     TPrecisionQualifier getDefaultPrecision(TPublicType&);
     TPrecisionQualifier getDefaultPrecision(TPublicType&);
-    void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&);
+    void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMat);
     void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type);
     void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type);
     bool containsFieldWithBasicType(const TType& type ,TBasicType basicType);
     bool containsFieldWithBasicType(const TType& type ,TBasicType basicType);
     TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
     TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
@@ -418,6 +424,7 @@ public:
     void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);
     void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);
     void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
     void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
     void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
     void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
+    void coopMatTypeParametersCheck(const TSourceLoc&, const TPublicType&);
 
 
     void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&);
     void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&);
     void constantIndexExpressionCheck(TIntermNode*);
     void constantIndexExpressionCheck(TIntermNode*);
@@ -438,12 +445,12 @@ public:
     const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
     const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
     const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
     const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
     void declareTypeDefaults(const TSourceLoc&, const TPublicType&);
     void declareTypeDefaults(const TSourceLoc&, const TPublicType&);
-    TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0);
+    TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = nullptr, TIntermTyped* initializer = nullptr);
     TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&);
     TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&);
     TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&);
     TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&);
     TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
     TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
     void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
     void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
-    void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
+    void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = nullptr, TArraySizes* arraySizes = nullptr);
     void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
     void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
     void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
     void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
     void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
     void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
@@ -456,11 +463,12 @@ public:
     void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
     void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
     void invariantCheck(const TSourceLoc&, const TQualifier&);
     void invariantCheck(const TSourceLoc&, const TQualifier&);
     void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
     void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
+    void updateBindlessQualifier(TType& memberType);
     void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
     void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
     TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
     TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
     const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*);
     const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*);
+    TLayoutFormat mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType);
 
 
-#ifndef GLSLANG_WEB
     TAttributeType attributeFromName(const TString& name) const;
     TAttributeType attributeFromName(const TString& name) const;
     TAttributes* makeAttributes(const TString& identifier) const;
     TAttributes* makeAttributes(const TString& identifier) const;
     TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const;
     TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const;
@@ -480,14 +488,13 @@ public:
     TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
     TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
                                                 TSpirvRequirement* spirvReq2);
                                                 TSpirvRequirement* spirvReq2);
     TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
     TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
+    TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TPublicType& type);
     TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
     TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
                                                    TSpirvTypeParameters* spirvTypeParams2);
                                                    TSpirvTypeParameters* spirvTypeParams2);
     TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
     TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
     TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value);
     TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value);
     TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1,
     TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1,
                                              TSpirvInstruction* spirvInst2);
                                              TSpirvInstruction* spirvInst2);
-#endif
-
     void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
     void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
 
 
 protected:
 protected:
@@ -500,9 +507,7 @@ protected:
     bool isRuntimeLength(const TIntermTyped&) const;
     bool isRuntimeLength(const TIntermTyped&) const;
     TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
     TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
     TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
     TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
-#ifndef GLSLANG_WEB
     void finish() override;
     void finish() override;
-#endif
 
 
     virtual const char* getGlobalUniformBlockName() const override;
     virtual const char* getGlobalUniformBlockName() const override;
     virtual void finalizeGlobalUniformBlockLayout(TVariable&) override;
     virtual void finalizeGlobalUniformBlockLayout(TVariable&) override;
@@ -539,7 +544,6 @@ protected:
     TQualifier globalOutputDefaults;
     TQualifier globalOutputDefaults;
     TQualifier globalSharedDefaults;
     TQualifier globalSharedDefaults;
     TString currentCaller;        // name of last function body entered (not valid when at global scope)
     TString currentCaller;        // name of last function body entered (not valid when at global scope)
-#ifndef GLSLANG_WEB
     int* atomicUintOffsets;       // to become an array of the right size to hold an offset per binding point
     int* atomicUintOffsets;       // to become an array of the right size to hold an offset per binding point
     bool anyIndexLimits;
     bool anyIndexLimits;
     TIdSetType inductiveLoopIds;
     TIdSetType inductiveLoopIds;
@@ -580,7 +584,6 @@ protected:
     //    array-sizing declarations
     //    array-sizing declarations
     //
     //
     TVector<TSymbol*> ioArraySymbolResizeList;
     TVector<TSymbol*> ioArraySymbolResizeList;
-#endif
 };
 };
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 16 - 32
src/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp

@@ -35,34 +35,28 @@
 #include "../Include/Common.h"
 #include "../Include/Common.h"
 #include "../Include/PoolAlloc.h"
 #include "../Include/PoolAlloc.h"
 
 
-#include "../Include/InitializeGlobals.h"
-#include "../OSDependent/osinclude.h"
-
 namespace glslang {
 namespace glslang {
 
 
-// Process-wide TLS index
-OS_TLSIndex PoolIndex;
+namespace {
+thread_local TPoolAllocator* threadPoolAllocator = nullptr;
+
+TPoolAllocator* GetDefaultThreadPoolAllocator()
+{
+    thread_local TPoolAllocator defaultAllocator;
+    return &defaultAllocator;
+}
+} // anonymous namespace
 
 
 // Return the thread-specific current pool.
 // Return the thread-specific current pool.
 TPoolAllocator& GetThreadPoolAllocator()
 TPoolAllocator& GetThreadPoolAllocator()
 {
 {
-    return *static_cast<TPoolAllocator*>(OS_GetTLSValue(PoolIndex));
+    return *(threadPoolAllocator ? threadPoolAllocator : GetDefaultThreadPoolAllocator());
 }
 }
 
 
 // Set the thread-specific current pool.
 // Set the thread-specific current pool.
 void SetThreadPoolAllocator(TPoolAllocator* poolAllocator)
 void SetThreadPoolAllocator(TPoolAllocator* poolAllocator)
 {
 {
-    OS_SetTLSValue(PoolIndex, poolAllocator);
-}
-
-// Process-wide set up of the TLS pool storage.
-bool InitializePoolIndex()
-{
-    // Allocate a TLS index.
-    if ((PoolIndex = OS_AllocTLSIndex()) == OS_INVALID_TLS_INDEX)
-        return false;
-
-    return true;
+    threadPoolAllocator = poolAllocator;
 }
 }
 
 
 //
 //
@@ -137,16 +131,6 @@ TPoolAllocator::~TPoolAllocator()
     }
     }
 }
 }
 
 
-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
 // Check a single guard block for damage
 //
 //
@@ -267,8 +251,8 @@ void* TPoolAllocator::allocate(size_t numBytes)
         //
         //
         size_t numBytesToAlloc = allocationSize + headerSkip;
         size_t numBytesToAlloc = allocationSize + headerSkip;
         tHeader* memory = reinterpret_cast<tHeader*>(::new char[numBytesToAlloc]);
         tHeader* memory = reinterpret_cast<tHeader*>(::new char[numBytesToAlloc]);
-        if (memory == 0)
-            return 0;
+        if (memory == nullptr)
+            return nullptr;
 
 
         // Use placement-new to initialize header
         // Use placement-new to initialize header
         new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize);
         new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize);
@@ -289,8 +273,8 @@ void* TPoolAllocator::allocate(size_t numBytes)
         freeList = freeList->nextPage;
         freeList = freeList->nextPage;
     } else {
     } else {
         memory = reinterpret_cast<tHeader*>(::new char[pageSize]);
         memory = reinterpret_cast<tHeader*>(::new char[pageSize]);
-        if (memory == 0)
-            return 0;
+        if (memory == nullptr)
+            return nullptr;
     }
     }
 
 
     // Use placement-new to initialize header
     // Use placement-new to initialize header
@@ -308,7 +292,7 @@ void* TPoolAllocator::allocate(size_t numBytes)
 //
 //
 void TAllocation::checkAllocList() const
 void TAllocation::checkAllocList() const
 {
 {
-    for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc)
+    for (const TAllocation* alloc = this; alloc != nullptr; alloc = alloc->prevAlloc)
         alloc->check();
         alloc->check();
 }
 }
 
 

+ 83 - 48
src/libraries/glslang/glslang/MachineIndependent/Scan.cpp

@@ -324,11 +324,9 @@ struct str_hash
 // A single global usable by all threads, by all versions, by all languages.
 // 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
 // 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_map<const char*, int, str_hash, str_eq>* KeywordMap = nullptr;
-#ifndef GLSLANG_WEB
 std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
 std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
-#endif
 
 
-};
+}
 
 
 namespace glslang {
 namespace glslang {
 
 
@@ -343,6 +341,7 @@ void TScanContext::fillInKeywordMap()
 
 
     (*KeywordMap)["const"] =                   CONST;
     (*KeywordMap)["const"] =                   CONST;
     (*KeywordMap)["uniform"] =                 UNIFORM;
     (*KeywordMap)["uniform"] =                 UNIFORM;
+    (*KeywordMap)["tileImageEXT"] =            TILEIMAGEEXT;
     (*KeywordMap)["buffer"] =                  BUFFER;
     (*KeywordMap)["buffer"] =                  BUFFER;
     (*KeywordMap)["in"] =                      IN;
     (*KeywordMap)["in"] =                      IN;
     (*KeywordMap)["out"] =                     OUT;
     (*KeywordMap)["out"] =                     OUT;
@@ -408,7 +407,6 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["uvec3"] =                   UVEC3;
     (*KeywordMap)["uvec3"] =                   UVEC3;
     (*KeywordMap)["uvec4"] =                   UVEC4;
     (*KeywordMap)["uvec4"] =                   UVEC4;
 
 
-#ifndef GLSLANG_WEB
     (*KeywordMap)["nonuniformEXT"] =           NONUNIFORM;
     (*KeywordMap)["nonuniformEXT"] =           NONUNIFORM;
     (*KeywordMap)["demote"] =                  DEMOTE;
     (*KeywordMap)["demote"] =                  DEMOTE;
     (*KeywordMap)["attribute"] =               ATTRIBUTE;
     (*KeywordMap)["attribute"] =               ATTRIBUTE;
@@ -598,7 +596,6 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["spirv_storage_class"] =     SPIRV_STORAGE_CLASS;
     (*KeywordMap)["spirv_storage_class"] =     SPIRV_STORAGE_CLASS;
     (*KeywordMap)["spirv_by_reference"] =      SPIRV_BY_REFERENCE;
     (*KeywordMap)["spirv_by_reference"] =      SPIRV_BY_REFERENCE;
     (*KeywordMap)["spirv_literal"] =           SPIRV_LITERAL;
     (*KeywordMap)["spirv_literal"] =           SPIRV_LITERAL;
-#endif
 
 
     (*KeywordMap)["sampler2D"] =               SAMPLER2D;
     (*KeywordMap)["sampler2D"] =               SAMPLER2D;
     (*KeywordMap)["samplerCube"] =             SAMPLERCUBE;
     (*KeywordMap)["samplerCube"] =             SAMPLERCUBE;
@@ -632,7 +629,6 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["sampler"] =                 SAMPLER;
     (*KeywordMap)["sampler"] =                 SAMPLER;
     (*KeywordMap)["samplerShadow"] =           SAMPLERSHADOW;
     (*KeywordMap)["samplerShadow"] =           SAMPLERSHADOW;
 
 
-#ifndef GLSLANG_WEB
     (*KeywordMap)["textureCubeArray"] =        TEXTURECUBEARRAY;
     (*KeywordMap)["textureCubeArray"] =        TEXTURECUBEARRAY;
     (*KeywordMap)["itextureCubeArray"] =       ITEXTURECUBEARRAY;
     (*KeywordMap)["itextureCubeArray"] =       ITEXTURECUBEARRAY;
     (*KeywordMap)["utextureCubeArray"] =       UTEXTURECUBEARRAY;
     (*KeywordMap)["utextureCubeArray"] =       UTEXTURECUBEARRAY;
@@ -685,6 +681,10 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["texture2DRect"] =           TEXTURE2DRECT;
     (*KeywordMap)["texture2DRect"] =           TEXTURE2DRECT;
     (*KeywordMap)["texture1DArray"] =          TEXTURE1DARRAY;
     (*KeywordMap)["texture1DArray"] =          TEXTURE1DARRAY;
 
 
+    (*KeywordMap)["attachmentEXT"] =           ATTACHMENTEXT;
+    (*KeywordMap)["iattachmentEXT"] =          IATTACHMENTEXT;
+    (*KeywordMap)["uattachmentEXT"] =          UATTACHMENTEXT;
+
     (*KeywordMap)["subpassInput"] =            SUBPASSINPUT;
     (*KeywordMap)["subpassInput"] =            SUBPASSINPUT;
     (*KeywordMap)["subpassInputMS"] =          SUBPASSINPUTMS;
     (*KeywordMap)["subpassInputMS"] =          SUBPASSINPUTMS;
     (*KeywordMap)["isubpassInput"] =           ISUBPASSINPUT;
     (*KeywordMap)["isubpassInput"] =           ISUBPASSINPUT;
@@ -739,6 +739,7 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["f16subpassInputMS"] =            F16SUBPASSINPUTMS;
     (*KeywordMap)["f16subpassInputMS"] =            F16SUBPASSINPUTMS;
     (*KeywordMap)["__explicitInterpAMD"] =     EXPLICITINTERPAMD;
     (*KeywordMap)["__explicitInterpAMD"] =     EXPLICITINTERPAMD;
     (*KeywordMap)["pervertexNV"] =             PERVERTEXNV;
     (*KeywordMap)["pervertexNV"] =             PERVERTEXNV;
+    (*KeywordMap)["pervertexEXT"] =            PERVERTEXEXT;
     (*KeywordMap)["precise"] =                 PRECISE;
     (*KeywordMap)["precise"] =                 PRECISE;
 
 
     (*KeywordMap)["rayPayloadNV"] =            PAYLOADNV;
     (*KeywordMap)["rayPayloadNV"] =            PAYLOADNV;
@@ -757,11 +758,18 @@ void TScanContext::fillInKeywordMap()
     (*KeywordMap)["perprimitiveNV"] =          PERPRIMITIVENV;
     (*KeywordMap)["perprimitiveNV"] =          PERPRIMITIVENV;
     (*KeywordMap)["perviewNV"] =               PERVIEWNV;
     (*KeywordMap)["perviewNV"] =               PERVIEWNV;
     (*KeywordMap)["taskNV"] =                  PERTASKNV;
     (*KeywordMap)["taskNV"] =                  PERTASKNV;
+    (*KeywordMap)["perprimitiveEXT"] =         PERPRIMITIVEEXT;
+    (*KeywordMap)["taskPayloadSharedEXT"] =    TASKPAYLOADWORKGROUPEXT;
 
 
     (*KeywordMap)["fcoopmatNV"] =              FCOOPMATNV;
     (*KeywordMap)["fcoopmatNV"] =              FCOOPMATNV;
     (*KeywordMap)["icoopmatNV"] =              ICOOPMATNV;
     (*KeywordMap)["icoopmatNV"] =              ICOOPMATNV;
     (*KeywordMap)["ucoopmatNV"] =              UCOOPMATNV;
     (*KeywordMap)["ucoopmatNV"] =              UCOOPMATNV;
 
 
+    (*KeywordMap)["coopmat"] =                 COOPMAT;
+
+    (*KeywordMap)["hitObjectNV"] =             HITOBJECTNV;
+    (*KeywordMap)["hitObjectAttributeNV"] =    HITOBJECTATTRNV;
+
     ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
     ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
 
 
     ReservedSet->insert("common");
     ReservedSet->insert("common");
@@ -801,17 +809,14 @@ void TScanContext::fillInKeywordMap()
     ReservedSet->insert("cast");
     ReservedSet->insert("cast");
     ReservedSet->insert("namespace");
     ReservedSet->insert("namespace");
     ReservedSet->insert("using");
     ReservedSet->insert("using");
-#endif
 }
 }
 
 
 void TScanContext::deleteKeywordMap()
 void TScanContext::deleteKeywordMap()
 {
 {
     delete KeywordMap;
     delete KeywordMap;
     KeywordMap = nullptr;
     KeywordMap = nullptr;
-#ifndef GLSLANG_WEB
     delete ReservedSet;
     delete ReservedSet;
     ReservedSet = nullptr;
     ReservedSet = nullptr;
-#endif
 }
 }
 
 
 // Called by yylex to get the next token.
 // Called by yylex to get the next token.
@@ -892,14 +897,12 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
         case PpAtomConstInt:           parserToken->sType.lex.i    = ppToken.ival;       return INTCONSTANT;
         case PpAtomConstInt:           parserToken->sType.lex.i    = ppToken.ival;       return INTCONSTANT;
         case PpAtomConstUint:          parserToken->sType.lex.i    = ppToken.ival;       return UINTCONSTANT;
         case PpAtomConstUint:          parserToken->sType.lex.i    = ppToken.ival;       return UINTCONSTANT;
         case PpAtomConstFloat:         parserToken->sType.lex.d    = ppToken.dval;       return FLOATCONSTANT;
         case PpAtomConstFloat:         parserToken->sType.lex.d    = ppToken.dval;       return FLOATCONSTANT;
-#ifndef GLSLANG_WEB
         case PpAtomConstInt16:         parserToken->sType.lex.i    = ppToken.ival;       return INT16CONSTANT;
         case PpAtomConstInt16:         parserToken->sType.lex.i    = ppToken.ival;       return INT16CONSTANT;
         case PpAtomConstUint16:        parserToken->sType.lex.i    = ppToken.ival;       return UINT16CONSTANT;
         case PpAtomConstUint16:        parserToken->sType.lex.i    = ppToken.ival;       return UINT16CONSTANT;
         case PpAtomConstInt64:         parserToken->sType.lex.i64  = ppToken.i64val;     return INT64CONSTANT;
         case PpAtomConstInt64:         parserToken->sType.lex.i64  = ppToken.i64val;     return INT64CONSTANT;
         case PpAtomConstUint64:        parserToken->sType.lex.i64  = ppToken.i64val;     return UINT64CONSTANT;
         case PpAtomConstUint64:        parserToken->sType.lex.i64  = ppToken.i64val;     return UINT64CONSTANT;
         case PpAtomConstDouble:        parserToken->sType.lex.d    = ppToken.dval;       return DOUBLECONSTANT;
         case PpAtomConstDouble:        parserToken->sType.lex.d    = ppToken.dval;       return DOUBLECONSTANT;
         case PpAtomConstFloat16:       parserToken->sType.lex.d    = ppToken.dval;       return FLOAT16CONSTANT;
         case PpAtomConstFloat16:       parserToken->sType.lex.d    = ppToken.dval;       return FLOAT16CONSTANT;
-#endif
         case PpAtomIdentifier:
         case PpAtomIdentifier:
         {
         {
             int token = tokenizeIdentifier();
             int token = tokenizeIdentifier();
@@ -921,10 +924,8 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
 
 
 int TScanContext::tokenizeIdentifier()
 int TScanContext::tokenizeIdentifier()
 {
 {
-#ifndef GLSLANG_WEB
     if (ReservedSet->find(tokenText) != ReservedSet->end())
     if (ReservedSet->find(tokenText) != ReservedSet->end())
         return reservedWord();
         return reservedWord();
-#endif
 
 
     auto it = KeywordMap->find(tokenText);
     auto it = KeywordMap->find(tokenText);
     if (it == KeywordMap->end()) {
     if (it == KeywordMap->end()) {
@@ -936,6 +937,7 @@ int TScanContext::tokenizeIdentifier()
     switch (keyword) {
     switch (keyword) {
     case CONST:
     case CONST:
     case UNIFORM:
     case UNIFORM:
+    case TILEIMAGEEXT:
     case IN:
     case IN:
     case OUT:
     case OUT:
     case INOUT:
     case INOUT:
@@ -1046,7 +1048,6 @@ int TScanContext::tokenizeIdentifier()
         return identifierOrReserved(reserved);
         return identifierOrReserved(reserved);
     }
     }
 
 
-#ifndef GLSLANG_WEB
     case NOPERSPECTIVE:
     case NOPERSPECTIVE:
         if (parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation))
         if (parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation))
             return keyword;
             return keyword;
@@ -1072,12 +1073,18 @@ int TScanContext::tokenizeIdentifier()
             parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))
             parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))
             return keyword;
             return keyword;
         return identifierOrType();
         return identifierOrType();
+    case ACCSTRUCTEXT:
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) ||
+            parseContext.extensionTurnedOn(E_GL_EXT_ray_query) ||
+            parseContext.extensionTurnedOn(E_GL_NV_displacement_micromap))
+            return keyword;
+        return identifierOrType();
     case PAYLOADEXT:
     case PAYLOADEXT:
     case PAYLOADINEXT:
     case PAYLOADINEXT:
     case HITATTREXT:
     case HITATTREXT:
     case CALLDATAEXT:
     case CALLDATAEXT:
     case CALLDATAINEXT:
     case CALLDATAINEXT:
-    case ACCSTRUCTEXT:
         if (parseContext.symbolTable.atBuiltInLevel() ||
         if (parseContext.symbolTable.atBuiltInLevel() ||
             parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) ||
             parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) ||
             parseContext.extensionTurnedOn(E_GL_EXT_ray_query))
             parseContext.extensionTurnedOn(E_GL_EXT_ray_query))
@@ -1133,7 +1140,7 @@ int TScanContext::tokenizeIdentifier()
 
 
     case SUBROUTINE:
     case SUBROUTINE:
         return es30ReservedFromGLSL(400);
         return es30ReservedFromGLSL(400);
-#endif
+
     case SHARED:
     case SHARED:
         if ((parseContext.isEsProfile() && parseContext.version < 300) ||
         if ((parseContext.isEsProfile() && parseContext.version < 300) ||
             (!parseContext.isEsProfile() && parseContext.version < 140))
             (!parseContext.isEsProfile() && parseContext.version < 140))
@@ -1168,7 +1175,6 @@ int TScanContext::tokenizeIdentifier()
     case MAT4X4:
     case MAT4X4:
         return matNxM();
         return matNxM();
 
 
-#ifndef GLSLANG_WEB
     case DMAT2:
     case DMAT2:
     case DMAT3:
     case DMAT3:
     case DMAT4:
     case DMAT4:
@@ -1473,13 +1479,14 @@ int TScanContext::tokenizeIdentifier()
             return keyword;
             return keyword;
         else
         else
             return identifierOrType();
             return identifierOrType();
-#endif
 
 
     case UINT:
     case UINT:
     case UVEC2:
     case UVEC2:
     case UVEC3:
     case UVEC3:
     case UVEC4:
     case UVEC4:
     case SAMPLERCUBESHADOW:
     case SAMPLERCUBESHADOW:
+    case SAMPLER2DARRAY:
+    case SAMPLER2DARRAYSHADOW:
     case ISAMPLER2D:
     case ISAMPLER2D:
     case ISAMPLER3D:
     case ISAMPLER3D:
     case ISAMPLERCUBE:
     case ISAMPLERCUBE:
@@ -1489,6 +1496,12 @@ int TScanContext::tokenizeIdentifier()
     case USAMPLERCUBE:
     case USAMPLERCUBE:
     case USAMPLER2DARRAY:
     case USAMPLER2DARRAY:
         afterType = true;
         afterType = true;
+        if (keyword == SAMPLER2DARRAY || keyword == SAMPLER2DARRAYSHADOW) {
+            if ((keyword == SAMPLER2DARRAY || !parseContext.isEsProfile()) &&
+                (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) {
+                return keyword;
+            }
+        }
         return nonreservedKeyword(300, 130);
         return nonreservedKeyword(300, 130);
 
 
     case SAMPLER3D:
     case SAMPLER3D:
@@ -1526,12 +1539,18 @@ int TScanContext::tokenizeIdentifier()
         else
         else
             return identifierOrType();
             return identifierOrType();
 
 
-#ifndef GLSLANG_WEB
     case ISAMPLER1D:
     case ISAMPLER1D:
     case ISAMPLER1DARRAY:
     case ISAMPLER1DARRAY:
+    case SAMPLER1DARRAYSHADOW:
     case USAMPLER1D:
     case USAMPLER1D:
     case USAMPLER1DARRAY:
     case USAMPLER1DARRAY:
         afterType = true;
         afterType = true;
+        if (keyword == SAMPLER1DARRAYSHADOW) {
+            if (!parseContext.isEsProfile() &&
+                (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) {
+                return keyword;
+            }
+        }
         return es30ReservedFromGLSL(130);
         return es30ReservedFromGLSL(130);
     case ISAMPLER2DRECT:
     case ISAMPLER2DRECT:
     case USAMPLER2DRECT:
     case USAMPLER2DRECT:
@@ -1583,19 +1602,6 @@ int TScanContext::tokenizeIdentifier()
             reservedWord();
             reservedWord();
         return keyword;
         return keyword;
 
 
-    case SAMPLER2DARRAY:
-    case SAMPLER2DARRAYSHADOW:
-        afterType = true;
-        if (parseContext.symbolTable.atBuiltInLevel())
-            return keyword;
-        else if (parseContext.version < 130 && ((parseContext.isEsProfile() && keyword != SAMPLER2DARRAY) || !parseContext.extensionsTurnedOn(1, &E_GL_EXT_texture_array))) {
-            if (parseContext.forwardCompatible)
-                parseContext.warn(loc, "using future keyword", tokenText, "");
-
-            return identifierOrType();
-        }
-        return keyword;
-
     case SAMPLER2DRECT:
     case SAMPLER2DRECT:
     case SAMPLER2DRECTSHADOW:
     case SAMPLER2DRECTSHADOW:
         afterType = true;
         afterType = true;
@@ -1610,20 +1616,14 @@ int TScanContext::tokenizeIdentifier()
         return keyword;
         return keyword;
 
 
     case SAMPLER1DARRAY:
     case SAMPLER1DARRAY:
-	case SAMPLER1DARRAYSHADOW:
         afterType = true;
         afterType = true;
-		if (parseContext.symbolTable.atBuiltInLevel())
-            return keyword;
-		if (parseContext.isEsProfile()) {
-			if (parseContext.version >= 300)
-				reservedWord();
-			else
-				return identifierOrType();
-		} else if (parseContext.version < 130 && !parseContext.extensionsTurnedOn(1, &E_GL_EXT_texture_array)) {
-			if (parseContext.forwardCompatible)
-				parseContext.warn(loc, "using future keyword", tokenText, "");
-			return identifierOrType();
-		}
+        if (parseContext.isEsProfile() && parseContext.version == 300)
+            reservedWord();
+        else if ((parseContext.isEsProfile() && parseContext.version < 300) ||
+                 ((!parseContext.isEsProfile() && parseContext.version < 130) &&
+                   !parseContext.symbolTable.atBuiltInLevel() &&
+                   !parseContext.extensionTurnedOn(E_GL_EXT_texture_array)))
+            return identifierOrType();
         return keyword;
         return keyword;
 
 
     case SAMPLEREXTERNALOES:
     case SAMPLEREXTERNALOES:
@@ -1670,6 +1670,9 @@ int TScanContext::tokenizeIdentifier()
     case ISUBPASSINPUTMS:
     case ISUBPASSINPUTMS:
     case USUBPASSINPUT:
     case USUBPASSINPUT:
     case USUBPASSINPUTMS:
     case USUBPASSINPUTMS:
+    case ATTACHMENTEXT:
+    case IATTACHMENTEXT:
+    case UATTACHMENTEXT:
         if (parseContext.spvVersion.vulkan > 0)
         if (parseContext.spvVersion.vulkan > 0)
             return keyword;
             return keyword;
         else
         else
@@ -1737,6 +1740,12 @@ int TScanContext::tokenizeIdentifier()
             return keyword;
             return keyword;
         return identifierOrType();
         return identifierOrType();
 
 
+    case PERVERTEXEXT:
+        if ((!parseContext.isEsProfile() && parseContext.version >= 450) ||
+            parseContext.extensionTurnedOn(E_GL_EXT_fragment_shader_barycentric))
+            return keyword;
+        return identifierOrType();
+
     case PRECISE:
     case PRECISE:
         if ((parseContext.isEsProfile() &&
         if ((parseContext.isEsProfile() &&
              (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) ||
              (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) ||
@@ -1751,12 +1760,18 @@ int TScanContext::tokenizeIdentifier()
     case PERPRIMITIVENV:
     case PERPRIMITIVENV:
     case PERVIEWNV:
     case PERVIEWNV:
     case PERTASKNV:
     case PERTASKNV:
-        if ((!parseContext.isEsProfile() && parseContext.version >= 450) ||
-            (parseContext.isEsProfile() && parseContext.version >= 320) ||
+        if (parseContext.symbolTable.atBuiltInLevel() ||
             parseContext.extensionTurnedOn(E_GL_NV_mesh_shader))
             parseContext.extensionTurnedOn(E_GL_NV_mesh_shader))
             return keyword;
             return keyword;
         return identifierOrType();
         return identifierOrType();
 
 
+    case PERPRIMITIVEEXT:
+    case TASKPAYLOADWORKGROUPEXT:
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            parseContext.extensionTurnedOn(E_GL_EXT_mesh_shader))
+            return keyword;
+        return identifierOrType();
+
     case FCOOPMATNV:
     case FCOOPMATNV:
         afterType = true;
         afterType = true;
         if (parseContext.symbolTable.atBuiltInLevel() ||
         if (parseContext.symbolTable.atBuiltInLevel() ||
@@ -1772,6 +1787,13 @@ int TScanContext::tokenizeIdentifier()
             return keyword;
             return keyword;
         return identifierOrType();
         return identifierOrType();
 
 
+    case COOPMAT:
+        afterType = true;
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            parseContext.extensionTurnedOn(E_GL_KHR_cooperative_matrix))
+            return keyword;
+        return identifierOrType();
+
     case DEMOTE:
     case DEMOTE:
         if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
         if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
             return keyword;
             return keyword;
@@ -1792,7 +1814,20 @@ int TScanContext::tokenizeIdentifier()
             parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
             parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
             return keyword;
             return keyword;
         return identifierOrType();
         return identifierOrType();
-#endif
+
+    case HITOBJECTNV:
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            (!parseContext.isEsProfile() && parseContext.version >= 460
+                 && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
+            return keyword;
+        return identifierOrType();
+
+    case HITOBJECTATTRNV:
+        if (parseContext.symbolTable.atBuiltInLevel() ||
+            (!parseContext.isEsProfile() && parseContext.version >= 460
+                 && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
+            return keyword;
+        return identifierOrType();
 
 
     default:
     default:
         parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
         parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);

+ 94 - 156
src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp

@@ -45,6 +45,7 @@
 #include <iostream>
 #include <iostream>
 #include <sstream>
 #include <sstream>
 #include <memory>
 #include <memory>
+#include <mutex>
 #include "SymbolTable.h"
 #include "SymbolTable.h"
 #include "ParseHelper.h"
 #include "ParseHelper.h"
 #include "Scan.h"
 #include "Scan.h"
@@ -57,7 +58,6 @@
 #endif
 #endif
 
 
 #include "../Include/ShHandle.h"
 #include "../Include/ShHandle.h"
-#include "../../OGLCompilersDLL/InitializeDll.h"
 
 
 #include "preprocessor/PpContext.h"
 #include "preprocessor/PpContext.h"
 
 
@@ -81,6 +81,9 @@ namespace { // anonymous namespace for file-local functions and symbols
 // Shared global; access should be protected by a global mutex/critical section.
 // Shared global; access should be protected by a global mutex/critical section.
 int NumberOfClients = 0;
 int NumberOfClients = 0;
 
 
+// global initialization lock
+std::mutex init_lock;
+
 using namespace glslang;
 using namespace glslang;
 
 
 // Create a language specific version of parseables.
 // Create a language specific version of parseables.
@@ -295,14 +298,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
                                 EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable,
                                 EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable,
                                 TSymbolTable** symbolTables)
                                 TSymbolTable** symbolTables)
 {
 {
-#ifdef GLSLANG_WEB
-    profile = EEsProfile;
-    version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
-#endif
-
     (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
     (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
     InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source,
     InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source,
                           infoSink, *symbolTables[language]);
                           infoSink, *symbolTables[language]);
@@ -319,14 +314,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
 //
 //
 bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source)
 bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source)
 {
 {
-#ifdef GLSLANG_WEB
-    profile = EEsProfile;
-    version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
-#endif
-
     std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
     std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
 
 
     if (builtInParseables == nullptr)
     if (builtInParseables == nullptr)
@@ -349,7 +336,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
     InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source,
     InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source,
                                infoSink, commonTable, symbolTables);
                                infoSink, commonTable, symbolTables);
 
 
-#ifndef GLSLANG_WEB
     // check for tessellation
     // check for tessellation
     if ((profile != EEsProfile && version >= 150) ||
     if ((profile != EEsProfile && version >= 150) ||
         (profile == EEsProfile && version >= 310)) {
         (profile == EEsProfile && version >= 310)) {
@@ -371,7 +357,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
                                    infoSink, commonTable, symbolTables);
                                    infoSink, commonTable, symbolTables);
 
 
-#ifndef GLSLANG_ANGLE
     // check for ray tracing stages
     // check for ray tracing stages
     if (profile != EEsProfile && version >= 450) {
     if (profile != EEsProfile && version >= 450) {
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
         InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
@@ -391,16 +376,14 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable,  TS
     // check for mesh
     // check for mesh
     if ((profile != EEsProfile && version >= 450) ||
     if ((profile != EEsProfile && version >= 450) ||
         (profile == EEsProfile && version >= 320))
         (profile == EEsProfile && version >= 320))
-        InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMeshNV, source,
+        InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source,
                                    infoSink, commonTable, symbolTables);
                                    infoSink, commonTable, symbolTables);
 
 
     // check for task
     // check for task
     if ((profile != EEsProfile && version >= 450) ||
     if ((profile != EEsProfile && version >= 450) ||
         (profile == EEsProfile && version >= 320))
         (profile == EEsProfile && version >= 320))
-        InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
+        InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
                                    infoSink, commonTable, symbolTables);
                                    infoSink, commonTable, symbolTables);
-#endif // !GLSLANG_ANGLE
-#endif // !GLSLANG_WEB
 
 
     return true;
     return true;
 }
 }
@@ -437,18 +420,15 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
     TInfoSink infoSink;
     TInfoSink infoSink;
 
 
     // Make sure only one thread tries to do this at a time
     // Make sure only one thread tries to do this at a time
-    glslang::GetGlobalLock();
+    const std::lock_guard<std::mutex> lock(init_lock);
 
 
     // See if it's already been done for this version/profile combination
     // See if it's already been done for this version/profile combination
     int versionIndex = MapVersionToIndex(version);
     int versionIndex = MapVersionToIndex(version);
     int spvVersionIndex = MapSpvVersionToIndex(spvVersion);
     int spvVersionIndex = MapSpvVersionToIndex(spvVersion);
     int profileIndex = MapProfileToIndex(profile);
     int profileIndex = MapProfileToIndex(profile);
     int sourceIndex = MapSourceToIndex(source);
     int sourceIndex = MapSourceToIndex(source);
-    if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) {
-        glslang::ReleaseGlobalLock();
-
+    if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral])
         return;
         return;
-    }
 
 
     // Switch to a new pool
     // Switch to a new pool
     TPoolAllocator& previousAllocator = GetThreadPoolAllocator();
     TPoolAllocator& previousAllocator = GetThreadPoolAllocator();
@@ -495,20 +475,16 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
 
 
     delete builtInPoolAllocator;
     delete builtInPoolAllocator;
     SetThreadPoolAllocator(&previousAllocator);
     SetThreadPoolAllocator(&previousAllocator);
-
-    glslang::ReleaseGlobalLock();
 }
 }
 
 
 // Function to Print all builtins
 // Function to Print all builtins
 void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
 void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     infoSink.debug << "BuiltinSymbolTable {\n";
     infoSink.debug << "BuiltinSymbolTable {\n";
 
 
     symbolTable.dump(infoSink, true);
     symbolTable.dump(infoSink, true);
 
 
     infoSink.debug << "}\n";
     infoSink.debug << "}\n";
-#endif
 }
 }
 
 
 // Return true if the shader was correctly specified for version/profile/stage.
 // Return true if the shader was correctly specified for version/profile/stage.
@@ -606,7 +582,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
         break;
         break;
     }
     }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     // Correct for stage type...
     // Correct for stage type...
     switch (stage) {
     switch (stage) {
     case EShLangGeometry:
     case EShLangGeometry:
@@ -650,8 +625,8 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
             version = 460;
             version = 460;
         }
         }
         break;
         break;
-    case EShLangMeshNV:
-    case EShLangTaskNV:
+    case EShLangMesh:
+    case EShLangTask:
         if ((profile == EEsProfile && version < 320) ||
         if ((profile == EEsProfile && version < 320) ||
             (profile != EEsProfile && version < 450)) {
             (profile != EEsProfile && version < 450)) {
             correct = false;
             correct = false;
@@ -694,7 +669,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
             break;
             break;
         }
         }
     }
     }
-#endif
 
 
     return correct;
     return correct;
 }
 }
@@ -813,6 +787,7 @@ bool ProcessDeferred(
     // set version/profile to defaultVersion/defaultProfile regardless of the #version
     // set version/profile to defaultVersion/defaultProfile regardless of the #version
     // directive in the source code
     // directive in the source code
     bool forceDefaultVersionAndProfile,
     bool forceDefaultVersionAndProfile,
+    int overrideVersion, // overrides version specified by #verison or default version
     bool forwardCompatible,     // give errors for use of deprecated features
     bool forwardCompatible,     // give errors for use of deprecated features
     EShMessages messages,       // warnings/errors/AST; things to print out
     EShMessages messages,       // warnings/errors/AST; things to print out
     TIntermediate& intermediate, // returned tree, etc.
     TIntermediate& intermediate, // returned tree, etc.
@@ -820,7 +795,8 @@ bool ProcessDeferred(
     bool requireNonempty,
     bool requireNonempty,
     TShader::Includer& includer,
     TShader::Includer& includer,
     const std::string sourceEntryPointName = "",
     const std::string sourceEntryPointName = "",
-    const TEnvironment* environment = nullptr)  // optional way of fully setting all versions, overriding the above
+    const TEnvironment* environment = nullptr,  // optional way of fully setting all versions, overriding the above
+    bool compileOnly = false)
 {
 {
     // This must be undone (.pop()) by the caller, after it finishes consuming the created tree.
     // This must be undone (.pop()) by the caller, after it finishes consuming the created tree.
     GetThreadPoolAllocator().push();
     GetThreadPoolAllocator().push();
@@ -883,7 +859,6 @@ bool ProcessDeferred(
                                 : userInput.scanVersion(version, profile, versionNotFirstToken);
                                 : userInput.scanVersion(version, profile, versionNotFirstToken);
     bool versionNotFound = version == 0;
     bool versionNotFound = version == 0;
     if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
     if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
         if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
         if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
             (version != defaultVersion || profile != defaultProfile)) {
             (version != defaultVersion || profile != defaultProfile)) {
             compiler->infoSink.info << "Warning, (version, profile) forced to be ("
             compiler->infoSink.info << "Warning, (version, profile) forced to be ("
@@ -891,7 +866,7 @@ bool ProcessDeferred(
                                     << "), while in source code it is ("
                                     << "), while in source code it is ("
                                     << version << ", " << ProfileName(profile) << ")\n";
                                     << version << ", " << ProfileName(profile) << ")\n";
         }
         }
-#endif
+
         if (versionNotFound) {
         if (versionNotFound) {
             versionNotFirstToken = false;
             versionNotFirstToken = false;
             versionNotFirst = false;
             versionNotFirst = false;
@@ -900,19 +875,13 @@ bool ProcessDeferred(
         version = defaultVersion;
         version = defaultVersion;
         profile = defaultProfile;
         profile = defaultProfile;
     }
     }
+    if (source == EShSourceGlsl && overrideVersion != 0) {
+        version = overrideVersion;
+    }
 
 
     bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage,
     bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage,
                                             versionNotFirst, defaultVersion, source, version, profile, spvVersion);
                                             versionNotFirst, defaultVersion, source, version, profile, spvVersion);
-#ifdef GLSLANG_WEB
-    profile = EEsProfile;
-    version = 310;
-#elif defined(GLSLANG_ANGLE)
-    profile = ECoreProfile;
-    version = 450;
-#endif
-
     bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
     bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     bool warnVersionNotFirst = false;
     bool warnVersionNotFirst = false;
     if (! versionWillBeError && versionNotFirstToken) {
     if (! versionWillBeError && versionNotFirstToken) {
         if (messages & EShMsgRelaxedErrors)
         if (messages & EShMsgRelaxedErrors)
@@ -920,7 +889,6 @@ bool ProcessDeferred(
         else
         else
             versionWillBeError = true;
             versionWillBeError = true;
     }
     }
-#endif
 
 
     intermediate.setSource(source);
     intermediate.setSource(source);
     intermediate.setVersion(version);
     intermediate.setVersion(version);
@@ -974,6 +942,7 @@ bool ProcessDeferred(
     std::unique_ptr<TParseContextBase> parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source,
     std::unique_ptr<TParseContextBase> parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source,
                                                     stage, compiler->infoSink,
                                                     stage, compiler->infoSink,
                                                     spvVersion, forwardCompatible, messages, false, sourceEntryPointName));
                                                     spvVersion, forwardCompatible, messages, false, sourceEntryPointName));
+    parseContext->compileOnly = compileOnly;
     TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer);
     TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer);
 
 
     // only GLSL (bison triggered, really) needs an externally set scan context
     // only GLSL (bison triggered, really) needs an externally set scan context
@@ -985,13 +954,11 @@ bool ProcessDeferred(
     parseContext->setLimits(*resources);
     parseContext->setLimits(*resources);
     if (! goodVersion)
     if (! goodVersion)
         parseContext->addError();
         parseContext->addError();
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     if (warnVersionNotFirst) {
     if (warnVersionNotFirst) {
         TSourceLoc loc;
         TSourceLoc loc;
         loc.init();
         loc.init();
         parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", "");
         parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", "");
     }
     }
-#endif
 
 
     parseContext->initializeExtensionBehavior();
     parseContext->initializeExtensionBehavior();
 
 
@@ -1023,8 +990,6 @@ bool ProcessDeferred(
     return success;
     return success;
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 // Responsible for keeping track of the most recent source string and line in
 // Responsible for keeping track of the most recent source string and line in
 // the preprocessor and outputting newlines appropriately if the source string
 // the preprocessor and outputting newlines appropriately if the source string
 // or line changes.
 // or line changes.
@@ -1102,8 +1067,8 @@ struct DoPreprocessing {
                     EShOptimizationLevel, EShMessages)
                     EShOptimizationLevel, EShMessages)
     {
     {
         // This is a list of tokens that do not require a space before or after.
         // 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 = ",";
+        static const std::string noNeededSpaceBeforeTokens = ";)[].,";
+        static const std::string noNeededSpaceAfterTokens = ".([";
         glslang::TPpToken ppToken;
         glslang::TPpToken ppToken;
 
 
         parseContext.setScanner(&input);
         parseContext.setScanner(&input);
@@ -1176,6 +1141,7 @@ struct DoPreprocessing {
         });
         });
 
 
         int lastToken = EndOfInput; // lastToken records the last token processed.
         int lastToken = EndOfInput; // lastToken records the last token processed.
+        std::string lastTokenName;
         do {
         do {
             int token = ppContext.tokenize(ppToken);
             int token = ppContext.tokenize(ppToken);
             if (token == EndOfInput)
             if (token == EndOfInput)
@@ -1194,12 +1160,23 @@ struct DoPreprocessing {
             // Output a space in between tokens, but not at the start of a line,
             // 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 also not around special tokens. This helps with readability
             // and consistency.
             // and consistency.
-            if (!isNewString && !isNewLine && lastToken != EndOfInput &&
-                (unNeededSpaceTokens.find((char)token) == std::string::npos) &&
-                (unNeededSpaceTokens.find((char)lastToken) == std::string::npos) &&
-                (noSpaceBeforeTokens.find((char)token) == std::string::npos)) {
-                outputBuffer += ' ';
+            if (!isNewString && !isNewLine && lastToken != EndOfInput) {
+                // left parenthesis need a leading space, except it is in a function-call-like context.
+                // examples: `for (xxx)`, `a * (b + c)`, `vec(2.0)`, `foo(x, y, z)`
+                if (token == '(') {
+                    if (lastToken != PpAtomIdentifier ||
+                        lastTokenName == "if" ||
+                        lastTokenName == "for" ||
+                        lastTokenName == "while" ||
+                        lastTokenName == "switch")
+                        outputBuffer += ' ';
+                } else if ((noNeededSpaceBeforeTokens.find((char)token) == std::string::npos) &&
+                    (noNeededSpaceAfterTokens.find((char)lastToken) == std::string::npos)) {
+                    outputBuffer += ' ';
+                }
             }
             }
+            if (token == PpAtomIdentifier)
+                lastTokenName = ppToken.name;
             lastToken = token;
             lastToken = token;
             if (token == PpAtomConstString)
             if (token == PpAtomConstString)
                 outputBuffer += "\"";
                 outputBuffer += "\"";
@@ -1221,8 +1198,6 @@ struct DoPreprocessing {
     std::string* outputString;
     std::string* outputString;
 };
 };
 
 
-#endif
-
 // DoFullParse is a valid ProcessingConext template argument for fully
 // DoFullParse is a valid ProcessingConext template argument for fully
 // parsing the shader.  It populates the "intermediate" with the AST.
 // parsing the shader.  It populates the "intermediate" with the AST.
 struct DoFullParse{
 struct DoFullParse{
@@ -1246,16 +1221,13 @@ struct DoFullParse{
             parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors.  No code generated.\n\n";
             parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors.  No code generated.\n\n";
         }
         }
 
 
-#ifndef GLSLANG_ANGLE
         if (messages & EShMsgAST)
         if (messages & EShMsgAST)
             intermediate.output(parseContext.infoSink, true);
             intermediate.output(parseContext.infoSink, true);
-#endif
 
 
         return success;
         return success;
     }
     }
 };
 };
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
 // Take a single compilation unit, and run the preprocessor on it.
 // Take a single compilation unit, and run the preprocessor on it.
 // Return: True if there were no issues found in preprocessing,
 // Return: True if there were no issues found in preprocessing,
 //         False if during preprocessing any unknown version, pragmas or
 //         False if during preprocessing any unknown version, pragmas or
@@ -1275,6 +1247,7 @@ bool PreprocessDeferred(
     int defaultVersion,         // use 100 for ES environment, 110 for desktop
     int defaultVersion,         // use 100 for ES environment, 110 for desktop
     EProfile defaultProfile,
     EProfile defaultProfile,
     bool forceDefaultVersionAndProfile,
     bool forceDefaultVersionAndProfile,
+    int overrideVersion,        // use 0 if not overriding GLSL version
     bool forwardCompatible,     // give errors for use of deprecated features
     bool forwardCompatible,     // give errors for use of deprecated features
     EShMessages messages,       // warnings/errors/AST; things to print out
     EShMessages messages,       // warnings/errors/AST; things to print out
     TShader::Includer& includer,
     TShader::Includer& includer,
@@ -1285,11 +1258,10 @@ bool PreprocessDeferred(
     DoPreprocessing parser(outputString);
     DoPreprocessing parser(outputString);
     return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
     return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
                            preamble, optLevel, resources, defaultVersion,
                            preamble, optLevel, resources, defaultVersion,
-                           defaultProfile, forceDefaultVersionAndProfile,
+                           defaultProfile, forceDefaultVersionAndProfile, overrideVersion,
                            forwardCompatible, messages, intermediate, parser,
                            forwardCompatible, messages, intermediate, parser,
                            false, includer, "", environment);
                            false, includer, "", environment);
 }
 }
-#endif
 
 
 //
 //
 // do a partial compile on the given strings for a single compilation unit
 // do a partial compile on the given strings for a single compilation unit
@@ -1314,19 +1286,21 @@ bool CompileDeferred(
     int defaultVersion,         // use 100 for ES environment, 110 for desktop
     int defaultVersion,         // use 100 for ES environment, 110 for desktop
     EProfile defaultProfile,
     EProfile defaultProfile,
     bool forceDefaultVersionAndProfile,
     bool forceDefaultVersionAndProfile,
+    int overrideVersion,        // use 0 if not overriding GLSL version
     bool forwardCompatible,     // give errors for use of deprecated features
     bool forwardCompatible,     // give errors for use of deprecated features
     EShMessages messages,       // warnings/errors/AST; things to print out
     EShMessages messages,       // warnings/errors/AST; things to print out
     TIntermediate& intermediate,// returned tree, etc.
     TIntermediate& intermediate,// returned tree, etc.
     TShader::Includer& includer,
     TShader::Includer& includer,
     const std::string sourceEntryPointName = "",
     const std::string sourceEntryPointName = "",
-    TEnvironment* environment = nullptr)
+    TEnvironment* environment = nullptr,
+    bool compileOnly = false)
 {
 {
     DoFullParse parser;
     DoFullParse parser;
     return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
     return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
                            preamble, optLevel, resources, defaultVersion,
                            preamble, optLevel, resources, defaultVersion,
-                           defaultProfile, forceDefaultVersionAndProfile,
+                           defaultProfile, forceDefaultVersionAndProfile, overrideVersion,
                            forwardCompatible, messages, intermediate, parser,
                            forwardCompatible, messages, intermediate, parser,
-                           true, includer, sourceEntryPointName, environment);
+                           true, includer, sourceEntryPointName, environment, compileOnly);
 }
 }
 
 
 } // end anonymous namespace for local functions
 } // end anonymous namespace for local functions
@@ -1336,12 +1310,7 @@ bool CompileDeferred(
 //
 //
 int ShInitialize()
 int ShInitialize()
 {
 {
-    glslang::InitGlobalLock();
-
-    if (! InitProcess())
-        return 0;
-
-    glslang::GetGlobalLock();
+    const std::lock_guard<std::mutex> lock(init_lock);
     ++NumberOfClients;
     ++NumberOfClients;
 
 
     if (PerProcessGPA == nullptr)
     if (PerProcessGPA == nullptr)
@@ -1352,7 +1321,6 @@ int ShInitialize()
     glslang::HlslScanContext::fillInKeywordMap();
     glslang::HlslScanContext::fillInKeywordMap();
 #endif
 #endif
 
 
-    glslang::ReleaseGlobalLock();
     return 1;
     return 1;
 }
 }
 
 
@@ -1361,31 +1329,22 @@ int ShInitialize()
 // objects.
 // objects.
 //
 //
 
 
-ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions)
+ShHandle ShConstructCompiler(const EShLanguage language, int /*debugOptions unused*/)
 {
 {
-    if (!InitThread())
-        return 0;
-
-    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(language, debugOptions));
+    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(language, 0));
 
 
     return reinterpret_cast<void*>(base);
     return reinterpret_cast<void*>(base);
 }
 }
 
 
-ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions)
+ShHandle ShConstructLinker(const EShExecutable executable, int /*debugOptions unused*/)
 {
 {
-    if (!InitThread())
-        return 0;
-
-    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructLinker(executable, debugOptions));
+    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructLinker(executable, 0));
 
 
     return reinterpret_cast<void*>(base);
     return reinterpret_cast<void*>(base);
 }
 }
 
 
 ShHandle ShConstructUniformMap()
 ShHandle ShConstructUniformMap()
 {
 {
-    if (!InitThread())
-        return 0;
-
     TShHandleBase* base = static_cast<TShHandleBase*>(ConstructUniformMap());
     TShHandleBase* base = static_cast<TShHandleBase*>(ConstructUniformMap());
 
 
     return reinterpret_cast<void*>(base);
     return reinterpret_cast<void*>(base);
@@ -1393,7 +1352,7 @@ ShHandle ShConstructUniformMap()
 
 
 void ShDestruct(ShHandle handle)
 void ShDestruct(ShHandle handle)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return;
         return;
 
 
     TShHandleBase* base = static_cast<TShHandleBase*>(handle);
     TShHandleBase* base = static_cast<TShHandleBase*>(handle);
@@ -1411,14 +1370,11 @@ void ShDestruct(ShHandle handle)
 //
 //
 int ShFinalize()
 int ShFinalize()
 {
 {
-    glslang::GetGlobalLock();
+    const std::lock_guard<std::mutex> lock(init_lock);
     --NumberOfClients;
     --NumberOfClients;
     assert(NumberOfClients >= 0);
     assert(NumberOfClients >= 0);
-    bool finalize = NumberOfClients == 0;
-    if (! finalize) {
-        glslang::ReleaseGlobalLock();
+    if (NumberOfClients > 0)
         return 1;
         return 1;
-    }
 
 
     for (int version = 0; version < VersionCount; ++version) {
     for (int version = 0; version < VersionCount; ++version) {
         for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) {
         for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) {
@@ -1426,7 +1382,7 @@ int ShFinalize()
                 for (int source = 0; source < SourceCount; ++source) {
                 for (int source = 0; source < SourceCount; ++source) {
                     for (int stage = 0; stage < EShLangCount; ++stage) {
                     for (int stage = 0; stage < EShLangCount; ++stage) {
                         delete SharedSymbolTables[version][spvVersion][p][source][stage];
                         delete SharedSymbolTables[version][spvVersion][p][source][stage];
-                        SharedSymbolTables[version][spvVersion][p][source][stage] = 0;
+                        SharedSymbolTables[version][spvVersion][p][source][stage] = nullptr;
                     }
                     }
                 }
                 }
             }
             }
@@ -1439,7 +1395,7 @@ int ShFinalize()
                 for (int source = 0; source < SourceCount; ++source) {
                 for (int source = 0; source < SourceCount; ++source) {
                     for (int pc = 0; pc < EPcCount; ++pc) {
                     for (int pc = 0; pc < EPcCount; ++pc) {
                         delete CommonSymbolTable[version][spvVersion][p][source][pc];
                         delete CommonSymbolTable[version][spvVersion][p][source][pc];
-                        CommonSymbolTable[version][spvVersion][p][source][pc] = 0;
+                        CommonSymbolTable[version][spvVersion][p][source][pc] = nullptr;
                     }
                     }
                 }
                 }
             }
             }
@@ -1456,7 +1412,6 @@ int ShFinalize()
     glslang::HlslScanContext::deleteKeywordMap();
     glslang::HlslScanContext::deleteKeywordMap();
 #endif
 #endif
 
 
-    glslang::ReleaseGlobalLock();
     return 1;
     return 1;
 }
 }
 
 
@@ -1482,12 +1437,12 @@ int ShCompile(
     )
     )
 {
 {
     // Map the generic handle to the C++ object
     // Map the generic handle to the C++ object
-    if (handle == 0)
+    if (handle == nullptr)
         return 0;
         return 0;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TCompiler* compiler = base->getAsCompiler();
     TCompiler* compiler = base->getAsCompiler();
-    if (compiler == 0)
+    if (compiler == nullptr)
         return 0;
         return 0;
 
 
     SetThreadPoolAllocator(compiler->getPool());
     SetThreadPoolAllocator(compiler->getPool());
@@ -1498,7 +1453,7 @@ int ShCompile(
     TIntermediate intermediate(compiler->getLanguage());
     TIntermediate intermediate(compiler->getLanguage());
     TShader::ForbidIncluder includer;
     TShader::ForbidIncluder includer;
     bool success = CompileDeferred(compiler, shaderStrings, numStrings, inputLengths, nullptr,
     bool success = CompileDeferred(compiler, shaderStrings, numStrings, inputLengths, nullptr,
-                                   "", optLevel, resources, defaultVersion, ENoProfile, false,
+                                   "", optLevel, resources, defaultVersion, ENoProfile, false, 0,
                                    forwardCompatible, messages, intermediate, includer);
                                    forwardCompatible, messages, intermediate, includer);
 
 
     //
     //
@@ -1527,13 +1482,13 @@ int ShLinkExt(
     const ShHandle compHandles[],
     const ShHandle compHandles[],
     const int numHandles)
     const int numHandles)
 {
 {
-    if (linkHandle == 0 || numHandles == 0)
+    if (linkHandle == nullptr || numHandles == 0)
         return 0;
         return 0;
 
 
     THandleList cObjects;
     THandleList cObjects;
 
 
     for (int i = 0; i < numHandles; ++i) {
     for (int i = 0; i < numHandles; ++i) {
-        if (compHandles[i] == 0)
+        if (compHandles[i] == nullptr)
             return 0;
             return 0;
         TShHandleBase* base = reinterpret_cast<TShHandleBase*>(compHandles[i]);
         TShHandleBase* base = reinterpret_cast<TShHandleBase*>(compHandles[i]);
         if (base->getAsLinker()) {
         if (base->getAsLinker()) {
@@ -1542,18 +1497,17 @@ int ShLinkExt(
         if (base->getAsCompiler())
         if (base->getAsCompiler())
             cObjects.push_back(base->getAsCompiler());
             cObjects.push_back(base->getAsCompiler());
 
 
-        if (cObjects[i] == 0)
+        if (cObjects[i] == nullptr)
             return 0;
             return 0;
     }
     }
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle);
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
 
 
-    SetThreadPoolAllocator(linker->getPool());
-
-    if (linker == 0)
+    if (linker == nullptr)
         return 0;
         return 0;
-
+    
+    SetThreadPoolAllocator(linker->getPool());
     linker->infoSink.info.erase();
     linker->infoSink.info.erase();
 
 
     for (int i = 0; i < numHandles; ++i) {
     for (int i = 0; i < numHandles; ++i) {
@@ -1576,7 +1530,7 @@ int ShLinkExt(
 //
 //
 void ShSetEncryptionMethod(ShHandle handle)
 void ShSetEncryptionMethod(ShHandle handle)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return;
         return;
 }
 }
 
 
@@ -1585,8 +1539,8 @@ void ShSetEncryptionMethod(ShHandle handle)
 //
 //
 const char* ShGetInfoLog(const ShHandle handle)
 const char* ShGetInfoLog(const ShHandle handle)
 {
 {
-    if (handle == 0)
-        return 0;
+    if (handle == nullptr)
+        return nullptr;
 
 
     TShHandleBase* base = static_cast<TShHandleBase*>(handle);
     TShHandleBase* base = static_cast<TShHandleBase*>(handle);
     TInfoSink* infoSink;
     TInfoSink* infoSink;
@@ -1596,7 +1550,7 @@ const char* ShGetInfoLog(const ShHandle handle)
     else if (base->getAsLinker())
     else if (base->getAsLinker())
         infoSink = &(base->getAsLinker()->getInfoSink());
         infoSink = &(base->getAsLinker()->getInfoSink());
     else
     else
-        return 0;
+        return nullptr;
 
 
     infoSink->info << infoSink->debug.c_str();
     infoSink->info << infoSink->debug.c_str();
     return infoSink->info.c_str();
     return infoSink->info.c_str();
@@ -1608,14 +1562,14 @@ const char* ShGetInfoLog(const ShHandle handle)
 //
 //
 const void* ShGetExecutable(const ShHandle handle)
 const void* ShGetExecutable(const ShHandle handle)
 {
 {
-    if (handle == 0)
-        return 0;
+    if (handle == nullptr)
+        return nullptr;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
 
 
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
-    if (linker == 0)
-        return 0;
+    if (linker == nullptr)
+        return nullptr;
 
 
     return linker->getObjectCode();
     return linker->getObjectCode();
 }
 }
@@ -1630,13 +1584,13 @@ const void* ShGetExecutable(const ShHandle handle)
 //
 //
 int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table)
 int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return 0;
         return 0;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
 
 
-    if (linker == 0)
+    if (linker == nullptr)
         return 0;
         return 0;
 
 
     linker->setAppAttributeBindings(table);
     linker->setAppAttributeBindings(table);
@@ -1649,13 +1603,13 @@ int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* t
 //
 //
 int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table)
 int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return 0;
         return 0;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
 
 
-    if (linker == 0)
+    if (linker == nullptr)
         return 0;
         return 0;
 
 
     linker->setFixedAttributeBindings(table);
     linker->setFixedAttributeBindings(table);
@@ -1667,12 +1621,12 @@ int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* tab
 //
 //
 int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
 int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return 0;
         return 0;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
     TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
-    if (linker == 0)
+    if (linker == nullptr)
         return 0;
         return 0;
 
 
     linker->setExcludedAttributes(attributes, count);
     linker->setExcludedAttributes(attributes, count);
@@ -1688,12 +1642,12 @@ int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
 //
 //
 int ShGetUniformLocation(const ShHandle handle, const char* name)
 int ShGetUniformLocation(const ShHandle handle, const char* name)
 {
 {
-    if (handle == 0)
+    if (handle == nullptr)
         return -1;
         return -1;
 
 
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
     TUniformMap* uniformMap= base->getAsUniformMap();
     TUniformMap* uniformMap= base->getAsUniformMap();
-    if (uniformMap == 0)
+    if (uniformMap == nullptr)
         return -1;
         return -1;
 
 
     return uniformMap->getLocation(name);
     return uniformMap->getLocation(name);
@@ -1759,7 +1713,7 @@ public:
 };
 };
 
 
 TShader::TShader(EShLanguage s)
 TShader::TShader(EShLanguage s)
-    : stage(s), lengths(nullptr), stringNames(nullptr), preamble("")
+    : stage(s), lengths(nullptr), stringNames(nullptr), preamble(""), overrideVersion(0)
 {
 {
     pool = new TPoolAllocator;
     pool = new TPoolAllocator;
     infoSink = new TInfoSink;
     infoSink = new TInfoSink;
@@ -1828,12 +1782,17 @@ void  TShader::setUniqueId(unsigned long long id)
     intermediate->setUniqueId(id);
     intermediate->setUniqueId(id);
 }
 }
 
 
+void TShader::setOverrideVersion(int version)
+{
+    overrideVersion = version;
+}
+
+void TShader::setDebugInfo(bool debugInfo)              { intermediate->setDebugInfo(debugInfo); }
 void TShader::setInvertY(bool invert)                   { intermediate->setInvertY(invert); }
 void TShader::setInvertY(bool invert)                   { intermediate->setInvertY(invert); }
 void TShader::setDxPositionW(bool invert)               { intermediate->setDxPositionW(invert); }
 void TShader::setDxPositionW(bool invert)               { intermediate->setDxPositionW(invert); }
+void TShader::setEnhancedMsgs()                         { intermediate->setEnhancedMsgs(); }
 void TShader::setNanMinMaxClamp(bool useNonNan)         { intermediate->setNanMinMaxClamp(useNonNan); }
 void TShader::setNanMinMaxClamp(bool useNonNan)         { intermediate->setNanMinMaxClamp(useNonNan); }
 
 
-#ifndef GLSLANG_WEB
-
 // Set binding base for given resource type
 // Set binding base for given resource type
 void TShader::setShiftBinding(TResourceType res, unsigned int base) {
 void TShader::setShiftBinding(TResourceType res, unsigned int base) {
     intermediate->setShiftBinding(res, base);
     intermediate->setShiftBinding(res, base);
@@ -1875,7 +1834,6 @@ void TShader::setUniformLocationBase(int base)
 void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); }
 void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); }
 void TShader::setResourceSetBinding(const std::vector<std::string>& base)   { intermediate->setResourceSetBinding(base); }
 void TShader::setResourceSetBinding(const std::vector<std::string>& base)   { intermediate->setResourceSetBinding(base); }
 void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
 void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
-#endif
 
 
 void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); }
 void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); }
 
 
@@ -1900,8 +1858,6 @@ void TShader::setFlattenUniformArrays(bool flatten)     { intermediate->setFlatt
 bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
 bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
                     bool forwardCompatible, EShMessages messages, Includer& includer)
                     bool forwardCompatible, EShMessages messages, Includer& includer)
 {
 {
-    if (! InitThread())
-        return false;
     SetThreadPoolAllocator(pool);
     SetThreadPoolAllocator(pool);
 
 
     if (! preamble)
     if (! preamble)
@@ -1909,12 +1865,11 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
 
 
     return CompileDeferred(compiler, strings, numStrings, lengths, stringNames,
     return CompileDeferred(compiler, strings, numStrings, lengths, stringNames,
                            preamble, EShOptNone, builtInResources, defaultVersion,
                            preamble, EShOptNone, builtInResources, defaultVersion,
-                           defaultProfile, forceDefaultVersionAndProfile,
+                           defaultProfile, forceDefaultVersionAndProfile, overrideVersion,
                            forwardCompatible, messages, *intermediate, includer, sourceEntryPointName,
                            forwardCompatible, messages, *intermediate, includer, sourceEntryPointName,
-                           &environment);
+                           &environment, compileOnly);
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
 // Fill in a string with the result of preprocessing ShaderStrings
 // Fill in a string with the result of preprocessing ShaderStrings
 // Returns true if all extensions, pragmas and version strings were valid.
 // Returns true if all extensions, pragmas and version strings were valid.
 //
 //
@@ -1927,8 +1882,6 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
                          std::string* output_string,
                          std::string* output_string,
                          Includer& includer)
                          Includer& includer)
 {
 {
-    if (! InitThread())
-        return false;
     SetThreadPoolAllocator(pool);
     SetThreadPoolAllocator(pool);
 
 
     if (! preamble)
     if (! preamble)
@@ -1936,11 +1889,10 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
 
 
     return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
     return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
                               EShOptNone, builtInResources, defaultVersion,
                               EShOptNone, builtInResources, defaultVersion,
-                              defaultProfile, forceDefaultVersionAndProfile,
+                              defaultProfile, forceDefaultVersionAndProfile, overrideVersion,
                               forwardCompatible, message, includer, *intermediate, output_string,
                               forwardCompatible, message, includer, *intermediate, output_string,
                               &environment);
                               &environment);
 }
 }
-#endif
 
 
 const char* TShader::getInfoLog()
 const char* TShader::getInfoLog()
 {
 {
@@ -1952,16 +1904,12 @@ const char* TShader::getInfoDebugLog()
     return infoSink->debug.c_str();
     return infoSink->debug.c_str();
 }
 }
 
 
-TProgram::TProgram() :
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-    reflection(0),
-#endif
-    linked(false)
+TProgram::TProgram() : reflection(nullptr), linked(false)
 {
 {
     pool = new TPoolAllocator;
     pool = new TPoolAllocator;
     infoSink = new TInfoSink;
     infoSink = new TInfoSink;
     for (int s = 0; s < EShLangCount; ++s) {
     for (int s = 0; s < EShLangCount; ++s) {
-        intermediate[s] = 0;
+        intermediate[s] = nullptr;
         newedIntermediate[s] = false;
         newedIntermediate[s] = false;
     }
     }
 }
 }
@@ -1969,9 +1917,7 @@ TProgram::TProgram() :
 TProgram::~TProgram()
 TProgram::~TProgram()
 {
 {
     delete infoSink;
     delete infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     delete reflection;
     delete reflection;
-#endif
 
 
     for (int s = 0; s < EShLangCount; ++s)
     for (int s = 0; s < EShLangCount; ++s)
         if (newedIntermediate[s])
         if (newedIntermediate[s])
@@ -2019,7 +1965,6 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
     if (stages[stage].size() == 0)
     if (stages[stage].size() == 0)
         return true;
         return true;
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     int numEsShaders = 0, numNonEsShaders = 0;
     int numEsShaders = 0, numNonEsShaders = 0;
     for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
     for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
         if ((*it)->intermediate->getProfile() == EEsProfile) {
         if ((*it)->intermediate->getProfile() == EEsProfile) {
@@ -2049,6 +1994,8 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
                                                 firstIntermediate->getVersion(),
                                                 firstIntermediate->getVersion(),
                                                 firstIntermediate->getProfile());
                                                 firstIntermediate->getProfile());
         intermediate[stage]->setLimits(firstIntermediate->getLimits());
         intermediate[stage]->setLimits(firstIntermediate->getLimits());
+        if (firstIntermediate->getEnhancedMsgs())
+            intermediate[stage]->setEnhancedMsgs();
 
 
         // The new TIntermediate must use the same origin as the original TIntermediates.
         // The new TIntermediate must use the same origin as the original TIntermediates.
         // Otherwise linking will fail due to different coordinate systems.
         // Otherwise linking will fail due to different coordinate systems.
@@ -2068,15 +2015,10 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
         for (it = stages[stage].begin(); it != stages[stage].end(); ++it)
         for (it = stages[stage].begin(); it != stages[stage].end(); ++it)
             intermediate[stage]->merge(*infoSink, *(*it)->intermediate);
             intermediate[stage]->merge(*infoSink, *(*it)->intermediate);
     }
     }
-#else
-    intermediate[stage] = stages[stage].front()->intermediate;
-#endif
     intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
     intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
 
 
-#ifndef GLSLANG_ANGLE
     if (messages & EShMsgAST)
     if (messages & EShMsgAST)
         intermediate[stage]->output(*infoSink, true);
         intermediate[stage]->output(*infoSink, true);
-#endif
 
 
     return intermediate[stage]->getNumErrors() == 0;
     return intermediate[stage]->getNumErrors() == 0;
 }
 }
@@ -2154,8 +2096,6 @@ const char* TProgram::getInfoDebugLog()
     return infoSink->debug.c_str();
     return infoSink->debug.c_str();
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 //
 //
 // Reflection implementation.
 // Reflection implementation.
 //
 //
@@ -2236,6 +2176,4 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
     return ioMapper->doMap(pResolver, *infoSink);
     return ioMapper->doMap(pResolver, *infoSink);
 }
 }
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
-
 } // end namespace glslang
 } // end namespace glslang

+ 42 - 32
src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp

@@ -33,8 +33,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#ifndef GLSLANG_WEB
-
 //
 //
 // GL_EXT_spirv_intrinsics
 // GL_EXT_spirv_intrinsics
 //
 //
@@ -45,6 +43,15 @@
 
 
 namespace glslang {
 namespace glslang {
 
 
+bool TSpirvTypeParameter::operator==(const TSpirvTypeParameter& rhs) const
+{
+    if (getAsConstant() != nullptr)
+        return getAsConstant()->getConstArray() == rhs.getAsConstant()->getConstArray();
+
+    assert(getAsType() != nullptr);
+    return *getAsType() == *rhs.getAsType();
+}
+
 //
 //
 // Handle SPIR-V requirements
 // Handle SPIR-V requirements
 //
 //
@@ -67,7 +74,7 @@ TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, co
             spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst());
             spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst());
         }
         }
     } else
     } else
-        error(loc, "unknow SPIR-V requirement", name.c_str(), "");
+        error(loc, "unknown SPIR-V requirement", name.c_str(), "");
 
 
     return spirvReq;
     return spirvReq;
 }
 }
@@ -168,7 +175,7 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args
     TVector<const TIntermTyped*> extraOperands;
     TVector<const TIntermTyped*> extraOperands;
     for (auto arg : args->getSequence()) {
     for (auto arg : args->getSequence()) {
         auto extraOperand = arg->getAsTyped();
         auto extraOperand = arg->getAsTyped();
-        assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant());
+        assert(extraOperand != nullptr);
         extraOperands.push_back(extraOperand);
         extraOperands.push_back(extraOperand);
     }
     }
     spirvDecorate->decorateIds[decoration] = extraOperands;
     spirvDecorate->decorateIds[decoration] = extraOperands;
@@ -202,30 +209,29 @@ TString TQualifier::getSpirvDecorateQualifierString() const
     const auto appendStr = [&](const char* s) { qualifierString.append(s); };
     const auto appendStr = [&](const char* s) { qualifierString.append(s); };
 
 
     const auto appendDecorate = [&](const TIntermTyped* constant) {
     const auto appendDecorate = [&](const TIntermTyped* constant) {
-        auto& constArray = constant->getAsConstantUnion() != nullptr ? constant->getAsConstantUnion()->getConstArray()
-                                                                     : constant->getAsSymbolNode()->getConstArray();
-        if (constant->getBasicType() == EbtFloat) {
-            float value = static_cast<float>(constArray[0].getDConst());
-            appendFloat(value);
-        }
-        else if (constant->getBasicType() == EbtInt) {
-            int value = constArray[0].getIConst();
-            appendInt(value);
-        }
-        else if (constant->getBasicType() == EbtUint) {
-            unsigned value = constArray[0].getUConst();
-            appendUint(value);
-        }
-        else if (constant->getBasicType() == EbtBool) {
-            bool value = constArray[0].getBConst();
-            appendBool(value);
+        if (constant->getAsConstantUnion()) {
+            auto& constArray = constant->getAsConstantUnion()->getConstArray();
+            if (constant->getBasicType() == EbtFloat) {
+                float value = static_cast<float>(constArray[0].getDConst());
+                appendFloat(value);
+            } else if (constant->getBasicType() == EbtInt) {
+                int value = constArray[0].getIConst();
+                appendInt(value);
+            } else if (constant->getBasicType() == EbtUint) {
+                unsigned value = constArray[0].getUConst();
+                appendUint(value);
+            } else if (constant->getBasicType() == EbtBool) {
+                bool value = constArray[0].getBConst();
+                appendBool(value);
+            } else if (constant->getBasicType() == EbtString) {
+                const TString* value = constArray[0].getSConst();
+                appendStr(value->c_str());
+            } else
+                assert(0);
+        } else {
+            assert(constant->getAsSymbolNode());
+            appendStr(constant->getAsSymbolNode()->getName().c_str());
         }
         }
-        else if (constant->getBasicType() == EbtString) {
-            const TString* value = constArray[0].getSConst();
-            appendStr(value->c_str());
-        }
-        else
-            assert(0);
     };
     };
 
 
     for (auto& decorate : spirvDecorate->decorates) {
     for (auto& decorate : spirvDecorate->decorates) {
@@ -284,14 +290,20 @@ TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& l
         constant->getBasicType() != EbtBool &&
         constant->getBasicType() != EbtBool &&
         constant->getBasicType() != EbtString)
         constant->getBasicType() != EbtString)
         error(loc, "this type not allowed", constant->getType().getBasicString(), "");
         error(loc, "this type not allowed", constant->getType().getBasicString(), "");
-    else {
-        assert(constant);
+    else
         spirvTypeParams->push_back(TSpirvTypeParameter(constant));
         spirvTypeParams->push_back(TSpirvTypeParameter(constant));
-    }
 
 
     return spirvTypeParams;
     return spirvTypeParams;
 }
 }
 
 
+TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& /* loc */,
+                                                             const TPublicType& type)
+{
+    TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
+    spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type)));
+    return spirvTypeParams;
+}
+
 TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
 TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
 {
 {
     // Merge SPIR-V type parameters of the second one to the first one
     // Merge SPIR-V type parameters of the second one to the first one
@@ -346,5 +358,3 @@ TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, T
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // GLSLANG_WEB

+ 14 - 15
src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp

@@ -65,7 +65,6 @@ void TType::buildMangledName(TString& mangledName) const
     case EbtInt:                mangledName += 'i';      break;
     case EbtInt:                mangledName += 'i';      break;
     case EbtUint:               mangledName += 'u';      break;
     case EbtUint:               mangledName += 'u';      break;
     case EbtBool:               mangledName += 'b';      break;
     case EbtBool:               mangledName += 'b';      break;
-#ifndef GLSLANG_WEB
     case EbtDouble:             mangledName += 'd';      break;
     case EbtDouble:             mangledName += 'd';      break;
     case EbtFloat16:            mangledName += "f16";    break;
     case EbtFloat16:            mangledName += "f16";    break;
     case EbtInt8:               mangledName += "i8";     break;
     case EbtInt8:               mangledName += "i8";     break;
@@ -78,12 +77,10 @@ void TType::buildMangledName(TString& mangledName) const
     case EbtAccStruct:          mangledName += "as";     break;
     case EbtAccStruct:          mangledName += "as";     break;
     case EbtRayQuery:           mangledName += "rq";     break;
     case EbtRayQuery:           mangledName += "rq";     break;
     case EbtSpirvType:          mangledName += "spv-t";  break;
     case EbtSpirvType:          mangledName += "spv-t";  break;
-#endif
+    case EbtHitObjectNV:        mangledName += "ho";     break;
     case EbtSampler:
     case EbtSampler:
         switch (sampler.type) {
         switch (sampler.type) {
-#ifndef GLSLANG_WEB
         case EbtFloat16: mangledName += "f16"; break;
         case EbtFloat16: mangledName += "f16"; break;
-#endif
         case EbtInt:   mangledName += "i"; break;
         case EbtInt:   mangledName += "i"; break;
         case EbtUint:  mangledName += "u"; break;
         case EbtUint:  mangledName += "u"; break;
         case EbtInt64:   mangledName += "i64"; break;
         case EbtInt64:   mangledName += "i64"; break;
@@ -110,12 +107,10 @@ void TType::buildMangledName(TString& mangledName) const
         case Esd2D:       mangledName += "2";  break;
         case Esd2D:       mangledName += "2";  break;
         case Esd3D:       mangledName += "3";  break;
         case Esd3D:       mangledName += "3";  break;
         case EsdCube:     mangledName += "C";  break;
         case EsdCube:     mangledName += "C";  break;
-#ifndef GLSLANG_WEB
         case Esd1D:       mangledName += "1";  break;
         case Esd1D:       mangledName += "1";  break;
         case EsdRect:     mangledName += "R2"; break;
         case EsdRect:     mangledName += "R2"; break;
         case EsdBuffer:   mangledName += "B";  break;
         case EsdBuffer:   mangledName += "B";  break;
         case EsdSubpass:  mangledName += "P";  break;
         case EsdSubpass:  mangledName += "P";  break;
-#endif
         default: break; // some compilers want this
         default: break; // some compilers want this
         }
         }
 
 
@@ -183,8 +178,6 @@ void TType::buildMangledName(TString& mangledName) const
     }
     }
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 //
 //
 // Dump functions.
 // Dump functions.
 //
 //
@@ -263,8 +256,6 @@ void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const
     }
     }
 }
 }
 
 
-#endif
-
 //
 //
 // Functions have buried pointers to delete.
 // Functions have buried pointers to delete.
 //
 //
@@ -327,6 +318,16 @@ void TSymbolTableLevel::setFunctionExtensions(const char* name, int num, const c
     }
     }
 }
 }
 
 
+// Make a single function require an extension(s). i.e., this will only set the extensions for the symbol that matches 'name' exactly.
+// This is different from setFunctionExtensions, which uses std::map::lower_bound to effectively set all symbols that start with 'name'.
+// Should only be used for a version/profile that actually needs the extension(s).
+void TSymbolTableLevel::setSingleFunctionExtensions(const char* name, int num, const char* const extensions[])
+{
+    if (auto candidate = level.find(name); candidate != level.end()) {
+        candidate->second->setExtensions(num, extensions);
+    }
+}
+
 //
 //
 // Make all symbols in this table level read only.
 // Make all symbols in this table level read only.
 //
 //
@@ -381,9 +382,9 @@ TVariable* TVariable::clone() const
 TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
 TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
 {
 {
     for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
     for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
-        TParameter param;
+        TParameter param{};
         parameters.push_back(param);
         parameters.push_back(param);
-        parameters.back().copyParam(copyOf.parameters[i]);
+        (void)parameters.back().copyParam(copyOf.parameters[i]);
     }
     }
 
 
     extensions = nullptr;
     extensions = nullptr;
@@ -397,9 +398,7 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
     implicitThis = copyOf.implicitThis;
     implicitThis = copyOf.implicitThis;
     illegalImplicitThis = copyOf.illegalImplicitThis;
     illegalImplicitThis = copyOf.illegalImplicitThis;
     defaultParamCount = copyOf.defaultParamCount;
     defaultParamCount = copyOf.defaultParamCount;
-#ifndef GLSLANG_WEB
     spirvInst = copyOf.spirvInst;
     spirvInst = copyOf.spirvInst;
-#endif
 }
 }
 
 
 TFunction* TFunction::clone() const
 TFunction* TFunction::clone() const
@@ -416,7 +415,7 @@ TAnonMember* TAnonMember::clone() const
     // copy of the original container.
     // copy of the original container.
     assert(0);
     assert(0);
 
 
-    return 0;
+    return nullptr;
 }
 }
 
 
 TSymbolTableLevel* TSymbolTableLevel::clone() const
 TSymbolTableLevel* TSymbolTableLevel::clone() const

+ 32 - 34
src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h

@@ -84,7 +84,7 @@ typedef TVector<const char*> TExtensionList;
 class TSymbol {
 class TSymbol {
 public:
 public:
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
-    explicit TSymbol(const TString *n) :  name(n), uniqueId(0), extensions(0), writable(true) { }
+    explicit TSymbol(const TString *n) :  name(n), uniqueId(0), extensions(nullptr), writable(true) { }
     virtual TSymbol* clone() const = 0;
     virtual TSymbol* clone() const = 0;
     virtual ~TSymbol() { }  // rely on all symbol owned memory coming from the pool
     virtual ~TSymbol() { }  // rely on all symbol owned memory coming from the pool
 
 
@@ -97,18 +97,18 @@ public:
         changeName(NewPoolTString(newName.c_str()));
         changeName(NewPoolTString(newName.c_str()));
     }
     }
     virtual const TString& getMangledName() const { return getName(); }
     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 TFunction* getAsFunction() { return nullptr; }
+    virtual const TFunction* getAsFunction() const { return nullptr; }
+    virtual TVariable* getAsVariable() { return nullptr; }
+    virtual const TVariable* getAsVariable() const { return nullptr; }
+    virtual const TAnonMember* getAsAnonMember() const { return nullptr; }
     virtual const TType& getType() const = 0;
     virtual const TType& getType() const = 0;
     virtual TType& getWritableType() = 0;
     virtual TType& getWritableType() = 0;
     virtual void setUniqueId(long long id) { uniqueId = id; }
     virtual void setUniqueId(long long id) { uniqueId = id; }
     virtual long long getUniqueId() const { return uniqueId; }
     virtual long long getUniqueId() const { return uniqueId; }
     virtual void setExtensions(int numExts, const char* const exts[])
     virtual void setExtensions(int numExts, const char* const exts[])
     {
     {
-        assert(extensions == 0);
+        assert(extensions == nullptr);
         assert(numExts > 0);
         assert(numExts > 0);
         extensions = NewPoolObject(extensions);
         extensions = NewPoolObject(extensions);
         for (int e = 0; e < numExts; ++e)
         for (int e = 0; e < numExts; ++e)
@@ -117,10 +117,8 @@ public:
     virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
     virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
     virtual const char** getExtensions() const { return extensions->data(); }
     virtual const char** getExtensions() const { return extensions->data(); }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
     void dumpExtensions(TInfoSink& infoSink) const;
     void dumpExtensions(TInfoSink& infoSink) const;
-#endif
 
 
     virtual bool isReadOnly() const { return ! writable; }
     virtual bool isReadOnly() const { return ! writable; }
     virtual void makeReadOnly() { writable = false; }
     virtual void makeReadOnly() { writable = false; }
@@ -196,9 +194,7 @@ public:
     }
     }
     virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
     virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const;
-#endif
 
 
 protected:
 protected:
     explicit TVariable(const TVariable&);
     explicit TVariable(const TVariable&);
@@ -224,14 +220,15 @@ struct TParameter {
     TString *name;
     TString *name;
     TType* type;
     TType* type;
     TIntermTyped* defaultValue;
     TIntermTyped* defaultValue;
-    void copyParam(const TParameter& param)
+    TParameter& copyParam(const TParameter& param)
     {
     {
         if (param.name)
         if (param.name)
             name = NewPoolTString(param.name->c_str());
             name = NewPoolTString(param.name->c_str());
         else
         else
-            name = 0;
+            name = nullptr;
         type = param.type->clone();
         type = param.type->clone();
         defaultValue = param.defaultValue;
         defaultValue = param.defaultValue;
+        return *this;
     }
     }
     TBuiltInVariable getDeclaredBuiltIn() const { return type->getQualifier().declaredBuiltIn; }
     TBuiltInVariable getDeclaredBuiltIn() const { return type->getQualifier().declaredBuiltIn; }
 };
 };
@@ -242,14 +239,15 @@ struct TParameter {
 class TFunction : public TSymbol {
 class TFunction : public TSymbol {
 public:
 public:
     explicit TFunction(TOperator o) :
     explicit TFunction(TOperator o) :
-        TSymbol(0),
+        TSymbol(nullptr),
         op(o),
         op(o),
         defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { }
         defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { }
     TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) :
     TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) :
         TSymbol(name),
         TSymbol(name),
         mangledName(*name + '('),
         mangledName(*name + '('),
         op(tOp),
         op(tOp),
-        defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0)
+        defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0),
+        linkType(ELinkNone)
     {
     {
         returnType.shallowCopy(retType);
         returnType.shallowCopy(retType);
         declaredBuiltIn = retType.getQualifier().builtIn;
         declaredBuiltIn = retType.getQualifier().builtIn;
@@ -318,19 +316,19 @@ public:
 
 
     virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
     virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
     virtual const TParameter& operator[](int i) const { return parameters[i]; }
     virtual const TParameter& operator[](int i) const { return parameters[i]; }
+    const TQualifier& getQualifier() const { return returnType.getQualifier(); }
 
 
-#ifndef GLSLANG_WEB
     virtual void setSpirvInstruction(const TSpirvInstruction& inst)
     virtual void setSpirvInstruction(const TSpirvInstruction& inst)
     {
     {
         relateToOperator(EOpSpirvInst);
         relateToOperator(EOpSpirvInst);
         spirvInst = inst;
         spirvInst = inst;
     }
     }
     virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
     virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
-#endif
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
-#endif
+
+    void setExport() { linkType = ELinkExport; }
+    TLinkType getLinkType() const { return linkType; }
 
 
 protected:
 protected:
     explicit TFunction(const TFunction&);
     explicit TFunction(const TFunction&);
@@ -352,9 +350,8 @@ protected:
                                // but is not allowed to use them, or see hidden symbols instead.
                                // but is not allowed to use them, or see hidden symbols instead.
     int  defaultParamCount;
     int  defaultParamCount;
 
 
-#ifndef GLSLANG_WEB
     TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers
     TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers
-#endif
+    TLinkType linkType;
 };
 };
 
 
 //
 //
@@ -394,9 +391,7 @@ public:
     virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
     virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
 
 
     virtual int getAnonId() const { return anonId; }
     virtual int getAnonId() const { return anonId; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
     virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
-#endif
 
 
 protected:
 protected:
     explicit TAnonMember(const TAnonMember&);
     explicit TAnonMember(const TAnonMember&);
@@ -410,7 +405,7 @@ protected:
 class TSymbolTableLevel {
 class TSymbolTableLevel {
 public:
 public:
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
     POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
-    TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { }
+    TSymbolTableLevel() : defaultPrecision(nullptr), anonId(0), thisLevel(false) { }
     ~TSymbolTableLevel();
     ~TSymbolTableLevel();
 
 
     bool insert(const TString& name, TSymbol* symbol) {
     bool insert(const TString& name, TSymbol* symbol) {
@@ -492,7 +487,7 @@ public:
     {
     {
         tLevel::const_iterator it = level.find(name);
         tLevel::const_iterator it = level.find(name);
         if (it == level.end())
         if (it == level.end())
-            return 0;
+            return nullptr;
         else
         else
             return (*it).second;
             return (*it).second;
     }
     }
@@ -560,7 +555,7 @@ public:
     {
     {
         // can call multiple times at one scope, will only latch on first call,
         // 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
         // as we're tracking the previous scope's values, not the current values
-        if (defaultPrecision != 0)
+        if (defaultPrecision != nullptr)
             return;
             return;
 
 
         defaultPrecision = new TPrecisionQualifier[EbtNumTypes];
         defaultPrecision = new TPrecisionQualifier[EbtNumTypes];
@@ -572,7 +567,7 @@ public:
     {
     {
         // can be called for table level pops that didn't set the
         // can be called for table level pops that didn't set the
         // defaults
         // defaults
-        if (defaultPrecision == 0 || p == 0)
+        if (defaultPrecision == nullptr || p == nullptr)
             return;
             return;
 
 
         for (int t = 0; t < EbtNumTypes; ++t)
         for (int t = 0; t < EbtNumTypes; ++t)
@@ -581,9 +576,8 @@ public:
 
 
     void relateToOperator(const char* name, TOperator op);
     void relateToOperator(const char* name, TOperator op);
     void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
     void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+    void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]);
     void dump(TInfoSink& infoSink, bool complete = false) const;
     void dump(TInfoSink& infoSink, bool complete = false) const;
-#endif
     TSymbolTableLevel* clone() const;
     TSymbolTableLevel* clone() const;
     void readOnly();
     void readOnly();
 
 
@@ -621,7 +615,7 @@ public:
 
 
         // don't deallocate levels passed in from elsewhere
         // don't deallocate levels passed in from elsewhere
         while (table.size() > adoptedLevels)
         while (table.size() > adoptedLevels)
-            pop(0);
+            pop(nullptr);
     }
     }
 
 
     void adoptLevels(TSymbolTable& symTable)
     void adoptLevels(TSymbolTable& symTable)
@@ -782,7 +776,7 @@ public:
 
 
     // Normal find of a symbol, that can optionally say whether the symbol was found
     // Normal find of a symbol, that can optionally say whether the symbol was found
     // at a built-in level or the current top-scope level.
     // at a built-in level or the current top-scope level.
-    TSymbol* find(const TString& name, bool* builtIn = 0, bool* currentScope = 0, int* thisDepthP = 0)
+    TSymbol* find(const TString& name, bool* builtIn = nullptr, bool* currentScope = nullptr, int* thisDepthP = nullptr)
     {
     {
         int level = currentLevel();
         int level = currentLevel();
         TSymbol* symbol;
         TSymbol* symbol;
@@ -826,7 +820,7 @@ public:
                 ++thisDepth;
                 ++thisDepth;
             symbol = table[level]->find(name);
             symbol = table[level]->find(name);
             --level;
             --level;
-        } while (symbol == 0 && level >= 0);
+        } while (symbol == nullptr && level >= 0);
 
 
         if (! table[level + 1]->isThisLevel())
         if (! table[level + 1]->isThisLevel())
             thisDepth = 0;
             thisDepth = 0;
@@ -884,6 +878,12 @@ public:
             table[level]->setFunctionExtensions(name, num, extensions);
             table[level]->setFunctionExtensions(name, num, extensions);
     }
     }
 
 
+    void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[])
+    {
+        for (unsigned int level = 0; level < table.size(); ++level)
+            table[level]->setSingleFunctionExtensions(name, num, extensions);
+    }
+
     void setVariableExtensions(const char* name, int numExts, const char* const extensions[])
     void setVariableExtensions(const char* name, int numExts, const char* const extensions[])
     {
     {
         TSymbol* symbol = find(TString(name));
         TSymbol* symbol = find(TString(name));
@@ -911,9 +911,7 @@ public:
     }
     }
 
 
     long long getMaxSymbolId() { return uniqueId; }
     long long getMaxSymbolId() { return uniqueId; }
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     void dump(TInfoSink& infoSink, bool complete = false) const;
     void dump(TInfoSink& infoSink, bool complete = false) const;
-#endif
     void copyTable(const TSymbolTable& copyOf);
     void copyTable(const TSymbolTable& copyOf);
 
 
     void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }
     void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }

+ 87 - 42
src/libraries/glslang/glslang/MachineIndependent/Versions.cpp

@@ -151,8 +151,6 @@
 
 
 namespace glslang {
 namespace glslang {
 
 
-#ifndef GLSLANG_WEB
-
 //
 //
 // Initialize all extensions, almost always to 'disable', as once their features
 // Initialize all extensions, almost always to 'disable', as once their features
 // are incorporated into a core version, their features are supported through allowing that
 // are incorporated into a core version, their features are supported through allowing that
@@ -166,7 +164,8 @@ void TParseVersions::initializeExtensionBehavior()
     } extensionData;
     } extensionData;
 
 
     const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4},
     const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4},
-                                   {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}
+                                   {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4},
+                                   {E_GL_EXT_mesh_shader, EShTargetSpv_1_4}
                                  };
                                  };
 
 
     for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
     for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
@@ -183,7 +182,6 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_OES_EGL_image_external_essl3]     = EBhDisable;
     extensionBehavior[E_GL_OES_EGL_image_external_essl3]     = EBhDisable;
     extensionBehavior[E_GL_EXT_YUV_target]                   = EBhDisable;
     extensionBehavior[E_GL_EXT_YUV_target]                   = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_texture_lod]           = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_texture_lod]           = EBhDisable;
-    extensionBehavior[E_GL_EXT_texture_array]                = EBhDisable;
     extensionBehavior[E_GL_EXT_shadow_samplers]              = EBhDisable;
     extensionBehavior[E_GL_EXT_shadow_samplers]              = EBhDisable;
     extensionBehavior[E_GL_ARB_texture_rectangle]            = EBhDisable;
     extensionBehavior[E_GL_ARB_texture_rectangle]            = EBhDisable;
     extensionBehavior[E_GL_3DL_array_objects]                = EBhDisable;
     extensionBehavior[E_GL_3DL_array_objects]                = EBhDisable;
@@ -227,6 +225,7 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_ARB_texture_query_lod]            = EBhDisable;
     extensionBehavior[E_GL_ARB_texture_query_lod]            = EBhDisable;
     extensionBehavior[E_GL_ARB_vertex_attrib_64bit]          = EBhDisable;
     extensionBehavior[E_GL_ARB_vertex_attrib_64bit]          = EBhDisable;
     extensionBehavior[E_GL_ARB_draw_instanced]               = EBhDisable;
     extensionBehavior[E_GL_ARB_draw_instanced]               = EBhDisable;
+    extensionBehavior[E_GL_ARB_bindless_texture]             = EBhDisable;
     extensionBehavior[E_GL_ARB_fragment_coord_conventions]   = EBhDisable;
     extensionBehavior[E_GL_ARB_fragment_coord_conventions]   = EBhDisable;
 
 
 
 
@@ -260,6 +259,10 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_EXT_shader_8bit_storage]                     = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_8bit_storage]                     = EBhDisable;
     extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow]           = EBhDisable;
     extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow]           = EBhDisable;
 
 
+    extensionBehavior[E_GL_EXT_fragment_shader_barycentric]             = EBhDisable;
+
+    extensionBehavior[E_GL_KHR_cooperative_matrix]                      = EBhDisable;
+
     // #line and #include
     // #line and #include
     extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive]          = EBhDisable;
     extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive]          = EBhDisable;
     extensionBehavior[E_GL_GOOGLE_include_directive]                 = EBhDisable;
     extensionBehavior[E_GL_GOOGLE_include_directive]                 = EBhDisable;
@@ -274,6 +277,7 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_AMD_shader_image_load_store_lod]          = EBhDisable;
     extensionBehavior[E_GL_AMD_shader_image_load_store_lod]          = EBhDisable;
     extensionBehavior[E_GL_AMD_shader_fragment_mask]                 = EBhDisable;
     extensionBehavior[E_GL_AMD_shader_fragment_mask]                 = EBhDisable;
     extensionBehavior[E_GL_AMD_gpu_shader_half_float_fetch]          = EBhDisable;
     extensionBehavior[E_GL_AMD_gpu_shader_half_float_fetch]          = EBhDisable;
+    extensionBehavior[E_GL_AMD_shader_early_and_late_fragment_tests] = EBhDisable;
 
 
     extensionBehavior[E_GL_INTEL_shader_integer_functions2]          = EBhDisable;
     extensionBehavior[E_GL_INTEL_shader_integer_functions2]          = EBhDisable;
 
 
@@ -293,10 +297,17 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_NV_compute_shader_derivatives]            = EBhDisable;
     extensionBehavior[E_GL_NV_compute_shader_derivatives]            = EBhDisable;
     extensionBehavior[E_GL_NV_shader_texture_footprint]              = EBhDisable;
     extensionBehavior[E_GL_NV_shader_texture_footprint]              = EBhDisable;
     extensionBehavior[E_GL_NV_mesh_shader]                           = EBhDisable;
     extensionBehavior[E_GL_NV_mesh_shader]                           = EBhDisable;
-
     extensionBehavior[E_GL_NV_cooperative_matrix]                    = EBhDisable;
     extensionBehavior[E_GL_NV_cooperative_matrix]                    = EBhDisable;
     extensionBehavior[E_GL_NV_shader_sm_builtins]                    = EBhDisable;
     extensionBehavior[E_GL_NV_shader_sm_builtins]                    = EBhDisable;
     extensionBehavior[E_GL_NV_integer_cooperative_matrix]            = EBhDisable;
     extensionBehavior[E_GL_NV_integer_cooperative_matrix]            = EBhDisable;
+    extensionBehavior[E_GL_NV_shader_invocation_reorder]             = EBhDisable;
+    extensionBehavior[E_GL_NV_displacement_micromap]                 = EBhDisable;
+
+    // ARM
+    extensionBehavior[E_GL_ARM_shader_core_builtins]                 = EBhDisable;
+
+    // QCOM
+    extensionBehavior[E_GL_QCOM_image_processing]                    = EBhDisable;
 
 
     // AEP
     // AEP
     extensionBehavior[E_GL_ANDROID_extension_pack_es31a]             = EBhDisable;
     extensionBehavior[E_GL_ANDROID_extension_pack_es31a]             = EBhDisable;
@@ -335,13 +346,21 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_EXT_ray_tracing]                 = EBhDisable;
     extensionBehavior[E_GL_EXT_ray_tracing]                 = EBhDisable;
     extensionBehavior[E_GL_EXT_ray_query]                   = EBhDisable;
     extensionBehavior[E_GL_EXT_ray_query]                   = EBhDisable;
     extensionBehavior[E_GL_EXT_ray_flags_primitive_culling] = EBhDisable;
     extensionBehavior[E_GL_EXT_ray_flags_primitive_culling] = EBhDisable;
+    extensionBehavior[E_GL_EXT_ray_cull_mask]               = EBhDisable;
     extensionBehavior[E_GL_EXT_blend_func_extended]         = EBhDisable;
     extensionBehavior[E_GL_EXT_blend_func_extended]         = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable;
     extensionBehavior[E_GL_EXT_fragment_shading_rate]       = EBhDisable;
     extensionBehavior[E_GL_EXT_fragment_shading_rate]       = EBhDisable;
-    extensionBehavior[E_GL_EXT_shader_image_int64]   = EBhDisable;
+    extensionBehavior[E_GL_EXT_shader_image_int64]          = EBhDisable;
     extensionBehavior[E_GL_EXT_terminate_invocation]        = EBhDisable;
     extensionBehavior[E_GL_EXT_terminate_invocation]        = EBhDisable;
     extensionBehavior[E_GL_EXT_shared_memory_block]         = EBhDisable;
     extensionBehavior[E_GL_EXT_shared_memory_block]         = EBhDisable;
     extensionBehavior[E_GL_EXT_spirv_intrinsics]            = EBhDisable;
     extensionBehavior[E_GL_EXT_spirv_intrinsics]            = EBhDisable;
+    extensionBehavior[E_GL_EXT_mesh_shader]                 = EBhDisable;
+    extensionBehavior[E_GL_EXT_opacity_micromap]            = EBhDisable;
+    extensionBehavior[E_GL_EXT_ray_tracing_position_fetch]  = EBhDisable;
+    extensionBehavior[E_GL_EXT_shader_tile_image]           = EBhDisable;
+    extensionBehavior[E_GL_EXT_texture_shadow_lod]          = EBhDisable;
+    extensionBehavior[E_GL_EXT_draw_instanced]              = EBhDisable;
+    extensionBehavior[E_GL_EXT_texture_array]               = EBhDisable;
 
 
     // OVR extensions
     // OVR extensions
     extensionBehavior[E_GL_OVR_multiview]                = EBhDisable;
     extensionBehavior[E_GL_OVR_multiview]                = EBhDisable;
@@ -364,9 +383,10 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_atomic_float]                    = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_atomic_float]                    = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_atomic_float2]                   = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_atomic_float2]                   = EBhDisable;
-}
 
 
-#endif // GLSLANG_WEB
+    // Record extensions not for spv.
+    spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture);
+}
 
 
 // Get code that is not part of a shared symbol table, is specific to this shader,
 // 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).
 // or needed by the preprocessor (which does not use a shared symbol table).
@@ -376,10 +396,6 @@ void TParseVersions::getPreamble(std::string& preamble)
         preamble =
         preamble =
             "#define GL_ES 1\n"
             "#define GL_ES 1\n"
             "#define GL_FRAGMENT_PRECISION_HIGH 1\n"
             "#define GL_FRAGMENT_PRECISION_HIGH 1\n"
-#ifdef GLSLANG_WEB
-            ;
-#else
-            "#define GL_EXT_texture_array 1\n"
             "#define GL_OES_texture_3D 1\n"
             "#define GL_OES_texture_3D 1\n"
             "#define GL_OES_standard_derivatives 1\n"
             "#define GL_OES_standard_derivatives 1\n"
             "#define GL_EXT_frag_depth 1\n"
             "#define GL_EXT_frag_depth 1\n"
@@ -389,6 +405,7 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_EXT_shader_texture_lod 1\n"
             "#define GL_EXT_shader_texture_lod 1\n"
             "#define GL_EXT_shadow_samplers 1\n"
             "#define GL_EXT_shadow_samplers 1\n"
             "#define GL_EXT_fragment_shading_rate 1\n"
             "#define GL_EXT_fragment_shading_rate 1\n"
+            "#define GL_EXT_texture_array 1\n"
 
 
             // AEP
             // AEP
             "#define GL_ANDROID_extension_pack_es31a 1\n"
             "#define GL_ANDROID_extension_pack_es31a 1\n"
@@ -420,6 +437,8 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_OES_texture_buffer 1\n"
             "#define GL_OES_texture_buffer 1\n"
             "#define GL_OES_texture_cube_map_array 1\n"
             "#define GL_OES_texture_cube_map_array 1\n"
             "#define GL_EXT_shader_non_constant_global_initializers 1\n"
             "#define GL_EXT_shader_non_constant_global_initializers 1\n"
+
+            "#define GL_QCOM_image_processing 1\n"
             ;
             ;
 
 
             if (version >= 300) {
             if (version >= 300) {
@@ -432,8 +451,6 @@ void TParseVersions::getPreamble(std::string& preamble)
 
 
     } else { // !isEsProfile()
     } else { // !isEsProfile()
         preamble =
         preamble =
-            "#define GL_FRAGMENT_PRECISION_HIGH 1\n"
-            "#define GL_EXT_texture_array 1\n"
             "#define GL_ARB_texture_rectangle 1\n"
             "#define GL_ARB_texture_rectangle 1\n"
             "#define GL_ARB_shading_language_420pack 1\n"
             "#define GL_ARB_shading_language_420pack 1\n"
             "#define GL_ARB_texture_gather 1\n"
             "#define GL_ARB_texture_gather 1\n"
@@ -473,6 +490,7 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_ARB_vertex_attrib_64bit 1\n"
             "#define GL_ARB_vertex_attrib_64bit 1\n"
             "#define GL_ARB_draw_instanced 1\n"
             "#define GL_ARB_draw_instanced 1\n"
             "#define GL_ARB_fragment_coord_conventions 1\n"
             "#define GL_ARB_fragment_coord_conventions 1\n"
+
             "#define GL_EXT_shader_non_constant_global_initializers 1\n"
             "#define GL_EXT_shader_non_constant_global_initializers 1\n"
             "#define GL_EXT_shader_image_load_formatted 1\n"
             "#define GL_EXT_shader_image_load_formatted 1\n"
             "#define GL_EXT_post_depth_coverage 1\n"
             "#define GL_EXT_post_depth_coverage 1\n"
@@ -502,13 +520,18 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_KHR_shader_subgroup_clustered 1\n"
             "#define GL_KHR_shader_subgroup_clustered 1\n"
             "#define GL_KHR_shader_subgroup_quad 1\n"
             "#define GL_KHR_shader_subgroup_quad 1\n"
 
 
+            "#define GL_KHR_cooperative_matrix 1\n"
+
             "#define GL_EXT_shader_image_int64 1\n"
             "#define GL_EXT_shader_image_int64 1\n"
             "#define GL_EXT_shader_atomic_int64 1\n"
             "#define GL_EXT_shader_atomic_int64 1\n"
             "#define GL_EXT_shader_realtime_clock 1\n"
             "#define GL_EXT_shader_realtime_clock 1\n"
             "#define GL_EXT_ray_tracing 1\n"
             "#define GL_EXT_ray_tracing 1\n"
             "#define GL_EXT_ray_query 1\n"
             "#define GL_EXT_ray_query 1\n"
             "#define GL_EXT_ray_flags_primitive_culling 1\n"
             "#define GL_EXT_ray_flags_primitive_culling 1\n"
+            "#define GL_EXT_ray_cull_mask 1\n"
+            "#define GL_EXT_ray_tracing_position_fetch 1\n"
             "#define GL_EXT_spirv_intrinsics 1\n"
             "#define GL_EXT_spirv_intrinsics 1\n"
+            "#define GL_EXT_mesh_shader 1\n"
 
 
             "#define GL_AMD_shader_ballot 1\n"
             "#define GL_AMD_shader_ballot 1\n"
             "#define GL_AMD_shader_trinary_minmax 1\n"
             "#define GL_AMD_shader_trinary_minmax 1\n"
@@ -538,6 +561,9 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_NV_mesh_shader 1\n"
             "#define GL_NV_mesh_shader 1\n"
             "#define GL_NV_cooperative_matrix 1\n"
             "#define GL_NV_cooperative_matrix 1\n"
             "#define GL_NV_integer_cooperative_matrix 1\n"
             "#define GL_NV_integer_cooperative_matrix 1\n"
+            "#define GL_NV_shader_invocation_reorder 1\n"
+
+            "#define GL_QCOM_image_processing 1\n"
 
 
             "#define GL_EXT_shader_explicit_arithmetic_types 1\n"
             "#define GL_EXT_shader_explicit_arithmetic_types 1\n"
             "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
             "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
@@ -555,8 +581,15 @@ void TParseVersions::getPreamble(std::string& preamble)
 
 
             "#define GL_EXT_shader_atomic_float 1\n"
             "#define GL_EXT_shader_atomic_float 1\n"
             "#define GL_EXT_shader_atomic_float2 1\n"
             "#define GL_EXT_shader_atomic_float2 1\n"
+
+            "#define GL_EXT_fragment_shader_barycentric 1\n"
+            "#define GL_EXT_texture_array 1\n"
             ;
             ;
 
 
+        if (spvVersion.spv == 0) {
+            preamble += "#define GL_ARB_bindless_texture 1\n";
+        }
+
         if (version >= 150) {
         if (version >= 150) {
             // define GL_core_profile and GL_compatibility_profile
             // define GL_core_profile and GL_compatibility_profile
             preamble += "#define GL_core_profile 1\n";
             preamble += "#define GL_core_profile 1\n";
@@ -568,10 +601,11 @@ void TParseVersions::getPreamble(std::string& preamble)
             preamble += "#define GL_EXT_null_initializer 1\n";
             preamble += "#define GL_EXT_null_initializer 1\n";
             preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
             preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
         }
         }
-#endif // GLSLANG_WEB
+        if (version >= 130) {
+            preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n";
+        }
     }
     }
 
 
-#ifndef GLSLANG_WEB
     if ((!isEsProfile() && version >= 140) ||
     if ((!isEsProfile() && version >= 140) ||
         (isEsProfile() && version >= 310)) {
         (isEsProfile() && version >= 310)) {
         preamble +=
         preamble +=
@@ -599,7 +633,6 @@ void TParseVersions::getPreamble(std::string& preamble)
     preamble +=
     preamble +=
             "#define GL_EXT_terminate_invocation 1\n"
             "#define GL_EXT_terminate_invocation 1\n"
             ;
             ;
-#endif
 
 
     // #define VULKAN XXXX
     // #define VULKAN XXXX
     const int numberBufSize = 12;
     const int numberBufSize = 12;
@@ -611,7 +644,6 @@ void TParseVersions::getPreamble(std::string& preamble)
         preamble += "\n";
         preamble += "\n";
     }
     }
 
 
-#ifndef GLSLANG_WEB
     // #define GL_SPIRV XXXX
     // #define GL_SPIRV XXXX
     if (spvVersion.openGl > 0) {
     if (spvVersion.openGl > 0) {
         preamble += "#define GL_SPIRV ";
         preamble += "#define GL_SPIRV ";
@@ -619,9 +651,7 @@ void TParseVersions::getPreamble(std::string& preamble)
         preamble += numberBuf;
         preamble += numberBuf;
         preamble += "\n";
         preamble += "\n";
     }
     }
-#endif
 
 
-#ifndef GLSLANG_WEB
     // GL_EXT_spirv_intrinsics
     // GL_EXT_spirv_intrinsics
     if (!isEsProfile()) {
     if (!isEsProfile()) {
         switch (language) {
         switch (language) {
@@ -637,12 +667,11 @@ void TParseVersions::getPreamble(std::string& preamble)
         case EShLangClosestHit:     preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n";           break;
         case EShLangClosestHit:     preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n";           break;
         case EShLangMiss:           preamble += "#define GL_MISS_SHADER_EXT 1 \n";                  break;
         case EShLangMiss:           preamble += "#define GL_MISS_SHADER_EXT 1 \n";                  break;
         case EShLangCallable:       preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n";              break;
         case EShLangCallable:       preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n";              break;
-        case EShLangTaskNV:         preamble += "#define GL_TASK_SHADER_NV 1 \n";                   break;
-        case EShLangMeshNV:         preamble += "#define GL_MESH_SHADER_NV 1 \n";                   break;
+        case EShLangTask:           preamble += "#define GL_TASK_SHADER_NV 1 \n";                   break;
+        case EShLangMesh:           preamble += "#define GL_MESH_SHADER_NV 1 \n";                   break;
         default:                                                                                    break;
         default:                                                                                    break;
         }
         }
     }
     }
-#endif
 }
 }
 
 
 //
 //
@@ -654,7 +683,6 @@ const char* StageName(EShLanguage stage)
     case EShLangVertex:         return "vertex";
     case EShLangVertex:         return "vertex";
     case EShLangFragment:       return "fragment";
     case EShLangFragment:       return "fragment";
     case EShLangCompute:        return "compute";
     case EShLangCompute:        return "compute";
-#ifndef GLSLANG_WEB
     case EShLangTessControl:    return "tessellation control";
     case EShLangTessControl:    return "tessellation control";
     case EShLangTessEvaluation: return "tessellation evaluation";
     case EShLangTessEvaluation: return "tessellation evaluation";
     case EShLangGeometry:       return "geometry";
     case EShLangGeometry:       return "geometry";
@@ -664,9 +692,8 @@ const char* StageName(EShLanguage stage)
     case EShLangClosestHit:     return "closest-hit";
     case EShLangClosestHit:     return "closest-hit";
     case EShLangMiss:           return "miss";
     case EShLangMiss:           return "miss";
     case EShLangCallable:       return "callable";
     case EShLangCallable:       return "callable";
-    case EShLangMeshNV:         return "mesh";
-    case EShLangTaskNV:         return "task";
-#endif
+    case EShLangMesh:           return "mesh";
+    case EShLangTask:           return "task";
     default:                    return "unknown stage";
     default:                    return "unknown stage";
     }
     }
 }
 }
@@ -691,7 +718,6 @@ void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, cons
     requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
     requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
 }
 }
 
 
-#ifndef GLSLANG_WEB
 //
 //
 // When to use requireProfile():
 // When to use requireProfile():
 //
 //
@@ -729,7 +755,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int
 {
 {
     if (profile & profileMask) {
     if (profile & profileMask) {
         bool okay = minVersion > 0 && version >= minVersion;
         bool okay = minVersion > 0 && version >= minVersion;
-#ifndef GLSLANG_WEB
         for (int i = 0; i < numExtensions; ++i) {
         for (int i = 0; i < numExtensions; ++i) {
             switch (getExtensionBehavior(extensions[i])) {
             switch (getExtensionBehavior(extensions[i])) {
             case EBhWarn:
             case EBhWarn:
@@ -742,7 +767,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int
             default: break; // some compilers want this
             default: break; // some compilers want this
             }
             }
         }
         }
-#endif
         if (! okay)
         if (! okay)
             error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
             error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
     }
     }
@@ -1056,10 +1080,22 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
 {
 {
     // GL_NV_mesh_shader extension is only allowed in task/mesh shaders
     // GL_NV_mesh_shader extension is only allowed in task/mesh shaders
     if (strcmp(extension, "GL_NV_mesh_shader") == 0) {
     if (strcmp(extension, "GL_NV_mesh_shader") == 0) {
-        requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask | EShLangFragmentMask),
+        requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
                      "#extension GL_NV_mesh_shader");
                      "#extension GL_NV_mesh_shader");
-        profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_NV_mesh_shader");
-        profileRequires(loc, EEsProfile, 320, 0, "#extension GL_NV_mesh_shader");
+        profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_NV_mesh_shader");
+        profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_NV_mesh_shader");
+        if (extensionTurnedOn(E_GL_EXT_mesh_shader)) {
+            error(loc, "GL_EXT_mesh_shader is already turned on, and not allowed with", "#extension", extension);
+        }
+    }
+    else if (strcmp(extension, "GL_EXT_mesh_shader") == 0) {
+        requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
+                     "#extension GL_EXT_mesh_shader");
+        profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_EXT_mesh_shader");
+        profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_EXT_mesh_shader");
+        if (extensionTurnedOn(E_GL_NV_mesh_shader)) {
+            error(loc, "GL_NV_mesh_shader is already turned on, and not allowed with", "#extension", extension);
+        }
     }
     }
 }
 }
 
 
@@ -1079,6 +1115,13 @@ void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const
             minSpvVersion = iter->second;
             minSpvVersion = iter->second;
         requireSpv(loc, extension, minSpvVersion);
         requireSpv(loc, extension, minSpvVersion);
     }
     }
+
+    if (spvVersion.spv != 0){
+        for (auto ext : spvUnsupportedExt){
+            if (strcmp(extension, ext.c_str()) == 0)
+                error(loc, "not allowed when using generating SPIR-V codes", extension, "");
+        }
+    }
 }
 }
 
 
 // Call for any operation needing full GLSL integer data-type support.
 // Call for any operation needing full GLSL integer data-type support.
@@ -1291,7 +1334,7 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil
     }
     }
 }
 }
 
 
-void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
+void TParseVersions::fcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn)
 {
 {
     if (!builtIn) {
     if (!builtIn) {
         const char* const extensions[] = {E_GL_NV_cooperative_matrix};
         const char* const extensions[] = {E_GL_NV_cooperative_matrix};
@@ -1299,14 +1342,22 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b
     }
     }
 }
 }
 
 
-void TParseVersions::intcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
+void TParseVersions::intcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn)
 {
 {
     if (!builtIn) {
     if (!builtIn) {
         const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix};
         const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix};
         requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
         requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
     }
     }
 }
 }
-#endif // GLSLANG_WEB
+
+void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
+{
+    if (!builtIn) {
+        const char* const extensions[] = {E_GL_KHR_cooperative_matrix};
+        requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
+    }
+}
+
 // Call for any operation removed because SPIR-V is in use.
 // Call for any operation removed because SPIR-V is in use.
 void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
 void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
 {
 {
@@ -1324,26 +1375,20 @@ void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
 // Call for any operation that requires Vulkan.
 // Call for any operation that requires Vulkan.
 void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op)
 void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op)
 {
 {
-#ifndef GLSLANG_WEB
     if (spvVersion.vulkan == 0)
     if (spvVersion.vulkan == 0)
         error(loc, "only allowed when using GLSL for Vulkan", op, "");
         error(loc, "only allowed when using GLSL for Vulkan", op, "");
-#endif
 }
 }
 
 
 // Call for any operation that requires SPIR-V.
 // Call for any operation that requires SPIR-V.
 void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
 void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
 {
 {
-#ifndef GLSLANG_WEB
     if (spvVersion.spv == 0)
     if (spvVersion.spv == 0)
         error(loc, "only allowed when generating SPIR-V", op, "");
         error(loc, "only allowed when generating SPIR-V", op, "");
-#endif
 }
 }
 void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version)
 void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version)
 {
 {
-#ifndef GLSLANG_WEB
     if (spvVersion.spv < version)
     if (spvVersion.spv < version)
         error(loc, "not supported for current targeted SPIR-V version", op, "");
         error(loc, "not supported for current targeted SPIR-V version", op, "");
-#endif
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 32 - 5
src/libraries/glslang/glslang/MachineIndependent/Versions.h

@@ -120,7 +120,6 @@ const char* const E_GL_EXT_YUV_target                   = "GL_EXT_YUV_target";
 const char* const E_GL_EXT_shader_texture_lod           = "GL_EXT_shader_texture_lod";
 const char* const E_GL_EXT_shader_texture_lod           = "GL_EXT_shader_texture_lod";
 const char* const E_GL_EXT_shadow_samplers              = "GL_EXT_shadow_samplers";
 const char* const E_GL_EXT_shadow_samplers              = "GL_EXT_shadow_samplers";
 
 
-const char* const E_GL_EXT_texture_array                = "GL_EXT_texture_array";
 const char* const E_GL_ARB_texture_rectangle            = "GL_ARB_texture_rectangle";
 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_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_shading_language_420pack     = "GL_ARB_shading_language_420pack";
@@ -164,6 +163,7 @@ const char* const E_GL_ARB_texture_query_lod            = "GL_ARB_texture_query_
 const char* const E_GL_ARB_vertex_attrib_64bit          = "GL_ARB_vertex_attrib_64bit";
 const char* const E_GL_ARB_vertex_attrib_64bit          = "GL_ARB_vertex_attrib_64bit";
 const char* const E_GL_ARB_draw_instanced               = "GL_ARB_draw_instanced";
 const char* const E_GL_ARB_draw_instanced               = "GL_ARB_draw_instanced";
 const char* const E_GL_ARB_fragment_coord_conventions   = "GL_ARB_fragment_coord_conventions";
 const char* const E_GL_ARB_fragment_coord_conventions   = "GL_ARB_fragment_coord_conventions";
+const char* const E_GL_ARB_bindless_texture             = "GL_ARB_bindless_texture";
 
 
 const char* const E_GL_KHR_shader_subgroup_basic            = "GL_KHR_shader_subgroup_basic";
 const char* const E_GL_KHR_shader_subgroup_basic            = "GL_KHR_shader_subgroup_basic";
 const char* const E_GL_KHR_shader_subgroup_vote             = "GL_KHR_shader_subgroup_vote";
 const char* const E_GL_KHR_shader_subgroup_vote             = "GL_KHR_shader_subgroup_vote";
@@ -174,6 +174,7 @@ const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_sub
 const char* const E_GL_KHR_shader_subgroup_clustered        = "GL_KHR_shader_subgroup_clustered";
 const char* const E_GL_KHR_shader_subgroup_clustered        = "GL_KHR_shader_subgroup_clustered";
 const char* const E_GL_KHR_shader_subgroup_quad             = "GL_KHR_shader_subgroup_quad";
 const char* const E_GL_KHR_shader_subgroup_quad             = "GL_KHR_shader_subgroup_quad";
 const char* const E_GL_KHR_memory_scope_semantics           = "GL_KHR_memory_scope_semantics";
 const char* const E_GL_KHR_memory_scope_semantics           = "GL_KHR_memory_scope_semantics";
+const char* const E_GL_KHR_cooperative_matrix               = "GL_KHR_cooperative_matrix";
 
 
 const char* const E_GL_EXT_shader_atomic_int64              = "GL_EXT_shader_atomic_int64";
 const char* const E_GL_EXT_shader_atomic_int64              = "GL_EXT_shader_atomic_int64";
 
 
@@ -202,6 +203,7 @@ const char* const E_GL_EXT_debug_printf                     = "GL_EXT_debug_prin
 const char* const E_GL_EXT_ray_tracing                      = "GL_EXT_ray_tracing";
 const char* const E_GL_EXT_ray_tracing                      = "GL_EXT_ray_tracing";
 const char* const E_GL_EXT_ray_query                        = "GL_EXT_ray_query";
 const char* const E_GL_EXT_ray_query                        = "GL_EXT_ray_query";
 const char* const E_GL_EXT_ray_flags_primitive_culling      = "GL_EXT_ray_flags_primitive_culling";
 const char* const E_GL_EXT_ray_flags_primitive_culling      = "GL_EXT_ray_flags_primitive_culling";
+const char* const E_GL_EXT_ray_cull_mask                    = "GL_EXT_ray_cull_mask";
 const char* const E_GL_EXT_blend_func_extended              = "GL_EXT_blend_func_extended";
 const char* const E_GL_EXT_blend_func_extended              = "GL_EXT_blend_func_extended";
 const char* const E_GL_EXT_shader_implicit_conversions      = "GL_EXT_shader_implicit_conversions";
 const char* const E_GL_EXT_shader_implicit_conversions      = "GL_EXT_shader_implicit_conversions";
 const char* const E_GL_EXT_fragment_shading_rate            = "GL_EXT_fragment_shading_rate";
 const char* const E_GL_EXT_fragment_shading_rate            = "GL_EXT_fragment_shading_rate";
@@ -210,12 +212,21 @@ const char* const E_GL_EXT_null_initializer                 = "GL_EXT_null_initi
 const char* const E_GL_EXT_shared_memory_block              = "GL_EXT_shared_memory_block";
 const char* const E_GL_EXT_shared_memory_block              = "GL_EXT_shared_memory_block";
 const char* const E_GL_EXT_subgroup_uniform_control_flow    = "GL_EXT_subgroup_uniform_control_flow";
 const char* const E_GL_EXT_subgroup_uniform_control_flow    = "GL_EXT_subgroup_uniform_control_flow";
 const char* const E_GL_EXT_spirv_intrinsics                 = "GL_EXT_spirv_intrinsics";
 const char* const E_GL_EXT_spirv_intrinsics                 = "GL_EXT_spirv_intrinsics";
+const char* const E_GL_EXT_fragment_shader_barycentric      = "GL_EXT_fragment_shader_barycentric";
+const char* const E_GL_EXT_mesh_shader                      = "GL_EXT_mesh_shader";
+const char* const E_GL_EXT_opacity_micromap                 = "GL_EXT_opacity_micromap";
+const char* const E_GL_EXT_draw_instanced                   = "GL_EXT_draw_instanced";
+const char* const E_GL_EXT_texture_array                    = "GL_EXT_texture_array";
 
 
 // Arrays of extensions for the above viewportEXTs duplications
 // Arrays of extensions for the above viewportEXTs duplications
 
 
 const char* const post_depth_coverageEXTs[] = { E_GL_ARB_post_depth_coverage, E_GL_EXT_post_depth_coverage };
 const char* const post_depth_coverageEXTs[] = { E_GL_ARB_post_depth_coverage, E_GL_EXT_post_depth_coverage };
 const int Num_post_depth_coverageEXTs = sizeof(post_depth_coverageEXTs) / sizeof(post_depth_coverageEXTs[0]);
 const int Num_post_depth_coverageEXTs = sizeof(post_depth_coverageEXTs) / sizeof(post_depth_coverageEXTs[0]);
 
 
+// Array of extensions to cover both extensions providing ray tracing capabilities.
+const char* const ray_tracing_EXTs[] = { E_GL_EXT_ray_query, E_GL_EXT_ray_tracing };
+const int Num_ray_tracing_EXTs = sizeof(ray_tracing_EXTs) / sizeof(ray_tracing_EXTs[0]);
+
 // OVR extensions
 // OVR extensions
 const char* const E_GL_OVR_multiview                    = "GL_OVR_multiview";
 const char* const E_GL_OVR_multiview                    = "GL_OVR_multiview";
 const char* const E_GL_OVR_multiview2                   = "GL_OVR_multiview2";
 const char* const E_GL_OVR_multiview2                   = "GL_OVR_multiview2";
@@ -237,6 +248,7 @@ const char* const E_GL_AMD_gpu_shader_int16                     = "GL_AMD_gpu_sh
 const char* const E_GL_AMD_shader_image_load_store_lod          = "GL_AMD_shader_image_load_store_lod";
 const char* const E_GL_AMD_shader_image_load_store_lod          = "GL_AMD_shader_image_load_store_lod";
 const char* const E_GL_AMD_shader_fragment_mask                 = "GL_AMD_shader_fragment_mask";
 const char* const E_GL_AMD_shader_fragment_mask                 = "GL_AMD_shader_fragment_mask";
 const char* const E_GL_AMD_gpu_shader_half_float_fetch          = "GL_AMD_gpu_shader_half_float_fetch";
 const char* const E_GL_AMD_gpu_shader_half_float_fetch          = "GL_AMD_gpu_shader_half_float_fetch";
+const char* const E_GL_AMD_shader_early_and_late_fragment_tests = "GL_AMD_shader_early_and_late_fragment_tests";
 
 
 const char* const E_GL_INTEL_shader_integer_functions2          = "GL_INTEL_shader_integer_functions2";
 const char* const E_GL_INTEL_shader_integer_functions2          = "GL_INTEL_shader_integer_functions2";
 
 
@@ -256,15 +268,23 @@ const char* const E_GL_NV_fragment_shader_barycentric           = "GL_NV_fragmen
 const char* const E_GL_NV_compute_shader_derivatives            = "GL_NV_compute_shader_derivatives";
 const char* const E_GL_NV_compute_shader_derivatives            = "GL_NV_compute_shader_derivatives";
 const char* const E_GL_NV_shader_texture_footprint              = "GL_NV_shader_texture_footprint";
 const char* const E_GL_NV_shader_texture_footprint              = "GL_NV_shader_texture_footprint";
 const char* const E_GL_NV_mesh_shader                           = "GL_NV_mesh_shader";
 const char* const E_GL_NV_mesh_shader                           = "GL_NV_mesh_shader";
+const char* const E_GL_NV_cooperative_matrix                    = "GL_NV_cooperative_matrix";
+const char* const E_GL_NV_shader_sm_builtins                    = "GL_NV_shader_sm_builtins";
+const char* const E_GL_NV_integer_cooperative_matrix            = "GL_NV_integer_cooperative_matrix";
+const char* const E_GL_NV_shader_invocation_reorder             = "GL_NV_shader_invocation_reorder";
+const char* const E_GL_EXT_ray_tracing_position_fetch           = "GL_EXT_ray_tracing_position_fetch";
+const char* const E_GL_NV_displacement_micromap                 = "GL_NV_displacement_micromap";
+
+// ARM
+const char* const E_GL_ARM_shader_core_builtins                 = "GL_ARM_shader_core_builtins";
 
 
 // Arrays of extensions for the above viewportEXTs duplications
 // Arrays of extensions for the above viewportEXTs duplications
 
 
 const char* const viewportEXTs[] = { E_GL_ARB_shader_viewport_layer_array, E_GL_NV_viewport_array2 };
 const char* const viewportEXTs[] = { E_GL_ARB_shader_viewport_layer_array, E_GL_NV_viewport_array2 };
 const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]);
 const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]);
 
 
-const char* const E_GL_NV_cooperative_matrix                    = "GL_NV_cooperative_matrix";
-const char* const E_GL_NV_shader_sm_builtins                    = "GL_NV_shader_sm_builtins";
-const char* const E_GL_NV_integer_cooperative_matrix            = "GL_NV_integer_cooperative_matrix";
+
+const char* const E_GL_QCOM_image_processing                    = "GL_QCOM_image_processing";
 
 
 // AEP
 // AEP
 const char* const E_GL_ANDROID_extension_pack_es31a             = "GL_ANDROID_extension_pack_es31a";
 const char* const E_GL_ANDROID_extension_pack_es31a             = "GL_ANDROID_extension_pack_es31a";
@@ -282,7 +302,7 @@ const char* const E_GL_EXT_tessellation_shader                  = "GL_EXT_tessel
 const char* const E_GL_EXT_tessellation_point_size              = "GL_EXT_tessellation_point_size";
 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_buffer                       = "GL_EXT_texture_buffer";
 const char* const E_GL_EXT_texture_cube_map_array               = "GL_EXT_texture_cube_map_array";
 const char* const E_GL_EXT_texture_cube_map_array               = "GL_EXT_texture_cube_map_array";
-const char* const E_GL_EXT_shader_integer_mix                   = "GL_EXT_shader_integer_mix"; 
+const char* const E_GL_EXT_shader_integer_mix                   = "GL_EXT_shader_integer_mix";
 
 
 // OES matching AEP
 // OES matching AEP
 const char* const E_GL_OES_geometry_shader                      = "GL_OES_geometry_shader";
 const char* const E_GL_OES_geometry_shader                      = "GL_OES_geometry_shader";
@@ -314,6 +334,10 @@ const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation";
 const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
 const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
 const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
 const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
 
 
+const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image";
+
+const char* const E_GL_EXT_texture_shadow_lod = "GL_EXT_texture_shadow_lod";
+
 // Arrays of extensions for the above AEP duplications
 // 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 char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
@@ -343,6 +367,9 @@ const int Num_AEP_texture_buffer = sizeof(AEP_texture_buffer)/sizeof(AEP_texture
 const char* const AEP_texture_cube_map_array[] = { E_GL_EXT_texture_cube_map_array, E_GL_OES_texture_cube_map_array };
 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]);
 const int Num_AEP_texture_cube_map_array = sizeof(AEP_texture_cube_map_array)/sizeof(AEP_texture_cube_map_array[0]);
 
 
+const char* const AEP_mesh_shader[] = { E_GL_NV_mesh_shader, E_GL_EXT_mesh_shader };
+const int Num_AEP_mesh_shader = sizeof(AEP_mesh_shader)/sizeof(AEP_mesh_shader[0]);
+
 } // end namespace glslang
 } // end namespace glslang
 
 
 #endif // _VERSIONS_INCLUDED_
 #endif // _VERSIONS_INCLUDED_

+ 3 - 4
src/libraries/glslang/glslang/MachineIndependent/attribute.cpp

@@ -34,8 +34,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#ifndef GLSLANG_WEB
-
 #include "attribute.h"
 #include "attribute.h"
 #include "../Include/intermediate.h"
 #include "../Include/intermediate.h"
 #include "ParseHelper.h"
 #include "ParseHelper.h"
@@ -125,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const
         return EatPartialCount;
         return EatPartialCount;
     else if (name == "subgroup_uniform_control_flow")
     else if (name == "subgroup_uniform_control_flow")
         return EatSubgroupUniformControlFlow;
         return EatSubgroupUniformControlFlow;
+    else if (name == "export")
+        return EatExport;
     else
     else
         return EatNone;
         return EatNone;
 }
 }
@@ -357,6 +357,7 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri
 
 
         switch (it->name) {
         switch (it->name) {
         case EatSubgroupUniformControlFlow:
         case EatSubgroupUniformControlFlow:
+            requireExtensions(loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
             intermediate.setSubgroupUniformControlFlow();
             intermediate.setSubgroupUniformControlFlow();
             break;
             break;
         default:
         default:
@@ -367,5 +368,3 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // GLSLANG_WEB

+ 1 - 0
src/libraries/glslang/glslang/MachineIndependent/attribute.h

@@ -120,6 +120,7 @@ namespace glslang {
         EatNonWritable,
         EatNonWritable,
         EatNonReadable,
         EatNonReadable,
         EatSubgroupUniformControlFlow,
         EatSubgroupUniformControlFlow,
+        EatExport,
     };
     };
 
 
     class TIntermAggregate;
     class TIntermAggregate;

File diff suppressed because it is too large
+ 542 - 517
src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp


+ 307 - 295
src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h

@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.7.4.  */
+/* A Bison parser, made by GNU Bison 3.8.2.  */
 
 
 /* Bison interface for Yacc-like parsers in C
 /* Bison interface for Yacc-like parsers in C
 
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
    Inc.
    Inc.
 
 
    This program is free software: you can redistribute it and/or modify
    This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
    GNU General Public License for more details.
 
 
    You should have received a copy of the GNU General Public License
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 /* As a special exception, you may create a larger work that contains
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    part or all of the Bison parser skeleton and distribute that work
@@ -217,295 +217,305 @@ extern int yydebug;
     FCOOPMATNV = 418,              /* FCOOPMATNV  */
     FCOOPMATNV = 418,              /* FCOOPMATNV  */
     ICOOPMATNV = 419,              /* ICOOPMATNV  */
     ICOOPMATNV = 419,              /* ICOOPMATNV  */
     UCOOPMATNV = 420,              /* UCOOPMATNV  */
     UCOOPMATNV = 420,              /* UCOOPMATNV  */
-    SAMPLERCUBEARRAY = 421,        /* SAMPLERCUBEARRAY  */
-    SAMPLERCUBEARRAYSHADOW = 422,  /* SAMPLERCUBEARRAYSHADOW  */
-    ISAMPLERCUBEARRAY = 423,       /* ISAMPLERCUBEARRAY  */
-    USAMPLERCUBEARRAY = 424,       /* USAMPLERCUBEARRAY  */
-    SAMPLER1D = 425,               /* SAMPLER1D  */
-    SAMPLER1DARRAY = 426,          /* SAMPLER1DARRAY  */
-    SAMPLER1DARRAYSHADOW = 427,    /* SAMPLER1DARRAYSHADOW  */
-    ISAMPLER1D = 428,              /* ISAMPLER1D  */
-    SAMPLER1DSHADOW = 429,         /* SAMPLER1DSHADOW  */
-    SAMPLER2DRECT = 430,           /* SAMPLER2DRECT  */
-    SAMPLER2DRECTSHADOW = 431,     /* SAMPLER2DRECTSHADOW  */
-    ISAMPLER2DRECT = 432,          /* ISAMPLER2DRECT  */
-    USAMPLER2DRECT = 433,          /* USAMPLER2DRECT  */
-    SAMPLERBUFFER = 434,           /* SAMPLERBUFFER  */
-    ISAMPLERBUFFER = 435,          /* ISAMPLERBUFFER  */
-    USAMPLERBUFFER = 436,          /* USAMPLERBUFFER  */
-    SAMPLER2DMS = 437,             /* SAMPLER2DMS  */
-    ISAMPLER2DMS = 438,            /* ISAMPLER2DMS  */
-    USAMPLER2DMS = 439,            /* USAMPLER2DMS  */
-    SAMPLER2DMSARRAY = 440,        /* SAMPLER2DMSARRAY  */
-    ISAMPLER2DMSARRAY = 441,       /* ISAMPLER2DMSARRAY  */
-    USAMPLER2DMSARRAY = 442,       /* USAMPLER2DMSARRAY  */
-    SAMPLEREXTERNALOES = 443,      /* SAMPLEREXTERNALOES  */
-    SAMPLEREXTERNAL2DY2YEXT = 444, /* SAMPLEREXTERNAL2DY2YEXT  */
-    ISAMPLER1DARRAY = 445,         /* ISAMPLER1DARRAY  */
-    USAMPLER1D = 446,              /* USAMPLER1D  */
-    USAMPLER1DARRAY = 447,         /* USAMPLER1DARRAY  */
-    F16SAMPLER1D = 448,            /* F16SAMPLER1D  */
-    F16SAMPLER2D = 449,            /* F16SAMPLER2D  */
-    F16SAMPLER3D = 450,            /* F16SAMPLER3D  */
-    F16SAMPLER2DRECT = 451,        /* F16SAMPLER2DRECT  */
-    F16SAMPLERCUBE = 452,          /* F16SAMPLERCUBE  */
-    F16SAMPLER1DARRAY = 453,       /* F16SAMPLER1DARRAY  */
-    F16SAMPLER2DARRAY = 454,       /* F16SAMPLER2DARRAY  */
-    F16SAMPLERCUBEARRAY = 455,     /* F16SAMPLERCUBEARRAY  */
-    F16SAMPLERBUFFER = 456,        /* F16SAMPLERBUFFER  */
-    F16SAMPLER2DMS = 457,          /* F16SAMPLER2DMS  */
-    F16SAMPLER2DMSARRAY = 458,     /* F16SAMPLER2DMSARRAY  */
-    F16SAMPLER1DSHADOW = 459,      /* F16SAMPLER1DSHADOW  */
-    F16SAMPLER2DSHADOW = 460,      /* F16SAMPLER2DSHADOW  */
-    F16SAMPLER1DARRAYSHADOW = 461, /* F16SAMPLER1DARRAYSHADOW  */
-    F16SAMPLER2DARRAYSHADOW = 462, /* F16SAMPLER2DARRAYSHADOW  */
-    F16SAMPLER2DRECTSHADOW = 463,  /* F16SAMPLER2DRECTSHADOW  */
-    F16SAMPLERCUBESHADOW = 464,    /* F16SAMPLERCUBESHADOW  */
-    F16SAMPLERCUBEARRAYSHADOW = 465, /* F16SAMPLERCUBEARRAYSHADOW  */
-    IMAGE1D = 466,                 /* IMAGE1D  */
-    IIMAGE1D = 467,                /* IIMAGE1D  */
-    UIMAGE1D = 468,                /* UIMAGE1D  */
-    IMAGE2D = 469,                 /* IMAGE2D  */
-    IIMAGE2D = 470,                /* IIMAGE2D  */
-    UIMAGE2D = 471,                /* UIMAGE2D  */
-    IMAGE3D = 472,                 /* IMAGE3D  */
-    IIMAGE3D = 473,                /* IIMAGE3D  */
-    UIMAGE3D = 474,                /* UIMAGE3D  */
-    IMAGE2DRECT = 475,             /* IMAGE2DRECT  */
-    IIMAGE2DRECT = 476,            /* IIMAGE2DRECT  */
-    UIMAGE2DRECT = 477,            /* UIMAGE2DRECT  */
-    IMAGECUBE = 478,               /* IMAGECUBE  */
-    IIMAGECUBE = 479,              /* IIMAGECUBE  */
-    UIMAGECUBE = 480,              /* UIMAGECUBE  */
-    IMAGEBUFFER = 481,             /* IMAGEBUFFER  */
-    IIMAGEBUFFER = 482,            /* IIMAGEBUFFER  */
-    UIMAGEBUFFER = 483,            /* UIMAGEBUFFER  */
-    IMAGE1DARRAY = 484,            /* IMAGE1DARRAY  */
-    IIMAGE1DARRAY = 485,           /* IIMAGE1DARRAY  */
-    UIMAGE1DARRAY = 486,           /* UIMAGE1DARRAY  */
-    IMAGE2DARRAY = 487,            /* IMAGE2DARRAY  */
-    IIMAGE2DARRAY = 488,           /* IIMAGE2DARRAY  */
-    UIMAGE2DARRAY = 489,           /* UIMAGE2DARRAY  */
-    IMAGECUBEARRAY = 490,          /* IMAGECUBEARRAY  */
-    IIMAGECUBEARRAY = 491,         /* IIMAGECUBEARRAY  */
-    UIMAGECUBEARRAY = 492,         /* UIMAGECUBEARRAY  */
-    IMAGE2DMS = 493,               /* IMAGE2DMS  */
-    IIMAGE2DMS = 494,              /* IIMAGE2DMS  */
-    UIMAGE2DMS = 495,              /* UIMAGE2DMS  */
-    IMAGE2DMSARRAY = 496,          /* IMAGE2DMSARRAY  */
-    IIMAGE2DMSARRAY = 497,         /* IIMAGE2DMSARRAY  */
-    UIMAGE2DMSARRAY = 498,         /* UIMAGE2DMSARRAY  */
-    F16IMAGE1D = 499,              /* F16IMAGE1D  */
-    F16IMAGE2D = 500,              /* F16IMAGE2D  */
-    F16IMAGE3D = 501,              /* F16IMAGE3D  */
-    F16IMAGE2DRECT = 502,          /* F16IMAGE2DRECT  */
-    F16IMAGECUBE = 503,            /* F16IMAGECUBE  */
-    F16IMAGE1DARRAY = 504,         /* F16IMAGE1DARRAY  */
-    F16IMAGE2DARRAY = 505,         /* F16IMAGE2DARRAY  */
-    F16IMAGECUBEARRAY = 506,       /* F16IMAGECUBEARRAY  */
-    F16IMAGEBUFFER = 507,          /* F16IMAGEBUFFER  */
-    F16IMAGE2DMS = 508,            /* F16IMAGE2DMS  */
-    F16IMAGE2DMSARRAY = 509,       /* F16IMAGE2DMSARRAY  */
-    I64IMAGE1D = 510,              /* I64IMAGE1D  */
-    U64IMAGE1D = 511,              /* U64IMAGE1D  */
-    I64IMAGE2D = 512,              /* I64IMAGE2D  */
-    U64IMAGE2D = 513,              /* U64IMAGE2D  */
-    I64IMAGE3D = 514,              /* I64IMAGE3D  */
-    U64IMAGE3D = 515,              /* U64IMAGE3D  */
-    I64IMAGE2DRECT = 516,          /* I64IMAGE2DRECT  */
-    U64IMAGE2DRECT = 517,          /* U64IMAGE2DRECT  */
-    I64IMAGECUBE = 518,            /* I64IMAGECUBE  */
-    U64IMAGECUBE = 519,            /* U64IMAGECUBE  */
-    I64IMAGEBUFFER = 520,          /* I64IMAGEBUFFER  */
-    U64IMAGEBUFFER = 521,          /* U64IMAGEBUFFER  */
-    I64IMAGE1DARRAY = 522,         /* I64IMAGE1DARRAY  */
-    U64IMAGE1DARRAY = 523,         /* U64IMAGE1DARRAY  */
-    I64IMAGE2DARRAY = 524,         /* I64IMAGE2DARRAY  */
-    U64IMAGE2DARRAY = 525,         /* U64IMAGE2DARRAY  */
-    I64IMAGECUBEARRAY = 526,       /* I64IMAGECUBEARRAY  */
-    U64IMAGECUBEARRAY = 527,       /* U64IMAGECUBEARRAY  */
-    I64IMAGE2DMS = 528,            /* I64IMAGE2DMS  */
-    U64IMAGE2DMS = 529,            /* U64IMAGE2DMS  */
-    I64IMAGE2DMSARRAY = 530,       /* I64IMAGE2DMSARRAY  */
-    U64IMAGE2DMSARRAY = 531,       /* U64IMAGE2DMSARRAY  */
-    TEXTURECUBEARRAY = 532,        /* TEXTURECUBEARRAY  */
-    ITEXTURECUBEARRAY = 533,       /* ITEXTURECUBEARRAY  */
-    UTEXTURECUBEARRAY = 534,       /* UTEXTURECUBEARRAY  */
-    TEXTURE1D = 535,               /* TEXTURE1D  */
-    ITEXTURE1D = 536,              /* ITEXTURE1D  */
-    UTEXTURE1D = 537,              /* UTEXTURE1D  */
-    TEXTURE1DARRAY = 538,          /* TEXTURE1DARRAY  */
-    ITEXTURE1DARRAY = 539,         /* ITEXTURE1DARRAY  */
-    UTEXTURE1DARRAY = 540,         /* UTEXTURE1DARRAY  */
-    TEXTURE2DRECT = 541,           /* TEXTURE2DRECT  */
-    ITEXTURE2DRECT = 542,          /* ITEXTURE2DRECT  */
-    UTEXTURE2DRECT = 543,          /* UTEXTURE2DRECT  */
-    TEXTUREBUFFER = 544,           /* TEXTUREBUFFER  */
-    ITEXTUREBUFFER = 545,          /* ITEXTUREBUFFER  */
-    UTEXTUREBUFFER = 546,          /* UTEXTUREBUFFER  */
-    TEXTURE2DMS = 547,             /* TEXTURE2DMS  */
-    ITEXTURE2DMS = 548,            /* ITEXTURE2DMS  */
-    UTEXTURE2DMS = 549,            /* UTEXTURE2DMS  */
-    TEXTURE2DMSARRAY = 550,        /* TEXTURE2DMSARRAY  */
-    ITEXTURE2DMSARRAY = 551,       /* ITEXTURE2DMSARRAY  */
-    UTEXTURE2DMSARRAY = 552,       /* UTEXTURE2DMSARRAY  */
-    F16TEXTURE1D = 553,            /* F16TEXTURE1D  */
-    F16TEXTURE2D = 554,            /* F16TEXTURE2D  */
-    F16TEXTURE3D = 555,            /* F16TEXTURE3D  */
-    F16TEXTURE2DRECT = 556,        /* F16TEXTURE2DRECT  */
-    F16TEXTURECUBE = 557,          /* F16TEXTURECUBE  */
-    F16TEXTURE1DARRAY = 558,       /* F16TEXTURE1DARRAY  */
-    F16TEXTURE2DARRAY = 559,       /* F16TEXTURE2DARRAY  */
-    F16TEXTURECUBEARRAY = 560,     /* F16TEXTURECUBEARRAY  */
-    F16TEXTUREBUFFER = 561,        /* F16TEXTUREBUFFER  */
-    F16TEXTURE2DMS = 562,          /* F16TEXTURE2DMS  */
-    F16TEXTURE2DMSARRAY = 563,     /* F16TEXTURE2DMSARRAY  */
-    SUBPASSINPUT = 564,            /* SUBPASSINPUT  */
-    SUBPASSINPUTMS = 565,          /* SUBPASSINPUTMS  */
-    ISUBPASSINPUT = 566,           /* ISUBPASSINPUT  */
-    ISUBPASSINPUTMS = 567,         /* ISUBPASSINPUTMS  */
-    USUBPASSINPUT = 568,           /* USUBPASSINPUT  */
-    USUBPASSINPUTMS = 569,         /* USUBPASSINPUTMS  */
-    F16SUBPASSINPUT = 570,         /* F16SUBPASSINPUT  */
-    F16SUBPASSINPUTMS = 571,       /* F16SUBPASSINPUTMS  */
-    SPIRV_INSTRUCTION = 572,       /* SPIRV_INSTRUCTION  */
-    SPIRV_EXECUTION_MODE = 573,    /* SPIRV_EXECUTION_MODE  */
-    SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID  */
-    SPIRV_DECORATE = 575,          /* SPIRV_DECORATE  */
-    SPIRV_DECORATE_ID = 576,       /* SPIRV_DECORATE_ID  */
-    SPIRV_DECORATE_STRING = 577,   /* SPIRV_DECORATE_STRING  */
-    SPIRV_TYPE = 578,              /* SPIRV_TYPE  */
-    SPIRV_STORAGE_CLASS = 579,     /* SPIRV_STORAGE_CLASS  */
-    SPIRV_BY_REFERENCE = 580,      /* SPIRV_BY_REFERENCE  */
-    SPIRV_LITERAL = 581,           /* SPIRV_LITERAL  */
-    LEFT_OP = 582,                 /* LEFT_OP  */
-    RIGHT_OP = 583,                /* RIGHT_OP  */
-    INC_OP = 584,                  /* INC_OP  */
-    DEC_OP = 585,                  /* DEC_OP  */
-    LE_OP = 586,                   /* LE_OP  */
-    GE_OP = 587,                   /* GE_OP  */
-    EQ_OP = 588,                   /* EQ_OP  */
-    NE_OP = 589,                   /* NE_OP  */
-    AND_OP = 590,                  /* AND_OP  */
-    OR_OP = 591,                   /* OR_OP  */
-    XOR_OP = 592,                  /* XOR_OP  */
-    MUL_ASSIGN = 593,              /* MUL_ASSIGN  */
-    DIV_ASSIGN = 594,              /* DIV_ASSIGN  */
-    ADD_ASSIGN = 595,              /* ADD_ASSIGN  */
-    MOD_ASSIGN = 596,              /* MOD_ASSIGN  */
-    LEFT_ASSIGN = 597,             /* LEFT_ASSIGN  */
-    RIGHT_ASSIGN = 598,            /* RIGHT_ASSIGN  */
-    AND_ASSIGN = 599,              /* AND_ASSIGN  */
-    XOR_ASSIGN = 600,              /* XOR_ASSIGN  */
-    OR_ASSIGN = 601,               /* OR_ASSIGN  */
-    SUB_ASSIGN = 602,              /* SUB_ASSIGN  */
-    STRING_LITERAL = 603,          /* STRING_LITERAL  */
-    LEFT_PAREN = 604,              /* LEFT_PAREN  */
-    RIGHT_PAREN = 605,             /* RIGHT_PAREN  */
-    LEFT_BRACKET = 606,            /* LEFT_BRACKET  */
-    RIGHT_BRACKET = 607,           /* RIGHT_BRACKET  */
-    LEFT_BRACE = 608,              /* LEFT_BRACE  */
-    RIGHT_BRACE = 609,             /* RIGHT_BRACE  */
-    DOT = 610,                     /* DOT  */
-    COMMA = 611,                   /* COMMA  */
-    COLON = 612,                   /* COLON  */
-    EQUAL = 613,                   /* EQUAL  */
-    SEMICOLON = 614,               /* SEMICOLON  */
-    BANG = 615,                    /* BANG  */
-    DASH = 616,                    /* DASH  */
-    TILDE = 617,                   /* TILDE  */
-    PLUS = 618,                    /* PLUS  */
-    STAR = 619,                    /* STAR  */
-    SLASH = 620,                   /* SLASH  */
-    PERCENT = 621,                 /* PERCENT  */
-    LEFT_ANGLE = 622,              /* LEFT_ANGLE  */
-    RIGHT_ANGLE = 623,             /* RIGHT_ANGLE  */
-    VERTICAL_BAR = 624,            /* VERTICAL_BAR  */
-    CARET = 625,                   /* CARET  */
-    AMPERSAND = 626,               /* AMPERSAND  */
-    QUESTION = 627,                /* QUESTION  */
-    INVARIANT = 628,               /* INVARIANT  */
-    HIGH_PRECISION = 629,          /* HIGH_PRECISION  */
-    MEDIUM_PRECISION = 630,        /* MEDIUM_PRECISION  */
-    LOW_PRECISION = 631,           /* LOW_PRECISION  */
-    PRECISION = 632,               /* PRECISION  */
-    PACKED = 633,                  /* PACKED  */
-    RESOURCE = 634,                /* RESOURCE  */
-    SUPERP = 635,                  /* SUPERP  */
-    FLOATCONSTANT = 636,           /* FLOATCONSTANT  */
-    INTCONSTANT = 637,             /* INTCONSTANT  */
-    UINTCONSTANT = 638,            /* UINTCONSTANT  */
-    BOOLCONSTANT = 639,            /* BOOLCONSTANT  */
-    IDENTIFIER = 640,              /* IDENTIFIER  */
-    TYPE_NAME = 641,               /* TYPE_NAME  */
-    CENTROID = 642,                /* CENTROID  */
-    IN = 643,                      /* IN  */
-    OUT = 644,                     /* OUT  */
-    INOUT = 645,                   /* INOUT  */
-    STRUCT = 646,                  /* STRUCT  */
-    VOID = 647,                    /* VOID  */
-    WHILE = 648,                   /* WHILE  */
-    BREAK = 649,                   /* BREAK  */
-    CONTINUE = 650,                /* CONTINUE  */
-    DO = 651,                      /* DO  */
-    ELSE = 652,                    /* ELSE  */
-    FOR = 653,                     /* FOR  */
-    IF = 654,                      /* IF  */
-    DISCARD = 655,                 /* DISCARD  */
-    RETURN = 656,                  /* RETURN  */
-    SWITCH = 657,                  /* SWITCH  */
-    CASE = 658,                    /* CASE  */
-    DEFAULT = 659,                 /* DEFAULT  */
-    TERMINATE_INVOCATION = 660,    /* TERMINATE_INVOCATION  */
-    TERMINATE_RAY = 661,           /* TERMINATE_RAY  */
-    IGNORE_INTERSECTION = 662,     /* IGNORE_INTERSECTION  */
-    UNIFORM = 663,                 /* UNIFORM  */
-    SHARED = 664,                  /* SHARED  */
-    BUFFER = 665,                  /* BUFFER  */
-    FLAT = 666,                    /* FLAT  */
-    SMOOTH = 667,                  /* SMOOTH  */
-    LAYOUT = 668,                  /* LAYOUT  */
-    DOUBLECONSTANT = 669,          /* DOUBLECONSTANT  */
-    INT16CONSTANT = 670,           /* INT16CONSTANT  */
-    UINT16CONSTANT = 671,          /* UINT16CONSTANT  */
-    FLOAT16CONSTANT = 672,         /* FLOAT16CONSTANT  */
-    INT32CONSTANT = 673,           /* INT32CONSTANT  */
-    UINT32CONSTANT = 674,          /* UINT32CONSTANT  */
-    INT64CONSTANT = 675,           /* INT64CONSTANT  */
-    UINT64CONSTANT = 676,          /* UINT64CONSTANT  */
-    SUBROUTINE = 677,              /* SUBROUTINE  */
-    DEMOTE = 678,                  /* DEMOTE  */
-    PAYLOADNV = 679,               /* PAYLOADNV  */
-    PAYLOADINNV = 680,             /* PAYLOADINNV  */
-    HITATTRNV = 681,               /* HITATTRNV  */
-    CALLDATANV = 682,              /* CALLDATANV  */
-    CALLDATAINNV = 683,            /* CALLDATAINNV  */
-    PAYLOADEXT = 684,              /* PAYLOADEXT  */
-    PAYLOADINEXT = 685,            /* PAYLOADINEXT  */
-    HITATTREXT = 686,              /* HITATTREXT  */
-    CALLDATAEXT = 687,             /* CALLDATAEXT  */
-    CALLDATAINEXT = 688,           /* CALLDATAINEXT  */
-    PATCH = 689,                   /* PATCH  */
-    SAMPLE = 690,                  /* SAMPLE  */
-    NONUNIFORM = 691,              /* NONUNIFORM  */
-    COHERENT = 692,                /* COHERENT  */
-    VOLATILE = 693,                /* VOLATILE  */
-    RESTRICT = 694,                /* RESTRICT  */
-    READONLY = 695,                /* READONLY  */
-    WRITEONLY = 696,               /* WRITEONLY  */
-    DEVICECOHERENT = 697,          /* DEVICECOHERENT  */
-    QUEUEFAMILYCOHERENT = 698,     /* QUEUEFAMILYCOHERENT  */
-    WORKGROUPCOHERENT = 699,       /* WORKGROUPCOHERENT  */
-    SUBGROUPCOHERENT = 700,        /* SUBGROUPCOHERENT  */
-    NONPRIVATE = 701,              /* NONPRIVATE  */
-    SHADERCALLCOHERENT = 702,      /* SHADERCALLCOHERENT  */
-    NOPERSPECTIVE = 703,           /* NOPERSPECTIVE  */
-    EXPLICITINTERPAMD = 704,       /* EXPLICITINTERPAMD  */
-    PERVERTEXNV = 705,             /* PERVERTEXNV  */
-    PERPRIMITIVENV = 706,          /* PERPRIMITIVENV  */
-    PERVIEWNV = 707,               /* PERVIEWNV  */
-    PERTASKNV = 708,               /* PERTASKNV  */
-    PRECISE = 709                  /* PRECISE  */
+    COOPMAT = 421,                 /* COOPMAT  */
+    HITOBJECTNV = 422,             /* HITOBJECTNV  */
+    HITOBJECTATTRNV = 423,         /* HITOBJECTATTRNV  */
+    SAMPLERCUBEARRAY = 424,        /* SAMPLERCUBEARRAY  */
+    SAMPLERCUBEARRAYSHADOW = 425,  /* SAMPLERCUBEARRAYSHADOW  */
+    ISAMPLERCUBEARRAY = 426,       /* ISAMPLERCUBEARRAY  */
+    USAMPLERCUBEARRAY = 427,       /* USAMPLERCUBEARRAY  */
+    SAMPLER1D = 428,               /* SAMPLER1D  */
+    SAMPLER1DARRAY = 429,          /* SAMPLER1DARRAY  */
+    SAMPLER1DARRAYSHADOW = 430,    /* SAMPLER1DARRAYSHADOW  */
+    ISAMPLER1D = 431,              /* ISAMPLER1D  */
+    SAMPLER1DSHADOW = 432,         /* SAMPLER1DSHADOW  */
+    SAMPLER2DRECT = 433,           /* SAMPLER2DRECT  */
+    SAMPLER2DRECTSHADOW = 434,     /* SAMPLER2DRECTSHADOW  */
+    ISAMPLER2DRECT = 435,          /* ISAMPLER2DRECT  */
+    USAMPLER2DRECT = 436,          /* USAMPLER2DRECT  */
+    SAMPLERBUFFER = 437,           /* SAMPLERBUFFER  */
+    ISAMPLERBUFFER = 438,          /* ISAMPLERBUFFER  */
+    USAMPLERBUFFER = 439,          /* USAMPLERBUFFER  */
+    SAMPLER2DMS = 440,             /* SAMPLER2DMS  */
+    ISAMPLER2DMS = 441,            /* ISAMPLER2DMS  */
+    USAMPLER2DMS = 442,            /* USAMPLER2DMS  */
+    SAMPLER2DMSARRAY = 443,        /* SAMPLER2DMSARRAY  */
+    ISAMPLER2DMSARRAY = 444,       /* ISAMPLER2DMSARRAY  */
+    USAMPLER2DMSARRAY = 445,       /* USAMPLER2DMSARRAY  */
+    SAMPLEREXTERNALOES = 446,      /* SAMPLEREXTERNALOES  */
+    SAMPLEREXTERNAL2DY2YEXT = 447, /* SAMPLEREXTERNAL2DY2YEXT  */
+    ISAMPLER1DARRAY = 448,         /* ISAMPLER1DARRAY  */
+    USAMPLER1D = 449,              /* USAMPLER1D  */
+    USAMPLER1DARRAY = 450,         /* USAMPLER1DARRAY  */
+    F16SAMPLER1D = 451,            /* F16SAMPLER1D  */
+    F16SAMPLER2D = 452,            /* F16SAMPLER2D  */
+    F16SAMPLER3D = 453,            /* F16SAMPLER3D  */
+    F16SAMPLER2DRECT = 454,        /* F16SAMPLER2DRECT  */
+    F16SAMPLERCUBE = 455,          /* F16SAMPLERCUBE  */
+    F16SAMPLER1DARRAY = 456,       /* F16SAMPLER1DARRAY  */
+    F16SAMPLER2DARRAY = 457,       /* F16SAMPLER2DARRAY  */
+    F16SAMPLERCUBEARRAY = 458,     /* F16SAMPLERCUBEARRAY  */
+    F16SAMPLERBUFFER = 459,        /* F16SAMPLERBUFFER  */
+    F16SAMPLER2DMS = 460,          /* F16SAMPLER2DMS  */
+    F16SAMPLER2DMSARRAY = 461,     /* F16SAMPLER2DMSARRAY  */
+    F16SAMPLER1DSHADOW = 462,      /* F16SAMPLER1DSHADOW  */
+    F16SAMPLER2DSHADOW = 463,      /* F16SAMPLER2DSHADOW  */
+    F16SAMPLER1DARRAYSHADOW = 464, /* F16SAMPLER1DARRAYSHADOW  */
+    F16SAMPLER2DARRAYSHADOW = 465, /* F16SAMPLER2DARRAYSHADOW  */
+    F16SAMPLER2DRECTSHADOW = 466,  /* F16SAMPLER2DRECTSHADOW  */
+    F16SAMPLERCUBESHADOW = 467,    /* F16SAMPLERCUBESHADOW  */
+    F16SAMPLERCUBEARRAYSHADOW = 468, /* F16SAMPLERCUBEARRAYSHADOW  */
+    IMAGE1D = 469,                 /* IMAGE1D  */
+    IIMAGE1D = 470,                /* IIMAGE1D  */
+    UIMAGE1D = 471,                /* UIMAGE1D  */
+    IMAGE2D = 472,                 /* IMAGE2D  */
+    IIMAGE2D = 473,                /* IIMAGE2D  */
+    UIMAGE2D = 474,                /* UIMAGE2D  */
+    IMAGE3D = 475,                 /* IMAGE3D  */
+    IIMAGE3D = 476,                /* IIMAGE3D  */
+    UIMAGE3D = 477,                /* UIMAGE3D  */
+    IMAGE2DRECT = 478,             /* IMAGE2DRECT  */
+    IIMAGE2DRECT = 479,            /* IIMAGE2DRECT  */
+    UIMAGE2DRECT = 480,            /* UIMAGE2DRECT  */
+    IMAGECUBE = 481,               /* IMAGECUBE  */
+    IIMAGECUBE = 482,              /* IIMAGECUBE  */
+    UIMAGECUBE = 483,              /* UIMAGECUBE  */
+    IMAGEBUFFER = 484,             /* IMAGEBUFFER  */
+    IIMAGEBUFFER = 485,            /* IIMAGEBUFFER  */
+    UIMAGEBUFFER = 486,            /* UIMAGEBUFFER  */
+    IMAGE1DARRAY = 487,            /* IMAGE1DARRAY  */
+    IIMAGE1DARRAY = 488,           /* IIMAGE1DARRAY  */
+    UIMAGE1DARRAY = 489,           /* UIMAGE1DARRAY  */
+    IMAGE2DARRAY = 490,            /* IMAGE2DARRAY  */
+    IIMAGE2DARRAY = 491,           /* IIMAGE2DARRAY  */
+    UIMAGE2DARRAY = 492,           /* UIMAGE2DARRAY  */
+    IMAGECUBEARRAY = 493,          /* IMAGECUBEARRAY  */
+    IIMAGECUBEARRAY = 494,         /* IIMAGECUBEARRAY  */
+    UIMAGECUBEARRAY = 495,         /* UIMAGECUBEARRAY  */
+    IMAGE2DMS = 496,               /* IMAGE2DMS  */
+    IIMAGE2DMS = 497,              /* IIMAGE2DMS  */
+    UIMAGE2DMS = 498,              /* UIMAGE2DMS  */
+    IMAGE2DMSARRAY = 499,          /* IMAGE2DMSARRAY  */
+    IIMAGE2DMSARRAY = 500,         /* IIMAGE2DMSARRAY  */
+    UIMAGE2DMSARRAY = 501,         /* UIMAGE2DMSARRAY  */
+    F16IMAGE1D = 502,              /* F16IMAGE1D  */
+    F16IMAGE2D = 503,              /* F16IMAGE2D  */
+    F16IMAGE3D = 504,              /* F16IMAGE3D  */
+    F16IMAGE2DRECT = 505,          /* F16IMAGE2DRECT  */
+    F16IMAGECUBE = 506,            /* F16IMAGECUBE  */
+    F16IMAGE1DARRAY = 507,         /* F16IMAGE1DARRAY  */
+    F16IMAGE2DARRAY = 508,         /* F16IMAGE2DARRAY  */
+    F16IMAGECUBEARRAY = 509,       /* F16IMAGECUBEARRAY  */
+    F16IMAGEBUFFER = 510,          /* F16IMAGEBUFFER  */
+    F16IMAGE2DMS = 511,            /* F16IMAGE2DMS  */
+    F16IMAGE2DMSARRAY = 512,       /* F16IMAGE2DMSARRAY  */
+    I64IMAGE1D = 513,              /* I64IMAGE1D  */
+    U64IMAGE1D = 514,              /* U64IMAGE1D  */
+    I64IMAGE2D = 515,              /* I64IMAGE2D  */
+    U64IMAGE2D = 516,              /* U64IMAGE2D  */
+    I64IMAGE3D = 517,              /* I64IMAGE3D  */
+    U64IMAGE3D = 518,              /* U64IMAGE3D  */
+    I64IMAGE2DRECT = 519,          /* I64IMAGE2DRECT  */
+    U64IMAGE2DRECT = 520,          /* U64IMAGE2DRECT  */
+    I64IMAGECUBE = 521,            /* I64IMAGECUBE  */
+    U64IMAGECUBE = 522,            /* U64IMAGECUBE  */
+    I64IMAGEBUFFER = 523,          /* I64IMAGEBUFFER  */
+    U64IMAGEBUFFER = 524,          /* U64IMAGEBUFFER  */
+    I64IMAGE1DARRAY = 525,         /* I64IMAGE1DARRAY  */
+    U64IMAGE1DARRAY = 526,         /* U64IMAGE1DARRAY  */
+    I64IMAGE2DARRAY = 527,         /* I64IMAGE2DARRAY  */
+    U64IMAGE2DARRAY = 528,         /* U64IMAGE2DARRAY  */
+    I64IMAGECUBEARRAY = 529,       /* I64IMAGECUBEARRAY  */
+    U64IMAGECUBEARRAY = 530,       /* U64IMAGECUBEARRAY  */
+    I64IMAGE2DMS = 531,            /* I64IMAGE2DMS  */
+    U64IMAGE2DMS = 532,            /* U64IMAGE2DMS  */
+    I64IMAGE2DMSARRAY = 533,       /* I64IMAGE2DMSARRAY  */
+    U64IMAGE2DMSARRAY = 534,       /* U64IMAGE2DMSARRAY  */
+    TEXTURECUBEARRAY = 535,        /* TEXTURECUBEARRAY  */
+    ITEXTURECUBEARRAY = 536,       /* ITEXTURECUBEARRAY  */
+    UTEXTURECUBEARRAY = 537,       /* UTEXTURECUBEARRAY  */
+    TEXTURE1D = 538,               /* TEXTURE1D  */
+    ITEXTURE1D = 539,              /* ITEXTURE1D  */
+    UTEXTURE1D = 540,              /* UTEXTURE1D  */
+    TEXTURE1DARRAY = 541,          /* TEXTURE1DARRAY  */
+    ITEXTURE1DARRAY = 542,         /* ITEXTURE1DARRAY  */
+    UTEXTURE1DARRAY = 543,         /* UTEXTURE1DARRAY  */
+    TEXTURE2DRECT = 544,           /* TEXTURE2DRECT  */
+    ITEXTURE2DRECT = 545,          /* ITEXTURE2DRECT  */
+    UTEXTURE2DRECT = 546,          /* UTEXTURE2DRECT  */
+    TEXTUREBUFFER = 547,           /* TEXTUREBUFFER  */
+    ITEXTUREBUFFER = 548,          /* ITEXTUREBUFFER  */
+    UTEXTUREBUFFER = 549,          /* UTEXTUREBUFFER  */
+    TEXTURE2DMS = 550,             /* TEXTURE2DMS  */
+    ITEXTURE2DMS = 551,            /* ITEXTURE2DMS  */
+    UTEXTURE2DMS = 552,            /* UTEXTURE2DMS  */
+    TEXTURE2DMSARRAY = 553,        /* TEXTURE2DMSARRAY  */
+    ITEXTURE2DMSARRAY = 554,       /* ITEXTURE2DMSARRAY  */
+    UTEXTURE2DMSARRAY = 555,       /* UTEXTURE2DMSARRAY  */
+    F16TEXTURE1D = 556,            /* F16TEXTURE1D  */
+    F16TEXTURE2D = 557,            /* F16TEXTURE2D  */
+    F16TEXTURE3D = 558,            /* F16TEXTURE3D  */
+    F16TEXTURE2DRECT = 559,        /* F16TEXTURE2DRECT  */
+    F16TEXTURECUBE = 560,          /* F16TEXTURECUBE  */
+    F16TEXTURE1DARRAY = 561,       /* F16TEXTURE1DARRAY  */
+    F16TEXTURE2DARRAY = 562,       /* F16TEXTURE2DARRAY  */
+    F16TEXTURECUBEARRAY = 563,     /* F16TEXTURECUBEARRAY  */
+    F16TEXTUREBUFFER = 564,        /* F16TEXTUREBUFFER  */
+    F16TEXTURE2DMS = 565,          /* F16TEXTURE2DMS  */
+    F16TEXTURE2DMSARRAY = 566,     /* F16TEXTURE2DMSARRAY  */
+    SUBPASSINPUT = 567,            /* SUBPASSINPUT  */
+    SUBPASSINPUTMS = 568,          /* SUBPASSINPUTMS  */
+    ISUBPASSINPUT = 569,           /* ISUBPASSINPUT  */
+    ISUBPASSINPUTMS = 570,         /* ISUBPASSINPUTMS  */
+    USUBPASSINPUT = 571,           /* USUBPASSINPUT  */
+    USUBPASSINPUTMS = 572,         /* USUBPASSINPUTMS  */
+    F16SUBPASSINPUT = 573,         /* F16SUBPASSINPUT  */
+    F16SUBPASSINPUTMS = 574,       /* F16SUBPASSINPUTMS  */
+    SPIRV_INSTRUCTION = 575,       /* SPIRV_INSTRUCTION  */
+    SPIRV_EXECUTION_MODE = 576,    /* SPIRV_EXECUTION_MODE  */
+    SPIRV_EXECUTION_MODE_ID = 577, /* SPIRV_EXECUTION_MODE_ID  */
+    SPIRV_DECORATE = 578,          /* SPIRV_DECORATE  */
+    SPIRV_DECORATE_ID = 579,       /* SPIRV_DECORATE_ID  */
+    SPIRV_DECORATE_STRING = 580,   /* SPIRV_DECORATE_STRING  */
+    SPIRV_TYPE = 581,              /* SPIRV_TYPE  */
+    SPIRV_STORAGE_CLASS = 582,     /* SPIRV_STORAGE_CLASS  */
+    SPIRV_BY_REFERENCE = 583,      /* SPIRV_BY_REFERENCE  */
+    SPIRV_LITERAL = 584,           /* SPIRV_LITERAL  */
+    ATTACHMENTEXT = 585,           /* ATTACHMENTEXT  */
+    IATTACHMENTEXT = 586,          /* IATTACHMENTEXT  */
+    UATTACHMENTEXT = 587,          /* UATTACHMENTEXT  */
+    LEFT_OP = 588,                 /* LEFT_OP  */
+    RIGHT_OP = 589,                /* RIGHT_OP  */
+    INC_OP = 590,                  /* INC_OP  */
+    DEC_OP = 591,                  /* DEC_OP  */
+    LE_OP = 592,                   /* LE_OP  */
+    GE_OP = 593,                   /* GE_OP  */
+    EQ_OP = 594,                   /* EQ_OP  */
+    NE_OP = 595,                   /* NE_OP  */
+    AND_OP = 596,                  /* AND_OP  */
+    OR_OP = 597,                   /* OR_OP  */
+    XOR_OP = 598,                  /* XOR_OP  */
+    MUL_ASSIGN = 599,              /* MUL_ASSIGN  */
+    DIV_ASSIGN = 600,              /* DIV_ASSIGN  */
+    ADD_ASSIGN = 601,              /* ADD_ASSIGN  */
+    MOD_ASSIGN = 602,              /* MOD_ASSIGN  */
+    LEFT_ASSIGN = 603,             /* LEFT_ASSIGN  */
+    RIGHT_ASSIGN = 604,            /* RIGHT_ASSIGN  */
+    AND_ASSIGN = 605,              /* AND_ASSIGN  */
+    XOR_ASSIGN = 606,              /* XOR_ASSIGN  */
+    OR_ASSIGN = 607,               /* OR_ASSIGN  */
+    SUB_ASSIGN = 608,              /* SUB_ASSIGN  */
+    STRING_LITERAL = 609,          /* STRING_LITERAL  */
+    LEFT_PAREN = 610,              /* LEFT_PAREN  */
+    RIGHT_PAREN = 611,             /* RIGHT_PAREN  */
+    LEFT_BRACKET = 612,            /* LEFT_BRACKET  */
+    RIGHT_BRACKET = 613,           /* RIGHT_BRACKET  */
+    LEFT_BRACE = 614,              /* LEFT_BRACE  */
+    RIGHT_BRACE = 615,             /* RIGHT_BRACE  */
+    DOT = 616,                     /* DOT  */
+    COMMA = 617,                   /* COMMA  */
+    COLON = 618,                   /* COLON  */
+    EQUAL = 619,                   /* EQUAL  */
+    SEMICOLON = 620,               /* SEMICOLON  */
+    BANG = 621,                    /* BANG  */
+    DASH = 622,                    /* DASH  */
+    TILDE = 623,                   /* TILDE  */
+    PLUS = 624,                    /* PLUS  */
+    STAR = 625,                    /* STAR  */
+    SLASH = 626,                   /* SLASH  */
+    PERCENT = 627,                 /* PERCENT  */
+    LEFT_ANGLE = 628,              /* LEFT_ANGLE  */
+    RIGHT_ANGLE = 629,             /* RIGHT_ANGLE  */
+    VERTICAL_BAR = 630,            /* VERTICAL_BAR  */
+    CARET = 631,                   /* CARET  */
+    AMPERSAND = 632,               /* AMPERSAND  */
+    QUESTION = 633,                /* QUESTION  */
+    INVARIANT = 634,               /* INVARIANT  */
+    HIGH_PRECISION = 635,          /* HIGH_PRECISION  */
+    MEDIUM_PRECISION = 636,        /* MEDIUM_PRECISION  */
+    LOW_PRECISION = 637,           /* LOW_PRECISION  */
+    PRECISION = 638,               /* PRECISION  */
+    PACKED = 639,                  /* PACKED  */
+    RESOURCE = 640,                /* RESOURCE  */
+    SUPERP = 641,                  /* SUPERP  */
+    FLOATCONSTANT = 642,           /* FLOATCONSTANT  */
+    INTCONSTANT = 643,             /* INTCONSTANT  */
+    UINTCONSTANT = 644,            /* UINTCONSTANT  */
+    BOOLCONSTANT = 645,            /* BOOLCONSTANT  */
+    IDENTIFIER = 646,              /* IDENTIFIER  */
+    TYPE_NAME = 647,               /* TYPE_NAME  */
+    CENTROID = 648,                /* CENTROID  */
+    IN = 649,                      /* IN  */
+    OUT = 650,                     /* OUT  */
+    INOUT = 651,                   /* INOUT  */
+    STRUCT = 652,                  /* STRUCT  */
+    VOID = 653,                    /* VOID  */
+    WHILE = 654,                   /* WHILE  */
+    BREAK = 655,                   /* BREAK  */
+    CONTINUE = 656,                /* CONTINUE  */
+    DO = 657,                      /* DO  */
+    ELSE = 658,                    /* ELSE  */
+    FOR = 659,                     /* FOR  */
+    IF = 660,                      /* IF  */
+    DISCARD = 661,                 /* DISCARD  */
+    RETURN = 662,                  /* RETURN  */
+    SWITCH = 663,                  /* SWITCH  */
+    CASE = 664,                    /* CASE  */
+    DEFAULT = 665,                 /* DEFAULT  */
+    TERMINATE_INVOCATION = 666,    /* TERMINATE_INVOCATION  */
+    TERMINATE_RAY = 667,           /* TERMINATE_RAY  */
+    IGNORE_INTERSECTION = 668,     /* IGNORE_INTERSECTION  */
+    UNIFORM = 669,                 /* UNIFORM  */
+    SHARED = 670,                  /* SHARED  */
+    BUFFER = 671,                  /* BUFFER  */
+    TILEIMAGEEXT = 672,            /* TILEIMAGEEXT  */
+    FLAT = 673,                    /* FLAT  */
+    SMOOTH = 674,                  /* SMOOTH  */
+    LAYOUT = 675,                  /* LAYOUT  */
+    DOUBLECONSTANT = 676,          /* DOUBLECONSTANT  */
+    INT16CONSTANT = 677,           /* INT16CONSTANT  */
+    UINT16CONSTANT = 678,          /* UINT16CONSTANT  */
+    FLOAT16CONSTANT = 679,         /* FLOAT16CONSTANT  */
+    INT32CONSTANT = 680,           /* INT32CONSTANT  */
+    UINT32CONSTANT = 681,          /* UINT32CONSTANT  */
+    INT64CONSTANT = 682,           /* INT64CONSTANT  */
+    UINT64CONSTANT = 683,          /* UINT64CONSTANT  */
+    SUBROUTINE = 684,              /* SUBROUTINE  */
+    DEMOTE = 685,                  /* DEMOTE  */
+    PAYLOADNV = 686,               /* PAYLOADNV  */
+    PAYLOADINNV = 687,             /* PAYLOADINNV  */
+    HITATTRNV = 688,               /* HITATTRNV  */
+    CALLDATANV = 689,              /* CALLDATANV  */
+    CALLDATAINNV = 690,            /* CALLDATAINNV  */
+    PAYLOADEXT = 691,              /* PAYLOADEXT  */
+    PAYLOADINEXT = 692,            /* PAYLOADINEXT  */
+    HITATTREXT = 693,              /* HITATTREXT  */
+    CALLDATAEXT = 694,             /* CALLDATAEXT  */
+    CALLDATAINEXT = 695,           /* CALLDATAINEXT  */
+    PATCH = 696,                   /* PATCH  */
+    SAMPLE = 697,                  /* SAMPLE  */
+    NONUNIFORM = 698,              /* NONUNIFORM  */
+    COHERENT = 699,                /* COHERENT  */
+    VOLATILE = 700,                /* VOLATILE  */
+    RESTRICT = 701,                /* RESTRICT  */
+    READONLY = 702,                /* READONLY  */
+    WRITEONLY = 703,               /* WRITEONLY  */
+    DEVICECOHERENT = 704,          /* DEVICECOHERENT  */
+    QUEUEFAMILYCOHERENT = 705,     /* QUEUEFAMILYCOHERENT  */
+    WORKGROUPCOHERENT = 706,       /* WORKGROUPCOHERENT  */
+    SUBGROUPCOHERENT = 707,        /* SUBGROUPCOHERENT  */
+    NONPRIVATE = 708,              /* NONPRIVATE  */
+    SHADERCALLCOHERENT = 709,      /* SHADERCALLCOHERENT  */
+    NOPERSPECTIVE = 710,           /* NOPERSPECTIVE  */
+    EXPLICITINTERPAMD = 711,       /* EXPLICITINTERPAMD  */
+    PERVERTEXEXT = 712,            /* PERVERTEXEXT  */
+    PERVERTEXNV = 713,             /* PERVERTEXNV  */
+    PERPRIMITIVENV = 714,          /* PERPRIMITIVENV  */
+    PERVIEWNV = 715,               /* PERVIEWNV  */
+    PERTASKNV = 716,               /* PERTASKNV  */
+    PERPRIMITIVEEXT = 717,         /* PERPRIMITIVEEXT  */
+    TASKPAYLOADWORKGROUPEXT = 718, /* TASKPAYLOADWORKGROUPEXT  */
+    PRECISE = 719                  /* PRECISE  */
   };
   };
   typedef enum yytokentype yytoken_kind_t;
   typedef enum yytokentype yytoken_kind_t;
 #endif
 #endif
@@ -514,7 +524,7 @@ extern int yydebug;
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 union YYSTYPE
 union YYSTYPE
 {
 {
-#line 97 "MachineIndependent/glslang.y"
+#line 72 "MachineIndependent/glslang.y"
 
 
     struct {
     struct {
         glslang::TSourceLoc loc;
         glslang::TSourceLoc loc;
@@ -550,10 +560,10 @@ union YYSTYPE
             glslang::TArraySizes* arraySizes;
             glslang::TArraySizes* arraySizes;
             glslang::TIdentifierList* identifierList;
             glslang::TIdentifierList* identifierList;
         };
         };
-        glslang::TArraySizes* typeParameters;
+        glslang::TTypeParameters* typeParameters;
     } interm;
     } interm;
 
 
-#line 557 "MachineIndependent/glslang_tab.cpp.h"
+#line 567 "MachineIndependent/glslang_tab.cpp.h"
 
 
 };
 };
 typedef union YYSTYPE YYSTYPE;
 typedef union YYSTYPE YYSTYPE;
@@ -563,6 +573,8 @@ typedef union YYSTYPE YYSTYPE;
 
 
 
 
 
 
+
 int yyparse (glslang::TParseContext* pParseContext);
 int yyparse (glslang::TParseContext* pParseContext);
 
 
+
 #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED  */
 #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED  */

+ 66 - 18
src/libraries/glslang/glslang/MachineIndependent/intermOut.cpp

@@ -36,8 +36,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #include "localintermediate.h"
 #include "localintermediate.h"
 #include "../Include/InfoSink.h"
 #include "../Include/InfoSink.h"
 
 
@@ -663,11 +661,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
     case EOpSubpassLoad:   out.debug << "subpassLoad";   break;
     case EOpSubpassLoad:   out.debug << "subpassLoad";   break;
     case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
     case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
 
 
+    case EOpColorAttachmentReadEXT:   out.debug << "colorAttachmentReadEXT";   break;
+
     case EOpConstructReference: out.debug << "Construct reference type"; break;
     case EOpConstructReference: out.debug << "Construct reference type"; break;
 
 
-#ifndef GLSLANG_WEB
+    case EOpDeclare: out.debug << "Declare"; break;
+
     case EOpSpirvInst: out.debug << "spirv_instruction"; break;
     case EOpSpirvInst: out.debug << "spirv_instruction"; break;
-#endif
 
 
     default: out.debug.message(EPrefixError, "Bad unary op");
     default: out.debug.message(EPrefixError, "Bad unary op");
     }
     }
@@ -692,6 +692,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
 
 
     switch (node->getOp()) {
     switch (node->getOp()) {
     case EOpSequence:      out.debug << "Sequence\n";       return true;
     case EOpSequence:      out.debug << "Sequence\n";       return true;
+    case EOpScope:         out.debug << "Scope\n";       return true;
     case EOpLinkerObjects: out.debug << "Linker Objects\n"; return true;
     case EOpLinkerObjects: out.debug << "Linker Objects\n"; return true;
     case EOpComma:         out.debug << "Comma";            break;
     case EOpComma:         out.debug << "Comma";            break;
     case EOpFunction:      out.debug << "Function Definition: " << node->getName(); break;
     case EOpFunction:      out.debug << "Function Definition: " << node->getName(); break;
@@ -804,7 +805,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
     case EOpConstructStruct:  out.debug << "Construct structure";  break;
     case EOpConstructStruct:  out.debug << "Construct structure";  break;
     case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
     case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
     case EOpConstructReference:  out.debug << "Construct reference";  break;
     case EOpConstructReference:  out.debug << "Construct reference";  break;
-    case EOpConstructCooperativeMatrix:  out.debug << "Construct cooperative matrix";  break;
+    case EOpConstructCooperativeMatrixNV:  out.debug << "Construct cooperative matrix NV";  break;
+    case EOpConstructCooperativeMatrixKHR:  out.debug << "Construct cooperative matrix KHR";  break;
     case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break;
     case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break;
 
 
     case EOpLessThan:         out.debug << "Compare Less Than";             break;
     case EOpLessThan:         out.debug << "Compare Less Than";             break;
@@ -1057,6 +1059,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
     case EOpSubpassLoad:   out.debug << "subpassLoad";   break;
     case EOpSubpassLoad:   out.debug << "subpassLoad";   break;
     case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
     case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
 
 
+    case EOpColorAttachmentReadEXT:   out.debug << "colorAttachmentReadEXT";   break;
+
     case EOpTraceNV:                          out.debug << "traceNV"; break;
     case EOpTraceNV:                          out.debug << "traceNV"; break;
     case EOpTraceRayMotionNV:                 out.debug << "traceRayMotionNV"; break;
     case EOpTraceRayMotionNV:                 out.debug << "traceRayMotionNV"; break;
     case EOpTraceKHR:                         out.debug << "traceRayKHR"; break;
     case EOpTraceKHR:                         out.debug << "traceRayKHR"; break;
@@ -1068,6 +1072,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
     case EOpExecuteCallableNV:                out.debug << "executeCallableNV"; break;
     case EOpExecuteCallableNV:                out.debug << "executeCallableNV"; break;
     case EOpExecuteCallableKHR:               out.debug << "executeCallableKHR"; break;
     case EOpExecuteCallableKHR:               out.debug << "executeCallableKHR"; break;
     case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
     case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
+    case EOpEmitMeshTasksEXT:                 out.debug << "EmitMeshTasksEXT"; break;
+    case EOpSetMeshOutputsEXT:                out.debug << "SetMeshOutputsEXT"; break;
 
 
     case EOpRayQueryInitialize:                                            out.debug << "rayQueryInitializeEXT"; break;
     case EOpRayQueryInitialize:                                            out.debug << "rayQueryInitializeEXT"; break;
     case EOpRayQueryTerminate:                                             out.debug << "rayQueryTerminateEXT"; break;
     case EOpRayQueryTerminate:                                             out.debug << "rayQueryTerminateEXT"; break;
@@ -1092,22 +1098,60 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
     case EOpRayQueryGetWorldRayOrigin:                                     out.debug << "rayQueryGetWorldRayOriginEXT"; break;
     case EOpRayQueryGetWorldRayOrigin:                                     out.debug << "rayQueryGetWorldRayOriginEXT"; break;
     case EOpRayQueryGetIntersectionObjectToWorld:                          out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
     case EOpRayQueryGetIntersectionObjectToWorld:                          out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
     case EOpRayQueryGetIntersectionWorldToObject:                          out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
     case EOpRayQueryGetIntersectionWorldToObject:                          out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
+    case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:             out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break;
 
 
-    case EOpCooperativeMatrixLoad:  out.debug << "Load cooperative matrix";  break;
-    case EOpCooperativeMatrixStore:  out.debug << "Store cooperative matrix";  break;
-    case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
+    case EOpCooperativeMatrixLoad:  out.debug << "Load cooperative matrix KHR"; break;
+    case EOpCooperativeMatrixStore:  out.debug << "Store cooperative matrix KHR"; break;
+    case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break;
+    case EOpCooperativeMatrixLoadNV:  out.debug << "Load cooperative matrix NV"; break;
+    case EOpCooperativeMatrixStoreNV:  out.debug << "Store cooperative matrix NV"; break;
+    case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break;
 
 
     case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
     case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
     case EOpDebugPrintf:  out.debug << "Debug printf";  break;
     case EOpDebugPrintf:  out.debug << "Debug printf";  break;
 
 
-#ifndef GLSLANG_WEB
+    case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break;
+    case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break;
+    case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break;
+    case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break;
+    case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break;
+    case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break;
+    case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break;
+    case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break;
+    case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break;
+    case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break;
+    case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break;
+    case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break;
+    case EOpHitObjectIsHitNV:  out.debug << "HitObjectIsHitNV"; break;
+    case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break;
+    case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break;
+    case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break;
+    case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break;
+    case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break;
+    case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break;
+    case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break;
+    case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break;
+    case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break;
+    case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break;
+    case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break;
+    case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break;
+    case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break;
+    case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break;
+    case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break;
+    case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break;
+    case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break;
+    case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break;
+    case EOpFetchMicroTriangleVertexPositionNV: out.debug << "MicroTriangleVertexPositionNV"; break;
+    case EOpFetchMicroTriangleVertexBarycentricNV: out.debug << "MicroTriangleVertexBarycentricNV"; break;
+
     case EOpSpirvInst: out.debug << "spirv_instruction"; break;
     case EOpSpirvInst: out.debug << "spirv_instruction"; break;
-#endif
+    case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break;
+    case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break;
 
 
     default: out.debug.message(EPrefixError, "Bad aggregation op");
     default: out.debug.message(EPrefixError, "Bad aggregation op");
     }
     }
 
 
-    if (node->getOp() != EOpSequence && node->getOp() != EOpParameters)
+    if (node->getOp() != EOpSequence && node->getOp() != EOpScope && node->getOp() != EOpParameters)
         out.debug << " (" << node->getCompleteString() << ")";
         out.debug << " (" << node->getCompleteString() << ")";
 
 
     out.debug << "\n";
     out.debug << "\n";
@@ -1164,12 +1208,12 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node
 //   - shows all digits, no premature rounding
 //   - shows all digits, no premature rounding
 static void OutputDouble(TInfoSink& out, double value, TOutputTraverser::EExtraOutput extra)
 static void OutputDouble(TInfoSink& out, double value, TOutputTraverser::EExtraOutput extra)
 {
 {
-    if (IsInfinity(value)) {
+    if (std::isinf(value)) {
         if (value < 0)
         if (value < 0)
             out.debug << "-1.#INF";
             out.debug << "-1.#INF";
         else
         else
             out.debug << "+1.#INF";
             out.debug << "+1.#INF";
-    } else if (IsNan(value))
+    } else if (std::isnan(value))
         out.debug << "1.#IND";
         out.debug << "1.#IND";
     else {
     else {
         const int maxSize = 340;
         const int maxSize = 340;
@@ -1507,6 +1551,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
             infoSink.debug << "using early_fragment_tests\n";
             infoSink.debug << "using early_fragment_tests\n";
         if (postDepthCoverage)
         if (postDepthCoverage)
             infoSink.debug << "using post_depth_coverage\n";
             infoSink.debug << "using post_depth_coverage\n";
+        if (nonCoherentColorAttachmentReadEXT)
+            infoSink.debug << "using non_coherent_color_attachment_readEXT\n";
+        if (nonCoherentDepthAttachmentReadEXT)
+            infoSink.debug << "using non_coherent_depth_attachment_readEXT\n";
+        if (nonCoherentStencilAttachmentReadEXT)
+            infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n";
         if (depthLayout != EldNone)
         if (depthLayout != EldNone)
             infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
             infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
         if (blendEquations != 0) {
         if (blendEquations != 0) {
@@ -1522,12 +1572,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
             infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n";
             infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n";
         break;
         break;
 
 
-    case EShLangMeshNV:
+    case EShLangMesh:
         infoSink.debug << "max_vertices = " << vertices << "\n";
         infoSink.debug << "max_vertices = " << vertices << "\n";
         infoSink.debug << "max_primitives = " << primitives << "\n";
         infoSink.debug << "max_primitives = " << primitives << "\n";
         infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
         infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
         // Fall through
         // Fall through
-    case EShLangTaskNV:
+    case EShLangTask:
         // Fall through
         // Fall through
     case EShLangCompute:
     case EShLangCompute:
         infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
         infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
@@ -1547,7 +1597,7 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
         break;
         break;
     }
     }
 
 
-    if (treeRoot == 0 || ! tree)
+    if (treeRoot == nullptr || ! tree)
         return;
         return;
 
 
     TOutputTraverser it(infoSink);
     TOutputTraverser it(infoSink);
@@ -1557,5 +1607,3 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE

+ 27 - 26
src/libraries/glslang/glslang/MachineIndependent/iomapper.cpp

@@ -33,8 +33,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #include "../Include/Common.h"
 #include "../Include/Common.h"
 #include "../Include/InfoSink.h"
 #include "../Include/InfoSink.h"
 #include "../Include/Types.h"
 #include "../Include/Types.h"
@@ -145,6 +143,8 @@ public:
             base->getWritableType().getQualifier().layoutComponent = at->second.newComponent;
             base->getWritableType().getQualifier().layoutComponent = at->second.newComponent;
         if (at->second.newIndex != -1)
         if (at->second.newIndex != -1)
             base->getWritableType().getQualifier().layoutIndex = at->second.newIndex;
             base->getWritableType().getQualifier().layoutIndex = at->second.newIndex;
+        if (at->second.upgradedToPushConstant)
+            base->getWritableType().getQualifier().layoutPushConstant = true;
     }
     }
 
 
   private:
   private:
@@ -203,11 +203,7 @@ struct TResolverUniformAdaptor {
 
 
     inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey) {
     inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey) {
         TVarEntryInfo& ent = entKey.second;
         TVarEntryInfo& ent = entKey.second;
-        ent.newLocation = -1;
-        ent.newComponent = -1;
-        ent.newBinding = -1;
-        ent.newSet = -1;
-        ent.newIndex = -1;
+        ent.clearNewAssignments();
         const bool isValid = resolver.validateBinding(stage, ent);
         const bool isValid = resolver.validateBinding(stage, ent);
         if (isValid) {
         if (isValid) {
             resolver.resolveSet(ent.stage, ent);
             resolver.resolveSet(ent.stage, ent);
@@ -281,11 +277,7 @@ struct TResolverInOutAdaptor {
     inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey)
     inline void operator()(std::pair<const TString, TVarEntryInfo>& entKey)
     {
     {
         TVarEntryInfo& ent = entKey.second;
         TVarEntryInfo& ent = entKey.second;
-        ent.newLocation = -1;
-        ent.newComponent = -1;
-        ent.newBinding = -1;
-        ent.newSet = -1;
-        ent.newIndex = -1;
+        ent.clearNewAssignments();
         const bool isValid = resolver.validateInOut(ent.stage, ent);
         const bool isValid = resolver.validateInOut(ent.stage, ent);
         if (isValid) {
         if (isValid) {
             resolver.resolveInOutLocation(stage, ent);
             resolver.resolveInOutLocation(stage, ent);
@@ -874,7 +866,7 @@ int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInf
     }
     }
 
 
     // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
     // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
-    if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
+    if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) {
         return ent.newLocation = -1;
         return ent.newLocation = -1;
     }
     }
 
 
@@ -961,7 +953,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
         return ent.newLocation = type.getQualifier().layoutLocation;
         return ent.newLocation = type.getQualifier().layoutLocation;
     }
     }
     // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
     // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
-    if (type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
+    if (type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) {
         return ent.newLocation = -1;
         return ent.newLocation = -1;
     }
     }
     // no locations on blocks of built-in variables
     // no locations on blocks of built-in variables
@@ -1670,31 +1662,42 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
                     if (size <= int(autoPushConstantMaxSize)) {
                     if (size <= int(autoPushConstantMaxSize)) {
                         qualifier.setBlockStorage(EbsPushConstant);
                         qualifier.setBlockStorage(EbsPushConstant);
                         qualifier.layoutPacking = autoPushConstantBlockPacking;
                         qualifier.layoutPacking = autoPushConstantBlockPacking;
+                        // Push constants don't have set/binding etc. decorations, remove those.
+                        qualifier.layoutSet = TQualifier::layoutSetEnd;
+                        at->second.clearNewAssignments();
+
                         upgraded = true;
                         upgraded = true;
                     }
                     }
                 }
                 }
             }
             }
-            // If it's been upgraded to push_constant, then remove it from the uniformVector
+            // If it's been upgraded to push_constant, then set the flag so when its traversed
+            // in the next for loop, all references to this symbol will get their flag changed.
             // so it doesn't get a set/binding assigned to it.
             // so it doesn't get a set/binding assigned to it.
             if (upgraded) {
             if (upgraded) {
-                auto at = std::find_if(uniformVector.begin(), uniformVector.end(),
-                                       [this](const TVarLivePair& p) { return p.first == autoPushConstantBlockName; });
-                if (at != uniformVector.end())
-                    uniformVector.erase(at);
+                std::for_each(uniformVector.begin(), uniformVector.end(),
+                                       [this](TVarLivePair& p) {
+                if (p.first == autoPushConstantBlockName) {
+                        p.second.upgradedToPushConstant = true;
+                    }
+                });
             }
             }
         }
         }
         for (size_t stage = 0; stage < EShLangCount; stage++) {
         for (size_t stage = 0; stage < EShLangCount; stage++) {
             if (intermediates[stage] != nullptr) {
             if (intermediates[stage] != nullptr) {
                 // traverse each stage, set new location to each input/output and unifom symbol, set new binding to
                 // traverse each stage, set new location to each input/output and unifom symbol, set new binding to
-                // ubo, ssbo and opaque symbols
+                // ubo, ssbo and opaque symbols. Assign push_constant upgrades as well.
                 TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap;
                 TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap;
                 std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) {
                 std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) {
                     auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName());
                     auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName());
                     if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){
                     if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){
-                        int resolvedBinding = at->second.newBinding;
-                        at->second = p.second;
-                        if (resolvedBinding > 0)
-                            at->second.newBinding = resolvedBinding;
+                        if (p.second.upgradedToPushConstant) {
+                            at->second.upgradedToPushConstant = true;
+                        } else {
+                            int resolvedBinding = at->second.newBinding;
+                            at->second = p.second;
+                            if (resolvedBinding > 0)
+                                at->second.newBinding = resolvedBinding;
+                        }
                     }
                     }
                 });
                 });
                 TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage],
                 TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage],
@@ -1709,5 +1712,3 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE

+ 11 - 4
src/libraries/glslang/glslang/MachineIndependent/iomapper.h

@@ -33,8 +33,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #ifndef _IOMAPPER_INCLUDED
 #ifndef _IOMAPPER_INCLUDED
 #define _IOMAPPER_INCLUDED
 #define _IOMAPPER_INCLUDED
 
 
@@ -55,12 +53,23 @@ struct TVarEntryInfo {
     long long id;
     long long id;
     TIntermSymbol* symbol;
     TIntermSymbol* symbol;
     bool live;
     bool live;
+    bool upgradedToPushConstant;
     int newBinding;
     int newBinding;
     int newSet;
     int newSet;
     int newLocation;
     int newLocation;
     int newComponent;
     int newComponent;
     int newIndex;
     int newIndex;
     EShLanguage stage;
     EShLanguage stage;
+
+    void clearNewAssignments() {
+        upgradedToPushConstant = false;
+        newBinding = -1;
+        newSet = -1;
+        newLocation = -1;
+        newComponent = -1;
+        newIndex = -1;
+    }
+
     struct TOrderById {
     struct TOrderById {
         inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { return l.id < r.id; }
         inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { return l.id < r.id; }
     };
     };
@@ -348,5 +357,3 @@ private:
 } // end namespace glslang
 } // end namespace glslang
 
 
 #endif // _IOMAPPER_INCLUDED
 #endif // _IOMAPPER_INCLUDED
-
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE

+ 0 - 2
src/libraries/glslang/glslang/MachineIndependent/limits.cpp

@@ -187,14 +187,12 @@ bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
 //
 //
 void TParseContext::constantIndexExpressionCheck(TIntermNode* index)
 void TParseContext::constantIndexExpressionCheck(TIntermNode* index)
 {
 {
-#ifndef GLSLANG_WEB
     TIndexTraverser it(inductiveLoopIds);
     TIndexTraverser it(inductiveLoopIds);
 
 
     index->traverse(&it);
     index->traverse(&it);
 
 
     if (it.bad)
     if (it.bad)
         error(it.badLoc, "Non-constant-index-expression", "limitations", "");
         error(it.badLoc, "Non-constant-index-expression", "limitations", "");
-#endif
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 353 - 155
src/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp

@@ -55,23 +55,25 @@ namespace glslang {
 //
 //
 // Link-time error emitter.
 // Link-time error emitter.
 //
 //
-void TIntermediate::error(TInfoSink& infoSink, const char* message)
+void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage)
 {
 {
-#ifndef GLSLANG_WEB
     infoSink.info.prefix(EPrefixError);
     infoSink.info.prefix(EPrefixError);
-    infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
-#endif
+    if (unitStage < EShLangCount)
+        infoSink.info << "Linking " << StageName(getStage()) << " and " << StageName(unitStage) << " stages: " << message << "\n";
+    else
+        infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
 
 
     ++numErrors;
     ++numErrors;
 }
 }
 
 
 // Link-time warning.
 // Link-time warning.
-void TIntermediate::warn(TInfoSink& infoSink, const char* message)
+void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage)
 {
 {
-#ifndef GLSLANG_WEB
     infoSink.info.prefix(EPrefixWarning);
     infoSink.info.prefix(EPrefixWarning);
-    infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
-#endif
+    if (unitStage < EShLangCount)
+        infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n";
+    else
+        infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
 }
 }
 
 
 // TODO: 4.4 offset/align:  "Two blocks linked together in the same program with the same block
 // TODO: 4.4 offset/align:  "Two blocks linked together in the same program with the same block
@@ -83,11 +85,9 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message)
 //
 //
 void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
 void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     mergeCallGraphs(infoSink, unit);
     mergeCallGraphs(infoSink, unit);
     mergeModes(infoSink, unit);
     mergeModes(infoSink, unit);
     mergeTrees(infoSink, unit);
     mergeTrees(infoSink, unit);
-#endif
 }
 }
 
 
 //
 //
@@ -114,7 +114,7 @@ void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit
 }
 }
 
 
 //
 //
-// do error checking on the shader boundary in / out vars 
+// do error checking on the shader boundary in / out vars
 //
 //
 void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
 void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
     if (unit.treeRoot == nullptr || treeRoot == nullptr)
     if (unit.treeRoot == nullptr || treeRoot == nullptr)
@@ -155,8 +155,6 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
     callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
     callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
 }
 }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #define MERGE_MAX(member) member = std::max(member, unit.member)
 #define MERGE_MAX(member) member = std::max(member, unit.member)
 #define MERGE_TRUE(member) if (unit.member) member = unit.member;
 #define MERGE_TRUE(member) if (unit.member) member = unit.member;
 
 
@@ -206,7 +204,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
     if (vertices == TQualifier::layoutNotSet)
     if (vertices == TQualifier::layoutNotSet)
         vertices = unit.vertices;
         vertices = unit.vertices;
     else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) {
     else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) {
-        if (language == EShLangGeometry || language == EShLangMeshNV)
+        if (language == EShLangGeometry || language == EShLangMesh)
             error(infoSink, "Contradictory layout max_vertices values");
             error(infoSink, "Contradictory layout max_vertices values");
         else if (language == EShLangTessControl)
         else if (language == EShLangTessControl)
             error(infoSink, "Contradictory layout vertices values");
             error(infoSink, "Contradictory layout vertices values");
@@ -216,7 +214,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
     if (primitives == TQualifier::layoutNotSet)
     if (primitives == TQualifier::layoutNotSet)
         primitives = unit.primitives;
         primitives = unit.primitives;
     else if (primitives != unit.primitives) {
     else if (primitives != unit.primitives) {
-        if (language == EShLangMeshNV)
+        if (language == EShLangMesh)
             error(infoSink, "Contradictory layout max_primitives values");
             error(infoSink, "Contradictory layout max_primitives values");
         else
         else
             assert(0);
             assert(0);
@@ -265,6 +263,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
 
 
     MERGE_TRUE(earlyFragmentTests);
     MERGE_TRUE(earlyFragmentTests);
     MERGE_TRUE(postDepthCoverage);
     MERGE_TRUE(postDepthCoverage);
+    MERGE_TRUE(nonCoherentColorAttachmentReadEXT);
+    MERGE_TRUE(nonCoherentDepthAttachmentReadEXT);
+    MERGE_TRUE(nonCoherentStencilAttachmentReadEXT);
 
 
     if (depthLayout == EldNone)
     if (depthLayout == EldNone)
         depthLayout = unit.depthLayout;
         depthLayout = unit.depthLayout;
@@ -313,6 +314,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
     MERGE_TRUE(autoMapLocations);
     MERGE_TRUE(autoMapLocations);
     MERGE_TRUE(invertY);
     MERGE_TRUE(invertY);
     MERGE_TRUE(dxPositionW);
     MERGE_TRUE(dxPositionW);
+    MERGE_TRUE(debugInfo);
     MERGE_TRUE(flattenUniformArrays);
     MERGE_TRUE(flattenUniformArrays);
     MERGE_TRUE(useUnknownFormat);
     MERGE_TRUE(useUnknownFormat);
     MERGE_TRUE(hlslOffsets);
     MERGE_TRUE(hlslOffsets);
@@ -371,8 +373,6 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
     ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
     ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
 }
 }
 
 
-#endif
-
 static const TString& getNameForIdMap(TIntermSymbol* symbol)
 static const TString& getNameForIdMap(TIntermSymbol* symbol)
 {
 {
     TShaderInterface si = symbol->getType().getShaderInterface();
     TShaderInterface si = symbol->getType().getShaderInterface();
@@ -580,9 +580,6 @@ void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate&
 }
 }
 
 
 void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) {
 void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) {
-    if (block->getType() == unitBlock->getType()) {
-        return;
-    }
 
 
     if (block->getType().getTypeName() != unitBlock->getType().getTypeName() ||
     if (block->getType().getTypeName() != unitBlock->getType().getTypeName() ||
         block->getType().getBasicType() != unitBlock->getType().getBasicType() ||
         block->getType().getBasicType() != unitBlock->getType().getBasicType() ||
@@ -629,44 +626,42 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl
         }
         }
     }
     }
 
 
-    TType unitType;
-    unitType.shallowCopy(unitBlock->getType());
-
     // update symbol node in unit tree,
     // update symbol node in unit tree,
     // and other nodes that may reference it
     // and other nodes that may reference it
     class TMergeBlockTraverser : public TIntermTraverser {
     class TMergeBlockTraverser : public TIntermTraverser {
     public:
     public:
-        TMergeBlockTraverser(const glslang::TType &type, const glslang::TType& unitType,
-                             glslang::TIntermediate& unit,
-                             const std::map<unsigned int, unsigned int>& memberIdxUpdates) :
-            newType(type), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
-        { }
-        virtual ~TMergeBlockTraverser() { }
-
-        const glslang::TType& newType;          // type with modifications
-        const glslang::TType& unitType;         // copy of original type
-        glslang::TIntermediate& unit;           // intermediate that is being updated
-        const std::map<unsigned int, unsigned int>& memberIndexUpdates;
-
-        virtual void visitSymbol(TIntermSymbol* symbol)
+        TMergeBlockTraverser(const TIntermSymbol* newSym)
+            : newSymbol(newSym), newType(nullptr), unit(nullptr), memberIndexUpdates(nullptr)
         {
         {
-            glslang::TType& symType = symbol->getWritableType();
+        }
+        TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit,
+                             const std::map<unsigned int, unsigned int>* memberIdxUpdates)
+            : TIntermTraverser(false, true), newSymbol(newSym), newType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
+        {
+        }
+        virtual ~TMergeBlockTraverser() {}
 
 
-            if (symType == unitType) {
-                // each symbol node has a local copy of the unitType
-                //  if merging involves changing properties that aren't shared objects
-                //  they should be updated in all instances
+        const TIntermSymbol* newSymbol;
+        const glslang::TType* newType; // shallow copy of the new type
+        glslang::TIntermediate* unit;   // intermediate that is being updated
+        const std::map<unsigned int, unsigned int>* memberIndexUpdates;
 
 
-                // e.g. the struct list is a ptr to an object, so it can be updated
-                // once, outside the traverser
-                //*symType.getWritableStruct() = *newType.getStruct();
+        virtual void visitSymbol(TIntermSymbol* symbol)
+        {
+            if (newSymbol->getAccessName() == symbol->getAccessName() &&
+                newSymbol->getQualifier().getBlockStorage() == symbol->getQualifier().getBlockStorage()) {
+                // Each symbol node may have a local copy of the block structure.
+                // Update those structures to match the new one post-merge
+                *(symbol->getWritableType().getWritableStruct()) = *(newSymbol->getType().getStruct());
             }
             }
-
         }
         }
 
 
         virtual bool visitBinary(TVisit, glslang::TIntermBinary* node)
         virtual bool visitBinary(TVisit, glslang::TIntermBinary* node)
         {
         {
-            if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) {
+            if (!unit || !newType || !memberIndexUpdates || memberIndexUpdates->empty())
+                return true;
+
+            if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == *newType) {
                 // this is a dereference to a member of the block since the
                 // this is a dereference to a member of the block since the
                 // member list changed, need to update this to point to the
                 // member list changed, need to update this to point to the
                 // right index
                 // right index
@@ -674,8 +669,8 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl
 
 
                 glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion();
                 glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion();
                 unsigned int memberIdx = constNode->getConstArray()[0].getUConst();
                 unsigned int memberIdx = constNode->getConstArray()[0].getUConst();
-                unsigned int newIdx = memberIndexUpdates.at(memberIdx);
-                TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc());
+                unsigned int newIdx = memberIndexUpdates->at(memberIdx);
+                TIntermTyped* newConstNode = unit->addConstantUnion(newIdx, node->getRight()->getLoc());
 
 
                 node->setRight(newConstNode);
                 node->setRight(newConstNode);
                 delete constNode;
                 delete constNode;
@@ -684,10 +679,20 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl
             }
             }
             return true;
             return true;
         }
         }
-    } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates);
+    };
 
 
-    // update the tree to use the new type
-    unit->getTreeRoot()->traverse(&finalLinkTraverser);
+    // 'this' may have symbols that are using the old block structure, so traverse the tree to update those
+    // in 'visitSymbol'
+    TMergeBlockTraverser finalLinkTraverser(block);
+    getTreeRoot()->traverse(&finalLinkTraverser);
+
+    // The 'unit' intermediate needs the block structures update, but also structure entry indices
+    // may have changed from the old block to the new one that it was merged into, so update those
+    // in 'visitBinary'
+    TType newType;
+    newType.shallowCopy(block->getType());
+    TMergeBlockTraverser unitFinalLinkTraverser(block, &newType, unit, &memberIndexUpdates);
+    unit->getTreeRoot()->traverse(&unitFinalLinkTraverser);
 
 
     // update the member list
     // update the member list
     (*unitMemberList) = (*memberList);
     (*unitMemberList) = (*memberList);
@@ -737,6 +742,21 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
                     symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
                     symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
                 }
                 }
 
 
+                // Update implicit array sizes
+                if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isImplicitlySizedArray()) {
+                    if (unitSymbol->getType().getImplicitArraySize() > symbol->getType().getImplicitArraySize()){
+                        symbol->getWritableType().updateImplicitArraySize(unitSymbol->getType().getImplicitArraySize());
+                    }
+                }
+                else if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isSizedArray()) {
+                    if (symbol->getWritableType().getImplicitArraySize() > unitSymbol->getType().getOuterArraySize())
+                        error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.");
+                }
+                else if (unitSymbol->getType().isImplicitlySizedArray() && symbol->getWritableType().isSizedArray()) {
+                    if (unitSymbol->getType().getImplicitArraySize() > symbol->getWritableType().getOuterArraySize())
+                        error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.");
+                }
+
                 // Update implicit array sizes
                 // Update implicit array sizes
                 mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
                 mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
 
 
@@ -747,6 +767,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
             else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
             else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
                 error(infoSink, "Only one push_constant block is allowed per stage");
                 error(infoSink, "Only one push_constant block is allowed per stage");
         }
         }
+
+        // Check conflicts between preset primitives and sizes of I/O variables among multiple geometry shaders
+        if (language == EShLangGeometry && unitStage == EShLangGeometry)
+        {
+            TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
+            if (unitSymbol->isArray() && unitSymbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().builtIn == EbvNone)
+                if ((unitSymbol->getArraySizes()->isImplicitlySized() &&
+                        unitSymbol->getArraySizes()->getImplicitSize() != TQualifier::mapGeometryToSize(getInputPrimitive())) ||
+                    (! unitSymbol->getArraySizes()->isImplicitlySized() &&
+                        unitSymbol->getArraySizes()->getDimSize(0) != TQualifier::mapGeometryToSize(getInputPrimitive())))
+                    error(infoSink, "Not all array sizes match across all geometry shaders in the program");
+        }
+
         if (merge) {
         if (merge) {
             linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
             linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
 
 
@@ -816,9 +849,12 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
 //
 //
 void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
 void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
 {
 {
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     bool crossStage = getStage() != unitStage;
     bool crossStage = getStage() != unitStage;
     bool writeTypeComparison = false;
     bool writeTypeComparison = false;
+    bool errorReported = false;
+    bool printQualifiers = false;
+    bool printPrecision = false;
+    bool printType = false;
 
 
     // Types have to match
     // Types have to match
     {
     {
@@ -847,14 +883,52 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
         else {
         else {
             arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
             arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
                 (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
                 (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
-                (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
+                 (symbol.getType().isImplicitlySizedArray() || unitSymbol.getType().isImplicitlySizedArray() ||
+                  symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
         }
         }
 
 
-        if (!symbol.getType().sameElementType(unitSymbol.getType()) ||
-            !symbol.getType().sameTypeParameters(unitSymbol.getType()) ||
-            !arraysMatch ) {
+        int lpidx = -1;
+        int rpidx = -1;
+        if (!symbol.getType().sameElementType(unitSymbol.getType(), &lpidx, &rpidx)) {
+            if (lpidx >= 0 && rpidx >= 0) {
+                error(infoSink, "Member names and types must match:", unitStage);
+                infoSink.info << "    Block: " << symbol.getType().getTypeName() << "\n";
+                infoSink.info << "        " << StageName(getStage()) << " stage: \""
+                              << (*symbol.getType().getStruct())[lpidx].type->getCompleteString(true, false, false, true,
+                                      (*symbol.getType().getStruct())[lpidx].type->getFieldName()) << "\"\n";
+                infoSink.info << "        " << StageName(unitStage) << " stage: \""
+                              << (*unitSymbol.getType().getStruct())[rpidx].type->getCompleteString(true, false, false, true,
+                                      (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName()) << "\"\n";
+                errorReported = true;
+            } else if (lpidx >= 0 && rpidx == -1) {
+                  TString errmsg = StageName(getStage());
+                  errmsg.append(" block member has no corresponding member in ").append(StageName(unitStage)).append(" block:");
+                  error(infoSink, errmsg.c_str(), unitStage);
+                  infoSink.info << "    " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: "
+                    << (*symbol.getType().getStruct())[lpidx].type->getFieldName() << "\n";
+                  infoSink.info << "    " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: n/a \n";
+                  errorReported = true;
+            } else if (lpidx == -1 && rpidx >= 0) {
+                  TString errmsg = StageName(unitStage);
+                  errmsg.append(" block member has no corresponding member in ").append(StageName(getStage())).append(" block:");
+                  error(infoSink, errmsg.c_str(), unitStage);
+                  infoSink.info << "    " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: "
+                    << (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName() << "\n";
+                  infoSink.info << "    " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: n/a \n";
+                  errorReported = true;
+            } else {
+                  error(infoSink, "Types must match:", unitStage);
+                  writeTypeComparison = true;
+                  printType = true;
+            }
+        } else if (!arraysMatch) {
+            error(infoSink, "Array sizes must be compatible:", unitStage);
+            writeTypeComparison = true;
+            printType = true;
+        } else if (!symbol.getType().sameTypeParameters(unitSymbol.getType())) {
+            error(infoSink, "Type parameters must match:", unitStage);
             writeTypeComparison = true;
             writeTypeComparison = true;
-            error(infoSink, "Types must match:");
+            printType = true;
         }
         }
     }
     }
 
 
@@ -875,13 +949,35 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
             }
             }
             const TQualifier& qualifier = (*symbol.getType().getStruct())[li].type->getQualifier();
             const TQualifier& qualifier = (*symbol.getType().getStruct())[li].type->getQualifier();
             const TQualifier & unitQualifier = (*unitSymbol.getType().getStruct())[ri].type->getQualifier();
             const TQualifier & unitQualifier = (*unitSymbol.getType().getStruct())[ri].type->getQualifier();
-            if (qualifier.layoutMatrix     != unitQualifier.layoutMatrix ||
-                qualifier.layoutOffset     != unitQualifier.layoutOffset ||
-                qualifier.layoutAlign      != unitQualifier.layoutAlign ||
-                qualifier.layoutLocation   != unitQualifier.layoutLocation ||
-                qualifier.layoutComponent  != unitQualifier.layoutComponent) {
-                error(infoSink, "Interface block member layout qualifiers must match:");
-                writeTypeComparison = true;
+            bool layoutQualifierError = false;
+            if (qualifier.layoutMatrix != unitQualifier.layoutMatrix) {
+                error(infoSink, "Interface block member layout matrix qualifier must match:", unitStage);
+                layoutQualifierError = true;
+            }
+            if (qualifier.layoutOffset != unitQualifier.layoutOffset) {
+                error(infoSink, "Interface block member layout offset qualifier must match:", unitStage);
+                layoutQualifierError = true;
+            }
+            if (qualifier.layoutAlign != unitQualifier.layoutAlign) {
+                error(infoSink, "Interface block member layout align qualifier must match:", unitStage);
+                layoutQualifierError = true;
+            }
+            if (qualifier.layoutLocation != unitQualifier.layoutLocation) {
+                error(infoSink, "Interface block member layout location qualifier must match:", unitStage);
+                layoutQualifierError = true;
+            }
+            if (qualifier.layoutComponent != unitQualifier.layoutComponent) {
+                error(infoSink, "Interface block member layout component qualifier must match:", unitStage);
+                layoutQualifierError = true;
+            }
+            if (layoutQualifierError) {
+                infoSink.info << "    " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: "
+                              << (*symbol.getType().getStruct())[li].type->getFieldName() << " \""
+                              << (*symbol.getType().getStruct())[li].type->getCompleteString(true, true, false, false) << "\"\n";
+                infoSink.info << "    " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: "
+                              << (*unitSymbol.getType().getStruct())[ri].type->getFieldName() << " \""
+                              << (*unitSymbol.getType().getStruct())[ri].type->getCompleteString(true, true, false, false) << "\"\n";
+                errorReported = true;
             }
             }
             ++li;
             ++li;
             ++ri;
             ++ri;
@@ -895,8 +991,9 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
     // Qualifiers have to (almost) match
     // Qualifiers have to (almost) match
     // Storage...
     // Storage...
     if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
     if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
-        error(infoSink, "Storage qualifiers must match:");
+        error(infoSink, "Storage qualifiers must match:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printQualifiers = true;
     }
     }
 
 
     // Uniform and buffer blocks must either both have an instance name, or
     // Uniform and buffer blocks must either both have an instance name, or
@@ -904,37 +1001,40 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
     if (symbol.getQualifier().isUniformOrBuffer() &&
     if (symbol.getQualifier().isUniformOrBuffer() &&
         (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) {
         (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) {
         error(infoSink, "Matched Uniform or Storage blocks must all be anonymous,"
         error(infoSink, "Matched Uniform or Storage blocks must all be anonymous,"
-                        " or all be named:");
+                        " or all be named:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
     }
     }
 
 
     if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage &&
     if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage &&
         (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) ||
         (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) ||
          (!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) {
          (!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) {
-        warn(infoSink, "Matched shader interfaces are using different instance names.");
+        warn(infoSink, "Matched shader interfaces are using different instance names.", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
     }
     }
 
 
     // Precision...
     // Precision...
     if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
     if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
-        error(infoSink, "Precision qualifiers must match:");
+        error(infoSink, "Precision qualifiers must match:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printPrecision = true;
     }
     }
 
 
     // Invariance...
     // Invariance...
     if (! crossStage && symbol.getQualifier().invariant != unitSymbol.getQualifier().invariant) {
     if (! crossStage && symbol.getQualifier().invariant != unitSymbol.getQualifier().invariant) {
-        error(infoSink, "Presence of invariant qualifier must match:");
+        error(infoSink, "Presence of invariant qualifier must match:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printQualifiers = true;
     }
     }
 
 
     // Precise...
     // Precise...
     if (! crossStage && symbol.getQualifier().isNoContraction() != unitSymbol.getQualifier().isNoContraction()) {
     if (! crossStage && symbol.getQualifier().isNoContraction() != unitSymbol.getQualifier().isNoContraction()) {
-        error(infoSink, "Presence of precise qualifier must match:");
+        error(infoSink, "Presence of precise qualifier must match:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printPrecision = true;
     }
     }
 
 
     // Auxiliary and interpolation...
     // Auxiliary and interpolation...
-    // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.  
+    // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.
     //  These mismatches are allowed between any pair of stages ...
     //  These mismatches are allowed between any pair of stages ...
     //  those provided in the fragment shader supersede those provided in previous stages."
     //  those provided in the fragment shader supersede those provided in previous stages."
     if (!crossStage &&
     if (!crossStage &&
@@ -944,59 +1044,138 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
         symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
         symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
         symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() ||
         symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() ||
         symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) {
         symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) {
-        error(infoSink, "Interpolation and auxiliary storage qualifiers must match:");
+        error(infoSink, "Interpolation and auxiliary storage qualifiers must match:", unitStage);
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printQualifiers = true;
     }
     }
 
 
     // Memory...
     // Memory...
-    if (symbol.getQualifier().coherent          != unitSymbol.getQualifier().coherent ||
-        symbol.getQualifier().devicecoherent    != unitSymbol.getQualifier().devicecoherent ||
-        symbol.getQualifier().queuefamilycoherent  != unitSymbol.getQualifier().queuefamilycoherent ||
-        symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent ||
-        symbol.getQualifier().subgroupcoherent  != unitSymbol.getQualifier().subgroupcoherent ||
-        symbol.getQualifier().shadercallcoherent!= unitSymbol.getQualifier().shadercallcoherent ||
-        symbol.getQualifier().nonprivate        != unitSymbol.getQualifier().nonprivate ||
-        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;
+    bool memoryQualifierError = false;
+    if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent) {
+        error(infoSink, "Memory coherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().devicecoherent != unitSymbol.getQualifier().devicecoherent) {
+        error(infoSink, "Memory devicecoherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent) {
+        error(infoSink, "Memory queuefamilycoherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent) {
+        error(infoSink, "Memory workgroupcoherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent) {
+        error(infoSink, "Memory subgroupcoherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().shadercallcoherent != unitSymbol.getQualifier().shadercallcoherent) {
+        error(infoSink, "Memory shadercallcoherent qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate) {
+        error(infoSink, "Memory nonprivate qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil) {
+        error(infoSink, "Memory volatil qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict) {
+        error(infoSink, "Memory restrict qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly) {
+        error(infoSink, "Memory readonly qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (symbol.getQualifier().writeonly != unitSymbol.getQualifier().writeonly) {
+        error(infoSink, "Memory writeonly qualifier must match:", unitStage);
+        memoryQualifierError = true;
+    }
+    if (memoryQualifierError) {
+          writeTypeComparison = true;
+          printQualifiers = true;
     }
     }
 
 
     // Layouts...
     // Layouts...
     // TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec
     // TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec
     //       requires separate user-supplied offset from actual computed offset, but
     //       requires separate user-supplied offset from actual computed offset, but
     //       current implementation only has one offset.
     //       current implementation only has one offset.
-    if (symbol.getQualifier().layoutMatrix    != unitSymbol.getQualifier().layoutMatrix ||
-        symbol.getQualifier().layoutPacking   != unitSymbol.getQualifier().layoutPacking ||
-        (symbol.getQualifier().hasLocation() && unitSymbol.getQualifier().hasLocation() && symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation) ||
-        symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent ||
-        symbol.getQualifier().layoutIndex     != unitSymbol.getQualifier().layoutIndex ||
-        (symbol.getQualifier().hasBinding() && unitSymbol.getQualifier().hasBinding() && symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding) ||
-        (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset))) {
-        error(infoSink, "Layout qualification must match:");
+    bool layoutQualifierError = false;
+    if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix) {
+        error(infoSink, "Layout matrix qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking) {
+        error(infoSink, "Layout packing qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().hasLocation() && unitSymbol.getQualifier().hasLocation() && symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation) {
+        error(infoSink, "Layout location qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent) {
+        error(infoSink, "Layout component qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex) {
+        error(infoSink, "Layout index qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().hasBinding() && unitSymbol.getQualifier().hasBinding() && symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding) {
+        error(infoSink, "Layout binding qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset)) {
+        error(infoSink, "Layout offset qualifier must match:", unitStage);
+        layoutQualifierError = true;
+    }
+    if (layoutQualifierError) {
         writeTypeComparison = true;
         writeTypeComparison = true;
+        printQualifiers = true;
     }
     }
 
 
     // Initializers have to match, if both are present, and if we don't already know the types don't match
     // Initializers have to match, if both are present, and if we don't already know the types don't match
-    if (! writeTypeComparison) {
+    if (! writeTypeComparison && ! errorReported) {
         if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) {
         if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) {
             if (symbol.getConstArray() != unitSymbol.getConstArray()) {
             if (symbol.getConstArray() != unitSymbol.getConstArray()) {
-                error(infoSink, "Initializers must match:");
+                error(infoSink, "Initializers must match:", unitStage);
                 infoSink.info << "    " << symbol.getName() << "\n";
                 infoSink.info << "    " << symbol.getName() << "\n";
             }
             }
         }
         }
     }
     }
 
 
     if (writeTypeComparison) {
     if (writeTypeComparison) {
-        infoSink.info << "    " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus ";
-        if (symbol.getName() != unitSymbol.getName())
-            infoSink.info << unitSymbol.getName() << ": ";
-
-        infoSink.info << "\"" << unitSymbol.getType().getCompleteString() << "\"\n";
+        if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
+            symbol.getType().getStruct() && unitSymbol.getType().getStruct()) {
+          if (printType) {
+            infoSink.info << "    " << StageName(getStage()) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision,
+                                                    printType, symbol.getName(), symbol.getType().getTypeName()) << "\"\n";
+            infoSink.info << "    " << StageName(unitStage) << " stage: \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision,
+                                                    printType, unitSymbol.getName(), unitSymbol.getType().getTypeName()) << "\"\n";
+          } else {
+            infoSink.info << "    " << StageName(getStage()) << " stage: Block: " << symbol.getType().getTypeName() << " Instance: " << symbol.getName()
+              << ": \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n";
+            infoSink.info << "    " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << " Instance: " << unitSymbol.getName()
+              << ": \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n";
+          }
+        } else {
+          if (printType) {
+            infoSink.info << "    " << StageName(getStage()) << " stage: \""
+              << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, symbol.getName()) << "\"\n";
+            infoSink.info << "    " << StageName(unitStage) << " stage: \""
+              << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, unitSymbol.getName()) << "\"\n";
+          } else {
+            infoSink.info << "    " << StageName(getStage()) << " stage: " << symbol.getName() << " \""
+              << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n";
+            infoSink.info << "    " << StageName(unitStage) << " stage: " << unitSymbol.getName() << " \""
+              << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n";
+          }
+        }
     }
     }
-#endif
 }
 }
 
 
 void TIntermediate::sharedBlockCheck(TInfoSink& infoSink)
 void TIntermediate::sharedBlockCheck(TInfoSink& infoSink)
@@ -1043,7 +1222,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
     // overlap/alias/missing I/O, etc.
     // overlap/alias/missing I/O, etc.
     inOutLocationCheck(infoSink);
     inOutLocationCheck(infoSink);
 
 
-#ifndef GLSLANG_WEB
     if (getNumPushConstants() > 1)
     if (getNumPushConstants() > 1)
         error(infoSink, "Only one push_constant block is allowed per stage");
         error(infoSink, "Only one push_constant block is allowed per stage");
 
 
@@ -1136,8 +1314,8 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
             error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
             error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
         break;
         break;
     case EShLangFragment:
     case EShLangFragment:
-        // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in 
-        // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage 
+        // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in
+        // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage
         // requiring explicit early_fragment_tests
         // requiring explicit early_fragment_tests
         if (getPostDepthCoverage() && !getEarlyFragmentTests())
         if (getPostDepthCoverage() && !getEarlyFragmentTests())
             error(infoSink, "post_depth_coverage requires early_fragment_tests");
             error(infoSink, "post_depth_coverage requires early_fragment_tests");
@@ -1154,7 +1332,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
         if (numShaderRecordBlocks > 1)
         if (numShaderRecordBlocks > 1)
             error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage");
             error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage");
         break;
         break;
-    case EShLangMeshNV:
+    case EShLangMesh:
         // NV_mesh_shader doesn't allow use of both single-view and per-view builtins.
         // NV_mesh_shader doesn't allow use of both single-view and per-view builtins.
         if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV"))
         if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV"))
             error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV");
             error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV");
@@ -1173,9 +1351,11 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
         if (primitives == TQualifier::layoutNotSet)
         if (primitives == TQualifier::layoutNotSet)
             error(infoSink, "At least one shader must specify a layout(max_primitives = value)");
             error(infoSink, "At least one shader must specify a layout(max_primitives = value)");
         // fall through
         // fall through
-    case EShLangTaskNV:
+    case EShLangTask:
         if (numTaskNVBlocks > 1)
         if (numTaskNVBlocks > 1)
             error(infoSink, "Only one taskNV interface block is allowed per shader");
             error(infoSink, "Only one taskNV interface block is allowed per shader");
+        if (numTaskEXTPayloads > 1)
+            error(infoSink, "Only single variable of type taskPayloadSharedEXT is allowed per shader");
         sharedBlockCheck(infoSink);
         sharedBlockCheck(infoSink);
         break;
         break;
     default:
     default:
@@ -1199,7 +1379,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
     } finalLinkTraverser;
     } finalLinkTraverser;
 
 
     treeRoot->traverse(&finalLinkTraverser);
     treeRoot->traverse(&finalLinkTraverser);
-#endif
 }
 }
 
 
 //
 //
@@ -1222,7 +1401,7 @@ void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink)
     TCall* newRoot;
     TCall* newRoot;
     do {
     do {
         // See if we have unvisited parts of the graph.
         // See if we have unvisited parts of the graph.
-        newRoot = 0;
+        newRoot = nullptr;
         for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
         for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
             if (! call->visited) {
             if (! call->visited) {
                 newRoot = &(*call);
                 newRoot = &(*call);
@@ -1356,7 +1535,10 @@ void TIntermediate::checkCallGraphBodies(TInfoSink& infoSink, bool keepUncalled)
     if (! keepUncalled) {
     if (! keepUncalled) {
         for (int f = 0; f < (int)functionSequence.size(); ++f) {
         for (int f = 0; f < (int)functionSequence.size(); ++f) {
             if (! reachable[f])
             if (! reachable[f])
+            {
+                resetTopLevelUncalledStatus(functionSequence[f]->getAsAggregate()->getName());
                 functionSequence[f] = nullptr;
                 functionSequence[f] = nullptr;
+            }
         }
         }
         functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end());
         functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end());
     }
     }
@@ -1424,7 +1606,7 @@ bool TIntermediate::userOutputUsed() const
     return found;
     return found;
 }
 }
 
 
-// Accumulate locations used for inputs, outputs, and uniforms, payload and callable data
+// Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT
 // and check for collisions as the accumulation is done.
 // 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.
 // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
@@ -1437,7 +1619,6 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
     typeCollision = false;
     typeCollision = false;
 
 
     int set;
     int set;
-    int setRT;
     if (qualifier.isPipeInput())
     if (qualifier.isPipeInput())
         set = 0;
         set = 0;
     else if (qualifier.isPipeOutput())
     else if (qualifier.isPipeOutput())
@@ -1446,10 +1627,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
         set = 2;
         set = 2;
     else if (qualifier.storage == EvqBuffer)
     else if (qualifier.storage == EvqBuffer)
         set = 3;
         set = 3;
+    else if (qualifier.storage == EvqTileImageEXT)
+        set = 4;
     else if (qualifier.isAnyPayload())
     else if (qualifier.isAnyPayload())
-        setRT = 0;
+        set = 0;
     else if (qualifier.isAnyCallable())
     else if (qualifier.isAnyCallable())
-        setRT = 1;
+        set = 1;
+    else if (qualifier.isHitObjectAttrNV())
+        set = 2;
     else
     else
         return -1;
         return -1;
 
 
@@ -1488,13 +1673,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
     // For raytracing IO (payloads and callabledata) each declaration occupies a single
     // For raytracing IO (payloads and callabledata) each declaration occupies a single
     // slot irrespective of type.
     // slot irrespective of type.
     int collision = -1; // no collision
     int collision = -1; // no collision
-#ifndef GLSLANG_WEB
-    if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) {
+    if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) {
         TRange range(qualifier.layoutLocation, qualifier.layoutLocation);
         TRange range(qualifier.layoutLocation, qualifier.layoutLocation);
-        collision = checkLocationRT(setRT, qualifier.layoutLocation);
+        collision = checkLocationRT(set, qualifier.layoutLocation);
         if (collision < 0)
         if (collision < 0)
-            usedIoRT[setRT].push_back(range);
-    } else if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 &&
+            usedIoRT[set].push_back(range);
+        return collision;
+    }
+    if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 &&
         (qualifier.isPipeInput() || qualifier.isPipeOutput())) {
         (qualifier.isPipeInput() || qualifier.isPipeOutput())) {
         // Dealing with dvec3 in/out split across two locations.
         // Dealing with dvec3 in/out split across two locations.
         // Need two io-ranges.
         // Need two io-ranges.
@@ -1520,31 +1706,33 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
             if (collision < 0)
             if (collision < 0)
                 usedIo[set].push_back(range2);
                 usedIo[set].push_back(range2);
         }
         }
-    } else
-#endif
-    {
-        // Not a dvec3 in/out split across two locations, generic path.
-        // Need a single IO-range block.
+        return collision;
+    }
 
 
-        TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1);
-        TRange componentRange(0, 3);
-        if (qualifier.hasComponent() || type.getVectorSize() > 0) {
-            int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1);
-            if (qualifier.hasComponent())
-                componentRange.start = qualifier.layoutComponent;
-            componentRange.last  = componentRange.start + consumedComponents - 1;
-        }
+    // Not a dvec3 in/out split across two locations, generic path.
+    // Need a single IO-range block.
 
 
-        // combine location and component ranges
-        TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0);
+    TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1);
+    TRange componentRange(0, 3);
+    if (qualifier.hasComponent() || type.getVectorSize() > 0) {
+        int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1);
+        if (qualifier.hasComponent())
+            componentRange.start = qualifier.layoutComponent;
+        componentRange.last  = componentRange.start + consumedComponents - 1;
+    }
 
 
-        // check for collisions, except for vertex inputs on desktop targeting OpenGL
-        if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
-            collision = checkLocationRange(set, range, type, typeCollision);
+    // combine location and component ranges
+    TBasicType basicTy = type.getBasicType();
+    if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT())
+        basicTy = type.getSampler().type;
+    TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0);
 
 
-        if (collision < 0)
-            usedIo[set].push_back(range);
-    }
+    // check for collisions, except for vertex inputs on desktop targeting OpenGL
+    if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
+        collision = checkLocationRange(set, range, type, typeCollision);
+
+    if (collision < 0)
+        usedIo[set].push_back(range);
 
 
     return collision;
     return collision;
 }
 }
@@ -1567,6 +1755,19 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp
         }
         }
     }
     }
 
 
+    // check typeCollision between tileImageEXT and out
+    if (set == 4 || set == 1) {
+      // if the set is "tileImageEXT", check against "out" and vice versa
+      int againstSet = (set == 4) ? 1 : 4;
+      for (size_t r = 0; r < usedIo[againstSet].size(); ++r) {
+        if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) {
+            // aliased-type mismatch
+            typeCollision = true;
+            return std::max(range.location.start, usedIo[againstSet][r].location.start);
+        }
+      }
+    }
+
     return -1; // no collision
     return -1; // no collision
 }
 }
 
 
@@ -1630,10 +1831,8 @@ int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage)
         if (type.isSizedArray() && !type.getQualifier().isPerView())
         if (type.isSizedArray() && !type.getQualifier().isPerView())
             return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage);
             return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage);
         else {
         else {
-#ifndef GLSLANG_WEB
             // unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];"
             // unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];"
             elementType.getQualifier().perViewNV = false;
             elementType.getQualifier().perViewNV = false;
-#endif
             return computeTypeLocationSize(elementType, stage);
             return computeTypeLocationSize(elementType, stage);
         }
         }
     }
     }
@@ -1709,8 +1908,6 @@ int TIntermediate::computeTypeUniformLocationSize(const TType& type)
     return 1;
     return 1;
 }
 }
 
 
-#ifndef GLSLANG_WEB
-
 // Accumulate xfb buffer ranges and check for collisions as the accumulation is done.
 // 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.
 // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
@@ -1802,7 +1999,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
         return size;
         return size;
     }
     }
 
 
-    int numComponents;
+    int numComponents {0};
     if (type.isScalar())
     if (type.isScalar())
         numComponents = 1;
         numComponents = 1;
     else if (type.isVector())
     else if (type.isVector())
@@ -1828,8 +2025,6 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
     }
     }
 }
 }
 
 
-#endif
-
 const int baseAlignmentVec4Std140 = 16;
 const int baseAlignmentVec4Std140 = 16;
 
 
 // Return the size and alignment of a component of the given type.
 // Return the size and alignment of a component of the given type.
@@ -1837,10 +2032,6 @@ const int baseAlignmentVec4Std140 = 16;
 // Return value is the alignment..
 // Return value is the alignment..
 int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
 int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
 {
 {
-#ifdef GLSLANG_WEB
-    size = 4; return 4;
-#endif
-
     switch (type.getBasicType()) {
     switch (type.getBasicType()) {
     case EbtInt64:
     case EbtInt64:
     case EbtUint64:
     case EbtUint64:
@@ -1851,6 +2042,15 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
     case EbtInt16:
     case EbtInt16:
     case EbtUint16:  size = 2; return 2;
     case EbtUint16:  size = 2; return 2;
     case EbtReference: size = 8; return 8;
     case EbtReference: size = 8; return 8;
+    case EbtSampler:
+    {
+        if (type.isBindlessImage() || type.isBindlessTexture()) {
+            size = 8; return 8;
+        }
+        else {
+            size = 4; return 4;
+        }
+    }
     default:         size = 4; return 4;
     default:         size = 4; return 4;
     }
     }
 }
 }
@@ -2068,7 +2268,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride,
 
 
     if (type.isVector()) {
     if (type.isVector()) {
         int scalarAlign = getBaseAlignmentScalar(type, size);
         int scalarAlign = getBaseAlignmentScalar(type, size);
-        
+
         size *= type.getVectorSize();
         size *= type.getVectorSize();
         return scalarAlign;
         return scalarAlign;
     }
     }
@@ -2089,7 +2289,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride,
 
 
     assert(0);  // all cases should be covered above
     assert(0);  // all cases should be covered above
     size = 1;
     size = 1;
-    return 1;    
+    return 1;
 }
 }
 
 
 int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor)
 int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor)
@@ -2171,7 +2371,6 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type)
     return size;
     return size;
 }
 }
 
 
-#ifndef GLSLANG_WEB
 bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
 bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
     return type.isArray() &&
     return type.isArray() &&
             ((language == EShLangGeometry    && type.getQualifier().storage == EvqVaryingIn) ||
             ((language == EShLangGeometry    && type.getQualifier().storage == EvqVaryingIn) ||
@@ -2179,10 +2378,9 @@ bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
                 ! type.getQualifier().patch) ||
                 ! type.getQualifier().patch) ||
             (language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) ||
             (language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) ||
             (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
             (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
-                type.getQualifier().pervertexNV) ||
-            (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
+             (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) ||
+            (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut &&
                 !type.getQualifier().perTaskNV));
                 !type.getQualifier().perTaskNV));
 }
 }
-#endif // not GLSLANG_WEB
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 147 - 72
src/libraries/glslang/glslang/MachineIndependent/localintermediate.h

@@ -43,11 +43,12 @@
 #include "../Public/ShaderLang.h"
 #include "../Public/ShaderLang.h"
 #include "Versions.h"
 #include "Versions.h"
 
 
-#include <string>
-#include <vector>
 #include <algorithm>
 #include <algorithm>
-#include <set>
 #include <array>
 #include <array>
+#include <functional>
+#include <set>
+#include <string>
+#include <vector>
 
 
 class TInfoSink;
 class TInfoSink;
 
 
@@ -147,7 +148,6 @@ struct TOffsetRange {
     TRange offset;
     TRange offset;
 };
 };
 
 
-#ifndef GLSLANG_WEB
 // Things that need to be tracked per xfb buffer.
 // Things that need to be tracked per xfb buffer.
 struct TXfbBuffer {
 struct TXfbBuffer {
     TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false),
     TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false),
@@ -159,7 +159,6 @@ struct TXfbBuffer {
     bool contains32BitType;
     bool contains32BitType;
     bool contains16BitType;
     bool contains16BitType;
 };
 };
-#endif
 
 
 // Track a set of strings describing how the module was processed.
 // Track a set of strings describing how the module was processed.
 // This includes command line options, transforms, etc., ideally inclusive enough
 // This includes command line options, transforms, etc., ideally inclusive enough
@@ -225,6 +224,16 @@ enum ComputeDerivativeMode {
     LayoutDerivativeGroupLinear,  // derivative_group_linearNV
     LayoutDerivativeGroupLinear,  // derivative_group_linearNV
 };
 };
 
 
+//
+// Status type on AST level. Some uncalled status or functions would be reset in call graph.
+// Currently we will keep status set by explicitly declared layout or variable decl.
+//
+enum AstRefType {
+    AstRefTypeVar,         // Status set by variable decl
+    AstRefTypeFunc,        // Status set by function decl
+    AstRefTypeLayout,      // Status set by layout decl
+};
+
 class TIdMaps {
 class TIdMaps {
 public:
 public:
     TMap<TString, long long>& operator[](long long i) { return maps[i]; }
     TMap<TString, long long>& operator[](long long i) { return maps[i]; }
@@ -283,34 +292,38 @@ class TIntermediate {
 public:
 public:
     explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
     explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
         language(l),
         language(l),
-#ifndef GLSLANG_ANGLE
         profile(p), version(v),
         profile(p), version(v),
-#endif
-        treeRoot(0),
+        treeRoot(nullptr),
         resources(TBuiltInResource{}),
         resources(TBuiltInResource{}),
         numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
         numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
         invertY(false),
         invertY(false),
         dxPositionW(false),
         dxPositionW(false),
+        enhancedMsgs(false),
+        debugInfo(false),
         useStorageBuffer(false),
         useStorageBuffer(false),
         invariantAll(false),
         invariantAll(false),
         nanMinMaxClamp(false),
         nanMinMaxClamp(false),
         depthReplacing(false),
         depthReplacing(false),
+        stencilReplacing(false),
         uniqueId(0),
         uniqueId(0),
         globalUniformBlockName(""),
         globalUniformBlockName(""),
         atomicCounterBlockName(""),
         atomicCounterBlockName(""),
         globalUniformBlockSet(TQualifier::layoutSetEnd),
         globalUniformBlockSet(TQualifier::layoutSetEnd),
         globalUniformBlockBinding(TQualifier::layoutBindingEnd),
         globalUniformBlockBinding(TQualifier::layoutBindingEnd),
-        atomicCounterBlockSet(TQualifier::layoutSetEnd)
-#ifndef GLSLANG_WEB
-        ,
+        atomicCounterBlockSet(TQualifier::layoutSetEnd),
         implicitThisName("@this"), implicitCounterName("@count"),
         implicitThisName("@this"), implicitCounterName("@count"),
         source(EShSourceNone),
         source(EShSourceNone),
         useVulkanMemoryModel(false),
         useVulkanMemoryModel(false),
         invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet),
         invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet),
         inputPrimitive(ElgNone), outputPrimitive(ElgNone),
         inputPrimitive(ElgNone), outputPrimitive(ElgNone),
-        pixelCenterInteger(false), originUpperLeft(false),
+        pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false),
         vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
         vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
-        postDepthCoverage(false), depthLayout(EldNone),
+        postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false),
+        nonCoherentColorAttachmentReadEXT(false),
+        nonCoherentDepthAttachmentReadEXT(false),
+        nonCoherentStencilAttachmentReadEXT(false),
+        depthLayout(EldNone),
+        stencilLayout(ElsNone),
         hlslFunctionality1(false),
         hlslFunctionality1(false),
         blendEquations(0), xfbMode(false), multiStream(false),
         blendEquations(0), xfbMode(false), multiStream(false),
         layoutOverrideCoverage(false),
         layoutOverrideCoverage(false),
@@ -320,6 +333,7 @@ public:
         primitives(TQualifier::layoutNotSet),
         primitives(TQualifier::layoutNotSet),
         numTaskNVBlocks(0),
         numTaskNVBlocks(0),
         layoutPrimitiveCulling(false),
         layoutPrimitiveCulling(false),
+        numTaskEXTPayloads(0),
         autoMapBindings(false),
         autoMapBindings(false),
         autoMapLocations(false),
         autoMapLocations(false),
         flattenUniformArrays(false),
         flattenUniformArrays(false),
@@ -335,7 +349,6 @@ public:
         spirvRequirement(nullptr),
         spirvRequirement(nullptr),
         spirvExecutionMode(nullptr),
         spirvExecutionMode(nullptr),
         uniformLocationBase(0)
         uniformLocationBase(0)
-#endif
     {
     {
         localSize[0] = 1;
         localSize[0] = 1;
         localSize[1] = 1;
         localSize[1] = 1;
@@ -346,23 +359,17 @@ public:
         localSizeSpecId[0] = TQualifier::layoutNotSet;
         localSizeSpecId[0] = TQualifier::layoutNotSet;
         localSizeSpecId[1] = TQualifier::layoutNotSet;
         localSizeSpecId[1] = TQualifier::layoutNotSet;
         localSizeSpecId[2] = TQualifier::layoutNotSet;
         localSizeSpecId[2] = TQualifier::layoutNotSet;
-#ifndef GLSLANG_WEB
         xfbBuffers.resize(TQualifier::layoutXfbBufferEnd);
         xfbBuffers.resize(TQualifier::layoutXfbBufferEnd);
         shiftBinding.fill(0);
         shiftBinding.fill(0);
-#endif
     }
     }
 
 
     void setVersion(int v)
     void setVersion(int v)
     {
     {
-#ifndef GLSLANG_ANGLE
         version = v;
         version = v;
-#endif
     }
     }
     void setProfile(EProfile p)
     void setProfile(EProfile p)
     {
     {
-#ifndef GLSLANG_ANGLE
         profile = p;
         profile = p;
-#endif
     }
     }
 
 
     int getVersion() const { return version; }
     int getVersion() const { return version; }
@@ -419,6 +426,9 @@ public:
         case EShTargetVulkan_1_2:
         case EShTargetVulkan_1_2:
             processes.addProcess("target-env vulkan1.2");
             processes.addProcess("target-env vulkan1.2");
             break;
             break;
+        case EShTargetVulkan_1_3:
+            processes.addProcess("target-env vulkan1.3");
+            break;
         default:
         default:
             processes.addProcess("target-env vulkanUnknown");
             processes.addProcess("target-env vulkanUnknown");
             break;
             break;
@@ -456,6 +466,12 @@ public:
     const std::string& getEntryPointName() const { return entryPointName; }
     const std::string& getEntryPointName() const { return entryPointName; }
     const std::string& getEntryPointMangledName() const { return entryPointMangledName; }
     const std::string& getEntryPointMangledName() const { return entryPointMangledName; }
 
 
+    void setDebugInfo(bool debuginfo)
+    {
+        debugInfo = debuginfo;
+    }
+    bool getDebugInfo() const { return debugInfo; }
+
     void setInvertY(bool invert)
     void setInvertY(bool invert)
     {
     {
         invertY = invert;
         invertY = invert;
@@ -466,12 +482,18 @@ public:
 
 
     void setDxPositionW(bool dxPosW)
     void setDxPositionW(bool dxPosW)
     {
     {
-      dxPositionW = dxPosW;
-      if (dxPositionW)
-        processes.addProcess("dx-position-w");
+        dxPositionW = dxPosW;
+        if (dxPositionW)
+            processes.addProcess("dx-position-w");
     }
     }
     bool getDxPositionW() const { return dxPositionW; }
     bool getDxPositionW() const { return dxPositionW; }
 
 
+    void setEnhancedMsgs()
+    {
+        enhancedMsgs = true;
+    }
+    bool getEnhancedMsgs() const { return enhancedMsgs && getSource() == EShSourceGlsl; }
+
 #ifdef ENABLE_HLSL
 #ifdef ENABLE_HLSL
     void setSource(EShSource s) { source = s; }
     void setSource(EShSource s) { source = s; }
     EShSource getSource() const { return source; }
     EShSource getSource() const { return source; }
@@ -506,6 +528,8 @@ public:
     TOperator mapTypeToConstructorOp(const TType&) const;
     TOperator mapTypeToConstructorOp(const TType&) const;
     TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right);
     TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right);
     TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&);
     TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&);
+    TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right);
+    TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&);
     TIntermAggregate* makeAggregate(TIntermNode* node);
     TIntermAggregate* makeAggregate(TIntermNode* node);
     TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&);
     TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&);
     TIntermAggregate* makeAggregate(const TSourceLoc&);
     TIntermAggregate* makeAggregate(const TSourceLoc&);
@@ -551,7 +575,8 @@ public:
     TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors<TVectorSelector>& fields, const TSourceLoc&);
     TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors<TVectorSelector>& fields, const TSourceLoc&);
 
 
     // Tree ops
     // Tree ops
-    static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay , bool BufferReferenceOk = false);
+    static const TIntermTyped* traverseLValueBase(const TIntermTyped*, bool swizzleOkay, bool bufferReferenceOk = false,
+                                                  std::function<bool(const TIntermNode&)> proc = {});
 
 
     // Linkage related
     // Linkage related
     void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
     void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
@@ -577,6 +602,8 @@ public:
     bool isInvariantAll() const { return invariantAll; }
     bool isInvariantAll() const { return invariantAll; }
     void setDepthReplacing() { depthReplacing = true; }
     void setDepthReplacing() { depthReplacing = true; }
     bool isDepthReplacing() const { return depthReplacing; }
     bool isDepthReplacing() const { return depthReplacing; }
+    void setStencilReplacing() { stencilReplacing = true; }
+    bool isStencilReplacing() const { return stencilReplacing; }
     bool setLocalSize(int dim, int size)
     bool setLocalSize(int dim, int size)
     {
     {
         if (localSizeNotDefault[dim])
         if (localSizeNotDefault[dim])
@@ -606,34 +633,6 @@ public:
                localSizeSpecId[1] != TQualifier::layoutNotSet ||
                localSizeSpecId[1] != TQualifier::layoutNotSet ||
                localSizeSpecId[2] != TQualifier::layoutNotSet;
                localSizeSpecId[2] != TQualifier::layoutNotSet;
     }
     }
-#ifdef GLSLANG_WEB
-    void output(TInfoSink&, bool tree) { }
-
-    bool isEsProfile() const { return false; }
-    bool getXfbMode() const { return false; }
-    bool isMultiStream() const { return false; }
-    TLayoutGeometry getOutputPrimitive() const { return ElgNone; }
-    bool getPostDepthCoverage() const { return false; }
-    bool getEarlyFragmentTests() const { return false; }
-    TLayoutDepth getDepth() const { return EldNone; }
-    bool getPixelCenterInteger() const { return false; }
-    void setOriginUpperLeft() { }
-    bool getOriginUpperLeft() const { return true; }
-    TInterlockOrdering getInterlockOrdering() const { return EioNone; }
-
-    bool getAutoMapBindings() const { return false; }
-    bool getAutoMapLocations() const { return false; }
-    int getNumPushConstants() const { return 0; }
-    void addShaderRecordCount() { }
-    void addTaskNVCount() { }
-    void setUseVulkanMemoryModel() { }
-    bool usingVulkanMemoryModel() const { return false; }
-    bool usingPhysicalStorageBuffer() const { return false; }
-    bool usingVariablePointers() const { return false; }
-    unsigned getXfbStride(int buffer) const { return 0; }
-    bool hasLayoutDerivativeModeNone() const { return false; }
-    ComputeDerivativeMode getLayoutDerivativeModeNone() const { return LayoutDerivativeNone; }
-#else
     void output(TInfoSink&, bool tree);
     void output(TInfoSink&, bool tree);
 
 
     bool isEsProfile() const { return profile == EEsProfile; }
     bool isEsProfile() const { return profile == EEsProfile; }
@@ -728,6 +727,65 @@ public:
         useVariablePointers = true;
         useVariablePointers = true;
         processes.addProcess("use-variable-pointers");
         processes.addProcess("use-variable-pointers");
     }
     }
+    // Set the global flag for bindless texture
+    void setBindlessTextureMode(const TString& currentCaller, AstRefType type)
+    {
+        // When type is not func, currentCaller should be "" (empty string)
+        bindlessTextureModeCaller[currentCaller] = type;
+    }
+
+    // Get the global flag for bindless texture
+    bool getBindlessTextureMode() const
+    {
+        return (bindlessTextureModeCaller.size() > 0);
+    }
+
+    // Set the global flag for bindless image
+    void setBindlessImageMode(const TString& currentCaller, AstRefType type)
+    {
+        // When type is not func, currentCaller should be "" (empty string)
+        bindlessImageModeCaller[currentCaller] = type;
+    }
+
+    // Get the global flag for bindless image
+    bool getBindlessImageMode() const
+    {
+        return (bindlessImageModeCaller.size() > 0);
+    }
+
+    // Get the global flag for bindless texture
+    bool resetTopLevelUncalledStatus(const TString& deadCaller)
+    {
+        // For reflection collection purpose, currently uniform layout setting and some
+        // flags introduced by variables (IO, global, etc,.) won't be reset here.
+        // Remove each global status (AST top level) introduced by uncalled functions.
+        // If a status is set by several functions, keep those which in call graph.
+        bool result = false;
+
+        // For two types of bindless mode flag, we would only reset which is set by an uncalled function.
+        // If one status flag's key in caller vec is empty, it should be come from a non-function setting.
+        if (!bindlessTextureModeCaller.empty()) {
+            auto caller = bindlessTextureModeCaller.find(deadCaller);
+            if (caller != bindlessTextureModeCaller.end() && bindlessTextureModeCaller[deadCaller] == AstRefTypeFunc) {
+                bindlessTextureModeCaller.erase(caller);
+                result = true;
+            }
+        }
+        if (!bindlessImageModeCaller.empty()) {
+            auto caller = bindlessImageModeCaller.find(deadCaller);
+            if (caller != bindlessImageModeCaller.end() && bindlessImageModeCaller[deadCaller] == AstRefTypeFunc) {
+                bindlessImageModeCaller.erase(caller);
+                result = true;
+            }
+        }
+        return result;
+    }
+
+    bool getBindlessMode() const
+    {
+        return getBindlessTextureMode() || getBindlessImageMode();
+    }
+
     bool usingVariablePointers() const { return useVariablePointers; }
     bool usingVariablePointers() const { return useVariablePointers; }
 
 
 #ifdef ENABLE_HLSL
 #ifdef ENABLE_HLSL
@@ -743,6 +801,7 @@ public:
     int getNumPushConstants() const { return numPushConstants; }
     int getNumPushConstants() const { return numPushConstants; }
     void addShaderRecordCount() { ++numShaderRecordBlocks; }
     void addShaderRecordCount() { ++numShaderRecordBlocks; }
     void addTaskNVCount() { ++numTaskNVBlocks; }
     void addTaskNVCount() { ++numTaskNVBlocks; }
+    void addTaskPayloadEXTCount() { ++numTaskEXTPayloads; }
 
 
     bool setInvocations(int i)
     bool setInvocations(int i)
     {
     {
@@ -808,10 +867,18 @@ public:
         return true;
         return true;
     }
     }
     TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
     TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
+    void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; }
+    bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; }
+    void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; }
+    bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; }
+    void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; }
+    bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; }
     void setPostDepthCoverage() { postDepthCoverage = true; }
     void setPostDepthCoverage() { postDepthCoverage = true; }
     bool getPostDepthCoverage() const { return postDepthCoverage; }
     bool getPostDepthCoverage() const { return postDepthCoverage; }
     void setEarlyFragmentTests() { earlyFragmentTests = true; }
     void setEarlyFragmentTests() { earlyFragmentTests = true; }
+    void setEarlyAndLateFragmentTestsAMD() { earlyAndLateFragmentTestsAMD = true; }
     bool getEarlyFragmentTests() const { return earlyFragmentTests; }
     bool getEarlyFragmentTests() const { return earlyFragmentTests; }
+    bool getEarlyAndLateFragmentTestsAMD() const { return earlyAndLateFragmentTestsAMD; }
     bool setDepth(TLayoutDepth d)
     bool setDepth(TLayoutDepth d)
     {
     {
         if (depthLayout != EldNone)
         if (depthLayout != EldNone)
@@ -819,11 +886,21 @@ public:
         depthLayout = d;
         depthLayout = d;
         return true;
         return true;
     }
     }
+    bool setStencil(TLayoutStencil s)
+    {
+        if (stencilLayout != ElsNone)
+            return stencilLayout == s;
+        stencilLayout = s;
+        return true;
+    }
     TLayoutDepth getDepth() const { return depthLayout; }
     TLayoutDepth getDepth() const { return depthLayout; }
+    TLayoutStencil getStencil() const { return stencilLayout; }
     void setOriginUpperLeft() { originUpperLeft = true; }
     void setOriginUpperLeft() { originUpperLeft = true; }
     bool getOriginUpperLeft() const { return originUpperLeft; }
     bool getOriginUpperLeft() const { return originUpperLeft; }
     void setPixelCenterInteger() { pixelCenterInteger = true; }
     void setPixelCenterInteger() { pixelCenterInteger = true; }
     bool getPixelCenterInteger() const { return pixelCenterInteger; }
     bool getPixelCenterInteger() const { return pixelCenterInteger; }
+    void setTexCoordRedeclared() { texCoordBuiltinRedeclared = true; }
+    bool getTexCoordRedeclared() const { return texCoordBuiltinRedeclared; }
     void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); }
     void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); }
     unsigned int getBlendEquations() const { return blendEquations; }
     unsigned int getBlendEquations() const { return blendEquations; }
     bool setXfbBufferStride(int buffer, unsigned stride)
     bool setXfbBufferStride(int buffer, unsigned stride)
@@ -894,7 +971,6 @@ public:
     void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args);
     void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args);
     bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; }
     bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; }
     const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; }
     const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; }
-#endif // GLSLANG_WEB
 
 
     void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
     void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
     {
     {
@@ -1001,12 +1077,6 @@ public:
     void setUniqueId(unsigned long long id) { uniqueId = id; }
     void setUniqueId(unsigned long long id) { uniqueId = id; }
 
 
     // Certain explicit conversions are allowed conditionally
     // Certain explicit conversions are allowed conditionally
-#ifdef GLSLANG_WEB
-    bool getArithemeticInt8Enabled() const { return false; }
-    bool getArithemeticInt16Enabled() const { return false; }
-    bool getArithemeticFloat16Enabled() const { return false; }
-    void updateNumericFeature(TNumericFeatures::feature f, bool on) { }
-#else
     bool getArithemeticInt8Enabled() const {
     bool getArithemeticInt8Enabled() const {
         return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
         return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) ||
                numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8);
                numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8);
@@ -1024,12 +1094,11 @@ public:
     }
     }
     void updateNumericFeature(TNumericFeatures::feature f, bool on)
     void updateNumericFeature(TNumericFeatures::feature f, bool on)
         { on ? numericFeatures.insert(f) : numericFeatures.erase(f); }
         { on ? numericFeatures.insert(f) : numericFeatures.erase(f); }
-#endif
 
 
 protected:
 protected:
     TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
     TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
-    void error(TInfoSink& infoSink, const char*);
-    void warn(TInfoSink& infoSink, const char*);
+    void error(TInfoSink& infoSink, const char*, EShLanguage unitStage = EShLangCount);
+    void warn(TInfoSink& infoSink, const char*, EShLanguage unitStage = EShLangCount);
     void mergeCallGraphs(TInfoSink&, TIntermediate&);
     void mergeCallGraphs(TInfoSink&, TIntermediate&);
     void mergeModes(TInfoSink&, TIntermediate&);
     void mergeModes(TInfoSink&, TIntermediate&);
     void mergeTrees(TInfoSink&, TIntermediate&);
     void mergeTrees(TInfoSink&, TIntermediate&);
@@ -1066,13 +1135,8 @@ protected:
     typedef std::list<TCall> TGraph;
     typedef std::list<TCall> TGraph;
     TGraph callGraph;
     TGraph callGraph;
 
 
-#ifdef GLSLANG_ANGLE
-    const EProfile profile = ECoreProfile;
-    const int version = 450;
-#else
     EProfile profile;                           // source profile
     EProfile profile;                           // source profile
     int version;                                // source version
     int version;                                // source version
-#endif
     SpvVersion spvVersion;
     SpvVersion spvVersion;
     TIntermNode* treeRoot;
     TIntermNode* treeRoot;
     std::set<std::string> requestedExtensions;  // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
     std::set<std::string> requestedExtensions;  // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
@@ -1083,10 +1147,13 @@ protected:
     bool recursive;
     bool recursive;
     bool invertY;
     bool invertY;
     bool dxPositionW;
     bool dxPositionW;
+    bool enhancedMsgs;
+    bool debugInfo;
     bool useStorageBuffer;
     bool useStorageBuffer;
     bool invariantAll;
     bool invariantAll;
     bool nanMinMaxClamp;            // true if desiring min/max/clamp to favor non-NaN over NaN
     bool nanMinMaxClamp;            // true if desiring min/max/clamp to favor non-NaN over NaN
     bool depthReplacing;
     bool depthReplacing;
+    bool stencilReplacing;
     int localSize[3];
     int localSize[3];
     bool localSizeNotDefault[3];
     bool localSizeNotDefault[3];
     int localSizeSpecId[3];
     int localSizeSpecId[3];
@@ -1098,7 +1165,6 @@ protected:
     unsigned int globalUniformBlockBinding;
     unsigned int globalUniformBlockBinding;
     unsigned int atomicCounterBlockSet;
     unsigned int atomicCounterBlockSet;
 
 
-#ifndef GLSLANG_WEB
 public:
 public:
     const char* const implicitThisName;
     const char* const implicitThisName;
     const char* const implicitCounterName;
     const char* const implicitCounterName;
@@ -1111,13 +1177,19 @@ protected:
     TLayoutGeometry outputPrimitive;
     TLayoutGeometry outputPrimitive;
     bool pixelCenterInteger;
     bool pixelCenterInteger;
     bool originUpperLeft;
     bool originUpperLeft;
+    bool texCoordBuiltinRedeclared;
     TVertexSpacing vertexSpacing;
     TVertexSpacing vertexSpacing;
     TVertexOrder vertexOrder;
     TVertexOrder vertexOrder;
     TInterlockOrdering interlockOrdering;
     TInterlockOrdering interlockOrdering;
     bool pointMode;
     bool pointMode;
     bool earlyFragmentTests;
     bool earlyFragmentTests;
     bool postDepthCoverage;
     bool postDepthCoverage;
+    bool earlyAndLateFragmentTestsAMD;
+    bool nonCoherentColorAttachmentReadEXT;
+    bool nonCoherentDepthAttachmentReadEXT;
+    bool nonCoherentStencilAttachmentReadEXT;
     TLayoutDepth depthLayout;
     TLayoutDepth depthLayout;
+    TLayoutStencil stencilLayout;
     bool hlslFunctionality1;
     bool hlslFunctionality1;
     int blendEquations;        // an 'or'ing of masks of shifts of TBlendEquationShift
     int blendEquations;        // an 'or'ing of masks of shifts of TBlendEquationShift
     bool xfbMode;
     bool xfbMode;
@@ -1130,6 +1202,7 @@ protected:
     int primitives;
     int primitives;
     int numTaskNVBlocks;
     int numTaskNVBlocks;
     bool layoutPrimitiveCulling;
     bool layoutPrimitiveCulling;
+    int numTaskEXTPayloads;
 
 
     // Base shift values
     // Base shift values
     std::array<unsigned int, EResCount> shiftBinding;
     std::array<unsigned int, EResCount> shiftBinding;
@@ -1157,20 +1230,22 @@ protected:
 
 
     TSpirvRequirement* spirvRequirement;
     TSpirvRequirement* spirvRequirement;
     TSpirvExecutionMode* spirvExecutionMode;
     TSpirvExecutionMode* spirvExecutionMode;
-
+    std::map<TString, AstRefType> bindlessTextureModeCaller;
+    std::map<TString, AstRefType> bindlessImageModeCaller;
     std::unordered_map<std::string, int> uniformLocationOverrides;
     std::unordered_map<std::string, int> uniformLocationOverrides;
     int uniformLocationBase;
     int uniformLocationBase;
     TNumericFeatures numericFeatures;
     TNumericFeatures numericFeatures;
-#endif
     std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides;
     std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides;
 
 
     std::unordered_set<int> usedConstantId; // specialization constant ids used
     std::unordered_set<int> usedConstantId; // specialization constant ids used
     std::vector<TOffsetRange> usedAtomics;  // sets of bindings used by atomic counters
     std::vector<TOffsetRange> usedAtomics;  // sets of bindings used by atomic counters
     std::vector<TIoRange> usedIo[4];        // sets of used locations, one for each of in, out, uniform, and buffers
     std::vector<TIoRange> usedIo[4];        // sets of used locations, one for each of in, out, uniform, and buffers
-    std::vector<TRange> usedIoRT[2];        // sets of used location, one for rayPayload/rayPayloadIN and other
-                                            // for callableData/callableDataIn
+    std::vector<TRange> usedIoRT[4];        // sets of used location, one for rayPayload/rayPayloadIN,
+                                            // one for callableData/callableDataIn, one for hitObjectAttributeNV and
+                                            // one for shaderrecordhitobjectNV
     // set of names of statically read/written I/O that might need extra checking
     // set of names of statically read/written I/O that might need extra checking
     std::set<TString> ioAccessed;
     std::set<TString> ioAccessed;
+
     // source code of shader, useful as part of debug information
     // source code of shader, useful as part of debug information
     std::string sourceFile;
     std::string sourceFile;
     std::string sourceText;
     std::string sourceText;

+ 1 - 1
src/libraries/glslang/glslang/MachineIndependent/parseConst.cpp

@@ -198,7 +198,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
 
 
 bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
 bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
 {
 {
-    if (root == 0)
+    if (root == nullptr)
         return false;
         return false;
 
 
     TConstTraverser it(unionArray, singleConstantParam, constructorType, t);
     TConstTraverser it(unionArray, singleConstantParam, constructorType, t);

+ 7 - 71
src/libraries/glslang/glslang/MachineIndependent/parseVersions.h

@@ -58,72 +58,18 @@ public:
                    const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
                    const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
                    bool forwardCompatible, EShMessages messages)
                    bool forwardCompatible, EShMessages messages)
         :
         :
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
         forwardCompatible(forwardCompatible),
         forwardCompatible(forwardCompatible),
         profile(profile),
         profile(profile),
-#endif
         infoSink(infoSink), version(version), 
         infoSink(infoSink), version(version), 
         language(language),
         language(language),
         spvVersion(spvVersion), 
         spvVersion(spvVersion), 
-        intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { }
+        intermediate(interm), messages(messages), numErrors(0), currentScanner(nullptr) { }
     virtual ~TParseVersions() { }
     virtual ~TParseVersions() { }
     void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
     void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
     void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
     void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
-#ifdef GLSLANG_WEB
-    const EProfile profile = EEsProfile;
-    bool isEsProfile() const { return true; }
-    void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc)
-    {
-        if (! (EEsProfile & profileMask))
-            error(loc, "not supported with this profile:", featureDesc, ProfileName(profile));
-    }
-    void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
-        const char* const extensions[], const char* featureDesc)
-    {
-        if ((EEsProfile & profileMask) && (minVersion == 0 || version < minVersion))
-            error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
-    }
-    void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension,
-        const char* featureDesc)
-    {
-        profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc);
-    }
-    void initializeExtensionBehavior() { }
-    void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { }
-    void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { }
-    void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
-        const char* featureDesc) { }
-    void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[],
-        const char* featureDesc) { }
-    TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; }
-    bool extensionTurnedOn(const char* const extension) { return false; }
-    bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; }
-    void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { }
-    void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { }
-    void checkExtensionStage(const TSourceLoc&, const char* const extension) { }
-    void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior) { }
-    void fullIntegerCheck(const TSourceLoc&, const char* op) { }
-    void doubleCheck(const TSourceLoc&, const char* op) { }
-    bool float16Arithmetic() { return false; }
-    void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
-    bool int16Arithmetic() { return false; }
-    void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
-    bool int8Arithmetic() { return false; }
-    void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { }
-    void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
-    void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
-    void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { }
-    bool relaxedErrors()    const { return false; }
-    bool suppressWarnings() const { return true; }
-    bool isForwardCompatible() const { return false; }
-#else
-#ifdef GLSLANG_ANGLE
-    const bool forwardCompatible = true;
-    const EProfile profile = ECoreProfile;
-#else
+
     bool forwardCompatible;      // true if errors are to be given for use of deprecated features
     bool forwardCompatible;      // true if errors are to be given for use of deprecated features
     EProfile profile;            // the declared profile in the shader (core by default)
     EProfile profile;            // the declared profile in the shader (core by default)
-#endif
     bool isEsProfile() const { return profile == EEsProfile; }
     bool isEsProfile() const { return profile == EEsProfile; }
     void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
     void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
     void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
     void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
@@ -167,29 +113,19 @@ public:
     virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false);
     virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false);
     virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
     virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
     virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
     virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
-    virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
-    virtual void intcoopmatCheck(const TSourceLoc&, const char *op, bool builtIn = false);
+    virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false);
+    virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false);
+    virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
     bool relaxedErrors()    const { return (messages & EShMsgRelaxedErrors) != 0; }
     bool relaxedErrors()    const { return (messages & EShMsgRelaxedErrors) != 0; }
     bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
     bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
     bool isForwardCompatible() const { return forwardCompatible; }
     bool isForwardCompatible() const { return forwardCompatible; }
-#endif // GLSLANG_WEB
+
     virtual void spvRemoved(const TSourceLoc&, const char* op);
     virtual void spvRemoved(const TSourceLoc&, const char* op);
     virtual void vulkanRemoved(const TSourceLoc&, const char* op);
     virtual void vulkanRemoved(const TSourceLoc&, const char* op);
     virtual void requireVulkan(const TSourceLoc&, const char* op);
     virtual void requireVulkan(const TSourceLoc&, const char* op);
     virtual void requireSpv(const TSourceLoc&, const char* op);
     virtual void requireSpv(const TSourceLoc&, const char* op);
     virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version);
     virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version);
 
 
-
-#if defined(GLSLANG_WEB) && !defined(GLSLANG_WEB_DEVEL)
-    void C_DECL   error(const TSourceLoc&, const char* szReason, const char* szToken,
-                        const char* szExtraInfoFormat, ...) { addError(); }
-    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, ...) { addError(); }
-    void C_DECL  ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
-                        const char* szExtraInfoFormat, ...) { }
-#else
     virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
         const char* szExtraInfoFormat, ...) = 0;
         const char* szExtraInfoFormat, ...) = 0;
     virtual void C_DECL  warn(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL  warn(const TSourceLoc&, const char* szReason, const char* szToken,
@@ -198,7 +134,6 @@ public:
         const char* szExtraInfoFormat, ...) = 0;
         const char* szExtraInfoFormat, ...) = 0;
     virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
     virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
         const char* szExtraInfoFormat, ...) = 0;
         const char* szExtraInfoFormat, ...) = 0;
-#endif
 
 
     void addError() { ++numErrors; }
     void addError() { ++numErrors; }
     int getNumErrors() const { return numErrors; }
     int getNumErrors() const { return numErrors; }
@@ -231,6 +166,7 @@ public:
 protected:
 protected:
     TMap<TString, TExtensionBehavior> extensionBehavior;    // for each extension string, what its current behavior is
     TMap<TString, TExtensionBehavior> extensionBehavior;    // for each extension string, what its current behavior is
     TMap<TString, unsigned int> extensionMinSpv;            // for each extension string, store minimum spirv required
     TMap<TString, unsigned int> extensionMinSpv;            // for each extension string, store minimum spirv required
+    TVector<TString> spvUnsupportedExt;                     // for extensions reserved for spv usage.
     EShMessages messages;        // errors/warnings/rule-sets
     EShMessages messages;        // errors/warnings/rule-sets
     int numErrors;               // number of compile-time errors encountered
     int numErrors;               // number of compile-time errors encountered
     TInputScanner* currentScanner;
     TInputScanner* currentScanner;

+ 14 - 14
src/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp

@@ -378,8 +378,6 @@ namespace {
     int op_cmpl(int a) { return ~a; }
     int op_cmpl(int a) { return ~a; }
     int op_not(int a) { return !a; }
     int op_not(int a) { return !a; }
 
 
-};
-
 struct TBinop {
 struct TBinop {
     int token, precedence, (*op)(int, int);
     int token, precedence, (*op)(int, int);
 } binop[] = {
 } binop[] = {
@@ -412,6 +410,8 @@ struct TUnop {
     { '!', op_not },
     { '!', op_not },
 };
 };
 
 
+} // anonymous namespace
+
 #define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0]))
 #define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0]))
 
 
 int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken)
 int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken)
@@ -736,7 +736,6 @@ int TPpContext::CPPline(TPpToken* ppToken)
         parseContext.setCurrentLine(lineRes);
         parseContext.setCurrentLine(lineRes);
 
 
         if (token != '\n') {
         if (token != '\n') {
-#ifndef GLSLANG_WEB
             if (token == PpAtomConstString) {
             if (token == PpAtomConstString) {
                 parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line");
                 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
                 // We need to save a copy of the string instead of pointing
@@ -746,9 +745,7 @@ int TPpContext::CPPline(TPpToken* ppToken)
                 parseContext.setCurrentSourceName(sourceName);
                 parseContext.setCurrentSourceName(sourceName);
                 hasFile = true;
                 hasFile = true;
                 token = scanToken(ppToken);
                 token = scanToken(ppToken);
-            } else
-#endif
-            {
+            } else {
                 token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken);
                 token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken);
                 if (! fileErr) {
                 if (! fileErr) {
                     parseContext.setCurrentString(fileRes);
                     parseContext.setCurrentString(fileRes);
@@ -974,7 +971,6 @@ int TPpContext::readCPPline(TPpToken* ppToken)
         case PpAtomLine:
         case PpAtomLine:
             token = CPPline(ppToken);
             token = CPPline(ppToken);
             break;
             break;
-#ifndef GLSLANG_WEB
         case PpAtomInclude:
         case PpAtomInclude:
             if(!parseContext.isReadingHLSL()) {
             if(!parseContext.isReadingHLSL()) {
                 parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include");
                 parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include");
@@ -984,7 +980,6 @@ int TPpContext::readCPPline(TPpToken* ppToken)
         case PpAtomPragma:
         case PpAtomPragma:
             token = CPPpragma(ppToken);
             token = CPPpragma(ppToken);
             break;
             break;
-#endif
         case PpAtomUndef:
         case PpAtomUndef:
             token = CPPundef(ppToken);
             token = CPPundef(ppToken);
             break;
             break;
@@ -1126,9 +1121,6 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
         pasting = true;
         pasting = true;
     }
     }
 
 
-    // HLSL does expand macros before concatenation
-    if (pasting && pp->parseContext.isReadingHLSL())
-        pasting = false;
 
 
     // TODO: preprocessor:  properly handle whitespace (or lack of it) between tokens when expanding
     // TODO: preprocessor:  properly handle whitespace (or lack of it) between tokens when expanding
     if (token == PpAtomIdentifier) {
     if (token == PpAtomIdentifier) {
@@ -1138,9 +1130,12 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
                 break;
                 break;
         if (i >= 0) {
         if (i >= 0) {
             TokenStream* arg = expandedArgs[i];
             TokenStream* arg = expandedArgs[i];
-            if (arg == nullptr || pasting)
+            bool expanded = !!arg && !pasting;
+            // HLSL does expand macros before concatenation
+            if (arg == nullptr || (pasting && !pp->parseContext.isReadingHLSL()) ) {
                 arg = args[i];
                 arg = args[i];
-            pp->pushTokenStreamInput(*arg, prepaste);
+            }
+            pp->pushTokenStreamInput(*arg, prepaste, expanded);
 
 
             return pp->scanToken(ppToken);
             return pp->scanToken(ppToken);
         }
         }
@@ -1183,6 +1178,9 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
 {
 {
     ppToken->space = false;
     ppToken->space = false;
     int macroAtom = atomStrings.getAtom(ppToken->name);
     int macroAtom = atomStrings.getAtom(ppToken->name);
+    if (ppToken->fullyExpanded)
+        return MacroExpandNotStarted;
+
     switch (macroAtom) {
     switch (macroAtom) {
     case PpAtomLineMacro:
     case PpAtomLineMacro:
         // Arguments which are macro have been replaced in the first stage.
         // Arguments which are macro have been replaced in the first stage.
@@ -1214,8 +1212,10 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
     MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom);
     MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom);
 
 
     // no recursive expansions
     // no recursive expansions
-    if (macro != nullptr && macro->busy)
+    if (macro != nullptr && macro->busy) {
+        ppToken->fullyExpanded = true;
         return MacroExpandNotStarted;
         return MacroExpandNotStarted;
+    }
 
 
     // not expanding undefined macros
     // not expanding undefined macros
     if ((macro == nullptr || macro->undef) && ! expandUndef)
     if ((macro == nullptr || macro->undef) && ! expandUndef)

+ 1 - 1
src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp

@@ -85,7 +85,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace glslang {
 namespace glslang {
 
 
 TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) :
 TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) :
-    preamble(0), strings(0), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false),
+    preamble(nullptr), strings(nullptr), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false),
     rootFileName(rootFileName),
     rootFileName(rootFileName),
     currentSourceFile(rootFileName),
     currentSourceFile(rootFileName),
     disableEscapeSequences(false)
     disableEscapeSequences(false)

+ 48 - 12
src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h

@@ -86,11 +86,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "../ParseHelper.h"
 #include "../ParseHelper.h"
 #include "PpTokens.h"
 #include "PpTokens.h"
 
 
-/* windows only pragma */
-#ifdef _MSC_VER
-    #pragma warning(disable : 4127)
-#endif
-
 namespace glslang {
 namespace glslang {
 
 
 class TPpToken {
 class TPpToken {
@@ -102,6 +97,7 @@ public:
         i64val = 0;
         i64val = 0;
         loc.init();
         loc.init();
         name[0] = 0;
         name[0] = 0;
+        fullyExpanded = false;
     }
     }
 
 
     // Used for comparing macro definitions, so checks what is relevant for that.
     // Used for comparing macro definitions, so checks what is relevant for that.
@@ -117,6 +113,8 @@ public:
     // True if a space (for white space or a removed comment) should also be
     // True if a space (for white space or a removed comment) should also be
     // recognized, in front of the token returned:
     // recognized, in front of the token returned:
     bool space;
     bool space;
+
+    bool fullyExpanded;
     // Numeric value of the token:
     // Numeric value of the token:
     union {
     union {
         int ival;
         int ival;
@@ -217,6 +215,7 @@ public:
         virtual bool peekContinuedPasting(int) { return false; } // true when non-spaced tokens can paste
         virtual bool peekContinuedPasting(int) { return false; } // true when non-spaced tokens can paste
         virtual bool endOfReplacementList() { return false; } // true when at the end of a macro replacement list (RHS of #define)
         virtual bool endOfReplacementList() { return false; } // true when at the end of a macro replacement list (RHS of #define)
         virtual bool isMacroInput() { return false; }
         virtual bool isMacroInput() { return false; }
+        virtual bool isStringInput() { return false; }
 
 
         // Will be called when we start reading tokens from this instance
         // Will be called when we start reading tokens from this instance
         virtual void notifyActivated() {}
         virtual void notifyActivated() {}
@@ -357,7 +356,8 @@ protected:
     // Scanner data:
     // Scanner data:
     int previous_token;
     int previous_token;
     TParseContextBase& parseContext;
     TParseContextBase& parseContext;
-
+    std::vector<int> lastLineTokens;
+    std::vector<TSourceLoc> lastLineTokenLocs;
     // Get the next token from *stack* of input sources, popping input sources
     // Get the next token from *stack* of input sources, popping input sources
     // that are out of tokens, down until an input source is found that has a token.
     // that are out of tokens, down until an input source is found that has a token.
     // Return EndOfInput when there are no more tokens to be found by doing this.
     // Return EndOfInput when there are no more tokens to be found by doing this.
@@ -371,7 +371,31 @@ protected:
                 break;
                 break;
             popInput();
             popInput();
         }
         }
-
+        if (!inputStack.empty() && inputStack.back()->isStringInput()) {
+            if (token == '\n') {
+                bool seenNumSign = false;
+                for (int i = 0; i < (int)lastLineTokens.size() - 1;) {
+                    int curPos = i;
+                    int curToken = lastLineTokens[i++];
+                    if (curToken == '#' && lastLineTokens[i] == '#') {
+                        curToken = PpAtomPaste;
+                        i++;
+                    }
+                    if (curToken == '#') {
+                        if (seenNumSign) {
+                            parseContext.ppError(lastLineTokenLocs[curPos], "(#) can be preceded in its line only by spaces or horizontal tabs", "#", "");
+                        } else {
+                            seenNumSign = true;
+                        }
+                    }
+                }
+                lastLineTokens.clear();
+                lastLineTokenLocs.clear();
+            } else {
+                lastLineTokens.push_back(token);
+                lastLineTokenLocs.push_back(ppToken->loc);
+            }
+        }
         return token;
         return token;
     }
     }
     int  getChar() { return inputStack.back()->getch(); }
     int  getChar() { return inputStack.back()->getch(); }
@@ -475,16 +499,27 @@ protected:
     //
     //
     // From PpTokens.cpp
     // From PpTokens.cpp
     //
     //
-    void pushTokenStreamInput(TokenStream&, bool pasting = false);
+    void pushTokenStreamInput(TokenStream&, bool pasting = false, bool expanded = false);
     void UngetToken(int token, TPpToken*);
     void UngetToken(int token, TPpToken*);
 
 
     class tTokenInput : public tInput {
     class tTokenInput : public tInput {
     public:
     public:
-        tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting) :
+        tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting, bool expanded) :
             tInput(pp),
             tInput(pp),
             tokens(t),
             tokens(t),
-            lastTokenPastes(prepasting) { }
-        virtual int scan(TPpToken *ppToken) override { return tokens->getToken(pp->parseContext, ppToken); }
+            lastTokenPastes(prepasting),
+            preExpanded(expanded) { }
+        virtual int scan(TPpToken *ppToken) override {
+            int token = tokens->getToken(pp->parseContext, ppToken);
+            ppToken->fullyExpanded = preExpanded;
+            if (tokens->atEnd() && token == PpAtomIdentifier) {
+                int macroAtom = pp->atomStrings.getAtom(ppToken->name);
+                MacroSymbol* macro = macroAtom == 0 ? nullptr : pp->lookupMacroDef(macroAtom);
+                if (macro && macro->functionLike)
+                    ppToken->fullyExpanded = false;
+            }
+            return token;
+        }
         virtual int getch() override { assert(0); return EndOfInput; }
         virtual int getch() override { assert(0); return EndOfInput; }
         virtual void ungetch() override { assert(0); }
         virtual void ungetch() override { assert(0); }
         virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); }
         virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); }
@@ -492,6 +527,7 @@ protected:
     protected:
     protected:
         TokenStream* tokens;
         TokenStream* tokens;
         bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token
         bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token
+        bool preExpanded;
     };
     };
 
 
     class tUngotTokenInput : public tInput {
     class tUngotTokenInput : public tInput {
@@ -512,7 +548,7 @@ protected:
     public:
     public:
         tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { }
         tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { }
         virtual int scan(TPpToken*) override;
         virtual int scan(TPpToken*) override;
-
+        bool isStringInput() override { return true; }
         // Scanner used to get source stream characters.
         // Scanner used to get source stream characters.
         //  - Escaped newlines are handled here, invisibly to the caller.
         //  - Escaped newlines are handled here, invisibly to the caller.
         //  - All forms of newline are handled, and turned into just a '\n'.
         //  - All forms of newline are handled, and turned into just a '\n'.

+ 105 - 14
src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp

@@ -3,6 +3,7 @@
 // Copyright (C) 2013 LunarG, Inc.
 // Copyright (C) 2013 LunarG, Inc.
 // Copyright (C) 2017 ARM Limited.
 // Copyright (C) 2017 ARM Limited.
 // Copyright (C) 2015-2018 Google, Inc.
 // Copyright (C) 2015-2018 Google, Inc.
+// Copyright (c) 2023, Mobica Limited
 //
 //
 // All rights reserved.
 // All rights reserved.
 //
 //
@@ -259,7 +260,6 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
     // Suffix:
     // Suffix:
     bool isDouble = false;
     bool isDouble = false;
     bool isFloat16 = false;
     bool isFloat16 = false;
-#ifndef GLSLANG_WEB
     if (ch == 'l' || ch == 'L') {
     if (ch == 'l' || ch == 'L') {
         if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl)
         if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl)
             parseContext.doubleCheck(ppToken->loc, "double floating-point suffix");
             parseContext.doubleCheck(ppToken->loc, "double floating-point suffix");
@@ -299,14 +299,11 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
             isFloat16 = true;
             isFloat16 = true;
         }
         }
     } else
     } else
-#endif
     if (ch == 'f' || ch == 'F') {
     if (ch == 'f' || ch == 'F') {
-#ifndef GLSLANG_WEB
         if (ifdepth == 0)
         if (ifdepth == 0)
             parseContext.profileRequires(ppToken->loc,  EEsProfile, 300, nullptr, "floating-point suffix");
             parseContext.profileRequires(ppToken->loc,  EEsProfile, 300, nullptr, "floating-point suffix");
         if (ifdepth == 0 && !parseContext.relaxedErrors())
         if (ifdepth == 0 && !parseContext.relaxedErrors())
             parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix");
             parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix");
-#endif
         if (ifdepth == 0 && !hasDecimalOrExponent)
         if (ifdepth == 0 && !hasDecimalOrExponent)
             parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
             parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
         saveName(ch);
         saveName(ch);
@@ -480,9 +477,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
         E_GL_EXT_shader_explicit_arithmetic_types_int16 };
         E_GL_EXT_shader_explicit_arithmetic_types_int16 };
     static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]);
     static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]);
 
 
-    ppToken->ival = 0;
-    ppToken->i64val = 0;
-    ppToken->space = false;
+    ppToken->clear();
     ch = getch();
     ch = getch();
     for (;;) {
     for (;;) {
         while (ch == ' ' || ch == '\t') {
         while (ch == ' ' || ch == '\t') {
@@ -551,7 +546,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
 
 
                     ival = 0;
                     ival = 0;
                     do {
                     do {
-                        if (len < MaxTokenLength && ival <= 0x0fffffffffffffffull) {
+                        if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) {
                             ppToken->name[len++] = (char)ch;
                             ppToken->name[len++] = (char)ch;
                             if (ch >= '0' && ch <= '9') {
                             if (ch >= '0' && ch <= '9') {
                                 ii = ch - '0';
                                 ii = ch - '0';
@@ -584,7 +579,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isUnsigned = true;
                     isUnsigned = true;
 
 
-#ifndef GLSLANG_WEB
                     int nextCh = getch();
                     int nextCh = getch();
                     if (nextCh == 'l' || nextCh == 'L') {
                     if (nextCh == 'l' || nextCh == 'L') {
                         if (len < MaxTokenLength)
                         if (len < MaxTokenLength)
@@ -610,7 +604,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                     if (len < MaxTokenLength)
                     if (len < MaxTokenLength)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isInt16 = true;
                     isInt16 = true;
-#endif
                 } else
                 } else
                     ungetch();
                     ungetch();
                 ppToken->name[len] = '\0';
                 ppToken->name[len] = '\0';
@@ -641,6 +634,108 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                     ppToken->ival = (int)ival;
                     ppToken->ival = (int)ival;
                     return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
                     return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
                 }
                 }
+            } else if ((ch == 'b' || ch == 'B') && pp->parseContext.intermediate.getSource() == EShSourceHlsl) {
+                // must be binary
+                bool isUnsigned = false;
+                bool isInt64 = false;
+                bool isInt16 = false;
+                ppToken->name[len++] = (char)ch;
+                ch = getch();
+
+                // Check value
+                if ((ch == '0' || ch == '1'))
+                {
+                    ival = 0;
+                    do {
+                        if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) {
+                            ppToken->name[len++] = (char)ch;
+                            if (ch == '0' || ch == '1') {
+                                ii = ch - '0';
+                            } else {
+                                pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", "");
+                            }
+                            ival = (ival << 1) | ii;
+                        }
+                        else
+                        {
+                            if (! AlreadyComplained) {
+                                if(len < MaxTokenLength)
+                                    pp->parseContext.ppError(ppToken->loc, "binary literal too big", "", "");
+                                else
+                                    pp->parseContext.ppError(ppToken->loc, "binary literal too long", "", "");
+                                AlreadyComplained = 1;
+                            }
+                            ival = 0xffffffffffffffffull;
+                        }
+                        ch = getch();
+                    } while (ch == '0' || ch == '1');
+                }
+                else
+                {
+                   pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", "");
+                }
+
+                // check type
+                if (ch == 'u' || ch == 'U') {
+                    if (len < MaxTokenLength)
+                        ppToken->name[len++] = (char)ch;
+                    isUnsigned = true;
+
+                    int nextCh = getch();
+                    if (nextCh == 'l' || nextCh == 'L') {
+                        if (len < MaxTokenLength)
+                            ppToken->name[len++] = (char)nextCh;
+                        isInt64 = true;
+                    } else
+                        ungetch();
+
+                    nextCh = getch();
+                    if ((nextCh == 's' || nextCh == 'S') &&
+                                pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
+                        if (len < MaxTokenLength)
+                            ppToken->name[len++] = (char)nextCh;
+                        isInt16 = true;
+                    } else
+                        ungetch();
+                } else if (ch == 'l' || ch == 'L') {
+                    if (len < MaxTokenLength)
+                        ppToken->name[len++] = (char)ch;
+                    isInt64 = true;
+                } else if ((ch == 's' || ch == 'S') &&
+                                pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
+                    if (len < MaxTokenLength)
+                        ppToken->name[len++] = (char)ch;
+                    isInt16 = true;
+                } else {
+                    ungetch();
+                }
+                ppToken->name[len] = '\0';
+
+                // Assign value
+                if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
+                    if (pp->ifdepth == 0) {
+                        pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile,
+                                                        "64-bit binary literal");
+                        pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0,
+                            Num_Int64_Extensions, Int64_Extensions, "64-bit binary literal");
+                    }
+                    ppToken->i64val = ival;
+                    return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64;
+                } else if (isInt16) {
+                    if (pp->ifdepth == 0) {
+                        if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) {
+                            pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile,
+                                                            "16-bit binary literal");
+                            pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0,
+                                Num_Int16_Extensions, Int16_Extensions, "16-bit binary literal");
+                        }
+                    }
+                    ppToken->ival = (int)ival;
+                    return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16;
+                } else {
+                    ppToken->ival = (int)ival;
+                    return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
+                }
             } else {
             } else {
                 // could be octal integer or floating point, speculative pursue octal until it must be floating point
                 // could be octal integer or floating point, speculative pursue octal until it must be floating point
 
 
@@ -692,7 +787,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isUnsigned = true;
                     isUnsigned = true;
 
 
-#ifndef GLSLANG_WEB
                     int nextCh = getch();
                     int nextCh = getch();
                     if (nextCh == 'l' || nextCh == 'L') {
                     if (nextCh == 'l' || nextCh == 'L') {
                         if (len < MaxTokenLength)
                         if (len < MaxTokenLength)
@@ -718,7 +812,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                     if (len < MaxTokenLength)
                     if (len < MaxTokenLength)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isInt16 = true;
                     isInt16 = true;
-#endif
                 } else
                 } else
                     ungetch();
                     ungetch();
                 ppToken->name[len] = '\0';
                 ppToken->name[len] = '\0';
@@ -781,7 +874,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isUnsigned = true;
                     isUnsigned = true;
 
 
-#ifndef GLSLANG_WEB
                     int nextCh = getch();
                     int nextCh = getch();
                     if (nextCh == 'l' || nextCh == 'L') {
                     if (nextCh == 'l' || nextCh == 'L') {
                         if (len < MaxTokenLength)
                         if (len < MaxTokenLength)
@@ -807,7 +899,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
                     if (len < MaxTokenLength)
                     if (len < MaxTokenLength)
                         ppToken->name[len++] = (char)ch;
                         ppToken->name[len++] = (char)ch;
                     isInt16 = true;
                     isInt16 = true;
-#endif
                 } else
                 } else
                     ungetch();
                     ungetch();
 
 

+ 3 - 8
src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp

@@ -85,9 +85,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef _CRT_SECURE_NO_WARNINGS
 #ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 #endif
-#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
-#define snprintf sprintf_s
-#endif
 
 
 #include <cassert>
 #include <cassert>
 #include <cstdlib>
 #include <cstdlib>
@@ -116,17 +113,15 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken
     int atom = stream[currentPos++].get(*ppToken);
     int atom = stream[currentPos++].get(*ppToken);
     ppToken->loc = parseContext.getCurrentLoc();
     ppToken->loc = parseContext.getCurrentLoc();
 
 
-#ifndef GLSLANG_WEB
     // Check for ##, unless the current # is the last character
     // Check for ##, unless the current # is the last character
     if (atom == '#') {
     if (atom == '#') {
         if (peekToken('#')) {
         if (peekToken('#')) {
             parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)");
             parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)");
-            parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)");
+            parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, nullptr, "token pasting (##)");
             currentPos++;
             currentPos++;
             atom = PpAtomPaste;
             atom = PpAtomPaste;
         }
         }
     }
     }
-#endif
 
 
     return atom;
     return atom;
 }
 }
@@ -195,9 +190,9 @@ bool TPpContext::TokenStream::peekUntokenizedPasting()
     return pasting;
     return pasting;
 }
 }
 
 
-void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting)
+void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting, bool expanded)
 {
 {
-    pushInput(new tTokenInput(this, &ts, prepasting));
+    pushInput(new tTokenInput(this, &ts, prepasting, expanded));
     ts.reset();
     ts.reset();
 }
 }
 
 

+ 2 - 6
src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp

@@ -37,8 +37,6 @@
 // propagate the 'noContraction' qualifier.
 // propagate the 'noContraction' qualifier.
 //
 //
 
 
-#ifndef GLSLANG_WEB
-
 #include "propagateNoContraction.h"
 #include "propagateNoContraction.h"
 
 
 #include <cstdlib>
 #include <cstdlib>
@@ -423,7 +421,7 @@ getSymbolToDefinitionMappingAndPreciseSymbolIDs(const glslang::TIntermediate& in
                                         ReturnBranchNodeSet());
                                         ReturnBranchNodeSet());
 
 
     TIntermNode* root = intermediate.getTreeRoot();
     TIntermNode* root = intermediate.getTreeRoot();
-    if (root == 0)
+    if (root == nullptr)
         return result_tuple;
         return result_tuple;
 
 
     NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple);
     NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple);
@@ -865,6 +863,4 @@ void PropagateNoContraction(const glslang::TIntermediate& intermediate)
         precise_object_accesschains.erase(precise_object_accesschain);
         precise_object_accesschains.erase(precise_object_accesschain);
     }
     }
 }
 }
-};
-
-#endif // GLSLANG_WEB
+}

+ 11 - 15
src/libraries/glslang/glslang/MachineIndependent/reflection.cpp

@@ -33,8 +33,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #include "../Include/Common.h"
 #include "../Include/Common.h"
 #include "reflection.h"
 #include "reflection.h"
 #include "LiveTraverser.h"
 #include "LiveTraverser.h"
@@ -251,7 +249,7 @@ public:
     void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList<TIntermBinary*>& derefs,
     void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList<TIntermBinary*>& derefs,
                                TList<TIntermBinary*>::const_iterator deref, int offset, int blockIndex, int arraySize,
                                TList<TIntermBinary*>::const_iterator deref, int offset, int blockIndex, int arraySize,
                                int topLevelArraySize, int topLevelArrayStride, TStorageQualifier baseStorage, bool active,
                                int topLevelArraySize, int topLevelArrayStride, TStorageQualifier baseStorage, bool active,
-							   const TConstUnionArray* constArray = nullptr)
+                               const TConstUnionArray* constArray = nullptr)
     {
     {
         // when strictArraySuffix is enabled, we closely follow the rules from ARB_program_interface_query.
         // when strictArraySuffix is enabled, we closely follow the rules from ARB_program_interface_query.
         // Broadly:
         // Broadly:
@@ -266,18 +264,18 @@ public:
         // process the part of the dereference chain that was explicit in the shader
         // process the part of the dereference chain that was explicit in the shader
         TString name = baseName;
         TString name = baseName;
         const TType* terminalType = &baseType;
         const TType* terminalType = &baseType;
-		const TConstUnionArray* terminalConstArray = constArray;
+        const TConstUnionArray* terminalConstArray = constArray;
         for (; deref != derefs.end(); ++deref) {
         for (; deref != derefs.end(); ++deref) {
             TIntermBinary* visitNode = *deref;
             TIntermBinary* visitNode = *deref;
             terminalType = &visitNode->getType();
             terminalType = &visitNode->getType();
-			if (visitNode->getAsSymbolNode())
-				terminalConstArray = &visitNode->getAsSymbolNode()->getConstArray();
-			else if (visitNode->getAsConstantUnion())
-				terminalConstArray = &visitNode->getAsConstantUnion()->getConstArray();
-			else if (visitNode->getLeft() != nullptr && visitNode->getLeft()->getAsSymbolNode())
-				terminalConstArray = &visitNode->getLeft()->getAsSymbolNode()->getConstArray();
-			else
-				terminalConstArray = nullptr;
+            if (visitNode->getAsSymbolNode())
+                terminalConstArray = &visitNode->getAsSymbolNode()->getConstArray();
+            else if (visitNode->getAsConstantUnion())
+                terminalConstArray = &visitNode->getAsConstantUnion()->getConstArray();
+            else if (visitNode->getLeft() != nullptr && visitNode->getLeft()->getAsSymbolNode())
+                terminalConstArray = &visitNode->getLeft()->getAsSymbolNode()->getConstArray();
+            else
+                terminalConstArray = nullptr;
             int index;
             int index;
             switch (visitNode->getOp()) {
             switch (visitNode->getOp()) {
             case EOpIndexIndirect: {
             case EOpIndexIndirect: {
@@ -692,7 +690,7 @@ public:
     }
     }
 
 
     // For a binary operation indexing into an aggregate, chase down the base of the aggregate.
     // 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.
+    // Return nullptr if the topology does not fit this situation.
     TIntermSymbol* findBase(const TIntermBinary* node)
     TIntermSymbol* findBase(const TIntermBinary* node)
     {
     {
         TIntermSymbol *base = node->getLeft()->getAsSymbolNode();
         TIntermSymbol *base = node->getLeft()->getAsSymbolNode();
@@ -1280,5 +1278,3 @@ void TReflection::dump()
 }
 }
 
 
 } // end namespace glslang
 } // end namespace glslang
-
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE

+ 0 - 4
src/libraries/glslang/glslang/MachineIndependent/reflection.h

@@ -33,8 +33,6 @@
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
 //
 //
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 #ifndef _REFLECTION_INCLUDED
 #ifndef _REFLECTION_INCLUDED
 #define _REFLECTION_INCLUDED
 #define _REFLECTION_INCLUDED
 
 
@@ -219,5 +217,3 @@ protected:
 } // end namespace glslang
 } // end namespace glslang
 
 
 #endif // _REFLECTION_INCLUDED
 #endif // _REFLECTION_INCLUDED
-
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE

+ 92 - 0
src/libraries/glslang/glslang/MachineIndependent/span.h

@@ -0,0 +1,92 @@
+#pragma once
+
+//
+// Copyright (C) 2023 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.
+//
+
+// Partial implementation of std::span for C++11
+// Replace with std::span if repo standard is bumped to C++20
+//
+// This code was copied from https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/layers/containers/custom_containers.h
+template <typename T>
+class span {
+  public:
+    using pointer = T *;
+    using const_pointer = T const *;
+    using iterator = pointer;
+    using const_iterator = const_pointer;
+
+    span() = default;
+    span(pointer start, size_t n) : data_(start), count_(n) {}
+    template <typename Iterator>
+    span(Iterator start, Iterator end) : data_(&(*start)), count_(end - start) {}
+    template <typename Container>
+    span(Container &c) : data_(c.data()), count_(c.size()) {}
+
+    iterator begin() { return data_; }
+    const_iterator begin() const { return data_; }
+
+    iterator end() { return data_ + count_; }
+    const_iterator end() const { return data_ + count_; }
+
+    T &operator[](int i) { return data_[i]; }
+    const T &operator[](int i) const { return data_[i]; }
+
+    T &front() { return *data_; }
+    const T &front() const { return *data_; }
+
+    T &back() { return *(data_ + (count_ - 1)); }
+    const T &back() const { return *(data_ + (count_ - 1)); }
+
+    size_t size() const { return count_; }
+    bool empty() const { return count_ == 0; }
+
+    pointer data() { return data_; }
+    const_pointer data() const { return data_; }
+
+  private:
+    pointer data_ = {};
+    size_t count_ = 0;
+};
+
+//
+// Allow type inference that using the constructor doesn't allow in C++11
+template <typename T>
+span<T> make_span(T *begin, size_t count) {
+    return span<T>(begin, count);
+}
+template <typename T>
+span<T> make_span(T *begin, T *end) {
+    return make_span<T>(begin, end);
+}

+ 0 - 151
src/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp

@@ -36,15 +36,8 @@
 // This file contains the Linux-specific functions
 // This file contains the Linux-specific functions
 //
 //
 #include "../osinclude.h"
 #include "../osinclude.h"
-#include "../../../OGLCompilersDLL/InitializeDll.h"
 
 
-#include <pthread.h>
-#include <semaphore.h>
-#include <assert.h>
-#include <errno.h>
-#include <stdint.h>
 #include <cstdio>
 #include <cstdio>
-#include <sys/time.h>
 
 
 #if !defined(__Fuchsia__)
 #if !defined(__Fuchsia__)
 #include <sys/resource.h>
 #include <sys/resource.h>
@@ -52,150 +45,6 @@
 
 
 namespace glslang {
 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)
-{
-#if defined(__ANDROID__) || defined(__Fuchsia__)
-    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;
-}
-
-namespace {
-    pthread_mutex_t gMutex;
-}
-
-static void InitMutex(void)
-{
-  pthread_mutexattr_t mutexattr;
-  pthread_mutexattr_init(&mutexattr);
-  pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
-  pthread_mutex_init(&gMutex, &mutexattr);
-}
-
-void InitGlobalLock()
-{
-  static pthread_once_t once = PTHREAD_ONCE_INIT;
-  pthread_once(&once, InitMutex);
-}
-
-void GetGlobalLock()
-{
-  pthread_mutex_lock(&gMutex);
-}
-
-void ReleaseGlobalLock()
-{
-  pthread_mutex_unlock(&gMutex);
-}
-
 // #define DUMP_COUNTERS
 // #define DUMP_COUNTERS
 
 
 void OS_DumpMemoryCounters()
 void OS_DumpMemoryCounters()

+ 9 - 0
src/libraries/glslang/glslang/OSDependent/Web/glslang.js.cpp

@@ -141,6 +141,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
     /* .maxTaskWorkGroupSizeY_NV = */ 1,
     /* .maxTaskWorkGroupSizeY_NV = */ 1,
     /* .maxTaskWorkGroupSizeZ_NV = */ 1,
     /* .maxTaskWorkGroupSizeZ_NV = */ 1,
     /* .maxMeshViewCountNV = */ 4,
     /* .maxMeshViewCountNV = */ 4,
+    /* .maxMeshOutputVerticesEXT = */ 256,
+    /* .maxMeshOutputPrimitivesEXT = */ 512,
+    /* .maxMeshWorkGroupSizeX_EXT = */ 32,
+    /* .maxMeshWorkGroupSizeY_EXT = */ 1,
+    /* .maxMeshWorkGroupSizeZ_EXT = */ 1,
+    /* .maxTaskWorkGroupSizeX_EXT = */ 32,
+    /* .maxTaskWorkGroupSizeY_EXT = */ 1,
+    /* .maxTaskWorkGroupSizeZ_EXT = */ 1,
+    /* .maxMeshViewCountEXT = */ 4,
     /* .maxDualSourceDrawBuffersEXT = */ 1,
     /* .maxDualSourceDrawBuffersEXT = */ 1,
 
 
     /* .limits = */ {
     /* .limits = */ {

+ 1 - 1
src/libraries/glslang/glslang/OSDependent/Web/glslang.pre.js

@@ -25,7 +25,7 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug, spirv_ve
 
 
     var p_output = Module['_malloc'](4);
     var p_output = Module['_malloc'](4);
     var p_output_len = Module['_malloc'](4);
     var p_output_len = Module['_malloc'](4);
-    var id = ccall('convert_glsl_to_spirv',
+    var id = Module['ccall']('convert_glsl_to_spirv',
         'number',
         'number',
         ['string', 'number', 'boolean', 'number', 'number', 'number'],
         ['string', 'number', 'boolean', 'number', 'number', 'number'],
         [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]);
         [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]);

+ 0 - 80
src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp

@@ -37,11 +37,9 @@
 #define STRICT
 #define STRICT
 #define VC_EXTRALEAN 1
 #define VC_EXTRALEAN 1
 #include <windows.h>
 #include <windows.h>
-#include <cassert>
 #include <process.h>
 #include <process.h>
 #include <psapi.h>
 #include <psapi.h>
 #include <cstdio>
 #include <cstdio>
-#include <cstdint>
 
 
 //
 //
 // This file contains the Window-OS-specific functions
 // This file contains the Window-OS-specific functions
@@ -53,84 +51,6 @@
 
 
 namespace glslang {
 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);
-}
-
 //#define DUMP_COUNTERS
 //#define DUMP_COUNTERS
 
 
 void OS_DumpMemoryCounters()
 void OS_DumpMemoryCounters()

+ 0 - 19
src/libraries/glslang/glslang/OSDependent/osinclude.h

@@ -37,25 +37,6 @@
 
 
 namespace glslang {
 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_CleanupThreadData(void);
-
 void OS_DumpMemoryCounters();
 void OS_DumpMemoryCounters();
 
 
 } // end namespace glslang
 } // end namespace glslang

+ 19 - 36
src/libraries/glslang/glslang/OSDependent/Windows/main.cpp → src/libraries/glslang/glslang/Public/ResourceLimits.h

@@ -1,5 +1,6 @@
 //
 //
-// Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
+// Copyright (C) 2016 Google, Inc.
+//
 // All rights reserved.
 // All rights reserved.
 //
 //
 // Redistribution and use in source and binary forms, with or without
 // Redistribution and use in source and binary forms, with or without
@@ -14,7 +15,7 @@
 //    disclaimer in the documentation and/or other materials provided
 //    disclaimer in the documentation and/or other materials provided
 //    with the distribution.
 //    with the distribution.
 //
 //
-//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    Neither the name of Google Inc. nor the names of its
 //    contributors may be used to endorse or promote products derived
 //    contributors may be used to endorse or promote products derived
 //    from this software without specific prior written permission.
 //    from this software without specific prior written permission.
 //
 //
@@ -30,45 +31,27 @@
 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // POSSIBILITY OF SUCH DAMAGE.
 // POSSIBILITY OF SUCH DAMAGE.
-//
-
-#include "glslang/OGLCompilersDLL/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:
+#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
 
 
-            if (! glslang::InitThread())
-                return FALSE;
-            break;
+#include <string>
 
 
-		case DLL_THREAD_DETACH:
+#include "../Include/ResourceLimits.h"
 
 
-			if (! glslang::DetachThread())
-				return FALSE;
-			break;
+// Return pointer to user-writable Resource to pass through API in
+// future-proof way.
+extern TBuiltInResource* GetResources();
 
 
-		case DLL_PROCESS_DETACH:
+// 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* GetDefaultResources();
 
 
-			glslang::DetachProcess();
-			break;
+// Returns the DefaultTBuiltInResource as a human-readable string.
+std::string GetDefaultTBuiltInResourceString();
 
 
-		default:
-			assert(0 && "DllMain(): Reason for calling DLL Main is unknown");
-			return FALSE;
-	}
+// Decodes the resource limits from |config| to |resources|.
+void DecodeResourceLimits(TBuiltInResource* resources, char* config);
 
 
-	return TRUE;
-}
+#endif  // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_

+ 41 - 35
src/libraries/glslang/glslang/Public/ShaderLang.h

@@ -108,8 +108,10 @@ typedef enum {
     EShLangMissNV = EShLangMiss,
     EShLangMissNV = EShLangMiss,
     EShLangCallable,
     EShLangCallable,
     EShLangCallableNV = EShLangCallable,
     EShLangCallableNV = EShLangCallable,
-    EShLangTaskNV,
-    EShLangMeshNV,
+    EShLangTask,
+    EShLangTaskNV = EShLangTask,
+    EShLangMesh,
+    EShLangMeshNV = EShLangMesh,
     LAST_ELEMENT_MARKER(EShLangCount),
     LAST_ELEMENT_MARKER(EShLangCount),
 } EShLanguage;         // would be better as stage, but this is ancient now
 } EShLanguage;         // would be better as stage, but this is ancient now
 
 
@@ -132,8 +134,10 @@ typedef enum : unsigned {
     EShLangMissNVMask         = EShLangMissMask,
     EShLangMissNVMask         = EShLangMissMask,
     EShLangCallableMask       = (1 << EShLangCallable),
     EShLangCallableMask       = (1 << EShLangCallable),
     EShLangCallableNVMask     = EShLangCallableMask,
     EShLangCallableNVMask     = EShLangCallableMask,
-    EShLangTaskNVMask         = (1 << EShLangTaskNV),
-    EShLangMeshNVMask         = (1 << EShLangMeshNV),
+    EShLangTaskMask           = (1 << EShLangTask),
+    EShLangTaskNVMask         = EShLangTaskMask,
+    EShLangMeshMask           = (1 << EShLangMesh),
+    EShLangMeshNVMask         = EShLangMeshMask,
     LAST_ELEMENT_MARKER(EShLanguageMaskCount),
     LAST_ELEMENT_MARKER(EShLanguageMaskCount),
 } EShLanguageMask;
 } EShLanguageMask;
 
 
@@ -151,8 +155,8 @@ typedef enum {
 
 
 typedef enum {
 typedef enum {
     EShClientNone,               // use when there is no client, e.g. for validation
     EShClientNone,               // use when there is no client, e.g. for validation
-    EShClientVulkan,
-    EShClientOpenGL,
+    EShClientVulkan,             // as GLSL dialect, specifies KHR_vulkan_glsl extension
+    EShClientOpenGL,             // as GLSL dialect, specifies ARB_gl_spirv extension
     LAST_ELEMENT_MARKER(EShClientCount),
     LAST_ELEMENT_MARKER(EShClientCount),
 } EShClient;
 } EShClient;
 
 
@@ -164,12 +168,12 @@ typedef enum {
 } EShTargetLanguage;
 } EShTargetLanguage;
 
 
 typedef enum {
 typedef enum {
-    EShTargetUniversal = 0,                           // Universal
     EShTargetVulkan_1_0 = (1 << 22),                  // Vulkan 1.0
     EShTargetVulkan_1_0 = (1 << 22),                  // Vulkan 1.0
     EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),      // Vulkan 1.1
     EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),      // Vulkan 1.1
     EShTargetVulkan_1_2 = (1 << 22) | (2 << 12),      // Vulkan 1.2
     EShTargetVulkan_1_2 = (1 << 22) | (2 << 12),      // Vulkan 1.2
+    EShTargetVulkan_1_3 = (1 << 22) | (3 << 12),      // Vulkan 1.3
     EShTargetOpenGL_450 = 450,                        // OpenGL
     EShTargetOpenGL_450 = 450,                        // OpenGL
-    LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4),
+    LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 5),
 } EShTargetClientVersion;
 } EShTargetClientVersion;
 
 
 typedef EShTargetClientVersion EshTargetClientVersion;
 typedef EShTargetClientVersion EshTargetClientVersion;
@@ -265,6 +269,7 @@ enum EShMessages : unsigned {
     EShMsgHlslLegalization  = (1 << 12), // enable HLSL Legalization messages
     EShMsgHlslLegalization  = (1 << 12), // enable HLSL Legalization messages
     EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (for samplers and semantics)
     EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (for samplers and semantics)
     EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table
     EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table
+    EShMsgEnhanced         = (1 << 15), // enhanced message readability
     LAST_ELEMENT_MARKER(EShMsgCount),
     LAST_ELEMENT_MARKER(EShMsgCount),
 };
 };
 
 
@@ -301,7 +306,7 @@ typedef struct {
 
 
 //
 //
 // ShHandle held by but opaque to the driver.  It is allocated,
 // ShHandle held by but opaque to the driver.  It is allocated,
-// managed, and de-allocated by the compiler/linker. It's contents
+// managed, and de-allocated by the compiler/linker. Its contents
 // are defined by and used by the compiler and linker.  For example,
 // are defined by and used by the compiler and linker.  For example,
 // symbol table information and object code passed from the compiler
 // symbol table information and object code passed from the compiler
 // to the linker can be stored where ShHandle points.
 // to the linker can be stored where ShHandle points.
@@ -314,8 +319,8 @@ typedef void* ShHandle;
 // Driver calls these to create and destroy compiler/linker
 // Driver calls these to create and destroy compiler/linker
 // objects.
 // objects.
 //
 //
-GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions);  // one per shader
-GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions);  // one per shader pair
+GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int /*debugOptions unused*/); // one per shader
+GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int /*debugOptions unused*/); // one per shader pair
 GLSLANG_EXPORT ShHandle ShConstructUniformMap();                 // one per uniform namespace (currently entire program object)
 GLSLANG_EXPORT ShHandle ShConstructUniformMap();                 // one per uniform namespace (currently entire program object)
 GLSLANG_EXPORT void ShDestruct(ShHandle);
 GLSLANG_EXPORT void ShDestruct(ShHandle);
 
 
@@ -326,18 +331,13 @@ GLSLANG_EXPORT void ShDestruct(ShHandle);
 // The info-log should be written by ShCompile into
 // The info-log should be written by ShCompile into
 // ShHandle, so it can answer future queries.
 // ShHandle, so it can answer future queries.
 //
 //
-GLSLANG_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
-    );
+GLSLANG_EXPORT int ShCompile(const ShHandle, const char* const shaderStrings[], const int numStrings,
+                             const int* lengths, const EShOptimizationLevel, const TBuiltInResource* resources,
+                             int,                      // debugOptions unused
+                             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
+);
 
 
 GLSLANG_EXPORT int ShLinkExt(
 GLSLANG_EXPORT int ShLinkExt(
     const ShHandle,               // linker object
     const ShHandle,               // linker object
@@ -471,6 +471,8 @@ public:
     GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName);
     GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName);
     GLSLANG_EXPORT void addProcesses(const std::vector<std::string>&);
     GLSLANG_EXPORT void addProcesses(const std::vector<std::string>&);
     GLSLANG_EXPORT void setUniqueId(unsigned long long id);
     GLSLANG_EXPORT void setUniqueId(unsigned long long id);
+    GLSLANG_EXPORT void setOverrideVersion(int version);
+    GLSLANG_EXPORT void setDebugInfo(bool debugInfo);
 
 
     // IO resolver binding data: see comments in ShaderLang.cpp
     // IO resolver binding data: see comments in ShaderLang.cpp
     GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base);
     GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base);
@@ -489,6 +491,7 @@ public:
     GLSLANG_EXPORT void setUniformLocationBase(int base);
     GLSLANG_EXPORT void setUniformLocationBase(int base);
     GLSLANG_EXPORT void setInvertY(bool invert);
     GLSLANG_EXPORT void setInvertY(bool invert);
     GLSLANG_EXPORT void setDxPositionW(bool dxPosW);
     GLSLANG_EXPORT void setDxPositionW(bool dxPosW);
+    GLSLANG_EXPORT void setEnhancedMsgs();
 #ifdef ENABLE_HLSL
 #ifdef ENABLE_HLSL
     GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap);
     GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap);
     GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten);
     GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten);
@@ -516,11 +519,14 @@ public:
     //                 use EShClientNone and version of 0, e.g. for validation mode.
     //                 use EShClientNone and version of 0, e.g. for validation mode.
     //                 Note 'version' does not describe the target environment,
     //                 Note 'version' does not describe the target environment,
     //                 just the version of the source dialect to compile under.
     //                 just the version of the source dialect to compile under.
+    //                 For example, to choose the Vulkan dialect of GLSL defined by
+    //                 version 100 of the KHR_vulkan_glsl extension: lang = EShSourceGlsl,
+    //                 dialect = EShClientVulkan, and version = 100.
     //
     //
     //                 See the definitions of TEnvironment, EShSource, EShLanguage,
     //                 See the definitions of TEnvironment, EShSource, EShLanguage,
     //                 and EShClient for choices and more detail.
     //                 and EShClient for choices and more detail.
     //
     //
-    // setEnvClient:   The client that will be hosting the execution, and it's version.
+    // setEnvClient:   The client that will be hosting the execution, and its version.
     //                 Note 'version' is not the version of the languages involved, but
     //                 Note 'version' is not the version of the languages involved, but
     //                 the version of the client environment.
     //                 the version of the client environment.
     //                 Use EShClientNone and version of 0 if there is no client, e.g.
     //                 Use EShClientNone and version of 0 if there is no client, e.g.
@@ -563,6 +569,9 @@ public:
     void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; }
     void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; }
     bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; }
     bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; }
 
 
+    void setCompileOnly() { compileOnly = true; }
+    bool getCompileOnly() const { return compileOnly; }
+
     // Interface to #include handlers.
     // Interface to #include handlers.
     //
     //
     // To support #include, a client of Glslang does the following:
     // To support #include, a client of Glslang does the following:
@@ -707,16 +716,20 @@ protected:
     // a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
     // a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
     std::string sourceEntryPointName;
     std::string sourceEntryPointName;
 
 
+    // overrides #version in shader source or default version if #version isn't present
+    int overrideVersion;
+
     TEnvironment environment;
     TEnvironment environment;
 
 
+    // Indicates this shader is meant to be used without linking
+    bool compileOnly = false;
+
     friend class TProgram;
     friend class TProgram;
 
 
 private:
 private:
     TShader& operator=(TShader&);
     TShader& operator=(TShader&);
 };
 };
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
 //
 //
 // A reflection database and its interface, consistent with the OpenGL API reflection queries.
 // A reflection database and its interface, consistent with the OpenGL API reflection queries.
 //
 //
@@ -727,7 +740,7 @@ public:
     GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex, const TConstUnionArray* pConstArray = nullptr);
     GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex, const TConstUnionArray* pConstArray = nullptr);
 
 
     const TType* getType() const { return type; }
     const TType* getType() const { return type; }
-	const TConstUnionArray* getConstArray() const { return constArray; }
+    const TConstUnionArray* getConstArray() const { return constArray; }
     GLSLANG_EXPORT int getBinding() const;
     GLSLANG_EXPORT int getBinding() const;
     GLSLANG_EXPORT void dump() const;
     GLSLANG_EXPORT void dump() const;
     static TObjectReflection badReflection() { return TObjectReflection(); }
     static TObjectReflection badReflection() { return TObjectReflection(); }
@@ -752,7 +765,7 @@ protected:
     }
     }
 
 
     const TType* type;
     const TType* type;
-	const TConstUnionArray* constArray;
+    const TConstUnionArray* constArray;
 };
 };
 
 
 class  TReflection;
 class  TReflection;
@@ -835,8 +848,6 @@ public:
     virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
     virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
 };
 };
 
 
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
-
 // Make one TProgram per set of shaders that will get linked together.  Add all
 // 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()
 // the shaders that are to be linked together.  After calling shader.parse()
 // for all shaders, call link().
 // for all shaders, call link().
@@ -856,8 +867,6 @@ public:
 
 
     TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
     TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
 
 
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
-
     // Reflection Interface
     // Reflection Interface
 
 
     // call first, to do liveness analysis, index mapping, etc.; returns false on failure
     // call first, to do liveness analysis, index mapping, etc.; returns false on failure
@@ -950,7 +959,6 @@ public:
     // If resolver is not provided it uses the previous approach
     // If resolver is not provided it uses the previous approach
     // and respects auto assignment and offsets.
     // and respects auto assignment and offsets.
     GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
     GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
-#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
 
 
 protected:
 protected:
     GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
     GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
@@ -961,9 +969,7 @@ protected:
     TIntermediate* intermediate[EShLangCount];
     TIntermediate* intermediate[EShLangCount];
     bool newedIntermediate[EShLangCount];      // track which intermediate were "new" versus reusing a singleton unit in a stage
     bool newedIntermediate[EShLangCount];      // track which intermediate were "new" versus reusing a singleton unit in a stage
     TInfoSink* infoSink;
     TInfoSink* infoSink;
-#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
     TReflection* reflection;
     TReflection* reflection;
-#endif
     bool linked;
     bool linked;
 
 
 private:
 private:

+ 542 - 0
src/libraries/glslang/glslang/ResourceLimits/ResourceLimits.cpp

@@ -0,0 +1,542 @@
+//
+// 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 <cctype>
+
+#include "../../glslang/Public/ResourceLimits.h"
+
+TBuiltInResource Resources;
+
+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,
+    /* .maxMeshOutputVerticesNV = */ 256,
+    /* .maxMeshOutputPrimitivesNV = */ 512,
+    /* .maxMeshWorkGroupSizeX_NV = */ 32,
+    /* .maxMeshWorkGroupSizeY_NV = */ 1,
+    /* .maxMeshWorkGroupSizeZ_NV = */ 1,
+    /* .maxTaskWorkGroupSizeX_NV = */ 32,
+    /* .maxTaskWorkGroupSizeY_NV = */ 1,
+    /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+    /* .maxMeshViewCountNV = */ 4,
+    /* .maxMeshOutputVerticesEXT = */ 256,
+    /* .maxMeshOutputPrimitivesEXT = */ 256,
+    /* .maxMeshWorkGroupSizeX_EXT = */ 128,
+    /* .maxMeshWorkGroupSizeY_EXT = */ 128,
+    /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
+    /* .maxTaskWorkGroupSizeX_EXT = */ 128,
+    /* .maxTaskWorkGroupSizeY_EXT = */ 128,
+    /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
+    /* .maxMeshViewCountEXT = */ 4,
+    /* .maxDualSourceDrawBuffersEXT = */ 1,
+
+    /* .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"
+            << "MaxMeshOutputVerticesNV "                   << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
+            << "MaxMeshOutputPrimitivesNV "                 << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
+            << "MaxMeshWorkGroupSizeX_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
+            << "MaxMeshWorkGroupSizeY_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
+            << "MaxMeshWorkGroupSizeZ_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
+            << "MaxTaskWorkGroupSizeX_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
+            << "MaxTaskWorkGroupSizeY_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
+            << "MaxTaskWorkGroupSizeZ_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
+            << "MaxMeshViewCountNV "                        << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
+            << "MaxMeshOutputVerticesEXT "                  << DefaultTBuiltInResource.maxMeshOutputVerticesEXT << "\n"
+            << "MaxMeshOutputPrimitivesEXT "                << DefaultTBuiltInResource.maxMeshOutputPrimitivesEXT << "\n"
+            << "MaxMeshWorkGroupSizeX_EXT "                 << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_EXT << "\n"
+            << "MaxMeshWorkGroupSizeY_EXT "                 << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_EXT << "\n"
+            << "MaxMeshWorkGroupSizeZ_EXT "                 << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_EXT << "\n"
+            << "MaxTaskWorkGroupSizeX_EXT "                 << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_EXT << "\n"
+            << "MaxTaskWorkGroupSizeY_EXT "                 << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_EXT << "\n"
+            << "MaxTaskWorkGroupSizeZ_EXT "                 << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_EXT << "\n"
+            << "MaxMeshViewCountEXT "                       << DefaultTBuiltInResource.maxMeshViewCountEXT << "\n"
+            << "MaxDualSourceDrawBuffersEXT "               << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\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)
+{
+    static const char* delims = " \t\n\r";
+
+    size_t pos     = 0;
+    std::string configStr(config);
+
+    while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) {
+        const size_t token_s = pos;
+        const size_t token_e = configStr.find_first_of(delims, token_s);
+        const size_t value_s = configStr.find_first_not_of(delims, token_e);
+        const size_t value_e = configStr.find_first_of(delims, value_s);
+        pos = value_e;
+
+        // Faster to use compare(), but prefering readability.
+        const std::string tokenStr = configStr.substr(token_s, token_e-token_s);
+        const std::string valueStr = configStr.substr(value_s, value_e-value_s);
+
+        if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) {
+            printf("Error: '%s' bad .conf file.  Each name must be followed by one number.\n",
+                   valueStr.c_str());
+            return;
+        }
+
+        const int value = std::atoi(valueStr.c_str());
+
+        if (tokenStr == "MaxLights")
+            resources->maxLights = value;
+        else if (tokenStr == "MaxClipPlanes")
+            resources->maxClipPlanes = value;
+        else if (tokenStr == "MaxTextureUnits")
+            resources->maxTextureUnits = value;
+        else if (tokenStr == "MaxTextureCoords")
+            resources->maxTextureCoords = value;
+        else if (tokenStr == "MaxVertexAttribs")
+            resources->maxVertexAttribs = value;
+        else if (tokenStr == "MaxVertexUniformComponents")
+            resources->maxVertexUniformComponents = value;
+        else if (tokenStr == "MaxVaryingFloats")
+            resources->maxVaryingFloats = value;
+        else if (tokenStr == "MaxVertexTextureImageUnits")
+            resources->maxVertexTextureImageUnits = value;
+        else if (tokenStr == "MaxCombinedTextureImageUnits")
+            resources->maxCombinedTextureImageUnits = value;
+        else if (tokenStr == "MaxTextureImageUnits")
+            resources->maxTextureImageUnits = value;
+        else if (tokenStr == "MaxFragmentUniformComponents")
+            resources->maxFragmentUniformComponents = value;
+        else if (tokenStr == "MaxDrawBuffers")
+            resources->maxDrawBuffers = value;
+        else if (tokenStr == "MaxVertexUniformVectors")
+            resources->maxVertexUniformVectors = value;
+        else if (tokenStr == "MaxVaryingVectors")
+            resources->maxVaryingVectors = value;
+        else if (tokenStr == "MaxFragmentUniformVectors")
+            resources->maxFragmentUniformVectors = value;
+        else if (tokenStr == "MaxVertexOutputVectors")
+            resources->maxVertexOutputVectors = value;
+        else if (tokenStr == "MaxFragmentInputVectors")
+            resources->maxFragmentInputVectors = value;
+        else if (tokenStr == "MinProgramTexelOffset")
+            resources->minProgramTexelOffset = value;
+        else if (tokenStr == "MaxProgramTexelOffset")
+            resources->maxProgramTexelOffset = value;
+        else if (tokenStr == "MaxClipDistances")
+            resources->maxClipDistances = value;
+        else if (tokenStr == "MaxComputeWorkGroupCountX")
+            resources->maxComputeWorkGroupCountX = value;
+        else if (tokenStr == "MaxComputeWorkGroupCountY")
+            resources->maxComputeWorkGroupCountY = value;
+        else if (tokenStr == "MaxComputeWorkGroupCountZ")
+            resources->maxComputeWorkGroupCountZ = value;
+        else if (tokenStr == "MaxComputeWorkGroupSizeX")
+            resources->maxComputeWorkGroupSizeX = value;
+        else if (tokenStr == "MaxComputeWorkGroupSizeY")
+            resources->maxComputeWorkGroupSizeY = value;
+        else if (tokenStr == "MaxComputeWorkGroupSizeZ")
+            resources->maxComputeWorkGroupSizeZ = value;
+        else if (tokenStr == "MaxComputeUniformComponents")
+            resources->maxComputeUniformComponents = value;
+        else if (tokenStr == "MaxComputeTextureImageUnits")
+            resources->maxComputeTextureImageUnits = value;
+        else if (tokenStr == "MaxComputeImageUniforms")
+            resources->maxComputeImageUniforms = value;
+        else if (tokenStr == "MaxComputeAtomicCounters")
+            resources->maxComputeAtomicCounters = value;
+        else if (tokenStr == "MaxComputeAtomicCounterBuffers")
+            resources->maxComputeAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxVaryingComponents")
+            resources->maxVaryingComponents = value;
+        else if (tokenStr == "MaxVertexOutputComponents")
+            resources->maxVertexOutputComponents = value;
+        else if (tokenStr == "MaxGeometryInputComponents")
+            resources->maxGeometryInputComponents = value;
+        else if (tokenStr == "MaxGeometryOutputComponents")
+            resources->maxGeometryOutputComponents = value;
+        else if (tokenStr == "MaxFragmentInputComponents")
+            resources->maxFragmentInputComponents = value;
+        else if (tokenStr == "MaxImageUnits")
+            resources->maxImageUnits = value;
+        else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs")
+            resources->maxCombinedImageUnitsAndFragmentOutputs = value;
+        else if (tokenStr == "MaxCombinedShaderOutputResources")
+            resources->maxCombinedShaderOutputResources = value;
+        else if (tokenStr == "MaxImageSamples")
+            resources->maxImageSamples = value;
+        else if (tokenStr == "MaxVertexImageUniforms")
+            resources->maxVertexImageUniforms = value;
+        else if (tokenStr == "MaxTessControlImageUniforms")
+            resources->maxTessControlImageUniforms = value;
+        else if (tokenStr == "MaxTessEvaluationImageUniforms")
+            resources->maxTessEvaluationImageUniforms = value;
+        else if (tokenStr == "MaxGeometryImageUniforms")
+            resources->maxGeometryImageUniforms = value;
+        else if (tokenStr == "MaxFragmentImageUniforms")
+            resources->maxFragmentImageUniforms = value;
+        else if (tokenStr == "MaxCombinedImageUniforms")
+            resources->maxCombinedImageUniforms = value;
+        else if (tokenStr == "MaxGeometryTextureImageUnits")
+            resources->maxGeometryTextureImageUnits = value;
+        else if (tokenStr == "MaxGeometryOutputVertices")
+            resources->maxGeometryOutputVertices = value;
+        else if (tokenStr == "MaxGeometryTotalOutputComponents")
+            resources->maxGeometryTotalOutputComponents = value;
+        else if (tokenStr == "MaxGeometryUniformComponents")
+            resources->maxGeometryUniformComponents = value;
+        else if (tokenStr == "MaxGeometryVaryingComponents")
+            resources->maxGeometryVaryingComponents = value;
+        else if (tokenStr == "MaxTessControlInputComponents")
+            resources->maxTessControlInputComponents = value;
+        else if (tokenStr == "MaxTessControlOutputComponents")
+            resources->maxTessControlOutputComponents = value;
+        else if (tokenStr == "MaxTessControlTextureImageUnits")
+            resources->maxTessControlTextureImageUnits = value;
+        else if (tokenStr == "MaxTessControlUniformComponents")
+            resources->maxTessControlUniformComponents = value;
+        else if (tokenStr == "MaxTessControlTotalOutputComponents")
+            resources->maxTessControlTotalOutputComponents = value;
+        else if (tokenStr == "MaxTessEvaluationInputComponents")
+            resources->maxTessEvaluationInputComponents = value;
+        else if (tokenStr == "MaxTessEvaluationOutputComponents")
+            resources->maxTessEvaluationOutputComponents = value;
+        else if (tokenStr == "MaxTessEvaluationTextureImageUnits")
+            resources->maxTessEvaluationTextureImageUnits = value;
+        else if (tokenStr == "MaxTessEvaluationUniformComponents")
+            resources->maxTessEvaluationUniformComponents = value;
+        else if (tokenStr == "MaxTessPatchComponents")
+            resources->maxTessPatchComponents = value;
+        else if (tokenStr == "MaxPatchVertices")
+            resources->maxPatchVertices = value;
+        else if (tokenStr == "MaxTessGenLevel")
+            resources->maxTessGenLevel = value;
+        else if (tokenStr == "MaxViewports")
+            resources->maxViewports = value;
+        else if (tokenStr == "MaxVertexAtomicCounters")
+            resources->maxVertexAtomicCounters = value;
+        else if (tokenStr == "MaxTessControlAtomicCounters")
+            resources->maxTessControlAtomicCounters = value;
+        else if (tokenStr == "MaxTessEvaluationAtomicCounters")
+            resources->maxTessEvaluationAtomicCounters = value;
+        else if (tokenStr == "MaxGeometryAtomicCounters")
+            resources->maxGeometryAtomicCounters = value;
+        else if (tokenStr == "MaxFragmentAtomicCounters")
+            resources->maxFragmentAtomicCounters = value;
+        else if (tokenStr == "MaxCombinedAtomicCounters")
+            resources->maxCombinedAtomicCounters = value;
+        else if (tokenStr == "MaxAtomicCounterBindings")
+            resources->maxAtomicCounterBindings = value;
+        else if (tokenStr == "MaxVertexAtomicCounterBuffers")
+            resources->maxVertexAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxTessControlAtomicCounterBuffers")
+            resources->maxTessControlAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers")
+            resources->maxTessEvaluationAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxGeometryAtomicCounterBuffers")
+            resources->maxGeometryAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxFragmentAtomicCounterBuffers")
+            resources->maxFragmentAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxCombinedAtomicCounterBuffers")
+            resources->maxCombinedAtomicCounterBuffers = value;
+        else if (tokenStr == "MaxAtomicCounterBufferSize")
+            resources->maxAtomicCounterBufferSize = value;
+        else if (tokenStr == "MaxTransformFeedbackBuffers")
+            resources->maxTransformFeedbackBuffers = value;
+        else if (tokenStr == "MaxTransformFeedbackInterleavedComponents")
+            resources->maxTransformFeedbackInterleavedComponents = value;
+        else if (tokenStr == "MaxCullDistances")
+            resources->maxCullDistances = value;
+        else if (tokenStr == "MaxCombinedClipAndCullDistances")
+            resources->maxCombinedClipAndCullDistances = value;
+        else if (tokenStr == "MaxSamples")
+            resources->maxSamples = value;
+        else if (tokenStr == "MaxMeshOutputVerticesNV")
+            resources->maxMeshOutputVerticesNV = value;
+        else if (tokenStr == "MaxMeshOutputPrimitivesNV")
+            resources->maxMeshOutputPrimitivesNV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
+            resources->maxMeshWorkGroupSizeX_NV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
+            resources->maxMeshWorkGroupSizeY_NV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
+            resources->maxMeshWorkGroupSizeZ_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
+            resources->maxTaskWorkGroupSizeX_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
+            resources->maxTaskWorkGroupSizeY_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
+            resources->maxTaskWorkGroupSizeZ_NV = value;
+        else if (tokenStr == "MaxMeshViewCountNV")
+            resources->maxMeshViewCountNV = value;
+        else if (tokenStr == "MaxMeshOutputVerticesEXT")
+            resources->maxMeshOutputVerticesEXT = value;
+        else if (tokenStr == "MaxMeshOutputPrimitivesEXT")
+            resources->maxMeshOutputPrimitivesEXT = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeX_EXT")
+            resources->maxMeshWorkGroupSizeX_EXT = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeY_EXT")
+            resources->maxMeshWorkGroupSizeY_EXT = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeZ_EXT")
+            resources->maxMeshWorkGroupSizeZ_EXT = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeX_EXT")
+            resources->maxTaskWorkGroupSizeX_EXT = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeY_EXT")
+            resources->maxTaskWorkGroupSizeY_EXT = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeZ_EXT")
+            resources->maxTaskWorkGroupSizeZ_EXT = value;
+        else if (tokenStr == "MaxMeshViewCountEXT")
+            resources->maxMeshViewCountEXT = value;
+        else if (tokenStr == "MaxDualSourceDrawBuffersEXT")
+            resources->maxDualSourceDrawBuffersEXT = value;
+        else if (tokenStr == "nonInductiveForLoops")
+            resources->limits.nonInductiveForLoops = (value != 0);
+        else if (tokenStr == "whileLoops")
+            resources->limits.whileLoops = (value != 0);
+        else if (tokenStr == "doWhileLoops")
+            resources->limits.doWhileLoops = (value != 0);
+        else if (tokenStr == "generalUniformIndexing")
+            resources->limits.generalUniformIndexing = (value != 0);
+        else if (tokenStr == "generalAttributeMatrixVectorIndexing")
+            resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
+        else if (tokenStr == "generalVaryingIndexing")
+            resources->limits.generalVaryingIndexing = (value != 0);
+        else if (tokenStr == "generalSamplerIndexing")
+            resources->limits.generalSamplerIndexing = (value != 0);
+        else if (tokenStr == "generalVariableIndexing")
+            resources->limits.generalVariableIndexing = (value != 0);
+        else if (tokenStr == "generalConstantMatrixVectorIndexing")
+            resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
+        else
+            printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str());
+
+    }
+}
+
+TBuiltInResource* GetResources()
+{
+   return &Resources;
+}
+
+const TBuiltInResource* GetDefaultResources()
+{
+    return &DefaultTBuiltInResource;
+}

+ 13 - 13
src/libraries/glslang/glslang/build_info.h

@@ -34,29 +34,29 @@
 #ifndef GLSLANG_BUILD_INFO
 #ifndef GLSLANG_BUILD_INFO
 #define GLSLANG_BUILD_INFO
 #define GLSLANG_BUILD_INFO
 
 
-#define GLSLANG_VERSION_MAJOR 11
+#define GLSLANG_VERSION_MAJOR 14
 #define GLSLANG_VERSION_MINOR 0
 #define GLSLANG_VERSION_MINOR 0
 #define GLSLANG_VERSION_PATCH 0
 #define GLSLANG_VERSION_PATCH 0
 #define GLSLANG_VERSION_FLAVOR ""
 #define GLSLANG_VERSION_FLAVOR ""
 
 
 #define GLSLANG_VERSION_GREATER_THAN(major, minor, patch) \
 #define GLSLANG_VERSION_GREATER_THAN(major, minor, patch) \
-    (((major) > GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
-    (((minor) > GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
-     ((patch) > GLSLANG_VERSION_PATCH)))))
+    ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \
+    ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \
+     (GLSLANG_VERSION_PATCH) > (patch)))))
 
 
 #define GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch) \
 #define GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch) \
-    (((major) > GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
-    (((minor) > GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
-     ((patch) >= GLSLANG_VERSION_PATCH)))))
+    ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \
+    ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \
+     (GLSLANG_VERSION_PATCH >= (patch))))))
 
 
 #define GLSLANG_VERSION_LESS_THAN(major, minor, patch) \
 #define GLSLANG_VERSION_LESS_THAN(major, minor, patch) \
-    (((major) < GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
-    (((minor) < GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
-     ((patch) < GLSLANG_VERSION_PATCH)))))
+    ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \
+    ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \
+     (GLSLANG_VERSION_PATCH) < (patch)))))
 
 
 #define GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch) \
 #define GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch) \
-    (((major) < GLSLANG_VERSION_MAJOR) || ((major) == GLSLANG_VERSION_MAJOR && \
-    (((minor) < GLSLANG_VERSION_MINOR) || ((minor) == GLSLANG_VERSION_MINOR && \
-     ((patch) <= GLSLANG_VERSION_PATCH)))))
+    ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \
+    ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \
+     (GLSLANG_VERSION_PATCH <= (patch))))))
 
 
 #endif // GLSLANG_BUILD_INFO
 #endif // GLSLANG_BUILD_INFO

+ 2 - 109
src/modules/graphics/ShaderStage.cpp

@@ -23,114 +23,7 @@
 #include "Graphics.h"
 #include "Graphics.h"
 
 
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
-
-// TODO: Use love.graphics to determine actual limits?
-static const TBuiltInResource defaultTBuiltInResource = {
-	/* .MaxLights = */ 32,
-	/* .MaxClipPlanes = */ 6,
-	/* .MaxTextureUnits = */ 32,
-	/* .MaxTextureCoords = */ 32,
-	/* .MaxVertexAttribs = */ 64,
-	/* .MaxVertexUniformComponents = */ 16384,
-	/* .MaxVaryingFloats = */ 128,
-	/* .MaxVertexTextureImageUnits = */ 32,
-	/* .MaxCombinedTextureImageUnits = */ 80,
-	/* .MaxTextureImageUnits = */ 32,
-	/* .MaxFragmentUniformComponents = */ 16384,
-	/* .MaxDrawBuffers = */ 8,
-	/* .MaxVertexUniformVectors = */ 4096,
-	/* .MaxVaryingVectors = */ 32,
-	/* .MaxFragmentUniformVectors = */ 4096,
-	/* .MaxVertexOutputVectors = */ 32,
-	/* .MaxFragmentInputVectors = */ 31,
-	/* .MinProgramTexelOffset = */ -8,
-	/* .MaxProgramTexelOffset = */ 7,
-	/* .MaxClipDistances = */ 8,
-	/* .MaxComputeWorkGroupCountX = */ 65535,
-	/* .MaxComputeWorkGroupCountY = */ 65535,
-	/* .MaxComputeWorkGroupCountZ = */ 65535,
-	/* .MaxComputeWorkGroupSizeX = */ 1024,
-	/* .MaxComputeWorkGroupSizeY = */ 1024,
-	/* .MaxComputeWorkGroupSizeZ = */ 64,
-	/* .MaxComputeUniformComponents = */ 1024,
-	/* .MaxComputeTextureImageUnits = */ 32,
-	/* .MaxComputeImageUniforms = */ 16,
-	/* .MaxComputeAtomicCounters = */ 4096,
-	/* .MaxComputeAtomicCounterBuffers = */ 8,
-	/* .MaxVaryingComponents = */ 128,
-	/* .MaxVertexOutputComponents = */ 128,
-	/* .MaxGeometryInputComponents = */ 128,
-	/* .MaxGeometryOutputComponents = */ 128,
-	/* .MaxFragmentInputComponents = */ 128,
-	/* .MaxImageUnits = */ 192,
-	/* .MaxCombinedImageUnitsAndFragmentOutputs = */ 144,
-	/* .MaxCombinedShaderOutputResources = */ 144,
-	/* .MaxImageSamples = */ 32,
-	/* .MaxVertexImageUniforms = */ 16,
-	/* .MaxTessControlImageUniforms = */ 16,
-	/* .MaxTessEvaluationImageUniforms = */ 16,
-	/* .MaxGeometryImageUniforms = */ 16,
-	/* .MaxFragmentImageUniforms = */ 16,
-	/* .MaxCombinedImageUniforms = */ 80,
-	/* .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 = */ 4096,
-	/* .MaxTessControlAtomicCounters = */ 4096,
-	/* .MaxTessEvaluationAtomicCounters = */ 4096,
-	/* .MaxGeometryAtomicCounters = */ 4096,
-	/* .MaxFragmentAtomicCounters = */ 4096,
-	/* .MaxCombinedAtomicCounters = */ 4096,
-	/* .MaxAtomicCounterBindings = */ 8,
-	/* .MaxVertexAtomicCounterBuffers = */ 8,
-	/* .MaxTessControlAtomicCounterBuffers = */ 8,
-	/* .MaxTessEvaluationAtomicCounterBuffers = */ 8,
-	/* .MaxGeometryAtomicCounterBuffers = */ 8,
-	/* .MaxFragmentAtomicCounterBuffers = */ 8,
-	/* .MaxCombinedAtomicCounterBuffers = */ 8,
-	/* .MaxAtomicCounterBufferSize = */ 16384,
-	/* .MaxTransformFeedbackBuffers = */ 4,
-	/* .MaxTransformFeedbackInterleavedComponents = */ 64,
-	/* .MaxCullDistances = */ 8,
-	/* .MaxCombinedClipAndCullDistances = */ 8,
-	/* .MaxSamples = */ 32,
-	/* .maxMeshOutputVerticesNV = */ 256,
-	/* .maxMeshOutputPrimitivesNV = */ 512,
-	/* .maxMeshWorkGroupSizeX_NV = */ 32,
-	/* .maxMeshWorkGroupSizeY_NV = */ 1,
-	/* .maxMeshWorkGroupSizeZ_NV = */ 1,
-	/* .maxTaskWorkGroupSizeX_NV = */ 32,
-	/* .maxTaskWorkGroupSizeY_NV = */ 1,
-	/* .maxTaskWorkGroupSizeZ_NV = */ 1,
-	/* .maxMeshViewCountNV = */ 4,
-	/* .maxDualSourceDrawBuffersEXT = */ 1,
-	/* .limits = */ {
-		/* .nonInductiveForLoops = */ 1,
-		/* .whileLoops = */ 1,
-		/* .doWhileLoops = */ 1,
-		/* .generalUniformIndexing = */ 1,
-		/* .generalAttributeMatrixVectorIndexing = */ 1,
-		/* .generalVaryingIndexing = */ 1,
-		/* .generalSamplerIndexing = */ 1,
-		/* .generalVariableIndexing = */ 1,
-		/* .generalConstantMatrixVectorIndexing = */ 1,
-	}
-};
+#include "libraries/glslang/glslang/Public/ResourceLimits.h"
 
 
 namespace love
 namespace love
 {
 {
@@ -169,7 +62,7 @@ ShaderStage::ShaderStage(Graphics *gfx, ShaderStageType stage, const std::string
 
 
 	bool forwardcompat = supportsGLSL3 && !forcedefault;
 	bool forwardcompat = supportsGLSL3 && !forcedefault;
 
 
-	if (!glslangShader->parse(&defaultTBuiltInResource, defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings))
+	if (!glslangShader->parse(GetDefaultResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings))
 	{
 	{
 		const char *stagename = "unknown";
 		const char *stagename = "unknown";
 		getConstant(stage, stagename);
 		getConstant(stage, stagename);

+ 2 - 109
src/modules/graphics/metal/Shader.mm

@@ -24,6 +24,7 @@
 
 
 // glslang
 // glslang
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
+#include "libraries/glslang/glslang/Public/ResourceLimits.h"
 #include "libraries/glslang/SPIRV/GlslangToSpv.h"
 #include "libraries/glslang/SPIRV/GlslangToSpv.h"
 #include "libraries/spirv_cross/spirv_msl.hpp"
 #include "libraries/spirv_cross/spirv_msl.hpp"
 #include "libraries/spirv_cross/spirv_reflect.hpp"
 #include "libraries/spirv_cross/spirv_reflect.hpp"
@@ -39,114 +40,6 @@ namespace metal
 
 
 static_assert(MAX_COLOR_RENDER_TARGETS <= 8, "Metal pipeline cache key only stores 8 render target pixel formats.");
 static_assert(MAX_COLOR_RENDER_TARGETS <= 8, "Metal pipeline cache key only stores 8 render target pixel formats.");
 
 
-// TODO: Use love.graphics to determine actual limits?
-static const TBuiltInResource defaultTBuiltInResource = {
-	/* .MaxLights = */ 32,
-	/* .MaxClipPlanes = */ 6,
-	/* .MaxTextureUnits = */ 32,
-	/* .MaxTextureCoords = */ 32,
-	/* .MaxVertexAttribs = */ 64,
-	/* .MaxVertexUniformComponents = */ 16384,
-	/* .MaxVaryingFloats = */ 128,
-	/* .MaxVertexTextureImageUnits = */ 32,
-	/* .MaxCombinedTextureImageUnits = */ 80,
-	/* .MaxTextureImageUnits = */ 32,
-	/* .MaxFragmentUniformComponents = */ 16384,
-	/* .MaxDrawBuffers = */ 8,
-	/* .MaxVertexUniformVectors = */ 4096,
-	/* .MaxVaryingVectors = */ 32,
-	/* .MaxFragmentUniformVectors = */ 4096,
-	/* .MaxVertexOutputVectors = */ 32,
-	/* .MaxFragmentInputVectors = */ 31,
-	/* .MinProgramTexelOffset = */ -8,
-	/* .MaxProgramTexelOffset = */ 7,
-	/* .MaxClipDistances = */ 8,
-	/* .MaxComputeWorkGroupCountX = */ 65535,
-	/* .MaxComputeWorkGroupCountY = */ 65535,
-	/* .MaxComputeWorkGroupCountZ = */ 65535,
-	/* .MaxComputeWorkGroupSizeX = */ 1024,
-	/* .MaxComputeWorkGroupSizeY = */ 1024,
-	/* .MaxComputeWorkGroupSizeZ = */ 64,
-	/* .MaxComputeUniformComponents = */ 1024,
-	/* .MaxComputeTextureImageUnits = */ 32,
-	/* .MaxComputeImageUniforms = */ 16,
-	/* .MaxComputeAtomicCounters = */ 4096,
-	/* .MaxComputeAtomicCounterBuffers = */ 8,
-	/* .MaxVaryingComponents = */ 128,
-	/* .MaxVertexOutputComponents = */ 128,
-	/* .MaxGeometryInputComponents = */ 128,
-	/* .MaxGeometryOutputComponents = */ 128,
-	/* .MaxFragmentInputComponents = */ 128,
-	/* .MaxImageUnits = */ 192,
-	/* .MaxCombinedImageUnitsAndFragmentOutputs = */ 144,
-	/* .MaxCombinedShaderOutputResources = */ 144,
-	/* .MaxImageSamples = */ 32,
-	/* .MaxVertexImageUniforms = */ 16,
-	/* .MaxTessControlImageUniforms = */ 16,
-	/* .MaxTessEvaluationImageUniforms = */ 16,
-	/* .MaxGeometryImageUniforms = */ 16,
-	/* .MaxFragmentImageUniforms = */ 16,
-	/* .MaxCombinedImageUniforms = */ 80,
-	/* .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 = */ 4096,
-	/* .MaxTessControlAtomicCounters = */ 4096,
-	/* .MaxTessEvaluationAtomicCounters = */ 4096,
-	/* .MaxGeometryAtomicCounters = */ 4096,
-	/* .MaxFragmentAtomicCounters = */ 4096,
-	/* .MaxCombinedAtomicCounters = */ 4096,
-	/* .MaxAtomicCounterBindings = */ 8,
-	/* .MaxVertexAtomicCounterBuffers = */ 8,
-	/* .MaxTessControlAtomicCounterBuffers = */ 8,
-	/* .MaxTessEvaluationAtomicCounterBuffers = */ 8,
-	/* .MaxGeometryAtomicCounterBuffers = */ 8,
-	/* .MaxFragmentAtomicCounterBuffers = */ 8,
-	/* .MaxCombinedAtomicCounterBuffers = */ 8,
-	/* .MaxAtomicCounterBufferSize = */ 16384,
-	/* .MaxTransformFeedbackBuffers = */ 4,
-	/* .MaxTransformFeedbackInterleavedComponents = */ 64,
-	/* .MaxCullDistances = */ 8,
-	/* .MaxCombinedClipAndCullDistances = */ 8,
-	/* .MaxSamples = */ 32,
-	/* .maxMeshOutputVerticesNV = */ 256,
-	/* .maxMeshOutputPrimitivesNV = */ 512,
-	/* .maxMeshWorkGroupSizeX_NV = */ 32,
-	/* .maxMeshWorkGroupSizeY_NV = */ 1,
-	/* .maxMeshWorkGroupSizeZ_NV = */ 1,
-	/* .maxTaskWorkGroupSizeX_NV = */ 32,
-	/* .maxTaskWorkGroupSizeY_NV = */ 1,
-	/* .maxTaskWorkGroupSizeZ_NV = */ 1,
-	/* .maxMeshViewCountNV = */ 4,
-	/* .maxDualSourceDrawBuffersEXT = */ 1,
-	/* .limits = */ {
-		/* .nonInductiveForLoops = */ 1,
-		/* .whileLoops = */ 1,
-		/* .doWhileLoops = */ 1,
-		/* .generalUniformIndexing = */ 1,
-		/* .generalAttributeMatrixVectorIndexing = */ 1,
-		/* .generalVaryingIndexing = */ 1,
-		/* .generalSamplerIndexing = */ 1,
-		/* .generalVariableIndexing = */ 1,
-		/* .generalConstantMatrixVectorIndexing = */ 1,
-	}
-};
-
 static MTLVertexFormat getMTLVertexFormat(DataFormat format)
 static MTLVertexFormat getMTLVertexFormat(DataFormat format)
 {
 {
 	switch (format)
 	switch (format)
@@ -314,7 +207,7 @@ Shader::Shader(id<MTLDevice> device, StrongRef<love::graphics::ShaderStage> stag
 		forcedefault = true;
 		forcedefault = true;
 #endif
 #endif
 
 
-		if (!tshader->parse(&defaultTBuiltInResource, defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings))
+		if (!tshader->parse(GetDefaultResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings))
 		{
 		{
 			const char *stagename = "unknown";
 			const char *stagename = "unknown";
 			ShaderStage::getConstant(stage, stagename);
 			ShaderStage::getConstant(stage, stagename);

+ 2 - 108
src/modules/graphics/vulkan/Shader.cpp

@@ -23,6 +23,7 @@
 #include "Graphics.h"
 #include "Graphics.h"
 
 
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
 #include "libraries/glslang/glslang/Public/ShaderLang.h"
+#include "libraries/glslang/glslang/Public/ResourceLimits.h"
 #include "libraries/glslang/SPIRV/GlslangToSpv.h"
 #include "libraries/glslang/SPIRV/GlslangToSpv.h"
 
 
 
 
@@ -33,113 +34,6 @@ namespace graphics
 namespace vulkan
 namespace vulkan
 {
 {
 
 
-static const TBuiltInResource defaultTBuiltInResource = {
-	/* .MaxLights = */ 32,
-	/* .MaxClipPlanes = */ 6,
-	/* .MaxTextureUnits = */ 32,
-	/* .MaxTextureCoords = */ 32,
-	/* .MaxVertexAttribs = */ 64,
-	/* .MaxVertexUniformComponents = */ 16384,
-	/* .MaxVaryingFloats = */ 128,
-	/* .MaxVertexTextureImageUnits = */ 32,
-	/* .MaxCombinedTextureImageUnits = */ 80,
-	/* .MaxTextureImageUnits = */ 32,
-	/* .MaxFragmentUniformComponents = */ 16384,
-	/* .MaxDrawBuffers = */ 8,
-	/* .MaxVertexUniformVectors = */ 4096,
-	/* .MaxVaryingVectors = */ 32,
-	/* .MaxFragmentUniformVectors = */ 4096,
-	/* .MaxVertexOutputVectors = */ 32,
-	/* .MaxFragmentInputVectors = */ 31,
-	/* .MinProgramTexelOffset = */ -8,
-	/* .MaxProgramTexelOffset = */ 7,
-	/* .MaxClipDistances = */ 8,
-	/* .MaxComputeWorkGroupCountX = */ 65535,
-	/* .MaxComputeWorkGroupCountY = */ 65535,
-	/* .MaxComputeWorkGroupCountZ = */ 65535,
-	/* .MaxComputeWorkGroupSizeX = */ 1024,
-	/* .MaxComputeWorkGroupSizeY = */ 1024,
-	/* .MaxComputeWorkGroupSizeZ = */ 64,
-	/* .MaxComputeUniformComponents = */ 1024,
-	/* .MaxComputeTextureImageUnits = */ 32,
-	/* .MaxComputeImageUniforms = */ 16,
-	/* .MaxComputeAtomicCounters = */ 4096,
-	/* .MaxComputeAtomicCounterBuffers = */ 8,
-	/* .MaxVaryingComponents = */ 128,
-	/* .MaxVertexOutputComponents = */ 128,
-	/* .MaxGeometryInputComponents = */ 128,
-	/* .MaxGeometryOutputComponents = */ 128,
-	/* .MaxFragmentInputComponents = */ 128,
-	/* .MaxImageUnits = */ 192,
-	/* .MaxCombinedImageUnitsAndFragmentOutputs = */ 144,
-	/* .MaxCombinedShaderOutputResources = */ 144,
-	/* .MaxImageSamples = */ 32,
-	/* .MaxVertexImageUniforms = */ 16,
-	/* .MaxTessControlImageUniforms = */ 16,
-	/* .MaxTessEvaluationImageUniforms = */ 16,
-	/* .MaxGeometryImageUniforms = */ 16,
-	/* .MaxFragmentImageUniforms = */ 16,
-	/* .MaxCombinedImageUniforms = */ 80,
-	/* .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 = */ 4096,
-	/* .MaxTessControlAtomicCounters = */ 4096,
-	/* .MaxTessEvaluationAtomicCounters = */ 4096,
-	/* .MaxGeometryAtomicCounters = */ 4096,
-	/* .MaxFragmentAtomicCounters = */ 4096,
-	/* .MaxCombinedAtomicCounters = */ 4096,
-	/* .MaxAtomicCounterBindings = */ 8,
-	/* .MaxVertexAtomicCounterBuffers = */ 8,
-	/* .MaxTessControlAtomicCounterBuffers = */ 8,
-	/* .MaxTessEvaluationAtomicCounterBuffers = */ 8,
-	/* .MaxGeometryAtomicCounterBuffers = */ 8,
-	/* .MaxFragmentAtomicCounterBuffers = */ 8,
-	/* .MaxCombinedAtomicCounterBuffers = */ 8,
-	/* .MaxAtomicCounterBufferSize = */ 16384,
-	/* .MaxTransformFeedbackBuffers = */ 4,
-	/* .MaxTransformFeedbackInterleavedComponents = */ 64,
-	/* .MaxCullDistances = */ 8,
-	/* .MaxCombinedClipAndCullDistances = */ 8,
-	/* .MaxSamples = */ 32,
-	/* .maxMeshOutputVerticesNV = */ 256,
-	/* .maxMeshOutputPrimitivesNV = */ 512,
-	/* .maxMeshWorkGroupSizeX_NV = */ 32,
-	/* .maxMeshWorkGroupSizeY_NV = */ 1,
-	/* .maxMeshWorkGroupSizeZ_NV = */ 1,
-	/* .maxTaskWorkGroupSizeX_NV = */ 32,
-	/* .maxTaskWorkGroupSizeY_NV = */ 1,
-	/* .maxTaskWorkGroupSizeZ_NV = */ 1,
-	/* .maxMeshViewCountNV = */ 4,
-	/* .maxDualSourceDrawBuffersEXT = */ 1,
-	/* .limits = */ {
-		/* .nonInductiveForLoops = */ 1,
-		/* .whileLoops = */ 1,
-		/* .doWhileLoops = */ 1,
-		/* .generalUniformIndexing = */ 1,
-		/* .generalAttributeMatrixVectorIndexing = */ 1,
-		/* .generalVaryingIndexing = */ 1,
-		/* .generalSamplerIndexing = */ 1,
-		/* .generalVariableIndexing = */ 1,
-		/* .generalConstantMatrixVectorIndexing = */ 1,
-	}
-};
-
 static const uint32_t STREAMBUFFER_DEFAULT_SIZE = 16;
 static const uint32_t STREAMBUFFER_DEFAULT_SIZE = 16;
 static const uint32_t DESCRIPTOR_POOL_SIZE = 1000;
 static const uint32_t DESCRIPTOR_POOL_SIZE = 1000;
 
 
@@ -726,7 +620,7 @@ void Shader::compileShaders()
 		bool forceDefault = false;
 		bool forceDefault = false;
 		bool forwardCompat = true;
 		bool forwardCompat = true;
 
 
-		if (!tshader->parse(&defaultTBuiltInResource, defaultVersion, defaultProfile, forceDefault, forwardCompat, EShMsgSuppressWarnings))
+		if (!tshader->parse(GetDefaultResources(), defaultVersion, defaultProfile, forceDefault, forwardCompat, EShMsgSuppressWarnings))
 		{
 		{
 			const char *stageName = "unknown";
 			const char *stageName = "unknown";
 			ShaderStage::getConstant(stage, stageName);
 			ShaderStage::getConstant(stage, stageName);

Some files were not shown because too many files changed in this diff