Snap for 7485283 from 493d4e9abf1642e372b41f4098d50baf42d3a34f to ndk-release-r23

Change-Id: I15b2eb00e9a41c8c8be6c29ed283606168b06434
diff --git a/BUILD.bazel b/BUILD.bazel
index bfb7797..e8cf6a8 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -53,7 +53,8 @@
     name = "gen_build_info_h",
     srcs = ["CHANGES.md", "build_info.h.tmpl"],
     outs = ["glslang/build_info.h"],
-    cmd = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
+    cmd_bash = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
+    cmd_bat = "for %F in ($(location CHANGES.md)) do $(location build_info) %~dpF -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
     tools = [":build_info"],
 )
 
@@ -143,7 +144,8 @@
         "include/SPIRV/NonSemanticDebugPrintf.h",
         "include/SPIRV/spirv.hpp",
     ],
-    cmd = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
+    cmd_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
+    cmd_bat = "(if not exist $(@D)\\include\\SPIRV mkdir $(@D)\\include\\SPIRV) && (for %S in ($(SRCS)) do @xcopy /q %S $(@D)\\include\\SPIRV\\ >NUL)",
 )
 
 cc_library(
diff --git a/CHANGES.md b/CHANGES.md
index 0698e76..3fd3636 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,7 +3,7 @@
 All notable changes to this project will be documented in this file.
 This project adheres to [Semantic Versioning](https://semver.org/).
 
-## 11.1.0 2021-02-18
+## 11.2.0 2021-02-18
 
 ### Other changes
 * Removed Python requirement when not building with spirv-tools
@@ -11,6 +11,11 @@
 * Implement GL_EXT_null_initializer
 * Add CMake support for Fuschia
 
+## 11.1.0 2020-12-07
+
+### Other changes
+* Added ray-tracing extension support
+
 ## 11.0.0 2020-07-20
 
 ### Breaking changes
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d582926..9ed5265 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,15 +31,15 @@
 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-project(glslang
-    LANGUAGES CXX)
-
 # increase to 3.1 once all major distributions
 # include a version of CMake >= 3.1
 cmake_minimum_required(VERSION 2.8.12)
 if (POLICY CMP0048)
   cmake_policy(SET CMP0048 NEW)
 endif()
+
+project(glslang LANGUAGES CXX)
+
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 # Enable compile commands database
@@ -193,6 +193,9 @@
     endif()
     if(ENABLE_EXCEPTIONS)
         add_compile_options(/EHsc) # Enable Exceptions
+	else()
+        string(REGEX REPLACE /EHsc "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Try to remove default /EHsc cxx_flag
+        add_compile_definitions(_HAS_EXCEPTIONS=0)
     endif()
 endif()
 
@@ -294,7 +297,7 @@
 endif()
 
 if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
-    find_package(PythonInterp 3 REQUIRED)
+    find_host_package(PythonInterp 3 REQUIRED)
 
     # We depend on these for later projects, so they should come first.
     add_subdirectory(External)
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 8528955..81aacd1 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -255,7 +255,7 @@
     bool nanMinMaxClamp;               // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp
     spv::Id stdBuiltins;
     spv::Id nonSemanticDebugPrintf;
-    std::unordered_map<const char*, spv::Id> extBuiltinMap;
+    std::unordered_map<std::string, spv::Id> extBuiltinMap;
 
     std::unordered_map<long long, spv::Id> symbolValues;
     std::unordered_set<long long> rValueParameters;  // set of formal function parameters passed as rValues,
@@ -1493,7 +1493,7 @@
 
     if (glslangIntermediate->usingPhysicalStorageBuffer()) {
         addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
-        builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
+        builder.addIncorporatedExtension(spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
         builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
     }
     if (glslangIntermediate->usingVulkanMemoryModel()) {
@@ -1551,15 +1551,16 @@
             builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
         }
 
-        if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
+        if (glslangIntermediate->isDepthReplacing())
             builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
 
 #ifndef GLSLANG_WEB
 
         switch(glslangIntermediate->getDepth()) {
-        case glslang::EldGreater:  mode = spv::ExecutionModeDepthGreater; break;
-        case glslang::EldLess:     mode = spv::ExecutionModeDepthLess;    break;
-        default:                   mode = spv::ExecutionModeMax;          break;
+        case glslang::EldGreater:   mode = spv::ExecutionModeDepthGreater;   break;
+        case glslang::EldLess:      mode = spv::ExecutionModeDepthLess;      break;
+        case glslang::EldUnchanged: mode = spv::ExecutionModeDepthUnchanged; break;
+        default:                    mode = spv::ExecutionModeMax;            break;
         }
         if (mode != spv::ExecutionModeMax)
             builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
@@ -2300,7 +2301,8 @@
     if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
         node->getOp() == glslang::EOpAtomicCounterDecrement ||
         node->getOp() == glslang::EOpAtomicCounter          ||
-        node->getOp() == glslang::EOpInterpolateAtCentroid  ||
+        (node->getOp() == glslang::EOpInterpolateAtCentroid &&
+          glslangIntermediate->getSource() != glslang::EShSourceHlsl)  ||
         node->getOp() == glslang::EOpRayQueryProceed        ||
         node->getOp() == glslang::EOpRayQueryGetRayTMin     ||
         node->getOp() == glslang::EOpRayQueryGetRayFlags    ||
@@ -2783,6 +2785,7 @@
         break;
 
     case glslang::EOpAtomicAdd:
+    case glslang::EOpAtomicSubtract:
     case glslang::EOpAtomicMin:
     case glslang::EOpAtomicMax:
     case glslang::EOpAtomicAnd:
@@ -2954,6 +2957,7 @@
             break;
 
         case glslang::EOpAtomicAdd:
+        case glslang::EOpAtomicSubtract:
         case glslang::EOpAtomicMin:
         case glslang::EOpAtomicMax:
         case glslang::EOpAtomicAnd:
@@ -2974,7 +2978,13 @@
         case glslang::EOpInterpolateAtOffset:
         case glslang::EOpInterpolateAtVertex:
             if (arg == 0) {
-                lvalue = true;
+                // If GLSL, use the address of the interpolant argument.
+                // If HLSL, use an internal version of OpInterolates that takes
+                // the rvalue of the interpolant. A fixup pass in spirv-opt
+                // legalization will remove the OpLoad and convert to an lvalue.
+                // Had to do this because legalization will only propagate a
+                // builtin into an rvalue.
+                lvalue = glslangIntermediate->getSource() != glslang::EShSourceHlsl;
 
                 // Does it need a swizzle inversion?  If so, evaluation is inverted;
                 // operate first on the swizzle base, then apply the swizzle.
@@ -3163,7 +3173,9 @@
 #endif
     if (atomic) {
         // Handle all atomics
-        result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(),
+        glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore)
+            ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType();
+        result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy,
             lvalueCoherentFlags);
     } else if (node->getOp() == glslang::EOpDebugPrintf) {
         if (!nonSemanticDebugPrintf) {
@@ -6831,9 +6843,6 @@
         break;
     case glslang::EOpConvPtrToUvec2:
     case glslang::EOpConvUvec2ToPtr:
-        if (builder.isVector(operand))
-            builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer,
-                                                 spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
         convOp = spv::OpBitcast;
         break;
 #endif
@@ -6891,6 +6900,7 @@
                 builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
         }
         break;
+    case glslang::EOpAtomicSubtract:
     case glslang::EOpAtomicCounterSubtract:
         opCode = spv::OpAtomicISub;
         break;
diff --git a/SPIRV/SpvTools.cpp b/SPIRV/SpvTools.cpp
index 5cfc426..8acf9b1 100644
--- a/SPIRV/SpvTools.cpp
+++ b/SPIRV/SpvTools.cpp
@@ -207,6 +207,7 @@
     optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
     optimizer.RegisterPass(spvtools::CreateVectorDCEPass());
     optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass());
+    optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
     if (options->optimizeSize) {
         optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
     }
diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp
index 6805c3a..3da77bf 100644
--- a/SPIRV/doc.cpp
+++ b/SPIRV/doc.cpp
@@ -917,6 +917,7 @@
     case CapabilityRayTracingNV:                    return "RayTracingNV";
     case CapabilityRayTracingKHR:                   return "RayTracingKHR";
     case CapabilityRayQueryKHR:                     return "RayQueryKHR";
+    case CapabilityRayTracingProvisionalKHR:        return "RayTracingProvisionalKHR";
     case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
     case CapabilityComputeDerivativeGroupQuadsNV:   return "ComputeDerivativeGroupQuadsNV";
     case CapabilityComputeDerivativeGroupLinearNV:  return "ComputeDerivativeGroupLinearNV";
@@ -2718,7 +2719,7 @@
 
     InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
     InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
-    InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'");
+    InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'");
 
     InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
 
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
index bff9ab6..751d1cd 100644
--- a/StandAlone/CMakeLists.txt
+++ b/StandAlone/CMakeLists.txt
@@ -100,7 +100,12 @@
 
     if(BUILD_SHARED_LIBS)
         install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
-                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-        install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+                RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    else()
+        install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
+                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()
+    install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index fdbf027..923ded3 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -110,6 +110,7 @@
 bool NaNClamp = false;
 bool stripDebugInfo = false;
 bool beQuiet = false;
+bool VulkanRulesRelaxed = false;
 
 //
 // Return codes from main/exit().
@@ -195,6 +196,17 @@
 std::array<std::array<TPerSetBaseBinding, EShLangCount>, glslang::EResCount> baseBindingForSet;
 std::array<std::vector<std::string>, EShLangCount> baseResourceSetBinding;
 
+std::vector<std::pair<std::string, glslang::TBlockStorageClass>> blockStorageOverrides;
+
+bool setGlobalUniformBlock = false;
+std::string globalUniformName;
+unsigned int globalUniformBinding;
+unsigned int globalUniformSet;
+
+bool setGlobalBufferBlock = false;
+std::string atomicCounterBlockName;
+unsigned int atomicCounterBlockSet;
+
 // Add things like "#define ..." to a preamble to use in the beginning of the shader.
 class TPreamble {
 public:
@@ -397,6 +409,115 @@
 }
 
 //
+// Process an optional binding base of one the forms:
+//   --argname name {uniform|buffer|push_constant}
+void ProcessBlockStorage(int& argc, char**& argv, std::vector<std::pair<std::string, glslang::TBlockStorageClass>>& storage)
+{
+    if (argc < 3)
+        usage();
+
+    glslang::TBlockStorageClass blockStorage = glslang::EbsNone;
+
+    std::string strBacking(argv[2]);
+    if (strBacking == "uniform")
+        blockStorage = glslang::EbsUniform;
+    else if (strBacking == "buffer")
+        blockStorage = glslang::EbsStorageBuffer;
+    else if (strBacking == "push_constant")
+        blockStorage = glslang::EbsPushConstant;
+    else {
+        printf("%s: invalid block storage\n", strBacking.c_str());
+        usage();
+    }
+
+    storage.push_back(std::make_pair(std::string(argv[1]), blockStorage));
+
+    argc -= 2;
+    argv += 2;
+}
+
+inline bool isNonDigit(char c) {
+    // a non-digit character valid in a glsl identifier
+    return (c == '_') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+}
+
+// whether string isa  valid identifier to be used in glsl
+bool isValidIdentifier(const char* str) {
+    std::string idn(str);
+
+    if (idn.length() == 0) {
+        return false;
+    }
+
+    if (idn.length() >= 3 && idn.substr(0, 3) == "gl_") {
+        // identifiers startin with "gl_" are reserved
+        return false;
+    }
+
+    if (!isNonDigit(idn[0])) {
+        return false;
+    }
+
+    for (unsigned int i = 1; i < idn.length(); ++i) {
+        if (!(isdigit(idn[i]) || isNonDigit(idn[i]))) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+// Process settings for either the global buffer block or global unfirom block
+// of the form:
+//      --argname name set binding
+void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsigned int* set, unsigned int* binding)
+{
+    if (argc < 4)
+        usage();
+
+    unsigned int curArg = 1;
+
+    assert(name || set || binding);
+
+    if (name) {
+        if (!isValidIdentifier(argv[curArg])) {
+            printf("%s: invalid identifier\n", argv[curArg]);
+            usage();
+        }
+        *name = argv[curArg];
+
+        curArg++;
+    }
+
+    if (set) {
+        errno = 0;
+        int setVal = ::strtol(argv[curArg], NULL, 10);
+        if (errno || setVal < 0) {
+            printf("%s: invalid set\n", argv[curArg]);
+            usage();
+        }
+        *set = setVal;
+
+        curArg++;
+    }
+
+    if (binding) {
+        errno = 0;
+        int bindingVal = ::strtol(argv[curArg], NULL, 10);
+        if (errno || bindingVal < 0) {
+            printf("%s: invalid binding\n", argv[curArg]);
+            usage();
+        }
+        *binding = bindingVal;
+
+        curArg++;
+    }
+
+    argc -= (curArg - 1);
+    argv += (curArg - 1);
+}
+
+//
 // Do all command-line argument parsing.  This includes building up the work-items
 // to be processed later, and saving all the command-line options.
 //
@@ -569,6 +690,17 @@
                                lowerword == "resource-set-binding"  ||
                                lowerword == "rsb") {
                         ProcessResourceSetBindingBase(argc, argv, baseResourceSetBinding);
+                    } else if (lowerword == "set-block-storage" ||
+                               lowerword == "sbs") {
+                        ProcessBlockStorage(argc, argv, blockStorageOverrides);
+                    } else if (lowerword == "set-atomic-counter-block" ||
+                               lowerword == "sacb") {
+                        ProcessGlobalBlockSettings(argc, argv, &atomicCounterBlockName, &atomicCounterBlockSet, nullptr);
+                        setGlobalBufferBlock = true;
+                    } else if (lowerword == "set-default-uniform-block" ||
+                               lowerword == "sdub") {
+                        ProcessGlobalBlockSettings(argc, argv, &globalUniformName, &globalUniformSet, &globalUniformBinding);
+                        setGlobalUniformBlock = true;
                     } else if (lowerword == "shift-image-bindings" ||  // synonyms
                                lowerword == "shift-image-binding"  ||
                                lowerword == "sib") {
@@ -721,6 +853,9 @@
                 else
                     Error("unknown -O option");
                 break;
+            case 'R':
+                VulkanRulesRelaxed = true;
+                break;
             case 'S':
                 if (argc <= 1)
                     Error("no <stage> specified for -S");
@@ -1068,6 +1203,24 @@
         shader->setUniformLocationBase(uniformBase);
 #endif
 
+        if (VulkanRulesRelaxed) {
+            for (auto& storageOverride : blockStorageOverrides) {
+                shader->addBlockStorageOverride(storageOverride.first.c_str(),
+                    storageOverride.second);
+            }
+
+            if (setGlobalBufferBlock) {
+                shader->setAtomicCounterBlockName(atomicCounterBlockName.c_str());
+                shader->setAtomicCounterBlockSet(atomicCounterBlockSet);
+            }
+
+            if (setGlobalUniformBlock) {
+                shader->setGlobalUniformBlockName(globalUniformName.c_str());
+                shader->setGlobalUniformSet(globalUniformSet);
+                shader->setGlobalUniformBinding(globalUniformBinding);
+            }
+        }
+
         shader->setNanMinMaxClamp(NaNClamp);
 
 #ifdef ENABLE_HLSL
@@ -1091,6 +1244,8 @@
             if (targetHlslFunctionality1)
                 shader->setEnvTargetHlslFunctionality1();
 #endif
+            if (VulkanRulesRelaxed)
+                shader->setEnvInputVulkanRulesRelaxed();
         }
 
         shaders.push_back(shader);
@@ -1572,6 +1727,9 @@
            "              is searched first, followed by left-to-right order of -I\n"
            "  -Od         disables optimization; may cause illegal SPIR-V for HLSL\n"
            "  -Os         optimizes SPIR-V to minimize size\n"
+           "  -R          use relaxed verification rules for generating Vulkan SPIR-V,\n"
+           "              allowing the use of default uniforms, atomic_uints, and\n"
+           "              gl_VertexID and gl_InstanceID keywords.\n"
            "  -S <stage>  uses specified stage rather than parsing the file extension\n"
            "              choices for <stage> are vert, tesc, tese, geom, frag, or comp\n"
            "  -U<name> | --undef-macro <name> | --U <name>\n"
@@ -1649,6 +1807,22 @@
            "  --resource-set-binding [stage] set\n"
            "                                    set descriptor set for all resources\n"
            "  --rsb                             synonym for --resource-set-binding\n"
+           "  --set-block-backing name {uniform|buffer|push_constant}\n"
+           "                                    changes the backing type of a uniform, buffer,\n"
+           "                                    or push_constant block declared in\n"
+           "                                    in the program, when using -R option.\n"
+           "                                    This can be used to change the backing\n"
+           "                                    for existing blocks as well as implicit ones\n"
+           "                                    such as 'gl_DefaultUniformBlock'.\n"
+           "  --sbs                             synonym for set-block-storage\n"
+           "  --set-atomic-counter-block name set\n"
+           "                                    set name, and descriptor set for\n"
+           "                                    atomic counter blocks, with -R opt\n"
+           "  --sacb                            synonym for set-atomic-counter-block\n"
+           "  --set-default-uniform-block name set binding\n"
+           "                                    set name, descriptor set, and binding for\n"
+           "                                    global default-uniform-block, with -R opt\n"
+           "  --sdub                            synonym for set-default-uniform-block\n"
            "  --shift-image-binding [stage] num\n"
            "                                    base binding number for images (uav)\n"
            "  --shift-image-binding [stage] [num set]...\n"
diff --git a/Test/420.vert b/Test/420.vert
index c7ffa90..cfae71f 100644
--- a/Test/420.vert
+++ b/Test/420.vert
@@ -159,3 +159,4 @@
 }

 

 layout(binding=0) writeonly uniform image1D badArray[];

+layout(binding = 74) uniform sampler2D u_sampler0[6];
diff --git a/Test/440.frag b/Test/440.frag
index 4eb1a3f..a3ec89d 100644
--- a/Test/440.frag
+++ b/Test/440.frag
@@ -151,3 +151,18 @@
 {

     return gl_Layer;

 }

+

+// The std140 layout qualifier should NOT propagate all the way down to

+// the vec3. It is unnecessary and it breaks downstream AST consumers,

+// notably LunarGlass.

+

+struct PointLight_t

+{

+    vec3 vPositionWs ;

+} ;

+

+layout( std140, row_major ) uniform PerViewLightData_t

+{

+

+    PointLight_t g_pointLightData [ 128 ] ;

+} ;

diff --git a/Test/450.frag b/Test/450.frag
index 076d0b3..abab34d 100644
--- a/Test/450.frag
+++ b/Test/450.frag
@@ -48,6 +48,31 @@
     float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);

 }

 

+#extension GL_ARB_sparse_texture2: enable

+

+uniform sampler2D               s2D;

+uniform isampler2DArray         is2DArray;

+uniform sampler2DRectShadow     s2DRectShadow;

+

+in flat ivec2 offsets[4];

+in vec2 c2;

+in vec3 c3;

+

+void testOffsets()

+{

+    vec4  texel  = vec4(0.0);

+    ivec4 itexel = ivec4(0);

+    const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));

+    sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(is2DArray, c3, constOffsets, itexel, 2);

+    sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, constOffsets, texel);

+

+    sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel); // Error : Non constant offsets

+    sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2); // Error : Non constant offsets

+    sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel); // Error : Non constant offsets

+

+}

+

 in float gl_CullDistance[6];

 

 float cull(int i)

diff --git a/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out
new file mode 100644
index 0000000..564f0f4
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out
@@ -0,0 +1,110 @@
+hlsl.intrinsics.evalfns.frag
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 274
+
+                              Capability Shader
+                              Capability InterpolationFunction
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 138 142 146 150 154 157 161
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 138  "inF1"
+                              Name 142  "inF2"
+                              Name 146  "inF3"
+                              Name 150  "inF4"
+                              Name 154  "inI2"
+                              Name 157  "i.vPos"
+                              Name 161  "@entryPointOutput"
+                              Decorate 138(inF1) Location 0
+                              Decorate 142(inF2) Location 1
+                              Decorate 146(inF3) Location 2
+                              Decorate 150(inF4) Location 3
+                              Decorate 154(inI2) Flat
+                              Decorate 154(inI2) Location 4
+                              Decorate 157(i.vPos) Location 5
+                              Decorate 161(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               8:             TypeVector 6(float) 2
+              10:             TypeVector 6(float) 3
+              12:             TypeVector 6(float) 4
+              14:             TypeInt 32 1
+              15:             TypeVector 14(int) 2
+              30:    6(float) Constant 3204448256
+              31:    6(float) Constant 3179282432
+              32:    8(fvec2) ConstantComposite 30 31
+              36:    6(float) Constant 0
+              37:    6(float) Constant 1031798784
+              38:    8(fvec2) ConstantComposite 36 37
+              42:    6(float) Constant 1044381696
+              43:    6(float) Constant 3200253952
+              44:    8(fvec2) ConstantComposite 42 43
+              48:    6(float) Constant 1054867456
+              49:    8(fvec2) ConstantComposite 48 30
+              53:     14(int) Constant 28
+              64:             TypeInt 32 0
+              65:     64(int) Constant 3
+             137:             TypePointer Input 6(float)
+       138(inF1):    137(ptr) Variable Input
+             141:             TypePointer Input 8(fvec2)
+       142(inF2):    141(ptr) Variable Input
+             145:             TypePointer Input 10(fvec3)
+       146(inF3):    145(ptr) Variable Input
+             149:             TypePointer Input 12(fvec4)
+       150(inF4):    149(ptr) Variable Input
+             153:             TypePointer Input 15(ivec2)
+       154(inI2):    153(ptr) Variable Input
+     157(i.vPos):    141(ptr) Variable Input
+             160:             TypePointer Output 12(fvec4)
+161(@entryPointOutput):    160(ptr) Variable Output
+             273:   15(ivec2) ConstantComposite 53 53
+         4(main):           2 Function None 3
+               5:             Label
+             155:   15(ivec2) Load 154(inI2)
+             183:    6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 138(inF1) 32
+             185:    8(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 142(inF2) 38
+             187:   10(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 146(inF3) 44
+             189:   12(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 150(inF4) 49
+             193:   15(ivec2) ShiftLeftLogical 155 273
+             195:   15(ivec2) ShiftRightArithmetic 193 273
+             196:    8(fvec2) ConvertSToF 195
+             197:    8(fvec2) VectorTimesScalar 196 37
+             198:    6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 138(inF1) 197
+             200:    6(float) FAdd 183 198
+             202:    6(float) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 138(inF1) 65
+             204:    6(float) FAdd 200 202
+             206:    8(fvec2) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 142(inF2) 65
+             208:    8(fvec2) FAdd 185 206
+             210:   10(fvec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 146(inF3) 65
+             212:   10(fvec3) FAdd 187 210
+             214:   12(fvec4) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 150(inF4) 65
+             216:   12(fvec4) FAdd 189 214
+             219:     14(int) CompositeExtract 155 0
+             220:     64(int) Bitcast 219
+             221:    6(float) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 138(inF1) 220
+             223:    6(float) FAdd 204 221
+             225:    6(float) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 138(inF1)
+             227:    6(float) FAdd 223 225
+             229:    8(fvec2) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 142(inF2)
+             231:    8(fvec2) FAdd 208 229
+             233:   10(fvec3) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 146(inF3)
+             235:   10(fvec3) FAdd 212 233
+             237:   12(fvec4) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 150(inF4)
+             239:   12(fvec4) FAdd 216 237
+             242:    8(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 157(i.vPos) 38
+             244:    8(fvec2) FAdd 231 242
+             247:    8(fvec2) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 157(i.vPos) 65
+             249:    8(fvec2) FAdd 244 247
+             252:    8(fvec2) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 157(i.vPos)
+             254:    8(fvec2) FAdd 249 252
+             257:    6(float) CompositeExtract 254 1
+             259:    6(float) CompositeExtract 235 2
+             261:    6(float) CompositeExtract 239 3
+             262:   12(fvec4) CompositeConstruct 227 257 259 261
+                              Store 161(@entryPointOutput) 262
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/420.vert.out b/Test/baseResults/420.vert.out
index 1a57b34..b3d9e70 100644
--- a/Test/baseResults/420.vert.out
+++ b/Test/baseResults/420.vert.out
@@ -306,6 +306,7 @@
 0:?     'samp1D' ( uniform sampler1D)
 0:?     'samp1Ds' ( uniform sampler1DShadow)
 0:?     'badArray' (layout( binding=0) writeonly uniform unsized 1-element array of image1D)
+0:?     'u_sampler0' (layout( binding=74) uniform 6-element array of sampler2D)
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
@@ -388,6 +389,7 @@
 0:?     'samp1D' ( uniform sampler1D)
 0:?     'samp1Ds' ( uniform sampler1DShadow)
 0:?     'badArray' (layout( binding=0) writeonly uniform 1-element array of image1D)
+0:?     'u_sampler0' (layout( binding=74) uniform 6-element array of sampler2D)
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
diff --git a/Test/baseResults/440.frag.out b/Test/baseResults/440.frag.out
index 1ac6e7c..c7ff728 100644
--- a/Test/baseResults/440.frag.out
+++ b/Test/baseResults/440.frag.out
@@ -118,6 +118,7 @@
 0:?     'aconst' ( global 4-element array of int)
 0:?     'bconst' ( global 64-element array of int)
 0:?     'sampInArray' ( smooth sample in 4-element array of 3-component vector of float)
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 128-element array of structure{ global 3-component vector of float vPositionWs} g_pointLightData})
 
 
 Linked fragment stage:
@@ -162,4 +163,5 @@
 0:?     'aconst' ( global 4-element array of int)
 0:?     'bconst' ( global 64-element array of int)
 0:?     'sampInArray' ( smooth sample in 4-element array of 3-component vector of float)
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 128-element array of structure{ global 3-component vector of float vPositionWs} g_pointLightData})
 
diff --git a/Test/baseResults/450.frag.out b/Test/baseResults/450.frag.out
index 9cbb4cb..ec184ac 100644
--- a/Test/baseResults/450.frag.out
+++ b/Test/baseResults/450.frag.out
@@ -1,10 +1,14 @@
 450.frag
-ERROR: 0:63: 'location' : cannot use in a block array where new locations are needed for each block element 
-ERROR: 0:68: 'early_fragment_tests' : can only apply to a standalone qualifier 
-ERROR: 2 compilation errors.  No code generated.
+ERROR: 0:70: 'offsets' : argument must be compile-time constant 
+ERROR: 0:71: 'offsets' : argument must be compile-time constant 
+ERROR: 0:72: 'offsets' : argument must be compile-time constant 
+ERROR: 0:88: 'location' : cannot use in a block array where new locations are needed for each block element 
+ERROR: 0:93: 'early_fragment_tests' : can only apply to a standalone qualifier 
+ERROR: 5 compilation errors.  No code generated.
 
 
 Shader version: 450
+Requested GL_ARB_sparse_texture2
 ERROR: node is still EOpNull!
 0:8  Function Definition: main( ( global void)
 0:8    Function Parameters: 
@@ -133,26 +137,107 @@
 0:48              2 (const int)
 0:48            Constant:
 0:48              4.500000
-0:53  Function Definition: cull(i1; ( global float)
-0:53    Function Parameters: 
-0:53      'i' ( in int)
-0:55    Sequence
-0:55      Branch: Return with expression
-0:55        Test condition and select ( temp float)
-0:55          Condition
-0:55          Compare Greater Than or Equal ( temp bool)
-0:55            'i' ( in int)
-0:55            Constant:
-0:55              6 (const int)
-0:55          true case
-0:55          direct index ( smooth temp float CullDistance)
-0:55            'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
-0:55            Constant:
-0:55              5 (const int)
-0:55          false case
-0:55          indirect index ( smooth temp float CullDistance)
-0:55            'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
-0:55            'i' ( in int)
+0:61  Function Definition: testOffsets( ( global void)
+0:61    Function Parameters: 
+0:63    Sequence
+0:63      Sequence
+0:63        move second child to first child ( temp 4-component vector of float)
+0:63          'texel' ( temp 4-component vector of float)
+0:63          Constant:
+0:63            0.000000
+0:63            0.000000
+0:63            0.000000
+0:63            0.000000
+0:64      Sequence
+0:64        move second child to first child ( temp 4-component vector of int)
+0:64          'itexel' ( temp 4-component vector of int)
+0:64          Constant:
+0:64            0 (const int)
+0:64            0 (const int)
+0:64            0 (const int)
+0:64            0 (const int)
+0:66      sparseTextureGatherOffsets ( global int)
+0:66        's2D' ( uniform sampler2D)
+0:66        'c2' ( smooth in 2-component vector of float)
+0:66        Constant:
+0:66          1 (const int)
+0:66          2 (const int)
+0:66          3 (const int)
+0:66          4 (const int)
+0:66          15 (const int)
+0:66          16 (const int)
+0:66          -2 (const int)
+0:66          0 (const int)
+0:66        'texel' ( temp 4-component vector of float)
+0:67      sparseTextureGatherOffsets ( global int)
+0:67        'is2DArray' ( uniform isampler2DArray)
+0:67        'c3' ( smooth in 3-component vector of float)
+0:67        Constant:
+0:67          1 (const int)
+0:67          2 (const int)
+0:67          3 (const int)
+0:67          4 (const int)
+0:67          15 (const int)
+0:67          16 (const int)
+0:67          -2 (const int)
+0:67          0 (const int)
+0:67        'itexel' ( temp 4-component vector of int)
+0:67        Constant:
+0:67          2 (const int)
+0:68      sparseTextureGatherOffsets ( global int)
+0:68        's2DRectShadow' ( uniform sampler2DRectShadow)
+0:68        'c2' ( smooth in 2-component vector of float)
+0:68        Constant:
+0:68          2.000000
+0:68        Constant:
+0:68          1 (const int)
+0:68          2 (const int)
+0:68          3 (const int)
+0:68          4 (const int)
+0:68          15 (const int)
+0:68          16 (const int)
+0:68          -2 (const int)
+0:68          0 (const int)
+0:68        'texel' ( temp 4-component vector of float)
+0:70      sparseTextureGatherOffsets ( global int)
+0:70        's2D' ( uniform sampler2D)
+0:70        'c2' ( smooth in 2-component vector of float)
+0:70        'offsets' ( flat in 4-element array of 2-component vector of int)
+0:70        'texel' ( temp 4-component vector of float)
+0:71      sparseTextureGatherOffsets ( global int)
+0:71        'is2DArray' ( uniform isampler2DArray)
+0:71        'c3' ( smooth in 3-component vector of float)
+0:71        'offsets' ( flat in 4-element array of 2-component vector of int)
+0:71        'itexel' ( temp 4-component vector of int)
+0:71        Constant:
+0:71          2 (const int)
+0:72      sparseTextureGatherOffsets ( global int)
+0:72        's2DRectShadow' ( uniform sampler2DRectShadow)
+0:72        'c2' ( smooth in 2-component vector of float)
+0:72        Constant:
+0:72          2.000000
+0:72        'offsets' ( flat in 4-element array of 2-component vector of int)
+0:72        'texel' ( temp 4-component vector of float)
+0:78  Function Definition: cull(i1; ( global float)
+0:78    Function Parameters: 
+0:78      'i' ( in int)
+0:80    Sequence
+0:80      Branch: Return with expression
+0:80        Test condition and select ( temp float)
+0:80          Condition
+0:80          Compare Greater Than or Equal ( temp bool)
+0:80            'i' ( in int)
+0:80            Constant:
+0:80              6 (const int)
+0:80          true case
+0:80          direct index ( smooth temp float CullDistance)
+0:80            'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
+0:80            Constant:
+0:80              5 (const int)
+0:80          false case
+0:80          indirect index ( smooth temp float CullDistance)
+0:80            'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
+0:80            'i' ( in int)
 0:?   Linker Objects
 0:?     'in1' ( smooth in float)
 0:?     'in2' ( smooth in 2-component vector of float)
@@ -163,6 +248,12 @@
 0:?     'us2dmsa' ( uniform usampler2DMSArray)
 0:?     'ii2dms' (layout( rgba32i) uniform iimage2DMS)
 0:?     'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
+0:?     's2D' ( uniform sampler2D)
+0:?     'is2DArray' ( uniform isampler2DArray)
+0:?     's2DRectShadow' ( uniform sampler2DRectShadow)
+0:?     'offsets' ( flat in 4-element array of 2-component vector of int)
+0:?     'c2' ( smooth in 2-component vector of float)
+0:?     'c3' ( smooth in 3-component vector of float)
 0:?     'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
 0:?     'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
 0:?     'f' ( smooth in float)
@@ -172,6 +263,7 @@
 
 
 Shader version: 450
+Requested GL_ARB_sparse_texture2
 ERROR: node is still EOpNull!
 0:8  Function Definition: main( ( global void)
 0:8    Function Parameters: 
@@ -279,6 +371,12 @@
 0:?     'us2dmsa' ( uniform usampler2DMSArray)
 0:?     'ii2dms' (layout( rgba32i) uniform iimage2DMS)
 0:?     'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
+0:?     's2D' ( uniform sampler2D)
+0:?     'is2DArray' ( uniform isampler2DArray)
+0:?     's2DRectShadow' ( uniform sampler2DRectShadow)
+0:?     'offsets' ( flat in 4-element array of 2-component vector of int)
+0:?     'c2' ( smooth in 2-component vector of float)
+0:?     'c3' ( smooth in 3-component vector of float)
 0:?     'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
 0:?     'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
 0:?     'f' ( smooth in float)
diff --git a/Test/baseResults/hlsl.includeNegative.vert.out b/Test/baseResults/hlsl.includeNegative.vert.out
index 5faa383..67bf41c 100644
--- a/Test/baseResults/hlsl.includeNegative.vert.out
+++ b/Test/baseResults/hlsl.includeNegative.vert.out
@@ -3,8 +3,9 @@
 ERROR: ./inc2/../foo.h:1: '#error' : should not be included  
 ERROR: ./parentBad:3: '#error' : bad parent  
 ERROR: hlsl.includeNegative.vert:7: '#error' : in main  
+ERROR: hlsl.includeNegative.vert:6: 'declaration' : Expected 
 hlsl.includeNegative.vert(8): error at column 0, HLSL parsing failed.
-ERROR: 5 compilation errors.  No code generated.
+ERROR: 6 compilation errors.  No code generated.
 
 
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out
deleted file mode 100644
index 502ad0f..0000000
--- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out
+++ /dev/null
@@ -1,287 +0,0 @@
-hlsl.intrinsics.evalfns.frag
-Shader version: 500
-gl_FragCoord origin is upper left
-0:? Sequence
-0:3  Function Definition: @main(f1;vf2;vf3;vf4;vi2; ( temp void)
-0:3    Function Parameters: 
-0:3      'inF1' ( in float)
-0:3      'inF2' ( in 2-component vector of float)
-0:3      'inF3' ( in 3-component vector of float)
-0:3      'inF4' ( in 4-component vector of float)
-0:3      'inI2' ( in 2-component vector of int)
-0:?     Sequence
-0:4      interpolateAtOffset ( temp float)
-0:4        'inF1' ( in float)
-0:?         Constant:
-0:?           -0.500000
-0:?           -0.062500
-0:5      interpolateAtOffset ( temp 2-component vector of float)
-0:5        'inF2' ( in 2-component vector of float)
-0:?         Constant:
-0:?           0.000000
-0:?           0.062500
-0:6      interpolateAtOffset ( temp 3-component vector of float)
-0:6        'inF3' ( in 3-component vector of float)
-0:?         Constant:
-0:?           0.187500
-0:?           -0.375000
-0:7      interpolateAtOffset ( temp 4-component vector of float)
-0:7        'inF4' ( in 4-component vector of float)
-0:?         Constant:
-0:?           0.437500
-0:?           -0.500000
-0:9      interpolateAtOffset ( temp float)
-0:9        'inF1' ( in float)
-0:9        vector-scale ( temp 2-component vector of float)
-0:9          Convert int to float ( temp 2-component vector of float)
-0:9            right-shift ( temp 2-component vector of int)
-0:9              left-shift ( temp 2-component vector of int)
-0:9                'inI2' ( in 2-component vector of int)
-0:9                Constant:
-0:9                  28 (const int)
-0:9              Constant:
-0:9                28 (const int)
-0:9          Constant:
-0:9            0.062500
-0:3  Function Definition: main( ( temp void)
-0:3    Function Parameters: 
-0:?     Sequence
-0:3      move second child to first child ( temp float)
-0:?         'inF1' ( temp float)
-0:?         'inF1' (layout( location=0) in float)
-0:3      move second child to first child ( temp 2-component vector of float)
-0:?         'inF2' ( temp 2-component vector of float)
-0:?         'inF2' (layout( location=1) in 2-component vector of float)
-0:3      move second child to first child ( temp 3-component vector of float)
-0:?         'inF3' ( temp 3-component vector of float)
-0:?         'inF3' (layout( location=2) in 3-component vector of float)
-0:3      move second child to first child ( temp 4-component vector of float)
-0:?         'inF4' ( temp 4-component vector of float)
-0:?         'inF4' (layout( location=3) in 4-component vector of float)
-0:3      move second child to first child ( temp 2-component vector of int)
-0:?         'inI2' ( temp 2-component vector of int)
-0:?         'inI2' (layout( location=4) flat in 2-component vector of int)
-0:3      Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void)
-0:?         'inF1' ( temp float)
-0:?         'inF2' ( temp 2-component vector of float)
-0:?         'inF3' ( temp 3-component vector of float)
-0:?         'inF4' ( temp 4-component vector of float)
-0:?         'inI2' ( temp 2-component vector of int)
-0:?   Linker Objects
-0:?     'inF1' (layout( location=0) in float)
-0:?     'inF2' (layout( location=1) in 2-component vector of float)
-0:?     'inF3' (layout( location=2) in 3-component vector of float)
-0:?     'inF4' (layout( location=3) in 4-component vector of float)
-0:?     'inI2' (layout( location=4) flat in 2-component vector of int)
-
-
-Linked fragment stage:
-
-
-Shader version: 500
-gl_FragCoord origin is upper left
-0:? Sequence
-0:3  Function Definition: @main(f1;vf2;vf3;vf4;vi2; ( temp void)
-0:3    Function Parameters: 
-0:3      'inF1' ( in float)
-0:3      'inF2' ( in 2-component vector of float)
-0:3      'inF3' ( in 3-component vector of float)
-0:3      'inF4' ( in 4-component vector of float)
-0:3      'inI2' ( in 2-component vector of int)
-0:?     Sequence
-0:4      interpolateAtOffset ( temp float)
-0:4        'inF1' ( in float)
-0:?         Constant:
-0:?           -0.500000
-0:?           -0.062500
-0:5      interpolateAtOffset ( temp 2-component vector of float)
-0:5        'inF2' ( in 2-component vector of float)
-0:?         Constant:
-0:?           0.000000
-0:?           0.062500
-0:6      interpolateAtOffset ( temp 3-component vector of float)
-0:6        'inF3' ( in 3-component vector of float)
-0:?         Constant:
-0:?           0.187500
-0:?           -0.375000
-0:7      interpolateAtOffset ( temp 4-component vector of float)
-0:7        'inF4' ( in 4-component vector of float)
-0:?         Constant:
-0:?           0.437500
-0:?           -0.500000
-0:9      interpolateAtOffset ( temp float)
-0:9        'inF1' ( in float)
-0:9        vector-scale ( temp 2-component vector of float)
-0:9          Convert int to float ( temp 2-component vector of float)
-0:9            right-shift ( temp 2-component vector of int)
-0:9              left-shift ( temp 2-component vector of int)
-0:9                'inI2' ( in 2-component vector of int)
-0:9                Constant:
-0:9                  28 (const int)
-0:9              Constant:
-0:9                28 (const int)
-0:9          Constant:
-0:9            0.062500
-0:3  Function Definition: main( ( temp void)
-0:3    Function Parameters: 
-0:?     Sequence
-0:3      move second child to first child ( temp float)
-0:?         'inF1' ( temp float)
-0:?         'inF1' (layout( location=0) in float)
-0:3      move second child to first child ( temp 2-component vector of float)
-0:?         'inF2' ( temp 2-component vector of float)
-0:?         'inF2' (layout( location=1) in 2-component vector of float)
-0:3      move second child to first child ( temp 3-component vector of float)
-0:?         'inF3' ( temp 3-component vector of float)
-0:?         'inF3' (layout( location=2) in 3-component vector of float)
-0:3      move second child to first child ( temp 4-component vector of float)
-0:?         'inF4' ( temp 4-component vector of float)
-0:?         'inF4' (layout( location=3) in 4-component vector of float)
-0:3      move second child to first child ( temp 2-component vector of int)
-0:?         'inI2' ( temp 2-component vector of int)
-0:?         'inI2' (layout( location=4) flat in 2-component vector of int)
-0:3      Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void)
-0:?         'inF1' ( temp float)
-0:?         'inF2' ( temp 2-component vector of float)
-0:?         'inF3' ( temp 3-component vector of float)
-0:?         'inF4' ( temp 4-component vector of float)
-0:?         'inI2' ( temp 2-component vector of int)
-0:?   Linker Objects
-0:?     'inF1' (layout( location=0) in float)
-0:?     'inF2' (layout( location=1) in 2-component vector of float)
-0:?     'inF3' (layout( location=2) in 3-component vector of float)
-0:?     'inF4' (layout( location=3) in 4-component vector of float)
-0:?     'inI2' (layout( location=4) flat in 2-component vector of int)
-
-Validation failed
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 80
-
-                              Capability Shader
-                              Capability InterpolationFunction
-               1:             ExtInstImport  "GLSL.std.450"
-                              MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 51 55 59 63 67
-                              ExecutionMode 4 OriginUpperLeft
-                              Source HLSL 500
-                              Name 4  "main"
-                              Name 23  "@main(f1;vf2;vf3;vf4;vi2;"
-                              Name 18  "inF1"
-                              Name 19  "inF2"
-                              Name 20  "inF3"
-                              Name 21  "inF4"
-                              Name 22  "inI2"
-                              Name 49  "inF1"
-                              Name 51  "inF1"
-                              Name 53  "inF2"
-                              Name 55  "inF2"
-                              Name 57  "inF3"
-                              Name 59  "inF3"
-                              Name 61  "inF4"
-                              Name 63  "inF4"
-                              Name 65  "inI2"
-                              Name 67  "inI2"
-                              Name 69  "param"
-                              Name 71  "param"
-                              Name 73  "param"
-                              Name 75  "param"
-                              Name 77  "param"
-                              Decorate 51(inF1) Location 0
-                              Decorate 55(inF2) Location 1
-                              Decorate 59(inF3) Location 2
-                              Decorate 63(inF4) Location 3
-                              Decorate 67(inI2) Flat
-                              Decorate 67(inI2) Location 4
-               2:             TypeVoid
-               3:             TypeFunction 2
-               6:             TypeFloat 32
-               7:             TypePointer Function 6(float)
-               8:             TypeVector 6(float) 2
-               9:             TypePointer Function 8(fvec2)
-              10:             TypeVector 6(float) 3
-              11:             TypePointer Function 10(fvec3)
-              12:             TypeVector 6(float) 4
-              13:             TypePointer Function 12(fvec4)
-              14:             TypeInt 32 1
-              15:             TypeVector 14(int) 2
-              16:             TypePointer Function 15(ivec2)
-              17:             TypeFunction 2 7(ptr) 9(ptr) 11(ptr) 13(ptr) 16(ptr)
-              25:    6(float) Constant 3204448256
-              26:    6(float) Constant 3179282432
-              27:    8(fvec2) ConstantComposite 25 26
-              29:    6(float) Constant 0
-              30:    6(float) Constant 1031798784
-              31:    8(fvec2) ConstantComposite 29 30
-              33:    6(float) Constant 1044381696
-              34:    6(float) Constant 3200253952
-              35:    8(fvec2) ConstantComposite 33 34
-              37:    6(float) Constant 1054867456
-              38:    8(fvec2) ConstantComposite 37 25
-              41:     14(int) Constant 28
-              50:             TypePointer Input 6(float)
-        51(inF1):     50(ptr) Variable Input
-              54:             TypePointer Input 8(fvec2)
-        55(inF2):     54(ptr) Variable Input
-              58:             TypePointer Input 10(fvec3)
-        59(inF3):     58(ptr) Variable Input
-              62:             TypePointer Input 12(fvec4)
-        63(inF4):     62(ptr) Variable Input
-              66:             TypePointer Input 15(ivec2)
-        67(inI2):     66(ptr) Variable Input
-         4(main):           2 Function None 3
-               5:             Label
-        49(inF1):      7(ptr) Variable Function
-        53(inF2):      9(ptr) Variable Function
-        57(inF3):     11(ptr) Variable Function
-        61(inF4):     13(ptr) Variable Function
-        65(inI2):     16(ptr) Variable Function
-       69(param):      7(ptr) Variable Function
-       71(param):      9(ptr) Variable Function
-       73(param):     11(ptr) Variable Function
-       75(param):     13(ptr) Variable Function
-       77(param):     16(ptr) Variable Function
-              52:    6(float) Load 51(inF1)
-                              Store 49(inF1) 52
-              56:    8(fvec2) Load 55(inF2)
-                              Store 53(inF2) 56
-              60:   10(fvec3) Load 59(inF3)
-                              Store 57(inF3) 60
-              64:   12(fvec4) Load 63(inF4)
-                              Store 61(inF4) 64
-              68:   15(ivec2) Load 67(inI2)
-                              Store 65(inI2) 68
-              70:    6(float) Load 49(inF1)
-                              Store 69(param) 70
-              72:    8(fvec2) Load 53(inF2)
-                              Store 71(param) 72
-              74:   10(fvec3) Load 57(inF3)
-                              Store 73(param) 74
-              76:   12(fvec4) Load 61(inF4)
-                              Store 75(param) 76
-              78:   15(ivec2) Load 65(inI2)
-                              Store 77(param) 78
-              79:           2 FunctionCall 23(@main(f1;vf2;vf3;vf4;vi2;) 69(param) 71(param) 73(param) 75(param) 77(param)
-                              Return
-                              FunctionEnd
-23(@main(f1;vf2;vf3;vf4;vi2;):           2 Function None 17
-        18(inF1):      7(ptr) FunctionParameter
-        19(inF2):      9(ptr) FunctionParameter
-        20(inF3):     11(ptr) FunctionParameter
-        21(inF4):     13(ptr) FunctionParameter
-        22(inI2):     16(ptr) FunctionParameter
-              24:             Label
-              28:    6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 18(inF1) 27
-              32:    8(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 19(inF2) 31
-              36:   10(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 20(inF3) 35
-              39:   12(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 21(inF4) 38
-              40:   15(ivec2) Load 22(inI2)
-              42:   15(ivec2) CompositeConstruct 41 41
-              43:   15(ivec2) ShiftLeftLogical 40 42
-              44:   15(ivec2) CompositeConstruct 41 41
-              45:   15(ivec2) ShiftRightArithmetic 43 44
-              46:    8(fvec2) ConvertSToF 45
-              47:    8(fvec2) VectorTimesScalar 46 30
-              48:    6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 18(inF1) 47
-                              Return
-                              FunctionEnd
diff --git a/Test/baseResults/iomap.crossStage.2.vert.out b/Test/baseResults/iomap.crossStage.2.vert.out
new file mode 100644
index 0000000..325c1b4
--- /dev/null
+++ b/Test/baseResults/iomap.crossStage.2.vert.out
@@ -0,0 +1,787 @@
+iomap.crossStage.2.vert
+Shader version: 460
+0:? Sequence
+0:32  Function Definition: main( ( global void)
+0:32    Function Parameters: 
+0:34    Sequence
+0:34      move second child to first child ( temp 4-component vector of float)
+0:34        'vgo1' ( smooth out 4-component vector of float)
+0:34        Constant:
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:35      move second child to first child ( temp 2-component vector of float)
+0:35        'vgo2' ( smooth out 2-component vector of float)
+0:35        Constant:
+0:35          0.000000
+0:35          0.000000
+0:36      move second child to first child ( temp 4-component vector of float)
+0:36        o3: direct index for structure ( out 4-component vector of float)
+0:36          'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        Constant:
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:?   Linker Objects
+0:?     'vgo1' ( smooth out 4-component vector of float)
+0:?     'vgo2' ( smooth out 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+
+iomap.crossStage.2.geom
+Shader version: 460
+invocations = -1
+max_vertices = 3
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:29  Function Definition: main( ( global void)
+0:29    Function Parameters: 
+0:31    Sequence
+0:31      Sequence
+0:31        Sequence
+0:31          move second child to first child ( temp int)
+0:31            'i' ( temp int)
+0:31            Constant:
+0:31              0 (const int)
+0:31        Loop with condition tested first
+0:31          Loop Condition
+0:31          Compare Less Than ( temp bool)
+0:31            'i' ( temp int)
+0:31            Constant:
+0:31              3 (const int)
+0:31          Loop Body
+0:32          Sequence
+0:32            move second child to first child ( temp 4-component vector of float)
+0:32              'gfo1' (layout( stream=0) out 4-component vector of float)
+0:32              Constant:
+0:32                0.000000
+0:32                0.000000
+0:32                0.000000
+0:32                0.000000
+0:33            move second child to first child ( temp 2-component vector of float)
+0:33              'gfo2' (layout( stream=0) out 2-component vector of float)
+0:33              Constant:
+0:33                0.000000
+0:33                0.000000
+0:34            move second child to first child ( temp 4-component vector of float)
+0:34              o3: direct index for structure (layout( stream=0) out 4-component vector of float)
+0:34                'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
+0:34                Constant:
+0:34                  0 (const int)
+0:34              o3: direct index for structure ( in 4-component vector of float)
+0:34                indirect index (layout( location=5) temp block{ in 4-component vector of float o3})
+0:34                  'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
+0:34                  'i' ( temp int)
+0:34                Constant:
+0:34                  0 (const int)
+0:35            EmitVertex ( global void)
+0:31          Loop Terminal Expression
+0:31          Post-Increment ( temp int)
+0:31            'i' ( temp int)
+0:37      EndPrimitive ( global void)
+0:?   Linker Objects
+0:?     'vgo1' ( in 1-element array of 4-component vector of float)
+0:?     'vgo2' ( in 1-element array of 2-component vector of float)
+0:?     'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
+0:?     'gfo1' (layout( stream=0) out 4-component vector of float)
+0:?     'gfo2' (layout( stream=0) out 2-component vector of float)
+0:?     'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+
+iomap.crossStage.2.frag
+Shader version: 460
+0:? Sequence
+0:37  Function Definition: main( ( global void)
+0:37    Function Parameters: 
+0:39    Sequence
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          'color' ( temp 4-component vector of float)
+0:39          component-wise multiply ( temp 4-component vector of float)
+0:39            component-wise multiply ( temp 4-component vector of float)
+0:39              component-wise multiply ( temp 4-component vector of float)
+0:39                'gfo1' ( smooth in 4-component vector of float)
+0:39                vector swizzle ( temp 4-component vector of float)
+0:39                  'u1' ( uniform 2-component vector of float)
+0:39                  Sequence
+0:39                    Constant:
+0:39                      0 (const int)
+0:39                    Constant:
+0:39                      1 (const int)
+0:39                    Constant:
+0:39                      0 (const int)
+0:39                    Constant:
+0:39                      1 (const int)
+0:39              vector swizzle ( temp 4-component vector of float)
+0:39                'u2' ( uniform 3-component vector of float)
+0:39                Sequence
+0:39                  Constant:
+0:39                    0 (const int)
+0:39                  Constant:
+0:39                    1 (const int)
+0:39                  Constant:
+0:39                    2 (const int)
+0:39                  Constant:
+0:39                    0 (const int)
+0:39            vector swizzle ( temp 4-component vector of float)
+0:39              'u3' ( uniform 4-component vector of float)
+0:39                0.000000
+0:39                0.000000
+0:39                0.000000
+0:39                0.000000
+0:39              Sequence
+0:39                Constant:
+0:39                  0 (const int)
+0:39                Constant:
+0:39                  1 (const int)
+0:39                Constant:
+0:39                  2 (const int)
+0:39                Constant:
+0:39                  3 (const int)
+0:40      move second child to first child ( temp 4-component vector of float)
+0:40        'outColor' ( out 4-component vector of float)
+0:40        'color' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
+0:?     'gfo1' ( smooth in 4-component vector of float)
+0:?     'gfo2' ( smooth in 2-component vector of float)
+0:?     'outColor' ( out 4-component vector of float)
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+
+
+Linked vertex stage:
+
+
+Linked geometry stage:
+
+
+Linked fragment stage:
+
+WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
+    blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}"
+
+Shader version: 460
+0:? Sequence
+0:32  Function Definition: main( ( global void)
+0:32    Function Parameters: 
+0:34    Sequence
+0:34      move second child to first child ( temp 4-component vector of float)
+0:34        'vgo1' ( smooth out 4-component vector of float)
+0:34        Constant:
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:35      move second child to first child ( temp 2-component vector of float)
+0:35        'vgo2' ( smooth out 2-component vector of float)
+0:35        Constant:
+0:35          0.000000
+0:35          0.000000
+0:36      move second child to first child ( temp 4-component vector of float)
+0:36        o3: direct index for structure ( out 4-component vector of float)
+0:36          'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        Constant:
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:?   Linker Objects
+0:?     'vgo1' ( smooth out 4-component vector of float)
+0:?     'vgo2' ( smooth out 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+Shader version: 460
+invocations = 1
+max_vertices = 3
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:29  Function Definition: main( ( global void)
+0:29    Function Parameters: 
+0:31    Sequence
+0:31      Sequence
+0:31        Sequence
+0:31          move second child to first child ( temp int)
+0:31            'i' ( temp int)
+0:31            Constant:
+0:31              0 (const int)
+0:31        Loop with condition tested first
+0:31          Loop Condition
+0:31          Compare Less Than ( temp bool)
+0:31            'i' ( temp int)
+0:31            Constant:
+0:31              3 (const int)
+0:31          Loop Body
+0:32          Sequence
+0:32            move second child to first child ( temp 4-component vector of float)
+0:32              'gfo1' (layout( stream=0) out 4-component vector of float)
+0:32              Constant:
+0:32                0.000000
+0:32                0.000000
+0:32                0.000000
+0:32                0.000000
+0:33            move second child to first child ( temp 2-component vector of float)
+0:33              'gfo2' (layout( stream=0) out 2-component vector of float)
+0:33              Constant:
+0:33                0.000000
+0:33                0.000000
+0:34            move second child to first child ( temp 4-component vector of float)
+0:34              o3: direct index for structure (layout( stream=0) out 4-component vector of float)
+0:34                'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
+0:34                Constant:
+0:34                  0 (const int)
+0:34              o3: direct index for structure ( in 4-component vector of float)
+0:34                indirect index (layout( location=5) temp block{ in 4-component vector of float o3})
+0:34                  'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
+0:34                  'i' ( temp int)
+0:34                Constant:
+0:34                  0 (const int)
+0:35            EmitVertex ( global void)
+0:31          Loop Terminal Expression
+0:31          Post-Increment ( temp int)
+0:31            'i' ( temp int)
+0:37      EndPrimitive ( global void)
+0:?   Linker Objects
+0:?     'vgo1' ( in 1-element array of 4-component vector of float)
+0:?     'vgo2' ( in 1-element array of 2-component vector of float)
+0:?     'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
+0:?     'gfo1' (layout( stream=0) out 4-component vector of float)
+0:?     'gfo2' (layout( stream=0) out 2-component vector of float)
+0:?     'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+Shader version: 460
+0:? Sequence
+0:37  Function Definition: main( ( global void)
+0:37    Function Parameters: 
+0:39    Sequence
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          'color' ( temp 4-component vector of float)
+0:39          component-wise multiply ( temp 4-component vector of float)
+0:39            component-wise multiply ( temp 4-component vector of float)
+0:39              component-wise multiply ( temp 4-component vector of float)
+0:39                'gfo1' ( smooth in 4-component vector of float)
+0:39                vector swizzle ( temp 4-component vector of float)
+0:39                  'u1' ( uniform 2-component vector of float)
+0:39                  Sequence
+0:39                    Constant:
+0:39                      0 (const int)
+0:39                    Constant:
+0:39                      1 (const int)
+0:39                    Constant:
+0:39                      0 (const int)
+0:39                    Constant:
+0:39                      1 (const int)
+0:39              vector swizzle ( temp 4-component vector of float)
+0:39                'u2' ( uniform 3-component vector of float)
+0:39                Sequence
+0:39                  Constant:
+0:39                    0 (const int)
+0:39                  Constant:
+0:39                    1 (const int)
+0:39                  Constant:
+0:39                    2 (const int)
+0:39                  Constant:
+0:39                    0 (const int)
+0:39            vector swizzle ( temp 4-component vector of float)
+0:39              'u3' ( uniform 4-component vector of float)
+0:39                0.000000
+0:39                0.000000
+0:39                0.000000
+0:39                0.000000
+0:39              Sequence
+0:39                Constant:
+0:39                  0 (const int)
+0:39                Constant:
+0:39                  1 (const int)
+0:39                Constant:
+0:39                  2 (const int)
+0:39                Constant:
+0:39                  3 (const int)
+0:40      move second child to first child ( temp 4-component vector of float)
+0:40        'outColor' ( out 4-component vector of float)
+0:40        'color' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
+0:?     'gfo1' ( smooth in 4-component vector of float)
+0:?     'gfo2' ( smooth in 2-component vector of float)
+0:?     'outColor' ( out 4-component vector of float)
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 56
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 9 14 18 54 55
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "vgo1"
+                              Name 14  "vgo2"
+                              Name 16  "outBlock"
+                              MemberName 16(outBlock) 0  "o3"
+                              Name 18  ""
+                              Name 23  "u1"
+                              Name 27  "u2"
+                              Name 29  "u3"
+                              Name 36  "um2"
+                              Name 40  "glass"
+                              Name 41  "crossStageBlock1"
+                              MemberName 41(crossStageBlock1) 0  "a"
+                              MemberName 41(crossStageBlock1) 1  "b"
+                              Name 43  ""
+                              Name 44  "vertOnlyBlock"
+                              MemberName 44(vertOnlyBlock) 0  "vb1"
+                              Name 46  ""
+                              Name 47  "crossStageBlock2"
+                              MemberName 47(crossStageBlock2) 0  "a"
+                              MemberName 47(crossStageBlock2) 1  "b"
+                              Name 52  "blockName1"
+                              Name 54  "gl_VertexID"
+                              Name 55  "gl_InstanceID"
+                              Decorate 9(vgo1) Location 0
+                              Decorate 14(vgo2) Location 1
+                              Decorate 16(outBlock) Block
+                              Decorate 18 Location 5
+                              Decorate 23(u1) Location 1
+                              Decorate 23(u1) DescriptorSet 0
+                              Decorate 27(u2) Location 2
+                              Decorate 27(u2) DescriptorSet 0
+                              Decorate 29(u3) Location 3
+                              Decorate 29(u3) DescriptorSet 0
+                              Decorate 36(um2) Location 4
+                              Decorate 36(um2) DescriptorSet 0
+                              Decorate 40(glass) Location 0
+                              Decorate 40(glass) DescriptorSet 0
+                              Decorate 40(glass) Binding 0
+                              MemberDecorate 41(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 41(crossStageBlock1) 1 Offset 16
+                              Decorate 41(crossStageBlock1) Block
+                              Decorate 43 DescriptorSet 0
+                              Decorate 43 Binding 0
+                              MemberDecorate 44(vertOnlyBlock) 0 Offset 0
+                              Decorate 44(vertOnlyBlock) BufferBlock
+                              Decorate 46 DescriptorSet 0
+                              Decorate 46 Binding 0
+                              MemberDecorate 47(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 47(crossStageBlock2) 1 Offset 16
+                              Decorate 47(crossStageBlock2) Block
+                              Decorate 52(blockName1) DescriptorSet 0
+                              Decorate 52(blockName1) Binding 0
+                              Decorate 54(gl_VertexID) BuiltIn VertexId
+                              Decorate 55(gl_InstanceID) BuiltIn InstanceId
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+         9(vgo1):      8(ptr) Variable Output
+              10:    6(float) Constant 0
+              11:    7(fvec4) ConstantComposite 10 10 10 10
+              12:             TypeVector 6(float) 2
+              13:             TypePointer Output 12(fvec2)
+        14(vgo2):     13(ptr) Variable Output
+              15:   12(fvec2) ConstantComposite 10 10
+    16(outBlock):             TypeStruct 7(fvec4)
+              17:             TypePointer Output 16(outBlock)
+              18:     17(ptr) Variable Output
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              22:             TypePointer UniformConstant 12(fvec2)
+          23(u1):     22(ptr) Variable UniformConstant
+              24:             TypeVector 6(float) 3
+              25:   24(fvec3) ConstantComposite 10 10 10
+              26:             TypePointer UniformConstant 24(fvec3)
+          27(u2):     26(ptr) Variable UniformConstant 25
+              28:             TypePointer UniformConstant 7(fvec4)
+          29(u3):     28(ptr) Variable UniformConstant 11
+              30:             TypeMatrix 12(fvec2) 2
+              31:    6(float) Constant 1082130432
+              32:   12(fvec2) ConstantComposite 31 10
+              33:   12(fvec2) ConstantComposite 10 31
+              34:          30 ConstantComposite 32 33
+              35:             TypePointer UniformConstant 30
+         36(um2):     35(ptr) Variable UniformConstant 34
+              37:             TypeImage 6(float) 2D sampled format:Unknown
+              38:             TypeSampledImage 37
+              39:             TypePointer UniformConstant 38
+       40(glass):     39(ptr) Variable UniformConstant
+41(crossStageBlock1):             TypeStruct 7(fvec4) 7(fvec4)
+              42:             TypePointer Uniform 41(crossStageBlock1)
+              43:     42(ptr) Variable Uniform
+44(vertOnlyBlock):             TypeStruct 12(fvec2)
+              45:             TypePointer Uniform 44(vertOnlyBlock)
+              46:     45(ptr) Variable Uniform
+47(crossStageBlock2):             TypeStruct 7(fvec4) 12(fvec2)
+              48:             TypeInt 32 0
+              49:     48(int) Constant 2
+              50:             TypeArray 47(crossStageBlock2) 49
+              51:             TypePointer Uniform 50
+  52(blockName1):     51(ptr) Variable Uniform
+              53:             TypePointer Input 19(int)
+ 54(gl_VertexID):     53(ptr) Variable Input
+55(gl_InstanceID):     53(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+                              Store 9(vgo1) 11
+                              Store 14(vgo2) 15
+              21:      8(ptr) AccessChain 18 20
+                              Store 21 11
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 65
+
+                              Capability Geometry
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 22 27 31 37 48 51
+                              ExecutionMode 4 InputPoints
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputTriangleStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "i"
+                              Name 22  "gfo1"
+                              Name 27  "gfo2"
+                              Name 29  "outBlock"
+                              MemberName 29(outBlock) 0  "o3"
+                              Name 31  "gf_out"
+                              Name 32  "outBlock"
+                              MemberName 32(outBlock) 0  "o3"
+                              Name 37  "inBlock"
+                              Name 48  "vgo1"
+                              Name 51  "vgo2"
+                              Name 53  "u1"
+                              Name 57  "u2"
+                              Name 59  "u3"
+                              Name 60  "crossStageBlock2"
+                              MemberName 60(crossStageBlock2) 0  "a"
+                              MemberName 60(crossStageBlock2) 1  "b"
+                              Name 64  "blockName1"
+                              Decorate 22(gfo1) Location 0
+                              Decorate 27(gfo2) Location 1
+                              Decorate 29(outBlock) Block
+                              Decorate 31(gf_out) Location 5
+                              Decorate 32(outBlock) Block
+                              Decorate 37(inBlock) Location 5
+                              Decorate 48(vgo1) Location 0
+                              Decorate 51(vgo2) Location 1
+                              Decorate 53(u1) Location 1
+                              Decorate 53(u1) DescriptorSet 0
+                              Decorate 57(u2) Location 2
+                              Decorate 57(u2) DescriptorSet 0
+                              Decorate 59(u3) Location 3
+                              Decorate 59(u3) DescriptorSet 0
+                              MemberDecorate 60(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 60(crossStageBlock2) 1 Offset 16
+                              Decorate 60(crossStageBlock2) Block
+                              Decorate 64(blockName1) DescriptorSet 0
+                              Decorate 64(blockName1) Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 1
+               7:             TypePointer Function 6(int)
+               9:      6(int) Constant 0
+              16:      6(int) Constant 3
+              17:             TypeBool
+              19:             TypeFloat 32
+              20:             TypeVector 19(float) 4
+              21:             TypePointer Output 20(fvec4)
+        22(gfo1):     21(ptr) Variable Output
+              23:   19(float) Constant 0
+              24:   20(fvec4) ConstantComposite 23 23 23 23
+              25:             TypeVector 19(float) 2
+              26:             TypePointer Output 25(fvec2)
+        27(gfo2):     26(ptr) Variable Output
+              28:   25(fvec2) ConstantComposite 23 23
+    29(outBlock):             TypeStruct 20(fvec4)
+              30:             TypePointer Output 29(outBlock)
+      31(gf_out):     30(ptr) Variable Output
+    32(outBlock):             TypeStruct 20(fvec4)
+              33:             TypeInt 32 0
+              34:     33(int) Constant 1
+              35:             TypeArray 32(outBlock) 34
+              36:             TypePointer Input 35
+     37(inBlock):     36(ptr) Variable Input
+              39:             TypePointer Input 20(fvec4)
+              44:      6(int) Constant 1
+              46:             TypeArray 20(fvec4) 34
+              47:             TypePointer Input 46
+        48(vgo1):     47(ptr) Variable Input
+              49:             TypeArray 25(fvec2) 34
+              50:             TypePointer Input 49
+        51(vgo2):     50(ptr) Variable Input
+              52:             TypePointer UniformConstant 25(fvec2)
+          53(u1):     52(ptr) Variable UniformConstant
+              54:             TypeVector 19(float) 3
+              55:   54(fvec3) ConstantComposite 23 23 23
+              56:             TypePointer UniformConstant 54(fvec3)
+          57(u2):     56(ptr) Variable UniformConstant 55
+              58:             TypePointer UniformConstant 20(fvec4)
+          59(u3):     58(ptr) Variable UniformConstant 24
+60(crossStageBlock2):             TypeStruct 20(fvec4) 25(fvec2)
+              61:     33(int) Constant 2
+              62:             TypeArray 60(crossStageBlock2) 61
+              63:             TypePointer Uniform 62
+  64(blockName1):     63(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+            8(i):      7(ptr) Variable Function
+                              Store 8(i) 9
+                              Branch 10
+              10:             Label
+                              LoopMerge 12 13 None
+                              Branch 14
+              14:             Label
+              15:      6(int) Load 8(i)
+              18:    17(bool) SLessThan 15 16
+                              BranchConditional 18 11 12
+              11:               Label
+                                Store 22(gfo1) 24
+                                Store 27(gfo2) 28
+              38:      6(int)   Load 8(i)
+              40:     39(ptr)   AccessChain 37(inBlock) 38 9
+              41:   20(fvec4)   Load 40
+              42:     21(ptr)   AccessChain 31(gf_out) 9
+                                Store 42 41
+                                EmitVertex
+                                Branch 13
+              13:               Label
+              43:      6(int)   Load 8(i)
+              45:      6(int)   IAdd 43 44
+                                Store 8(i) 45
+                                Branch 10
+              12:             Label
+                              EndPrimitive
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 62
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 11 32 36 38
+                              ExecutionMode 4 OriginLowerLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "color"
+                              Name 11  "gfo1"
+                              Name 15  "u1"
+                              Name 21  "u2"
+                              Name 28  "u3"
+                              Name 32  "outColor"
+                              Name 34  "outBlock"
+                              MemberName 34(outBlock) 0  "o3"
+                              Name 36  ""
+                              Name 38  "gfo2"
+                              Name 45  "um2"
+                              Name 49  "glass"
+                              Name 50  "crossStageBlock1"
+                              MemberName 50(crossStageBlock1) 0  "a"
+                              MemberName 50(crossStageBlock1) 1  "b"
+                              Name 52  ""
+                              Name 53  "fragOnlyBlock"
+                              MemberName 53(fragOnlyBlock) 0  "fb1"
+                              Name 55  ""
+                              Name 56  "crossStageBlock2"
+                              MemberName 56(crossStageBlock2) 0  "a"
+                              MemberName 56(crossStageBlock2) 1  "b"
+                              Name 61  "blockName2"
+                              Decorate 11(gfo1) Location 0
+                              Decorate 15(u1) Location 1
+                              Decorate 15(u1) DescriptorSet 0
+                              Decorate 21(u2) Location 2
+                              Decorate 21(u2) DescriptorSet 0
+                              Decorate 28(u3) Location 3
+                              Decorate 28(u3) DescriptorSet 0
+                              Decorate 32(outColor) Location 0
+                              Decorate 34(outBlock) Block
+                              Decorate 36 Location 5
+                              Decorate 38(gfo2) Location 1
+                              Decorate 45(um2) Location 4
+                              Decorate 45(um2) DescriptorSet 0
+                              Decorate 49(glass) Location 0
+                              Decorate 49(glass) DescriptorSet 0
+                              Decorate 49(glass) Binding 0
+                              MemberDecorate 50(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 50(crossStageBlock1) 1 Offset 16
+                              Decorate 50(crossStageBlock1) Block
+                              Decorate 52 DescriptorSet 0
+                              Decorate 52 Binding 0
+                              MemberDecorate 53(fragOnlyBlock) 0 Offset 0
+                              Decorate 53(fragOnlyBlock) BufferBlock
+                              Decorate 55 DescriptorSet 0
+                              Decorate 55 Binding 0
+                              MemberDecorate 56(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 56(crossStageBlock2) 1 Offset 16
+                              Decorate 56(crossStageBlock2) Block
+                              Decorate 61(blockName2) DescriptorSet 0
+                              Decorate 61(blockName2) Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+              10:             TypePointer Input 7(fvec4)
+        11(gfo1):     10(ptr) Variable Input
+              13:             TypeVector 6(float) 2
+              14:             TypePointer UniformConstant 13(fvec2)
+          15(u1):     14(ptr) Variable UniformConstant
+              19:             TypeVector 6(float) 3
+              20:             TypePointer UniformConstant 19(fvec3)
+          21(u2):     20(ptr) Variable UniformConstant
+              25:    6(float) Constant 0
+              26:    7(fvec4) ConstantComposite 25 25 25 25
+              27:             TypePointer UniformConstant 7(fvec4)
+          28(u3):     27(ptr) Variable UniformConstant 26
+              31:             TypePointer Output 7(fvec4)
+    32(outColor):     31(ptr) Variable Output
+    34(outBlock):             TypeStruct 7(fvec4)
+              35:             TypePointer Input 34(outBlock)
+              36:     35(ptr) Variable Input
+              37:             TypePointer Input 13(fvec2)
+        38(gfo2):     37(ptr) Variable Input
+              39:             TypeMatrix 13(fvec2) 2
+              40:    6(float) Constant 1082130432
+              41:   13(fvec2) ConstantComposite 40 25
+              42:   13(fvec2) ConstantComposite 25 40
+              43:          39 ConstantComposite 41 42
+              44:             TypePointer UniformConstant 39
+         45(um2):     44(ptr) Variable UniformConstant 43
+              46:             TypeImage 6(float) 2D sampled format:Unknown
+              47:             TypeSampledImage 46
+              48:             TypePointer UniformConstant 47
+       49(glass):     48(ptr) Variable UniformConstant
+50(crossStageBlock1):             TypeStruct 7(fvec4) 7(fvec4)
+              51:             TypePointer Uniform 50(crossStageBlock1)
+              52:     51(ptr) Variable Uniform
+53(fragOnlyBlock):             TypeStruct 13(fvec2)
+              54:             TypePointer Uniform 53(fragOnlyBlock)
+              55:     54(ptr) Variable Uniform
+56(crossStageBlock2):             TypeStruct 7(fvec4) 13(fvec2)
+              57:             TypeInt 32 0
+              58:     57(int) Constant 2
+              59:             TypeArray 56(crossStageBlock2) 58
+              60:             TypePointer Uniform 59
+  61(blockName2):     60(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+        9(color):      8(ptr) Variable Function
+              12:    7(fvec4) Load 11(gfo1)
+              16:   13(fvec2) Load 15(u1)
+              17:    7(fvec4) VectorShuffle 16 16 0 1 0 1
+              18:    7(fvec4) FMul 12 17
+              22:   19(fvec3) Load 21(u2)
+              23:    7(fvec4) VectorShuffle 22 22 0 1 2 0
+              24:    7(fvec4) FMul 18 23
+              29:    7(fvec4) Load 28(u3)
+              30:    7(fvec4) FMul 24 29
+                              Store 9(color) 30
+              33:    7(fvec4) Load 9(color)
+                              Store 32(outColor) 33
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/iomap.crossStage.vert.out b/Test/baseResults/iomap.crossStage.vert.out
new file mode 100644
index 0000000..5338b80
--- /dev/null
+++ b/Test/baseResults/iomap.crossStage.vert.out
@@ -0,0 +1,515 @@
+iomap.crossStage.vert
+Shader version: 460
+0:? Sequence
+0:32  Function Definition: main( ( global void)
+0:32    Function Parameters: 
+0:34    Sequence
+0:34      move second child to first child ( temp 4-component vector of float)
+0:34        'o1' ( smooth out 4-component vector of float)
+0:34        Constant:
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:35      move second child to first child ( temp 2-component vector of float)
+0:35        'o2' ( smooth out 2-component vector of float)
+0:35        Constant:
+0:35          0.000000
+0:35          0.000000
+0:36      move second child to first child ( temp 4-component vector of float)
+0:36        o3: direct index for structure ( out 4-component vector of float)
+0:36          'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        Constant:
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:?   Linker Objects
+0:?     'o1' ( smooth out 4-component vector of float)
+0:?     'o2' ( smooth out 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+
+iomap.crossStage.frag
+Shader version: 460
+0:? Sequence
+0:36  Function Definition: main( ( global void)
+0:36    Function Parameters: 
+0:38    Sequence
+0:38      Sequence
+0:38        move second child to first child ( temp 4-component vector of float)
+0:38          'color' ( temp 4-component vector of float)
+0:38          component-wise multiply ( temp 4-component vector of float)
+0:38            component-wise multiply ( temp 4-component vector of float)
+0:38              component-wise multiply ( temp 4-component vector of float)
+0:38                'o1' ( smooth in 4-component vector of float)
+0:38                vector swizzle ( temp 4-component vector of float)
+0:38                  'u1' ( uniform 2-component vector of float)
+0:38                  Sequence
+0:38                    Constant:
+0:38                      0 (const int)
+0:38                    Constant:
+0:38                      1 (const int)
+0:38                    Constant:
+0:38                      0 (const int)
+0:38                    Constant:
+0:38                      1 (const int)
+0:38              vector swizzle ( temp 4-component vector of float)
+0:38                'u2' ( uniform 3-component vector of float)
+0:38                Sequence
+0:38                  Constant:
+0:38                    0 (const int)
+0:38                  Constant:
+0:38                    1 (const int)
+0:38                  Constant:
+0:38                    2 (const int)
+0:38                  Constant:
+0:38                    0 (const int)
+0:38            vector swizzle ( temp 4-component vector of float)
+0:38              'u3' ( uniform 4-component vector of float)
+0:38                0.000000
+0:38                0.000000
+0:38                0.000000
+0:38                0.000000
+0:38              Sequence
+0:38                Constant:
+0:38                  0 (const int)
+0:38                Constant:
+0:38                  1 (const int)
+0:38                Constant:
+0:38                  2 (const int)
+0:38                Constant:
+0:38                  3 (const int)
+0:39      move second child to first child ( temp 4-component vector of float)
+0:39        'outColor' ( out 4-component vector of float)
+0:39        'color' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
+0:?     'o2' ( smooth in 2-component vector of float)
+0:?     'o1' ( smooth in 4-component vector of float)
+0:?     'outColor' ( out 4-component vector of float)
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+
+
+Linked vertex stage:
+
+
+Linked fragment stage:
+
+WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
+    blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}"
+
+Shader version: 460
+0:? Sequence
+0:32  Function Definition: main( ( global void)
+0:32    Function Parameters: 
+0:34    Sequence
+0:34      move second child to first child ( temp 4-component vector of float)
+0:34        'o1' ( smooth out 4-component vector of float)
+0:34        Constant:
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:34          0.000000
+0:35      move second child to first child ( temp 2-component vector of float)
+0:35        'o2' ( smooth out 2-component vector of float)
+0:35        Constant:
+0:35          0.000000
+0:35          0.000000
+0:36      move second child to first child ( temp 4-component vector of float)
+0:36        o3: direct index for structure ( out 4-component vector of float)
+0:36          'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:36          Constant:
+0:36            0 (const uint)
+0:36        Constant:
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:36          0.000000
+0:?   Linker Objects
+0:?     'o1' ( smooth out 4-component vector of float)
+0:?     'o2' ( smooth out 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+Shader version: 460
+0:? Sequence
+0:36  Function Definition: main( ( global void)
+0:36    Function Parameters: 
+0:38    Sequence
+0:38      Sequence
+0:38        move second child to first child ( temp 4-component vector of float)
+0:38          'color' ( temp 4-component vector of float)
+0:38          component-wise multiply ( temp 4-component vector of float)
+0:38            component-wise multiply ( temp 4-component vector of float)
+0:38              component-wise multiply ( temp 4-component vector of float)
+0:38                'o1' ( smooth in 4-component vector of float)
+0:38                vector swizzle ( temp 4-component vector of float)
+0:38                  'u1' ( uniform 2-component vector of float)
+0:38                  Sequence
+0:38                    Constant:
+0:38                      0 (const int)
+0:38                    Constant:
+0:38                      1 (const int)
+0:38                    Constant:
+0:38                      0 (const int)
+0:38                    Constant:
+0:38                      1 (const int)
+0:38              vector swizzle ( temp 4-component vector of float)
+0:38                'u2' ( uniform 3-component vector of float)
+0:38                Sequence
+0:38                  Constant:
+0:38                    0 (const int)
+0:38                  Constant:
+0:38                    1 (const int)
+0:38                  Constant:
+0:38                    2 (const int)
+0:38                  Constant:
+0:38                    0 (const int)
+0:38            vector swizzle ( temp 4-component vector of float)
+0:38              'u3' ( uniform 4-component vector of float)
+0:38                0.000000
+0:38                0.000000
+0:38                0.000000
+0:38                0.000000
+0:38              Sequence
+0:38                Constant:
+0:38                  0 (const int)
+0:38                Constant:
+0:38                  1 (const int)
+0:38                Constant:
+0:38                  2 (const int)
+0:38                Constant:
+0:38                  3 (const int)
+0:39      move second child to first child ( temp 4-component vector of float)
+0:39        'outColor' ( out 4-component vector of float)
+0:39        'color' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
+0:?     'o2' ( smooth in 2-component vector of float)
+0:?     'o1' ( smooth in 4-component vector of float)
+0:?     'outColor' ( out 4-component vector of float)
+0:?     'u1' ( uniform 2-component vector of float)
+0:?     'u2' ( uniform 3-component vector of float)
+0:?     'u3' ( uniform 4-component vector of float)
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?       0.000000
+0:?     'um2' ( uniform 2X2 matrix of float)
+0:?       4.000000
+0:?       0.000000
+0:?       0.000000
+0:?       4.000000
+0:?     'glass' (layout( location=0 binding=0) uniform sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 56
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 9 14 18 54 55
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "o1"
+                              Name 14  "o2"
+                              Name 16  "outBlock"
+                              MemberName 16(outBlock) 0  "o3"
+                              Name 18  ""
+                              Name 23  "u1"
+                              Name 27  "u2"
+                              Name 29  "u3"
+                              Name 36  "um2"
+                              Name 40  "glass"
+                              Name 41  "crossStageBlock1"
+                              MemberName 41(crossStageBlock1) 0  "a"
+                              MemberName 41(crossStageBlock1) 1  "b"
+                              Name 43  ""
+                              Name 44  "vertOnlyBlock"
+                              MemberName 44(vertOnlyBlock) 0  "vb1"
+                              Name 46  ""
+                              Name 47  "crossStageBlock2"
+                              MemberName 47(crossStageBlock2) 0  "a"
+                              MemberName 47(crossStageBlock2) 1  "b"
+                              Name 52  "blockName1"
+                              Name 54  "gl_VertexID"
+                              Name 55  "gl_InstanceID"
+                              Decorate 9(o1) Location 0
+                              Decorate 14(o2) Location 1
+                              Decorate 16(outBlock) Block
+                              Decorate 18 Location 5
+                              Decorate 23(u1) Location 1
+                              Decorate 23(u1) DescriptorSet 0
+                              Decorate 27(u2) Location 2
+                              Decorate 27(u2) DescriptorSet 0
+                              Decorate 29(u3) Location 3
+                              Decorate 29(u3) DescriptorSet 0
+                              Decorate 36(um2) Location 4
+                              Decorate 36(um2) DescriptorSet 0
+                              Decorate 40(glass) Location 0
+                              Decorate 40(glass) DescriptorSet 0
+                              Decorate 40(glass) Binding 0
+                              MemberDecorate 41(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 41(crossStageBlock1) 1 Offset 16
+                              Decorate 41(crossStageBlock1) Block
+                              Decorate 43 DescriptorSet 0
+                              Decorate 43 Binding 0
+                              MemberDecorate 44(vertOnlyBlock) 0 Offset 0
+                              Decorate 44(vertOnlyBlock) BufferBlock
+                              Decorate 46 DescriptorSet 0
+                              Decorate 46 Binding 0
+                              MemberDecorate 47(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 47(crossStageBlock2) 1 Offset 16
+                              Decorate 47(crossStageBlock2) Block
+                              Decorate 52(blockName1) DescriptorSet 0
+                              Decorate 52(blockName1) Binding 0
+                              Decorate 54(gl_VertexID) BuiltIn VertexId
+                              Decorate 55(gl_InstanceID) BuiltIn InstanceId
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+           9(o1):      8(ptr) Variable Output
+              10:    6(float) Constant 0
+              11:    7(fvec4) ConstantComposite 10 10 10 10
+              12:             TypeVector 6(float) 2
+              13:             TypePointer Output 12(fvec2)
+          14(o2):     13(ptr) Variable Output
+              15:   12(fvec2) ConstantComposite 10 10
+    16(outBlock):             TypeStruct 7(fvec4)
+              17:             TypePointer Output 16(outBlock)
+              18:     17(ptr) Variable Output
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              22:             TypePointer UniformConstant 12(fvec2)
+          23(u1):     22(ptr) Variable UniformConstant
+              24:             TypeVector 6(float) 3
+              25:   24(fvec3) ConstantComposite 10 10 10
+              26:             TypePointer UniformConstant 24(fvec3)
+          27(u2):     26(ptr) Variable UniformConstant 25
+              28:             TypePointer UniformConstant 7(fvec4)
+          29(u3):     28(ptr) Variable UniformConstant 11
+              30:             TypeMatrix 12(fvec2) 2
+              31:    6(float) Constant 1082130432
+              32:   12(fvec2) ConstantComposite 31 10
+              33:   12(fvec2) ConstantComposite 10 31
+              34:          30 ConstantComposite 32 33
+              35:             TypePointer UniformConstant 30
+         36(um2):     35(ptr) Variable UniformConstant 34
+              37:             TypeImage 6(float) 2D sampled format:Unknown
+              38:             TypeSampledImage 37
+              39:             TypePointer UniformConstant 38
+       40(glass):     39(ptr) Variable UniformConstant
+41(crossStageBlock1):             TypeStruct 7(fvec4) 7(fvec4)
+              42:             TypePointer Uniform 41(crossStageBlock1)
+              43:     42(ptr) Variable Uniform
+44(vertOnlyBlock):             TypeStruct 12(fvec2)
+              45:             TypePointer Uniform 44(vertOnlyBlock)
+              46:     45(ptr) Variable Uniform
+47(crossStageBlock2):             TypeStruct 7(fvec4) 12(fvec2)
+              48:             TypeInt 32 0
+              49:     48(int) Constant 2
+              50:             TypeArray 47(crossStageBlock2) 49
+              51:             TypePointer Uniform 50
+  52(blockName1):     51(ptr) Variable Uniform
+              53:             TypePointer Input 19(int)
+ 54(gl_VertexID):     53(ptr) Variable Input
+55(gl_InstanceID):     53(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+                              Store 9(o1) 11
+                              Store 14(o2) 15
+              21:      8(ptr) AccessChain 18 20
+                              Store 21 11
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 62
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 11 32 36 38
+                              ExecutionMode 4 OriginLowerLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "color"
+                              Name 11  "o1"
+                              Name 15  "u1"
+                              Name 21  "u2"
+                              Name 28  "u3"
+                              Name 32  "outColor"
+                              Name 34  "outBlock"
+                              MemberName 34(outBlock) 0  "o3"
+                              Name 36  ""
+                              Name 38  "o2"
+                              Name 45  "um2"
+                              Name 49  "glass"
+                              Name 50  "crossStageBlock1"
+                              MemberName 50(crossStageBlock1) 0  "a"
+                              MemberName 50(crossStageBlock1) 1  "b"
+                              Name 52  ""
+                              Name 53  "fragOnlyBlock"
+                              MemberName 53(fragOnlyBlock) 0  "fb1"
+                              Name 55  ""
+                              Name 56  "crossStageBlock2"
+                              MemberName 56(crossStageBlock2) 0  "a"
+                              MemberName 56(crossStageBlock2) 1  "b"
+                              Name 61  "blockName2"
+                              Decorate 11(o1) Location 0
+                              Decorate 15(u1) Location 1
+                              Decorate 15(u1) DescriptorSet 0
+                              Decorate 21(u2) Location 2
+                              Decorate 21(u2) DescriptorSet 0
+                              Decorate 28(u3) Location 3
+                              Decorate 28(u3) DescriptorSet 0
+                              Decorate 32(outColor) Location 0
+                              Decorate 34(outBlock) Block
+                              Decorate 36 Location 5
+                              Decorate 38(o2) Location 1
+                              Decorate 45(um2) Location 4
+                              Decorate 45(um2) DescriptorSet 0
+                              Decorate 49(glass) Location 0
+                              Decorate 49(glass) DescriptorSet 0
+                              Decorate 49(glass) Binding 0
+                              MemberDecorate 50(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 50(crossStageBlock1) 1 Offset 16
+                              Decorate 50(crossStageBlock1) Block
+                              Decorate 52 DescriptorSet 0
+                              Decorate 52 Binding 0
+                              MemberDecorate 53(fragOnlyBlock) 0 Offset 0
+                              Decorate 53(fragOnlyBlock) BufferBlock
+                              Decorate 55 DescriptorSet 0
+                              Decorate 55 Binding 0
+                              MemberDecorate 56(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 56(crossStageBlock2) 1 Offset 16
+                              Decorate 56(crossStageBlock2) Block
+                              Decorate 61(blockName2) DescriptorSet 0
+                              Decorate 61(blockName2) Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+              10:             TypePointer Input 7(fvec4)
+          11(o1):     10(ptr) Variable Input
+              13:             TypeVector 6(float) 2
+              14:             TypePointer UniformConstant 13(fvec2)
+          15(u1):     14(ptr) Variable UniformConstant
+              19:             TypeVector 6(float) 3
+              20:             TypePointer UniformConstant 19(fvec3)
+          21(u2):     20(ptr) Variable UniformConstant
+              25:    6(float) Constant 0
+              26:    7(fvec4) ConstantComposite 25 25 25 25
+              27:             TypePointer UniformConstant 7(fvec4)
+          28(u3):     27(ptr) Variable UniformConstant 26
+              31:             TypePointer Output 7(fvec4)
+    32(outColor):     31(ptr) Variable Output
+    34(outBlock):             TypeStruct 7(fvec4)
+              35:             TypePointer Input 34(outBlock)
+              36:     35(ptr) Variable Input
+              37:             TypePointer Input 13(fvec2)
+          38(o2):     37(ptr) Variable Input
+              39:             TypeMatrix 13(fvec2) 2
+              40:    6(float) Constant 1082130432
+              41:   13(fvec2) ConstantComposite 40 25
+              42:   13(fvec2) ConstantComposite 25 40
+              43:          39 ConstantComposite 41 42
+              44:             TypePointer UniformConstant 39
+         45(um2):     44(ptr) Variable UniformConstant 43
+              46:             TypeImage 6(float) 2D sampled format:Unknown
+              47:             TypeSampledImage 46
+              48:             TypePointer UniformConstant 47
+       49(glass):     48(ptr) Variable UniformConstant
+50(crossStageBlock1):             TypeStruct 7(fvec4) 7(fvec4)
+              51:             TypePointer Uniform 50(crossStageBlock1)
+              52:     51(ptr) Variable Uniform
+53(fragOnlyBlock):             TypeStruct 13(fvec2)
+              54:             TypePointer Uniform 53(fragOnlyBlock)
+              55:     54(ptr) Variable Uniform
+56(crossStageBlock2):             TypeStruct 7(fvec4) 13(fvec2)
+              57:             TypeInt 32 0
+              58:     57(int) Constant 2
+              59:             TypeArray 56(crossStageBlock2) 58
+              60:             TypePointer Uniform 59
+  61(blockName2):     60(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+        9(color):      8(ptr) Variable Function
+              12:    7(fvec4) Load 11(o1)
+              16:   13(fvec2) Load 15(u1)
+              17:    7(fvec4) VectorShuffle 16 16 0 1 0 1
+              18:    7(fvec4) FMul 12 17
+              22:   19(fvec3) Load 21(u2)
+              23:    7(fvec4) VectorShuffle 22 22 0 1 2 0
+              24:    7(fvec4) FMul 18 23
+              29:    7(fvec4) Load 28(u3)
+              30:    7(fvec4) FMul 24 29
+                              Store 9(color) 30
+              33:    7(fvec4) Load 9(color)
+                              Store 32(outColor) 33
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/iomap.crossStage.vk.vert.out b/Test/baseResults/iomap.crossStage.vk.vert.out
new file mode 100644
index 0000000..e137bdf
--- /dev/null
+++ b/Test/baseResults/iomap.crossStage.vk.vert.out
@@ -0,0 +1,720 @@
+iomap.crossStage.vk.vert
+Shader version: 460
+0:? Sequence
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:28    Sequence
+0:28      move second child to first child ( temp highp 4-component vector of float)
+0:28        'vgo1' ( smooth out highp 4-component vector of float)
+0:28        Constant:
+0:28          0.000000
+0:28          0.000000
+0:28          0.000000
+0:28          0.000000
+0:29      move second child to first child ( temp highp 2-component vector of float)
+0:29        'vgo2' ( smooth out highp 2-component vector of float)
+0:29        Constant:
+0:29          0.000000
+0:29          0.000000
+0:30      move second child to first child ( temp highp 4-component vector of float)
+0:30        o3: direct index for structure ( out highp 4-component vector of float)
+0:30          'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
+0:30          Constant:
+0:30            0 (const uint)
+0:30        Constant:
+0:30          0.000000
+0:30          0.000000
+0:30          0.000000
+0:30          0.000000
+0:?   Linker Objects
+0:?     'vgo1' ( smooth out highp 4-component vector of float)
+0:?     'vgo2' ( smooth out highp 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
+0:?     'glass' (layout( binding=0) uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+
+iomap.crossStage.vk.geom
+Shader version: 460
+invocations = -1
+max_vertices = 3
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:25  Function Definition: main( ( global void)
+0:25    Function Parameters: 
+0:27    Sequence
+0:27      Sequence
+0:27        Sequence
+0:27          move second child to first child ( temp highp int)
+0:27            'i' ( temp highp int)
+0:27            Constant:
+0:27              0 (const int)
+0:27        Loop with condition tested first
+0:27          Loop Condition
+0:27          Compare Less Than ( temp bool)
+0:27            'i' ( temp highp int)
+0:27            Constant:
+0:27              3 (const int)
+0:27          Loop Body
+0:28          Sequence
+0:28            move second child to first child ( temp highp 4-component vector of float)
+0:28              'gfo1' (layout( stream=0) out highp 4-component vector of float)
+0:28              Constant:
+0:28                0.000000
+0:28                0.000000
+0:28                0.000000
+0:28                0.000000
+0:29            move second child to first child ( temp highp 2-component vector of float)
+0:29              'gfo2' (layout( stream=0) out highp 2-component vector of float)
+0:29              Constant:
+0:29                0.000000
+0:29                0.000000
+0:30            move second child to first child ( temp highp 4-component vector of float)
+0:30              o3: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:30                'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
+0:30                Constant:
+0:30                  0 (const int)
+0:30              o3: direct index for structure ( in highp 4-component vector of float)
+0:30                indirect index (layout( location=5) temp block{ in highp 4-component vector of float o3})
+0:30                  'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
+0:30                  'i' ( temp highp int)
+0:30                Constant:
+0:30                  0 (const int)
+0:31            EmitVertex ( global void)
+0:27          Loop Terminal Expression
+0:27          Post-Increment ( temp highp int)
+0:27            'i' ( temp highp int)
+0:33      EndPrimitive ( global void)
+0:?   Linker Objects
+0:?     'vgo1' ( in 1-element array of highp 4-component vector of float)
+0:?     'vgo2' ( in 1-element array of highp 2-component vector of float)
+0:?     'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
+0:?     'gfo1' (layout( stream=0) out highp 4-component vector of float)
+0:?     'gfo2' (layout( stream=0) out highp 2-component vector of float)
+0:?     'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+
+iomap.crossStage.vk.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:30  Function Definition: Bar( ( global highp 2-component vector of float)
+0:30    Function Parameters: 
+0:31    Sequence
+0:31      Branch: Return with expression
+0:32        add ( temp highp 2-component vector of float)
+0:31          add ( temp highp 2-component vector of float)
+0:31            fb1: direct index for structure (layout( column_major std430) readonly buffer highp 2-component vector of float)
+0:31              'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
+0:31              Constant:
+0:31                0 (const uint)
+0:32            b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
+0:32              direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:32                'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:32                Constant:
+0:32                  0 (const int)
+0:32              Constant:
+0:32                1 (const int)
+0:33          b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
+0:33            direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:33              'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:33              Constant:
+0:33                1 (const int)
+0:33            Constant:
+0:33              1 (const int)
+0:36  Function Definition: Foo( ( global highp 4-component vector of float)
+0:36    Function Parameters: 
+0:37    Sequence
+0:37      Branch: Return with expression
+0:40        add ( temp highp 4-component vector of float)
+0:39          add ( temp highp 4-component vector of float)
+0:38            add ( temp highp 4-component vector of float)
+0:37              add ( temp highp 4-component vector of float)
+0:37                a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:37                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:37                  Constant:
+0:37                    0 (const uint)
+0:38                b: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:38                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:38                  Constant:
+0:38                    1 (const uint)
+0:39              a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:39                direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:39                  'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:39                  Constant:
+0:39                    0 (const int)
+0:39                Constant:
+0:39                  0 (const int)
+0:40            a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:40              direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:40                'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:40                Constant:
+0:40                  1 (const int)
+0:40              Constant:
+0:40                0 (const int)
+0:41          Construct vec4 ( temp highp 4-component vector of float)
+0:41            Function Call: Bar( ( global highp 2-component vector of float)
+0:41            Constant:
+0:41              0.000000
+0:41            Constant:
+0:41              0.000000
+0:44  Function Definition: main( ( global void)
+0:44    Function Parameters: 
+0:46    Sequence
+0:46      Sequence
+0:46        move second child to first child ( temp highp 4-component vector of float)
+0:46          'color' ( temp highp 4-component vector of float)
+0:46          'gfo1' ( smooth in highp 4-component vector of float)
+0:47      move second child to first child ( temp highp 4-component vector of float)
+0:47        'color' ( temp highp 4-component vector of float)
+0:47        add ( temp highp 4-component vector of float)
+0:47          'color' ( temp highp 4-component vector of float)
+0:47          Function Call: Foo( ( global highp 4-component vector of float)
+0:48      move second child to first child ( temp highp 4-component vector of float)
+0:48        'outColor' ( out highp 4-component vector of float)
+0:48        'color' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in highp 4-component vector of float o3})
+0:?     'gfo1' ( smooth in highp 4-component vector of float)
+0:?     'gfo2' ( smooth in highp 2-component vector of float)
+0:?     'outColor' ( out highp 4-component vector of float)
+0:?     'glass' (layout( binding=0) uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+
+
+Linked vertex stage:
+
+
+Linked geometry stage:
+
+
+Linked fragment stage:
+
+WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
+    blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b}"
+
+Shader version: 460
+0:? Sequence
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:28    Sequence
+0:28      move second child to first child ( temp highp 4-component vector of float)
+0:28        'vgo1' ( smooth out highp 4-component vector of float)
+0:28        Constant:
+0:28          0.000000
+0:28          0.000000
+0:28          0.000000
+0:28          0.000000
+0:29      move second child to first child ( temp highp 2-component vector of float)
+0:29        'vgo2' ( smooth out highp 2-component vector of float)
+0:29        Constant:
+0:29          0.000000
+0:29          0.000000
+0:30      move second child to first child ( temp highp 4-component vector of float)
+0:30        o3: direct index for structure ( out highp 4-component vector of float)
+0:30          'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
+0:30          Constant:
+0:30            0 (const uint)
+0:30        Constant:
+0:30          0.000000
+0:30          0.000000
+0:30          0.000000
+0:30          0.000000
+0:?   Linker Objects
+0:?     'vgo1' ( smooth out highp 4-component vector of float)
+0:?     'vgo2' ( smooth out highp 2-component vector of float)
+0:?     'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
+0:?     'glass' (layout( binding=0) uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float vb1})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+Shader version: 460
+invocations = 1
+max_vertices = 3
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:25  Function Definition: main( ( global void)
+0:25    Function Parameters: 
+0:27    Sequence
+0:27      Sequence
+0:27        Sequence
+0:27          move second child to first child ( temp highp int)
+0:27            'i' ( temp highp int)
+0:27            Constant:
+0:27              0 (const int)
+0:27        Loop with condition tested first
+0:27          Loop Condition
+0:27          Compare Less Than ( temp bool)
+0:27            'i' ( temp highp int)
+0:27            Constant:
+0:27              3 (const int)
+0:27          Loop Body
+0:28          Sequence
+0:28            move second child to first child ( temp highp 4-component vector of float)
+0:28              'gfo1' (layout( stream=0) out highp 4-component vector of float)
+0:28              Constant:
+0:28                0.000000
+0:28                0.000000
+0:28                0.000000
+0:28                0.000000
+0:29            move second child to first child ( temp highp 2-component vector of float)
+0:29              'gfo2' (layout( stream=0) out highp 2-component vector of float)
+0:29              Constant:
+0:29                0.000000
+0:29                0.000000
+0:30            move second child to first child ( temp highp 4-component vector of float)
+0:30              o3: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:30                'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
+0:30                Constant:
+0:30                  0 (const int)
+0:30              o3: direct index for structure ( in highp 4-component vector of float)
+0:30                indirect index (layout( location=5) temp block{ in highp 4-component vector of float o3})
+0:30                  'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
+0:30                  'i' ( temp highp int)
+0:30                Constant:
+0:30                  0 (const int)
+0:31            EmitVertex ( global void)
+0:27          Loop Terminal Expression
+0:27          Post-Increment ( temp highp int)
+0:27            'i' ( temp highp int)
+0:33      EndPrimitive ( global void)
+0:?   Linker Objects
+0:?     'vgo1' ( in 1-element array of highp 4-component vector of float)
+0:?     'vgo2' ( in 1-element array of highp 2-component vector of float)
+0:?     'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
+0:?     'gfo1' (layout( stream=0) out highp 4-component vector of float)
+0:?     'gfo2' (layout( stream=0) out highp 2-component vector of float)
+0:?     'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
+0:?     'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:30  Function Definition: Bar( ( global highp 2-component vector of float)
+0:30    Function Parameters: 
+0:31    Sequence
+0:31      Branch: Return with expression
+0:32        add ( temp highp 2-component vector of float)
+0:31          add ( temp highp 2-component vector of float)
+0:31            fb1: direct index for structure (layout( column_major std430) readonly buffer highp 2-component vector of float)
+0:31              'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
+0:31              Constant:
+0:31                0 (const uint)
+0:32            b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
+0:32              direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:32                'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:32                Constant:
+0:32                  0 (const int)
+0:32              Constant:
+0:32                1 (const int)
+0:33          b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
+0:33            direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:33              'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:33              Constant:
+0:33                1 (const int)
+0:33            Constant:
+0:33              1 (const int)
+0:36  Function Definition: Foo( ( global highp 4-component vector of float)
+0:36    Function Parameters: 
+0:37    Sequence
+0:37      Branch: Return with expression
+0:40        add ( temp highp 4-component vector of float)
+0:39          add ( temp highp 4-component vector of float)
+0:38            add ( temp highp 4-component vector of float)
+0:37              add ( temp highp 4-component vector of float)
+0:37                a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:37                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:37                  Constant:
+0:37                    0 (const uint)
+0:38                b: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:38                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:38                  Constant:
+0:38                    1 (const uint)
+0:39              a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:39                direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:39                  'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:39                  Constant:
+0:39                    0 (const int)
+0:39                Constant:
+0:39                  0 (const int)
+0:40            a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:40              direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:40                'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+0:40                Constant:
+0:40                  1 (const int)
+0:40              Constant:
+0:40                0 (const int)
+0:41          Construct vec4 ( temp highp 4-component vector of float)
+0:41            Function Call: Bar( ( global highp 2-component vector of float)
+0:41            Constant:
+0:41              0.000000
+0:41            Constant:
+0:41              0.000000
+0:44  Function Definition: main( ( global void)
+0:44    Function Parameters: 
+0:46    Sequence
+0:46      Sequence
+0:46        move second child to first child ( temp highp 4-component vector of float)
+0:46          'color' ( temp highp 4-component vector of float)
+0:46          'gfo1' ( smooth in highp 4-component vector of float)
+0:47      move second child to first child ( temp highp 4-component vector of float)
+0:47        'color' ( temp highp 4-component vector of float)
+0:47        add ( temp highp 4-component vector of float)
+0:47          'color' ( temp highp 4-component vector of float)
+0:47          Function Call: Foo( ( global highp 4-component vector of float)
+0:48      move second child to first child ( temp highp 4-component vector of float)
+0:48        'outColor' ( out highp 4-component vector of float)
+0:48        'color' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( location=5) in block{ in highp 4-component vector of float o3})
+0:?     'gfo1' ( smooth in highp 4-component vector of float)
+0:?     'gfo2' ( smooth in highp 2-component vector of float)
+0:?     'outColor' ( out highp 4-component vector of float)
+0:?     'glass' (layout( binding=0) uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
+0:?     'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
+0:?     'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 38
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 9 14 18
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "vgo1"
+                              Name 14  "vgo2"
+                              Name 16  "outBlock"
+                              MemberName 16(outBlock) 0  "o3"
+                              Name 18  ""
+                              Name 25  "glass"
+                              Name 26  "crossStageBlock1"
+                              MemberName 26(crossStageBlock1) 0  "a"
+                              MemberName 26(crossStageBlock1) 1  "b"
+                              Name 28  ""
+                              Name 29  "vertOnlyBlock"
+                              MemberName 29(vertOnlyBlock) 0  "vb1"
+                              Name 31  ""
+                              Name 32  "crossStageBlock2"
+                              MemberName 32(crossStageBlock2) 0  "a"
+                              MemberName 32(crossStageBlock2) 1  "b"
+                              Name 37  "blockName1"
+                              Decorate 9(vgo1) Location 0
+                              Decorate 14(vgo2) Location 1
+                              Decorate 16(outBlock) Block
+                              Decorate 18 Location 5
+                              Decorate 25(glass) DescriptorSet 0
+                              Decorate 25(glass) Binding 0
+                              MemberDecorate 26(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 26(crossStageBlock1) 1 Offset 16
+                              Decorate 26(crossStageBlock1) Block
+                              Decorate 28 DescriptorSet 0
+                              Decorate 28 Binding 1
+                              MemberDecorate 29(vertOnlyBlock) 0 NonWritable
+                              MemberDecorate 29(vertOnlyBlock) 0 Offset 0
+                              Decorate 29(vertOnlyBlock) BufferBlock
+                              Decorate 31 DescriptorSet 0
+                              Decorate 31 Binding 0
+                              MemberDecorate 32(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 32(crossStageBlock2) 1 Offset 16
+                              Decorate 32(crossStageBlock2) Block
+                              Decorate 37(blockName1) DescriptorSet 0
+                              Decorate 37(blockName1) Binding 3
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+         9(vgo1):      8(ptr) Variable Output
+              10:    6(float) Constant 0
+              11:    7(fvec4) ConstantComposite 10 10 10 10
+              12:             TypeVector 6(float) 2
+              13:             TypePointer Output 12(fvec2)
+        14(vgo2):     13(ptr) Variable Output
+              15:   12(fvec2) ConstantComposite 10 10
+    16(outBlock):             TypeStruct 7(fvec4)
+              17:             TypePointer Output 16(outBlock)
+              18:     17(ptr) Variable Output
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              22:             TypeImage 6(float) 2D sampled format:Unknown
+              23:             TypeSampledImage 22
+              24:             TypePointer UniformConstant 23
+       25(glass):     24(ptr) Variable UniformConstant
+26(crossStageBlock1):             TypeStruct 7(fvec4) 7(fvec4)
+              27:             TypePointer Uniform 26(crossStageBlock1)
+              28:     27(ptr) Variable Uniform
+29(vertOnlyBlock):             TypeStruct 12(fvec2)
+              30:             TypePointer Uniform 29(vertOnlyBlock)
+              31:     30(ptr) Variable Uniform
+32(crossStageBlock2):             TypeStruct 7(fvec4) 12(fvec2)
+              33:             TypeInt 32 0
+              34:     33(int) Constant 2
+              35:             TypeArray 32(crossStageBlock2) 34
+              36:             TypePointer Uniform 35
+  37(blockName1):     36(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+                              Store 9(vgo1) 11
+                              Store 14(vgo2) 15
+              21:      8(ptr) AccessChain 18 20
+                              Store 21 11
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 57
+
+                              Capability Geometry
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 22 27 31 37 48 51
+                              ExecutionMode 4 InputPoints
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputTriangleStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "i"
+                              Name 22  "gfo1"
+                              Name 27  "gfo2"
+                              Name 29  "outBlock"
+                              MemberName 29(outBlock) 0  "o3"
+                              Name 31  "gf_out"
+                              Name 32  "outBlock"
+                              MemberName 32(outBlock) 0  "o3"
+                              Name 37  "inBlock"
+                              Name 48  "vgo1"
+                              Name 51  "vgo2"
+                              Name 52  "crossStageBlock2"
+                              MemberName 52(crossStageBlock2) 0  "a"
+                              MemberName 52(crossStageBlock2) 1  "b"
+                              Name 56  "blockName1"
+                              Decorate 22(gfo1) Location 0
+                              Decorate 27(gfo2) Location 1
+                              Decorate 29(outBlock) Block
+                              Decorate 31(gf_out) Location 5
+                              Decorate 32(outBlock) Block
+                              Decorate 37(inBlock) Location 5
+                              Decorate 48(vgo1) Location 0
+                              Decorate 51(vgo2) Location 1
+                              MemberDecorate 52(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 52(crossStageBlock2) 1 Offset 16
+                              Decorate 52(crossStageBlock2) Block
+                              Decorate 56(blockName1) DescriptorSet 0
+                              Decorate 56(blockName1) Binding 3
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 1
+               7:             TypePointer Function 6(int)
+               9:      6(int) Constant 0
+              16:      6(int) Constant 3
+              17:             TypeBool
+              19:             TypeFloat 32
+              20:             TypeVector 19(float) 4
+              21:             TypePointer Output 20(fvec4)
+        22(gfo1):     21(ptr) Variable Output
+              23:   19(float) Constant 0
+              24:   20(fvec4) ConstantComposite 23 23 23 23
+              25:             TypeVector 19(float) 2
+              26:             TypePointer Output 25(fvec2)
+        27(gfo2):     26(ptr) Variable Output
+              28:   25(fvec2) ConstantComposite 23 23
+    29(outBlock):             TypeStruct 20(fvec4)
+              30:             TypePointer Output 29(outBlock)
+      31(gf_out):     30(ptr) Variable Output
+    32(outBlock):             TypeStruct 20(fvec4)
+              33:             TypeInt 32 0
+              34:     33(int) Constant 1
+              35:             TypeArray 32(outBlock) 34
+              36:             TypePointer Input 35
+     37(inBlock):     36(ptr) Variable Input
+              39:             TypePointer Input 20(fvec4)
+              44:      6(int) Constant 1
+              46:             TypeArray 20(fvec4) 34
+              47:             TypePointer Input 46
+        48(vgo1):     47(ptr) Variable Input
+              49:             TypeArray 25(fvec2) 34
+              50:             TypePointer Input 49
+        51(vgo2):     50(ptr) Variable Input
+52(crossStageBlock2):             TypeStruct 20(fvec4) 25(fvec2)
+              53:     33(int) Constant 2
+              54:             TypeArray 52(crossStageBlock2) 53
+              55:             TypePointer Uniform 54
+  56(blockName1):     55(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+            8(i):      7(ptr) Variable Function
+                              Store 8(i) 9
+                              Branch 10
+              10:             Label
+                              LoopMerge 12 13 None
+                              Branch 14
+              14:             Label
+              15:      6(int) Load 8(i)
+              18:    17(bool) SLessThan 15 16
+                              BranchConditional 18 11 12
+              11:               Label
+                                Store 22(gfo1) 24
+                                Store 27(gfo2) 28
+              38:      6(int)   Load 8(i)
+              40:     39(ptr)   AccessChain 37(inBlock) 38 9
+              41:   20(fvec4)   Load 40
+              42:     21(ptr)   AccessChain 31(gf_out) 9
+                                Store 42 41
+                                EmitVertex
+                                Branch 13
+              13:               Label
+              43:      6(int)   Load 8(i)
+              45:      6(int)   IAdd 43 44
+                                Store 8(i) 45
+                                Branch 10
+              12:             Label
+                              EndPrimitive
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 81
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 64 70 74 76
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "Bar("
+                              Name 13  "Foo("
+                              Name 15  "fragOnlyBlock"
+                              MemberName 15(fragOnlyBlock) 0  "fb1"
+                              Name 17  ""
+                              Name 23  "crossStageBlock2"
+                              MemberName 23(crossStageBlock2) 0  "a"
+                              MemberName 23(crossStageBlock2) 1  "b"
+                              Name 28  "blockName2"
+                              Name 38  "crossStageBlock1"
+                              MemberName 38(crossStageBlock1) 0  "a"
+                              MemberName 38(crossStageBlock1) 1  "b"
+                              Name 40  ""
+                              Name 62  "color"
+                              Name 64  "gfo1"
+                              Name 70  "outColor"
+                              Name 72  "outBlock"
+                              MemberName 72(outBlock) 0  "o3"
+                              Name 74  ""
+                              Name 76  "gfo2"
+                              Name 80  "glass"
+                              MemberDecorate 15(fragOnlyBlock) 0 NonWritable
+                              MemberDecorate 15(fragOnlyBlock) 0 Offset 0
+                              Decorate 15(fragOnlyBlock) BufferBlock
+                              Decorate 17 DescriptorSet 0
+                              Decorate 17 Binding 2
+                              MemberDecorate 23(crossStageBlock2) 0 Offset 0
+                              MemberDecorate 23(crossStageBlock2) 1 Offset 16
+                              Decorate 23(crossStageBlock2) Block
+                              Decorate 28(blockName2) DescriptorSet 0
+                              Decorate 28(blockName2) Binding 3
+                              MemberDecorate 38(crossStageBlock1) 0 Offset 0
+                              MemberDecorate 38(crossStageBlock1) 1 Offset 16
+                              Decorate 38(crossStageBlock1) Block
+                              Decorate 40 DescriptorSet 0
+                              Decorate 40 Binding 1
+                              Decorate 64(gfo1) Location 0
+                              Decorate 70(outColor) Location 0
+                              Decorate 72(outBlock) Block
+                              Decorate 74 Location 5
+                              Decorate 76(gfo2) Location 1
+                              Decorate 80(glass) DescriptorSet 0
+                              Decorate 80(glass) Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 2
+               8:             TypeFunction 7(fvec2)
+              11:             TypeVector 6(float) 4
+              12:             TypeFunction 11(fvec4)
+15(fragOnlyBlock):             TypeStruct 7(fvec2)
+              16:             TypePointer Uniform 15(fragOnlyBlock)
+              17:     16(ptr) Variable Uniform
+              18:             TypeInt 32 1
+              19:     18(int) Constant 0
+              20:             TypePointer Uniform 7(fvec2)
+23(crossStageBlock2):             TypeStruct 11(fvec4) 7(fvec2)
+              24:             TypeInt 32 0
+              25:     24(int) Constant 2
+              26:             TypeArray 23(crossStageBlock2) 25
+              27:             TypePointer Uniform 26
+  28(blockName2):     27(ptr) Variable Uniform
+              29:     18(int) Constant 1
+38(crossStageBlock1):             TypeStruct 11(fvec4) 11(fvec4)
+              39:             TypePointer Uniform 38(crossStageBlock1)
+              40:     39(ptr) Variable Uniform
+              41:             TypePointer Uniform 11(fvec4)
+              54:    6(float) Constant 0
+              61:             TypePointer Function 11(fvec4)
+              63:             TypePointer Input 11(fvec4)
+        64(gfo1):     63(ptr) Variable Input
+              69:             TypePointer Output 11(fvec4)
+    70(outColor):     69(ptr) Variable Output
+    72(outBlock):             TypeStruct 11(fvec4)
+              73:             TypePointer Input 72(outBlock)
+              74:     73(ptr) Variable Input
+              75:             TypePointer Input 7(fvec2)
+        76(gfo2):     75(ptr) Variable Input
+              77:             TypeImage 6(float) 2D sampled format:Unknown
+              78:             TypeSampledImage 77
+              79:             TypePointer UniformConstant 78
+       80(glass):     79(ptr) Variable UniformConstant
+         4(main):           2 Function None 3
+               5:             Label
+       62(color):     61(ptr) Variable Function
+              65:   11(fvec4) Load 64(gfo1)
+                              Store 62(color) 65
+              66:   11(fvec4) Load 62(color)
+              67:   11(fvec4) FunctionCall 13(Foo()
+              68:   11(fvec4) FAdd 66 67
+                              Store 62(color) 68
+              71:   11(fvec4) Load 62(color)
+                              Store 70(outColor) 71
+                              Return
+                              FunctionEnd
+         9(Bar():    7(fvec2) Function None 8
+              10:             Label
+              21:     20(ptr) AccessChain 17 19
+              22:    7(fvec2) Load 21
+              30:     20(ptr) AccessChain 28(blockName2) 19 29
+              31:    7(fvec2) Load 30
+              32:    7(fvec2) FAdd 22 31
+              33:     20(ptr) AccessChain 28(blockName2) 29 29
+              34:    7(fvec2) Load 33
+              35:    7(fvec2) FAdd 32 34
+                              ReturnValue 35
+                              FunctionEnd
+        13(Foo():   11(fvec4) Function None 12
+              14:             Label
+              42:     41(ptr) AccessChain 40 19
+              43:   11(fvec4) Load 42
+              44:     41(ptr) AccessChain 40 29
+              45:   11(fvec4) Load 44
+              46:   11(fvec4) FAdd 43 45
+              47:     41(ptr) AccessChain 28(blockName2) 19 19
+              48:   11(fvec4) Load 47
+              49:   11(fvec4) FAdd 46 48
+              50:     41(ptr) AccessChain 28(blockName2) 29 19
+              51:   11(fvec4) Load 50
+              52:   11(fvec4) FAdd 49 51
+              53:    7(fvec2) FunctionCall 9(Bar()
+              55:    6(float) CompositeExtract 53 0
+              56:    6(float) CompositeExtract 53 1
+              57:   11(fvec4) CompositeConstruct 55 56 54 54
+              58:   11(fvec4) FAdd 52 57
+                              ReturnValue 58
+                              FunctionEnd
diff --git a/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out b/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out
new file mode 100755
index 0000000..3d76b2f
--- /dev/null
+++ b/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out
@@ -0,0 +1,315 @@
+link.vk.inconsistentGLPerVertex.0.vert
+Shader version: 460
+0:? Sequence
+0:15  Function Definition: main( ( global void)
+0:15    Function Parameters: 
+0:17    Sequence
+0:17      move second child to first child ( temp highp 4-component vector of float)
+0:17        color: direct index for structure ( out highp 4-component vector of float)
+0:17          'vs_out' ( out block{ out highp 4-component vector of float color})
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          1.000000
+0:17          1.000000
+0:17          1.000000
+0:17          1.000000
+0:18      move second child to first child ( temp float)
+0:18        gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
+0:18          'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance,  out unsized 1-element array of float CullDistance gl_CullDistance})
+0:18          Constant:
+0:18            1 (const uint)
+0:18        Constant:
+0:18          1.000000
+0:19      move second child to first child ( temp highp 4-component vector of float)
+0:19        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:19          'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance,  out unsized 1-element array of float CullDistance gl_CullDistance})
+0:19          Constant:
+0:19            0 (const uint)
+0:19        'P' ( in highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'vs_out' ( out block{ out highp 4-component vector of float color})
+0:?     'P' ( in highp 4-component vector of float)
+0:?     'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance,  out unsized 1-element array of float CullDistance gl_CullDistance})
+
+link.vk.inconsistentGLPerVertex.0.geom
+Shader version: 460
+invocations = -1
+max_vertices = 50
+input primitive = lines_adjacency
+output primitive = triangle_strip
+0:? Sequence
+0:16  Function Definition: main( ( global void)
+0:16    Function Parameters: 
+0:18    Sequence
+0:18      move second child to first child ( temp 4-component vector of float)
+0:18        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:18          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 1-element array of float CullDistance gl_CullDistance})
+0:18          Constant:
+0:18            0 (const uint)
+0:18        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:18          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:18            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:18            Constant:
+0:18              0 (const int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      move second child to first child ( temp highp 4-component vector of float)
+0:19        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:19          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:19          Constant:
+0:19            0 (const int)
+0:19        color: direct index for structure ( in highp 4-component vector of float)
+0:19          direct index ( temp block{ in highp 4-component vector of float color})
+0:19            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:19            Constant:
+0:19              0 (const int)
+0:19          Constant:
+0:19            0 (const int)
+0:20      EmitVertex ( global void)
+0:21      move second child to first child ( temp highp 4-component vector of float)
+0:21        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:21          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:21          Constant:
+0:21            0 (const int)
+0:21        color: direct index for structure ( in highp 4-component vector of float)
+0:21          direct index ( temp block{ in highp 4-component vector of float color})
+0:21            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:21            Constant:
+0:21              1 (const int)
+0:21          Constant:
+0:21            0 (const int)
+0:22      move second child to first child ( temp 4-component vector of float)
+0:22        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:22          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 1-element array of float CullDistance gl_CullDistance})
+0:22          Constant:
+0:22            0 (const uint)
+0:22        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:22          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:22            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:22            Constant:
+0:22              1 (const int)
+0:22          Constant:
+0:22            0 (const int)
+0:23      EmitVertex ( global void)
+0:24      move second child to first child ( temp highp 4-component vector of float)
+0:24        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:24          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:24          Constant:
+0:24            0 (const int)
+0:24        color: direct index for structure ( in highp 4-component vector of float)
+0:24          direct index ( temp block{ in highp 4-component vector of float color})
+0:24            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:24            Constant:
+0:24              0 (const int)
+0:24          Constant:
+0:24            0 (const int)
+0:25      move second child to first child ( temp 4-component vector of float)
+0:25        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:25          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 1-element array of float CullDistance gl_CullDistance})
+0:25          Constant:
+0:25            0 (const uint)
+0:25        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:25          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:25            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:25            Constant:
+0:25              0 (const int)
+0:25          Constant:
+0:25            0 (const int)
+0:26      EmitVertex ( global void)
+0:?   Linker Objects
+0:?     'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:?     'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:?     'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 1-element array of float CullDistance gl_CullDistance})
+0:?     'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in unsized 1-element array of float ClipDistance gl_ClipDistance,  in unsized 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+
+
+Linked vertex stage:
+
+
+Linked geometry stage:
+
+
+Shader version: 460
+0:? Sequence
+0:15  Function Definition: main( ( global void)
+0:15    Function Parameters: 
+0:17    Sequence
+0:17      move second child to first child ( temp highp 4-component vector of float)
+0:17        color: direct index for structure ( out highp 4-component vector of float)
+0:17          'vs_out' ( out block{ out highp 4-component vector of float color})
+0:17          Constant:
+0:17            0 (const int)
+0:17        Constant:
+0:17          1.000000
+0:17          1.000000
+0:17          1.000000
+0:17          1.000000
+0:18      move second child to first child ( temp float)
+0:18        gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
+0:18          'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out 1-element array of float ClipDistance gl_ClipDistance,  out 1-element array of float CullDistance gl_CullDistance})
+0:18          Constant:
+0:18            1 (const uint)
+0:18        Constant:
+0:18          1.000000
+0:19      move second child to first child ( temp highp 4-component vector of float)
+0:19        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:19          'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out 1-element array of float ClipDistance gl_ClipDistance,  out 1-element array of float CullDistance gl_CullDistance})
+0:19          Constant:
+0:19            0 (const uint)
+0:19        'P' ( in highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'vs_out' ( out block{ out highp 4-component vector of float color})
+0:?     'P' ( in highp 4-component vector of float)
+0:?     'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out 1-element array of float ClipDistance gl_ClipDistance,  out 1-element array of float CullDistance gl_CullDistance})
+Shader version: 460
+invocations = 1
+max_vertices = 50
+input primitive = lines_adjacency
+output primitive = triangle_strip
+0:? Sequence
+0:16  Function Definition: main( ( global void)
+0:16    Function Parameters: 
+0:18    Sequence
+0:18      move second child to first child ( temp 4-component vector of float)
+0:18        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:18          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 1-element array of float CullDistance gl_CullDistance})
+0:18          Constant:
+0:18            0 (const uint)
+0:18        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:18          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:18            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:18            Constant:
+0:18              0 (const int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      move second child to first child ( temp highp 4-component vector of float)
+0:19        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:19          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:19          Constant:
+0:19            0 (const int)
+0:19        color: direct index for structure ( in highp 4-component vector of float)
+0:19          direct index ( temp block{ in highp 4-component vector of float color})
+0:19            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:19            Constant:
+0:19              0 (const int)
+0:19          Constant:
+0:19            0 (const int)
+0:20      EmitVertex ( global void)
+0:21      move second child to first child ( temp highp 4-component vector of float)
+0:21        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:21          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:21          Constant:
+0:21            0 (const int)
+0:21        color: direct index for structure ( in highp 4-component vector of float)
+0:21          direct index ( temp block{ in highp 4-component vector of float color})
+0:21            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:21            Constant:
+0:21              1 (const int)
+0:21          Constant:
+0:21            0 (const int)
+0:22      move second child to first child ( temp 4-component vector of float)
+0:22        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:22          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 1-element array of float CullDistance gl_CullDistance})
+0:22          Constant:
+0:22            0 (const uint)
+0:22        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:22          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:22            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:22            Constant:
+0:22              1 (const int)
+0:22          Constant:
+0:22            0 (const int)
+0:23      EmitVertex ( global void)
+0:24      move second child to first child ( temp highp 4-component vector of float)
+0:24        color: direct index for structure (layout( stream=0) out highp 4-component vector of float)
+0:24          'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:24          Constant:
+0:24            0 (const int)
+0:24        color: direct index for structure ( in highp 4-component vector of float)
+0:24          direct index ( temp block{ in highp 4-component vector of float color})
+0:24            'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:24            Constant:
+0:24              0 (const int)
+0:24          Constant:
+0:24            0 (const int)
+0:25      move second child to first child ( temp 4-component vector of float)
+0:25        gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
+0:25          'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 1-element array of float CullDistance gl_CullDistance})
+0:25          Constant:
+0:25            0 (const uint)
+0:25        gl_Position: direct index for structure ( in 4-component vector of float Position)
+0:25          direct index ( temp block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:25            'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+0:25            Constant:
+0:25              0 (const int)
+0:25          Constant:
+0:25            0 (const int)
+0:26      EmitVertex ( global void)
+0:?   Linker Objects
+0:?     'gs_in' ( in 4-element array of block{ in highp 4-component vector of float color})
+0:?     'gs_out' (layout( stream=0) out block{layout( stream=0) out highp 4-component vector of float color})
+0:?     'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 1-element array of float CullDistance gl_CullDistance})
+0:?     'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position,  in float PointSize gl_PointSize,  in 1-element array of float ClipDistance gl_ClipDistance,  in 1-element array of float CullDistance gl_CullDistance,  in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV,  in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 30
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 10 22 27
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "vs_output"
+                              MemberName 8(vs_output) 0  "color"
+                              Name 10  "vs_out"
+                              Name 20  "gl_PerVertex"
+                              MemberName 20(gl_PerVertex) 0  "gl_Position"
+                              MemberName 20(gl_PerVertex) 1  "gl_PointSize"
+                              MemberName 20(gl_PerVertex) 2  "gl_ClipDistance"
+                              MemberName 20(gl_PerVertex) 3  "gl_CullDistance"
+                              Name 22  ""
+                              Name 27  "P"
+                              Decorate 8(vs_output) Block
+                              Decorate 10(vs_out) Location 0
+                              MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
+                              MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
+                              MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance
+                              MemberDecorate 20(gl_PerVertex) 3 BuiltIn CullDistance
+                              Decorate 20(gl_PerVertex) Block
+                              Decorate 27(P) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+    8(vs_output):             TypeStruct 7(fvec4)
+               9:             TypePointer Output 8(vs_output)
+      10(vs_out):      9(ptr) Variable Output
+              11:             TypeInt 32 1
+              12:     11(int) Constant 0
+              13:    6(float) Constant 1065353216
+              14:    7(fvec4) ConstantComposite 13 13 13 13
+              15:             TypePointer Output 7(fvec4)
+              17:             TypeInt 32 0
+              18:     17(int) Constant 1
+              19:             TypeArray 6(float) 18
+20(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 19 19
+              21:             TypePointer Output 20(gl_PerVertex)
+              22:     21(ptr) Variable Output
+              23:     11(int) Constant 1
+              24:             TypePointer Output 6(float)
+              26:             TypePointer Input 7(fvec4)
+           27(P):     26(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+              16:     15(ptr) AccessChain 10(vs_out) 12
+                              Store 16 14
+              25:     24(ptr) AccessChain 22 23
+                              Store 25 13
+              28:    7(fvec4) Load 27(P)
+              29:     15(ptr) AccessChain 22 12
+                              Store 29 28
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/negativeWorkGroupSize.comp.out b/Test/baseResults/negativeWorkGroupSize.comp.out
new file mode 100644
index 0000000..7ae3798
--- /dev/null
+++ b/Test/baseResults/negativeWorkGroupSize.comp.out
@@ -0,0 +1,69 @@
+negativeWorkGroupSize.comp
+ERROR: 0:4: 'initializer' : can't read from gl_WorkGroupSize before a fixed workgroup size has been declared 
+ERROR: 1 compilation errors.  No code generated.
+
+
+Shader version: 460
+local_size = (64, 1, 1)
+ERROR: node is still EOpNull!
+0:3  Function Definition: fn( ( global void)
+0:3    Function Parameters: 
+0:4    Sequence
+0:4      Sequence
+0:4        move second child to first child ( temp 3-component vector of uint)
+0:4          'wgs' ( temp 3-component vector of uint)
+0:4          Constant:
+0:4            1 (const uint)
+0:4            1 (const uint)
+0:4            1 (const uint)
+0:9  Function Definition: main( ( global void)
+0:9    Function Parameters: 
+0:10    Sequence
+0:10      Function Call: fn( ( global void)
+0:11      Sequence
+0:11        move second child to first child ( temp 3-component vector of uint)
+0:11          'wgs' ( temp 3-component vector of uint)
+0:11          Constant:
+0:11            64 (const uint)
+0:11            1 (const uint)
+0:11            1 (const uint)
+0:?   Linker Objects
+0:?     'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
+0:?       64 (const uint)
+0:?       1 (const uint)
+0:?       1 (const uint)
+
+
+Linked compute stage:
+
+
+Shader version: 460
+local_size = (64, 1, 1)
+ERROR: node is still EOpNull!
+0:3  Function Definition: fn( ( global void)
+0:3    Function Parameters: 
+0:4    Sequence
+0:4      Sequence
+0:4        move second child to first child ( temp 3-component vector of uint)
+0:4          'wgs' ( temp 3-component vector of uint)
+0:4          Constant:
+0:4            1 (const uint)
+0:4            1 (const uint)
+0:4            1 (const uint)
+0:9  Function Definition: main( ( global void)
+0:9    Function Parameters: 
+0:10    Sequence
+0:10      Function Call: fn( ( global void)
+0:11      Sequence
+0:11        move second child to first child ( temp 3-component vector of uint)
+0:11          'wgs' ( temp 3-component vector of uint)
+0:11          Constant:
+0:11            64 (const uint)
+0:11            1 (const uint)
+0:11            1 (const uint)
+0:?   Linker Objects
+0:?     'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
+0:?       64 (const uint)
+0:?       1 (const uint)
+0:?       1 (const uint)
+
diff --git a/Test/baseResults/spv.atomicStoreInt64.comp.out b/Test/baseResults/spv.atomicStoreInt64.comp.out
new file mode 100644
index 0000000..3adadcb
--- /dev/null
+++ b/Test/baseResults/spv.atomicStoreInt64.comp.out
@@ -0,0 +1,57 @@
+spv.atomicStoreInt64.comp
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 25
+
+                              Capability Shader
+                              Capability Int64
+                              Capability Int64Atomics
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint GLCompute 4  "main"
+                              ExecutionMode 4 LocalSize 1 1 1
+                              Source GLSL 450
+                              SourceExtension  "GL_EXT_shader_atomic_int64"
+                              SourceExtension  "GL_EXT_shader_explicit_arithmetic_types_int64"
+                              SourceExtension  "GL_KHR_memory_scope_semantics"
+                              Name 4  "main"
+                              Name 7  "ssbo"
+                              MemberName 7(ssbo) 0  "y"
+                              Name 9  ""
+                              Name 14  "ubo"
+                              MemberName 14(ubo) 0  "z"
+                              Name 16  ""
+                              MemberDecorate 7(ssbo) 0 Offset 0
+                              Decorate 7(ssbo) BufferBlock
+                              Decorate 9 DescriptorSet 0
+                              Decorate 9 Binding 0
+                              MemberDecorate 14(ubo) 0 Offset 0
+                              Decorate 14(ubo) Block
+                              Decorate 16 DescriptorSet 0
+                              Decorate 16 Binding 1
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 64 0
+         7(ssbo):             TypeStruct 6(int64_t)
+               8:             TypePointer Uniform 7(ssbo)
+               9:      8(ptr) Variable Uniform
+              10:             TypeInt 32 1
+              11:     10(int) Constant 0
+              12:             TypePointer Uniform 6(int64_t)
+         14(ubo):             TypeStruct 6(int64_t)
+              15:             TypePointer Uniform 14(ubo)
+              16:     15(ptr) Variable Uniform
+              19:     10(int) Constant 1
+              20:     10(int) Constant 64
+              21:             TypeInt 32 0
+              22:     21(int) Constant 1
+              23:     21(int) Constant 0
+              24:     21(int) Constant 64
+         4(main):           2 Function None 3
+               5:             Label
+              13:     12(ptr) AccessChain 9 11
+              17:     12(ptr) AccessChain 16 11
+              18:  6(int64_t) Load 17
+                              AtomicStore 13 19 24 18
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.bufferhandle1.frag.out b/Test/baseResults/spv.bufferhandle1.frag.out
index 59bcc78..b49c129 100644
--- a/Test/baseResults/spv.bufferhandle1.frag.out
+++ b/Test/baseResults/spv.bufferhandle1.frag.out
@@ -6,7 +6,7 @@
                               Capability Shader
                               Capability VulkanMemoryModelKHR
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                               Extension  "SPV_KHR_vulkan_memory_model"
                1:             ExtInstImport  "GLSL.std.450"
diff --git a/Test/baseResults/spv.bufferhandle10.frag.out b/Test/baseResults/spv.bufferhandle10.frag.out
index 3a33c42..f9ab60d 100644
--- a/Test/baseResults/spv.bufferhandle10.frag.out
+++ b/Test/baseResults/spv.bufferhandle10.frag.out
@@ -6,7 +6,7 @@
                               Capability Shader
                               Capability VulkanMemoryModelKHR
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                               Extension  "SPV_KHR_vulkan_memory_model"
                1:             ExtInstImport  "GLSL.std.450"
diff --git a/Test/baseResults/spv.bufferhandle11.frag.out b/Test/baseResults/spv.bufferhandle11.frag.out
index bd034aa..9dd1c7b 100644
--- a/Test/baseResults/spv.bufferhandle11.frag.out
+++ b/Test/baseResults/spv.bufferhandle11.frag.out
@@ -9,8 +9,8 @@
                               Capability Shader
                               Capability StorageBuffer8BitAccess
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
                               Extension  "SPV_KHR_8bit_storage"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle12.frag.out b/Test/baseResults/spv.bufferhandle12.frag.out
index c47c718..7cd5cb5 100644
--- a/Test/baseResults/spv.bufferhandle12.frag.out
+++ b/Test/baseResults/spv.bufferhandle12.frag.out
@@ -9,8 +9,8 @@
                               Capability Shader
                               Capability StorageUniformBufferBlock16
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
                               Extension  "SPV_KHR_16bit_storage"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle13.frag.out b/Test/baseResults/spv.bufferhandle13.frag.out
index bfc1524..5ce24ac 100644
--- a/Test/baseResults/spv.bufferhandle13.frag.out
+++ b/Test/baseResults/spv.bufferhandle13.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle14.frag.out b/Test/baseResults/spv.bufferhandle14.frag.out
index 514a798..34df753 100644
--- a/Test/baseResults/spv.bufferhandle14.frag.out
+++ b/Test/baseResults/spv.bufferhandle14.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
                               EntryPoint Fragment 4  "main"
diff --git a/Test/baseResults/spv.bufferhandle15.frag.out b/Test/baseResults/spv.bufferhandle15.frag.out
index bfa5d94..ab1b4db 100644
--- a/Test/baseResults/spv.bufferhandle15.frag.out
+++ b/Test/baseResults/spv.bufferhandle15.frag.out
@@ -8,7 +8,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle16.frag.out b/Test/baseResults/spv.bufferhandle16.frag.out
index 284bcb0..a9d9dcf 100644
--- a/Test/baseResults/spv.bufferhandle16.frag.out
+++ b/Test/baseResults/spv.bufferhandle16.frag.out
@@ -6,7 +6,7 @@
                               Capability Shader
                               Capability Int64
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
                               EntryPoint Fragment 4  "main"
diff --git a/Test/baseResults/spv.bufferhandle18.frag.out b/Test/baseResults/spv.bufferhandle18.frag.out
index 21dddc5..59ad6d0 100644
--- a/Test/baseResults/spv.bufferhandle18.frag.out
+++ b/Test/baseResults/spv.bufferhandle18.frag.out
@@ -6,7 +6,7 @@
                               Capability Shader
                               Capability Int64
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
                               EntryPoint Fragment 4  "main"
diff --git a/Test/baseResults/spv.bufferhandle2.frag.out b/Test/baseResults/spv.bufferhandle2.frag.out
index f66c92a..e20f3b7 100644
--- a/Test/baseResults/spv.bufferhandle2.frag.out
+++ b/Test/baseResults/spv.bufferhandle2.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle3.frag.out b/Test/baseResults/spv.bufferhandle3.frag.out
index 95d4dcf..65ad1ca 100644
--- a/Test/baseResults/spv.bufferhandle3.frag.out
+++ b/Test/baseResults/spv.bufferhandle3.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle4.frag.out b/Test/baseResults/spv.bufferhandle4.frag.out
index 6751d6f..e06bca4 100644
--- a/Test/baseResults/spv.bufferhandle4.frag.out
+++ b/Test/baseResults/spv.bufferhandle4.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle5.frag.out b/Test/baseResults/spv.bufferhandle5.frag.out
index 9f78166..bf4d3a2 100644
--- a/Test/baseResults/spv.bufferhandle5.frag.out
+++ b/Test/baseResults/spv.bufferhandle5.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
                               EntryPoint Fragment 4  "main"
diff --git a/Test/baseResults/spv.bufferhandle6.frag.out b/Test/baseResults/spv.bufferhandle6.frag.out
index 441c762..abc9187 100644
--- a/Test/baseResults/spv.bufferhandle6.frag.out
+++ b/Test/baseResults/spv.bufferhandle6.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle7.frag.out b/Test/baseResults/spv.bufferhandle7.frag.out
index 3c8e86c..4282a36 100644
--- a/Test/baseResults/spv.bufferhandle7.frag.out
+++ b/Test/baseResults/spv.bufferhandle7.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle8.frag.out b/Test/baseResults/spv.bufferhandle8.frag.out
index b9f23c5..65d4665 100644
--- a/Test/baseResults/spv.bufferhandle8.frag.out
+++ b/Test/baseResults/spv.bufferhandle8.frag.out
@@ -5,7 +5,7 @@
 
                               Capability Shader
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.bufferhandle9.frag.out b/Test/baseResults/spv.bufferhandle9.frag.out
index 7e534df..1e5091c 100644
--- a/Test/baseResults/spv.bufferhandle9.frag.out
+++ b/Test/baseResults/spv.bufferhandle9.frag.out
@@ -6,7 +6,7 @@
                               Capability Shader
                               Capability Int64
                               Capability PhysicalStorageBufferAddressesEXT
-                              Extension  "SPV_EXT_physical_storage_buffer"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel PhysicalStorageBuffer64EXT GLSL450
diff --git a/Test/baseResults/spv.coopmat.comp.out b/Test/baseResults/spv.coopmat.comp.out
index 6838bfc..0a609df 100644
--- a/Test/baseResults/spv.coopmat.comp.out
+++ b/Test/baseResults/spv.coopmat.comp.out
@@ -9,8 +9,8 @@
                               Capability VulkanMemoryModelKHR
                               Capability PhysicalStorageBufferAddressesEXT
                               Capability CooperativeMatrixNV
-                              Extension  "SPV_EXT_physical_storage_buffer"
                               Extension  "SPV_KHR_16bit_storage"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                               Extension  "SPV_KHR_vulkan_memory_model"
                               Extension  "SPV_NV_cooperative_matrix"
diff --git a/Test/baseResults/spv.depthUnchanged.frag.out b/Test/baseResults/spv.depthUnchanged.frag.out
new file mode 100644
index 0000000..0074007
--- /dev/null
+++ b/Test/baseResults/spv.depthUnchanged.frag.out
@@ -0,0 +1,44 @@
+spv.depthUnchanged.frag
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 22
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 9 14 16
+                              ExecutionMode 4 OriginUpperLeft
+                              ExecutionMode 4 DepthReplacing
+                              ExecutionMode 4 DepthUnchanged
+                              Source GLSL 430
+                              Name 4  "main"
+                              Name 9  "outColor"
+                              Name 14  "gl_FragDepth"
+                              Name 16  "gl_FragCoord"
+                              Decorate 9(outColor) Location 0
+                              Decorate 14(gl_FragDepth) BuiltIn FragDepth
+                              Decorate 16(gl_FragCoord) BuiltIn FragCoord
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+     9(outColor):      8(ptr) Variable Output
+              10:    6(float) Constant 1065353216
+              11:    6(float) Constant 0
+              12:    7(fvec4) ConstantComposite 10 11 11 10
+              13:             TypePointer Output 6(float)
+14(gl_FragDepth):     13(ptr) Variable Output
+              15:             TypePointer Input 7(fvec4)
+16(gl_FragCoord):     15(ptr) Variable Input
+              17:             TypeInt 32 0
+              18:     17(int) Constant 1
+              19:             TypePointer Input 6(float)
+         4(main):           2 Function None 3
+               5:             Label
+                              Store 9(outColor) 12
+              20:     19(ptr) AccessChain 16(gl_FragCoord) 18
+              21:    6(float) Load 20
+                              Store 14(gl_FragDepth) 21
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.ext.MissShader.rmiss.out b/Test/baseResults/spv.ext.MissShader.rmiss.out
index bc29ccc..d2dfc17 100644
--- a/Test/baseResults/spv.ext.MissShader.rmiss.out
+++ b/Test/baseResults/spv.ext.MissShader.rmiss.out
@@ -1,8 +1,9 @@
 spv.ext.MissShader.rmiss
 // Module Version 10400
 // Generated by (magic number): 8000a
-// Id's are bound by 71
+// Id's are bound by 90
 
+                              Capability MinLod
                               Capability GroupNonUniform
                               Capability GroupNonUniformBallot
                               Capability SubgroupBallotKHR
@@ -13,9 +14,10 @@
                               Extension  "SPV_NV_shader_sm_builtins"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint MissKHR 4  "main" 11 14 21 24 29 32 36 51 53 58 63 70
+                              EntryPoint MissKHR 4  "main" 11 14 21 24 29 32 36 51 53 58 63 74 78 85 89
                               Source GLSL 460
                               SourceExtension  "GL_ARB_shader_ballot"
+                              SourceExtension  "GL_ARB_sparse_texture_clamp"
                               SourceExtension  "GL_EXT_ray_tracing"
                               SourceExtension  "GL_KHR_shader_subgroup_ballot"
                               SourceExtension  "GL_KHR_shader_subgroup_basic"
@@ -38,7 +40,11 @@
                               Name 53  "gl_SubGroupSizeARB"
                               Name 58  "gl_SubgroupEqMask"
                               Name 63  "gl_WarpIDNV"
-                              Name 70  "localPayload"
+                              Name 70  "texel"
+                              Name 74  "s2D"
+                              Name 78  "c2"
+                              Name 85  "lodClamp"
+                              Name 89  "localPayload"
                               Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
                               Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
                               Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
@@ -57,7 +63,11 @@
                               Decorate 63(gl_WarpIDNV) BuiltIn WarpIDNV
                               Decorate 63(gl_WarpIDNV) Volatile
                               Decorate 63(gl_WarpIDNV) Coherent
-                              Decorate 70(localPayload) Location 0
+                              Decorate 74(s2D) DescriptorSet 0
+                              Decorate 74(s2D) Binding 1
+                              Decorate 78(c2) Location 2
+                              Decorate 85(lodClamp) Location 3
+                              Decorate 89(localPayload) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -100,8 +110,20 @@
 58(gl_SubgroupEqMask):     57(ptr) Variable Input
  63(gl_WarpIDNV):     52(ptr) Variable Input
               67:             TypePointer IncomingRayPayloadKHR 16(float)
-              69:             TypePointer RayPayloadKHR 49(fvec4)
-70(localPayload):     69(ptr) Variable RayPayloadKHR
+              69:             TypePointer Function 49(fvec4)
+              71:             TypeImage 16(float) 2D sampled format:Unknown
+              72:             TypeSampledImage 71
+              73:             TypePointer UniformConstant 72
+         74(s2D):     73(ptr) Variable UniformConstant
+              76:             TypeVector 16(float) 2
+              77:             TypePointer Input 76(fvec2)
+          78(c2):     77(ptr) Variable Input
+              82:             TypeVector 47(int) 2
+              83:     47(int) Constant 5
+              84:   82(ivec2) ConstantComposite 83 83
+    85(lodClamp):     28(ptr) Variable Input
+              88:             TypePointer RayPayloadKHR 49(fvec4)
+89(localPayload):     88(ptr) Variable RayPayloadKHR
          4(main):           2 Function None 3
                5:             Label
            9(v0):      8(ptr) Variable Function
@@ -110,6 +132,7 @@
           23(v3):     18(ptr) Variable Function
           27(v4):     26(ptr) Variable Function
           31(v5):     26(ptr) Variable Function
+       70(texel):     69(ptr) Variable Function
               12:    7(ivec3) Load 11(gl_LaunchIDEXT)
                               Store 9(v0) 12
               15:    7(ivec3) Load 14(gl_LaunchSizeEXT)
@@ -135,5 +158,12 @@
               66:   16(float) FAdd 62 65
               68:     67(ptr) AccessChain 51(incomingPayload) 38
                               Store 68 66
+              75:          72 Load 74(s2D)
+              79:   76(fvec2) Load 78(c2)
+              80:   76(fvec2) Load 78(c2)
+              81:   76(fvec2) Load 78(c2)
+              86:   16(float) Load 85(lodClamp)
+              87:   49(fvec4) ImageSampleExplicitLod 75 79 Grad ConstOffset MinLod 80 81 84 86
+                              Store 70(texel) 87
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/spv.float16Fetch.frag.out b/Test/baseResults/spv.float16Fetch.frag.out
index 38c5478..3b2c36f 100644
--- a/Test/baseResults/spv.float16Fetch.frag.out
+++ b/Test/baseResults/spv.float16Fetch.frag.out
@@ -2,7 +2,7 @@
 Validation failed
 // Module Version 10000
 // Generated by (magic number): 8000a
-// Id's are bound by 5923
+// Id's are bound by 5933
 
                               Capability Shader
                               Capability Float16
@@ -29,7 +29,7 @@
                               Extension  "SPV_KHR_16bit_storage"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 128 135 137 148 156 169 177 215 251 309 565 572 1393 1401 1409 1417 1425 1433 4257 4264 5913 5922
+                              EntryPoint Fragment 4  "main" 128 135 137 148 156 169 177 215 251 309 565 572 1393 1401 1409 1417 1425 1433 4267 4274 5923 5932
                               ExecutionMode 4 OriginUpperLeft
                               Source GLSL 450
                               SourceExtension  "GL_AMD_gpu_shader_half_float"
@@ -173,40 +173,40 @@
                               Name 3832  "texel"
                               Name 3950  "texel"
                               Name 4022  "texel"
-                              Name 4094  "texel"
-                              Name 4146  "texel"
-                              Name 4174  "texel"
-                              Name 4202  "texel"
-                              Name 4254  "texel"
-                              Name 4257  "lodClamp"
-                              Name 4264  "f16lodClamp"
-                              Name 4391  "texel"
-                              Name 4598  "texel"
-                              Name 4674  "texel"
-                              Name 4818  "texel"
-                              Name 4962  "texel"
-                              Name 5188  "texel"
-                              Name 5280  "texel"
-                              Name 5452  "texel"
-                              Name 5454  "t1D"
-                              Name 5458  "s"
-                              Name 5474  "t2D"
-                              Name 5491  "t3D"
-                              Name 5508  "tCube"
-                              Name 5525  "sShadow"
-                              Name 5589  "t1DArray"
-                              Name 5606  "t2DArray"
-                              Name 5623  "tCubeArray"
-                              Name 5681  "t2DRect"
-                              Name 5741  "subpass"
-                              Name 5747  "subpassMS"
-                              Name 5753  "result"
-                              Name 5834  "param"
-                              Name 5913  "fragColor"
-                              Name 5917  "tBuffer"
-                              Name 5919  "t2DMS"
-                              Name 5921  "t2DMSArray"
-                              Name 5922  "bias"
+                              Name 4104  "texel"
+                              Name 4156  "texel"
+                              Name 4184  "texel"
+                              Name 4212  "texel"
+                              Name 4264  "texel"
+                              Name 4267  "lodClamp"
+                              Name 4274  "f16lodClamp"
+                              Name 4401  "texel"
+                              Name 4608  "texel"
+                              Name 4684  "texel"
+                              Name 4828  "texel"
+                              Name 4972  "texel"
+                              Name 5198  "texel"
+                              Name 5290  "texel"
+                              Name 5462  "texel"
+                              Name 5464  "t1D"
+                              Name 5468  "s"
+                              Name 5484  "t2D"
+                              Name 5501  "t3D"
+                              Name 5518  "tCube"
+                              Name 5535  "sShadow"
+                              Name 5599  "t1DArray"
+                              Name 5616  "t2DArray"
+                              Name 5633  "tCubeArray"
+                              Name 5691  "t2DRect"
+                              Name 5751  "subpass"
+                              Name 5757  "subpassMS"
+                              Name 5763  "result"
+                              Name 5844  "param"
+                              Name 5923  "fragColor"
+                              Name 5927  "tBuffer"
+                              Name 5929  "t2DMS"
+                              Name 5931  "t2DMSArray"
+                              Name 5932  "bias"
                               Decorate 125(s1D) DescriptorSet 0
                               Decorate 125(s1D) Binding 0
                               Decorate 128(c1) Location 0
@@ -283,42 +283,42 @@
                               Decorate 3036(i2DMS) Binding 9
                               Decorate 3045(i2DMSArray) DescriptorSet 1
                               Decorate 3045(i2DMSArray) Binding 10
-                              Decorate 4257(lodClamp) Location 7
-                              Decorate 4264(f16lodClamp) Location 17
-                              Decorate 5454(t1D) DescriptorSet 2
-                              Decorate 5454(t1D) Binding 0
-                              Decorate 5458(s) DescriptorSet 2
-                              Decorate 5458(s) Binding 11
-                              Decorate 5474(t2D) DescriptorSet 2
-                              Decorate 5474(t2D) Binding 1
-                              Decorate 5491(t3D) DescriptorSet 2
-                              Decorate 5491(t3D) Binding 2
-                              Decorate 5508(tCube) DescriptorSet 2
-                              Decorate 5508(tCube) Binding 4
-                              Decorate 5525(sShadow) DescriptorSet 2
-                              Decorate 5525(sShadow) Binding 12
-                              Decorate 5589(t1DArray) DescriptorSet 2
-                              Decorate 5589(t1DArray) Binding 5
-                              Decorate 5606(t2DArray) DescriptorSet 2
-                              Decorate 5606(t2DArray) Binding 6
-                              Decorate 5623(tCubeArray) DescriptorSet 2
-                              Decorate 5623(tCubeArray) Binding 7
-                              Decorate 5681(t2DRect) DescriptorSet 2
-                              Decorate 5681(t2DRect) Binding 3
-                              Decorate 5741(subpass) DescriptorSet 3
-                              Decorate 5741(subpass) Binding 0
-                              Decorate 5741(subpass) InputAttachmentIndex 0
-                              Decorate 5747(subpassMS) DescriptorSet 3
-                              Decorate 5747(subpassMS) Binding 1
-                              Decorate 5747(subpassMS) InputAttachmentIndex 0
-                              Decorate 5913(fragColor) Location 0
-                              Decorate 5917(tBuffer) DescriptorSet 2
-                              Decorate 5917(tBuffer) Binding 8
-                              Decorate 5919(t2DMS) DescriptorSet 2
-                              Decorate 5919(t2DMS) Binding 9
-                              Decorate 5921(t2DMSArray) DescriptorSet 2
-                              Decorate 5921(t2DMSArray) Binding 10
-                              Decorate 5922(bias) Location 6
+                              Decorate 4267(lodClamp) Location 7
+                              Decorate 4274(f16lodClamp) Location 17
+                              Decorate 5464(t1D) DescriptorSet 2
+                              Decorate 5464(t1D) Binding 0
+                              Decorate 5468(s) DescriptorSet 2
+                              Decorate 5468(s) Binding 11
+                              Decorate 5484(t2D) DescriptorSet 2
+                              Decorate 5484(t2D) Binding 1
+                              Decorate 5501(t3D) DescriptorSet 2
+                              Decorate 5501(t3D) Binding 2
+                              Decorate 5518(tCube) DescriptorSet 2
+                              Decorate 5518(tCube) Binding 4
+                              Decorate 5535(sShadow) DescriptorSet 2
+                              Decorate 5535(sShadow) Binding 12
+                              Decorate 5599(t1DArray) DescriptorSet 2
+                              Decorate 5599(t1DArray) Binding 5
+                              Decorate 5616(t2DArray) DescriptorSet 2
+                              Decorate 5616(t2DArray) Binding 6
+                              Decorate 5633(tCubeArray) DescriptorSet 2
+                              Decorate 5633(tCubeArray) Binding 7
+                              Decorate 5691(t2DRect) DescriptorSet 2
+                              Decorate 5691(t2DRect) Binding 3
+                              Decorate 5751(subpass) DescriptorSet 3
+                              Decorate 5751(subpass) Binding 0
+                              Decorate 5751(subpass) InputAttachmentIndex 0
+                              Decorate 5757(subpassMS) DescriptorSet 3
+                              Decorate 5757(subpassMS) Binding 1
+                              Decorate 5757(subpassMS) InputAttachmentIndex 0
+                              Decorate 5923(fragColor) Location 0
+                              Decorate 5927(tBuffer) DescriptorSet 2
+                              Decorate 5927(tBuffer) Binding 8
+                              Decorate 5929(t2DMS) DescriptorSet 2
+                              Decorate 5929(t2DMS) Binding 9
+                              Decorate 5931(t2DMSArray) DescriptorSet 2
+                              Decorate 5931(t2DMSArray) Binding 10
+                              Decorate 5932(bias) Location 6
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 16
@@ -491,258 +491,268 @@
 3045(i2DMSArray):   3044(ptr) Variable UniformConstant
    3102(ResType):             TypeStruct 47(int) 7(f16vec4)
    3138(ResType):             TypeStruct 47(int) 6(float16_t)
-  4257(lodClamp):    127(ptr) Variable Input
-4264(f16lodClamp):    134(ptr) Variable Input
-            5453:             TypePointer UniformConstant 122
-       5454(t1D):   5453(ptr) Variable UniformConstant
-            5456:             TypeSampler
-            5457:             TypePointer UniformConstant 5456
-         5458(s):   5457(ptr) Variable UniformConstant
-            5473:             TypePointer UniformConstant 142
-       5474(t2D):   5473(ptr) Variable UniformConstant
-            5490:             TypePointer UniformConstant 162
-       5491(t3D):   5490(ptr) Variable UniformConstant
-            5507:             TypePointer UniformConstant 183
-     5508(tCube):   5507(ptr) Variable UniformConstant
-   5525(sShadow):   5457(ptr) Variable UniformConstant
-            5588:             TypePointer UniformConstant 268
-  5589(t1DArray):   5588(ptr) Variable UniformConstant
-            5605:             TypePointer UniformConstant 283
-  5606(t2DArray):   5605(ptr) Variable UniformConstant
-            5622:             TypePointer UniformConstant 298
-5623(tCubeArray):   5622(ptr) Variable UniformConstant
-            5680:             TypePointer UniformConstant 356
-   5681(t2DRect):   5680(ptr) Variable UniformConstant
-            5739:             TypeImage 6(float16_t) SubpassData nonsampled format:Unknown
-            5740:             TypePointer UniformConstant 5739
-   5741(subpass):   5740(ptr) Variable UniformConstant
-            5743:  721(ivec2) ConstantComposite 2187 2187
-            5745:             TypeImage 6(float16_t) SubpassData multi-sampled nonsampled format:Unknown
-            5746:             TypePointer UniformConstant 5745
- 5747(subpassMS):   5746(ptr) Variable UniformConstant
-            5912:             TypePointer Output 249(fvec4)
- 5913(fragColor):   5912(ptr) Variable Output
-            5916:             TypePointer UniformConstant 1297
-   5917(tBuffer):   5916(ptr) Variable UniformConstant
-            5918:             TypePointer UniformConstant 1308
-     5919(t2DMS):   5918(ptr) Variable UniformConstant
-            5920:             TypePointer UniformConstant 1319
-5921(t2DMSArray):   5920(ptr) Variable UniformConstant
-      5922(bias):    127(ptr) Variable Input
+            4025:  721(ivec2) ConstantComposite 709 1326
+            4026:     47(int) Constant 3
+            4027:     47(int) Constant 4
+            4028:  721(ivec2) ConstantComposite 4026 4027
+            4029:     47(int) Constant 15
+            4030:     47(int) Constant 16
+            4031:  721(ivec2) ConstantComposite 4029 4030
+            4032:     47(int) Constant 4294967294
+            4033:  721(ivec2) ConstantComposite 4032 2187
+            4034:        2379 ConstantComposite 4025 4028 4031 4033
+  4267(lodClamp):    127(ptr) Variable Input
+4274(f16lodClamp):    134(ptr) Variable Input
+            5463:             TypePointer UniformConstant 122
+       5464(t1D):   5463(ptr) Variable UniformConstant
+            5466:             TypeSampler
+            5467:             TypePointer UniformConstant 5466
+         5468(s):   5467(ptr) Variable UniformConstant
+            5483:             TypePointer UniformConstant 142
+       5484(t2D):   5483(ptr) Variable UniformConstant
+            5500:             TypePointer UniformConstant 162
+       5501(t3D):   5500(ptr) Variable UniformConstant
+            5517:             TypePointer UniformConstant 183
+     5518(tCube):   5517(ptr) Variable UniformConstant
+   5535(sShadow):   5467(ptr) Variable UniformConstant
+            5598:             TypePointer UniformConstant 268
+  5599(t1DArray):   5598(ptr) Variable UniformConstant
+            5615:             TypePointer UniformConstant 283
+  5616(t2DArray):   5615(ptr) Variable UniformConstant
+            5632:             TypePointer UniformConstant 298
+5633(tCubeArray):   5632(ptr) Variable UniformConstant
+            5690:             TypePointer UniformConstant 356
+   5691(t2DRect):   5690(ptr) Variable UniformConstant
+            5749:             TypeImage 6(float16_t) SubpassData nonsampled format:Unknown
+            5750:             TypePointer UniformConstant 5749
+   5751(subpass):   5750(ptr) Variable UniformConstant
+            5753:  721(ivec2) ConstantComposite 2187 2187
+            5755:             TypeImage 6(float16_t) SubpassData multi-sampled nonsampled format:Unknown
+            5756:             TypePointer UniformConstant 5755
+ 5757(subpassMS):   5756(ptr) Variable UniformConstant
+            5922:             TypePointer Output 249(fvec4)
+ 5923(fragColor):   5922(ptr) Variable Output
+            5926:             TypePointer UniformConstant 1297
+   5927(tBuffer):   5926(ptr) Variable UniformConstant
+            5928:             TypePointer UniformConstant 1308
+     5929(t2DMS):   5928(ptr) Variable UniformConstant
+            5930:             TypePointer UniformConstant 1319
+5931(t2DMSArray):   5930(ptr) Variable UniformConstant
+      5932(bias):    127(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-    5753(result):     64(ptr) Variable Function
-     5834(param):     64(ptr) Variable Function
-                              Store 5753(result) 121
-            5754:  7(f16vec4) FunctionCall 9(testTexture()
-            5755:  7(f16vec4) Load 5753(result)
-            5756:  7(f16vec4) FAdd 5755 5754
-                              Store 5753(result) 5756
-            5757:  7(f16vec4) FunctionCall 11(testTextureProj()
-            5758:  7(f16vec4) Load 5753(result)
-            5759:  7(f16vec4) FAdd 5758 5757
-                              Store 5753(result) 5759
-            5760:  7(f16vec4) FunctionCall 13(testTextureLod()
-            5761:  7(f16vec4) Load 5753(result)
-            5762:  7(f16vec4) FAdd 5761 5760
-                              Store 5753(result) 5762
-            5763:  7(f16vec4) FunctionCall 15(testTextureOffset()
-            5764:  7(f16vec4) Load 5753(result)
-            5765:  7(f16vec4) FAdd 5764 5763
-                              Store 5753(result) 5765
-            5766:  7(f16vec4) FunctionCall 19(testTextureLodOffset()
-            5767:  7(f16vec4) Load 5753(result)
-            5768:  7(f16vec4) FAdd 5767 5766
-                              Store 5753(result) 5768
-            5769:  7(f16vec4) FunctionCall 21(testTextureProjLodOffset()
-            5770:  7(f16vec4) Load 5753(result)
-            5771:  7(f16vec4) FAdd 5770 5769
-                              Store 5753(result) 5771
-            5772:  7(f16vec4) FunctionCall 23(testTexelFetch()
-            5773:  7(f16vec4) Load 5753(result)
-            5774:  7(f16vec4) FAdd 5773 5772
-                              Store 5753(result) 5774
-            5775:  7(f16vec4) FunctionCall 25(testTexelFetchOffset()
-            5776:  7(f16vec4) Load 5753(result)
-            5777:  7(f16vec4) FAdd 5776 5775
-                              Store 5753(result) 5777
-            5778:  7(f16vec4) FunctionCall 27(testTextureGrad()
-            5779:  7(f16vec4) Load 5753(result)
-            5780:  7(f16vec4) FAdd 5779 5778
-                              Store 5753(result) 5780
-            5781:  7(f16vec4) FunctionCall 29(testTextureGradOffset()
-            5782:  7(f16vec4) Load 5753(result)
-            5783:  7(f16vec4) FAdd 5782 5781
-                              Store 5753(result) 5783
-            5784:  7(f16vec4) FunctionCall 31(testTextureProjGrad()
-            5785:  7(f16vec4) Load 5753(result)
-            5786:  7(f16vec4) FAdd 5785 5784
-                              Store 5753(result) 5786
-            5787:  7(f16vec4) FunctionCall 33(testTextureProjGradoffset()
-            5788:  7(f16vec4) Load 5753(result)
-            5789:  7(f16vec4) FAdd 5788 5787
-                              Store 5753(result) 5789
-            5790:  7(f16vec4) FunctionCall 35(testTextureGather()
-            5791:  7(f16vec4) Load 5753(result)
-            5792:  7(f16vec4) FAdd 5791 5790
-                              Store 5753(result) 5792
-            5793:  7(f16vec4) FunctionCall 37(testTextureGatherOffset()
-            5794:  7(f16vec4) Load 5753(result)
-            5795:  7(f16vec4) FAdd 5794 5793
-                              Store 5753(result) 5795
-            5796:  7(f16vec4) FunctionCall 39(testTextureGatherOffsets()
-            5797:  7(f16vec4) Load 5753(result)
-            5798:  7(f16vec4) FAdd 5797 5796
-                              Store 5753(result) 5798
-            5799:  7(f16vec4) FunctionCall 41(testTextureGatherLod()
-            5800:  7(f16vec4) Load 5753(result)
-            5801:  7(f16vec4) FAdd 5800 5799
-                              Store 5753(result) 5801
-            5802:  7(f16vec4) FunctionCall 43(testTextureGatherLodOffset()
-            5803:  7(f16vec4) Load 5753(result)
-            5804:  7(f16vec4) FAdd 5803 5802
-                              Store 5753(result) 5804
-            5805:  7(f16vec4) FunctionCall 45(testTextureGatherLodOffsets()
-            5806:  7(f16vec4) Load 5753(result)
-            5807:  7(f16vec4) FAdd 5806 5805
-                              Store 5753(result) 5807
-            5808:   48(ivec4) FunctionCall 50(testTextureSize()
-            5809:  7(f16vec4) ConvertSToF 5808
-            5810:  7(f16vec4) Load 5753(result)
+    5763(result):     64(ptr) Variable Function
+     5844(param):     64(ptr) Variable Function
+                              Store 5763(result) 121
+            5764:  7(f16vec4) FunctionCall 9(testTexture()
+            5765:  7(f16vec4) Load 5763(result)
+            5766:  7(f16vec4) FAdd 5765 5764
+                              Store 5763(result) 5766
+            5767:  7(f16vec4) FunctionCall 11(testTextureProj()
+            5768:  7(f16vec4) Load 5763(result)
+            5769:  7(f16vec4) FAdd 5768 5767
+                              Store 5763(result) 5769
+            5770:  7(f16vec4) FunctionCall 13(testTextureLod()
+            5771:  7(f16vec4) Load 5763(result)
+            5772:  7(f16vec4) FAdd 5771 5770
+                              Store 5763(result) 5772
+            5773:  7(f16vec4) FunctionCall 15(testTextureOffset()
+            5774:  7(f16vec4) Load 5763(result)
+            5775:  7(f16vec4) FAdd 5774 5773
+                              Store 5763(result) 5775
+            5776:  7(f16vec4) FunctionCall 19(testTextureLodOffset()
+            5777:  7(f16vec4) Load 5763(result)
+            5778:  7(f16vec4) FAdd 5777 5776
+                              Store 5763(result) 5778
+            5779:  7(f16vec4) FunctionCall 21(testTextureProjLodOffset()
+            5780:  7(f16vec4) Load 5763(result)
+            5781:  7(f16vec4) FAdd 5780 5779
+                              Store 5763(result) 5781
+            5782:  7(f16vec4) FunctionCall 23(testTexelFetch()
+            5783:  7(f16vec4) Load 5763(result)
+            5784:  7(f16vec4) FAdd 5783 5782
+                              Store 5763(result) 5784
+            5785:  7(f16vec4) FunctionCall 25(testTexelFetchOffset()
+            5786:  7(f16vec4) Load 5763(result)
+            5787:  7(f16vec4) FAdd 5786 5785
+                              Store 5763(result) 5787
+            5788:  7(f16vec4) FunctionCall 27(testTextureGrad()
+            5789:  7(f16vec4) Load 5763(result)
+            5790:  7(f16vec4) FAdd 5789 5788
+                              Store 5763(result) 5790
+            5791:  7(f16vec4) FunctionCall 29(testTextureGradOffset()
+            5792:  7(f16vec4) Load 5763(result)
+            5793:  7(f16vec4) FAdd 5792 5791
+                              Store 5763(result) 5793
+            5794:  7(f16vec4) FunctionCall 31(testTextureProjGrad()
+            5795:  7(f16vec4) Load 5763(result)
+            5796:  7(f16vec4) FAdd 5795 5794
+                              Store 5763(result) 5796
+            5797:  7(f16vec4) FunctionCall 33(testTextureProjGradoffset()
+            5798:  7(f16vec4) Load 5763(result)
+            5799:  7(f16vec4) FAdd 5798 5797
+                              Store 5763(result) 5799
+            5800:  7(f16vec4) FunctionCall 35(testTextureGather()
+            5801:  7(f16vec4) Load 5763(result)
+            5802:  7(f16vec4) FAdd 5801 5800
+                              Store 5763(result) 5802
+            5803:  7(f16vec4) FunctionCall 37(testTextureGatherOffset()
+            5804:  7(f16vec4) Load 5763(result)
+            5805:  7(f16vec4) FAdd 5804 5803
+                              Store 5763(result) 5805
+            5806:  7(f16vec4) FunctionCall 39(testTextureGatherOffsets()
+            5807:  7(f16vec4) Load 5763(result)
+            5808:  7(f16vec4) FAdd 5807 5806
+                              Store 5763(result) 5808
+            5809:  7(f16vec4) FunctionCall 41(testTextureGatherLod()
+            5810:  7(f16vec4) Load 5763(result)
             5811:  7(f16vec4) FAdd 5810 5809
-                              Store 5753(result) 5811
-            5812:   53(fvec2) FunctionCall 55(testTextureQueryLod()
-            5813:154(f16vec2) FConvert 5812
-            5814:  7(f16vec4) Load 5753(result)
-            5815:154(f16vec2) VectorShuffle 5814 5814 0 1
-            5816:154(f16vec2) FAdd 5815 5813
-            5817:  7(f16vec4) Load 5753(result)
-            5818:  7(f16vec4) VectorShuffle 5817 5816 4 5 2 3
-                              Store 5753(result) 5818
-            5819:     47(int) FunctionCall 58(testTextureQueryLevels()
-            5820:6(float16_t) ConvertSToF 5819
-            5821:    208(ptr) AccessChain 5753(result) 207
-            5822:6(float16_t) Load 5821
-            5823:6(float16_t) FAdd 5822 5820
-            5824:    208(ptr) AccessChain 5753(result) 207
-                              Store 5824 5823
-            5825:     47(int) FunctionCall 60(testTextureSamples()
-            5826:6(float16_t) ConvertSToF 5825
-            5827:    208(ptr) AccessChain 5753(result) 207
-            5828:6(float16_t) Load 5827
-            5829:6(float16_t) FAdd 5828 5826
-            5830:    208(ptr) AccessChain 5753(result) 207
-                              Store 5830 5829
-            5831:  7(f16vec4) FunctionCall 62(testImageLoad()
-            5832:  7(f16vec4) Load 5753(result)
-            5833:  7(f16vec4) FAdd 5832 5831
-                              Store 5753(result) 5833
-            5835:  7(f16vec4) Load 5753(result)
-                              Store 5834(param) 5835
-            5836:           2 FunctionCall 67(testImageStore(vf164;) 5834(param)
-            5837:  7(f16vec4) FunctionCall 69(testSparseTexture()
-            5838:  7(f16vec4) Load 5753(result)
-            5839:  7(f16vec4) FAdd 5838 5837
-                              Store 5753(result) 5839
-            5840:  7(f16vec4) FunctionCall 71(testSparseTextureLod()
-            5841:  7(f16vec4) Load 5753(result)
-            5842:  7(f16vec4) FAdd 5841 5840
-                              Store 5753(result) 5842
-            5843:  7(f16vec4) FunctionCall 73(testSparseTextureOffset()
-            5844:  7(f16vec4) Load 5753(result)
-            5845:  7(f16vec4) FAdd 5844 5843
-                              Store 5753(result) 5845
-            5846:  7(f16vec4) FunctionCall 75(testSparseTextureLodOffset()
-            5847:  7(f16vec4) Load 5753(result)
-            5848:  7(f16vec4) FAdd 5847 5846
-                              Store 5753(result) 5848
-            5849:  7(f16vec4) FunctionCall 77(testSparseTextureGrad()
-            5850:  7(f16vec4) Load 5753(result)
-            5851:  7(f16vec4) FAdd 5850 5849
-                              Store 5753(result) 5851
-            5852:  7(f16vec4) FunctionCall 79(testSparseTextureGradOffset()
-            5853:  7(f16vec4) Load 5753(result)
-            5854:  7(f16vec4) FAdd 5853 5852
-                              Store 5753(result) 5854
-            5855:  7(f16vec4) FunctionCall 81(testSparseTexelFetch()
-            5856:  7(f16vec4) Load 5753(result)
-            5857:  7(f16vec4) FAdd 5856 5855
-                              Store 5753(result) 5857
-            5858:  7(f16vec4) FunctionCall 83(testSparseTexelFetchOffset()
-            5859:  7(f16vec4) Load 5753(result)
-            5860:  7(f16vec4) FAdd 5859 5858
-                              Store 5753(result) 5860
-            5861:  7(f16vec4) FunctionCall 85(testSparseTextureGather()
-            5862:  7(f16vec4) Load 5753(result)
-            5863:  7(f16vec4) FAdd 5862 5861
-                              Store 5753(result) 5863
-            5864:  7(f16vec4) FunctionCall 87(testSparseTextureGatherOffset()
-            5865:  7(f16vec4) Load 5753(result)
-            5866:  7(f16vec4) FAdd 5865 5864
-                              Store 5753(result) 5866
-            5867:  7(f16vec4) FunctionCall 89(testSparseTextureGatherOffsets()
-            5868:  7(f16vec4) Load 5753(result)
-            5869:  7(f16vec4) FAdd 5868 5867
-                              Store 5753(result) 5869
-            5870:  7(f16vec4) FunctionCall 91(testSparseTextureGatherLod()
-            5871:  7(f16vec4) Load 5753(result)
-            5872:  7(f16vec4) FAdd 5871 5870
-                              Store 5753(result) 5872
-            5873:  7(f16vec4) FunctionCall 93(testSparseTextureGatherLodOffset()
-            5874:  7(f16vec4) Load 5753(result)
-            5875:  7(f16vec4) FAdd 5874 5873
-                              Store 5753(result) 5875
-            5876:  7(f16vec4) FunctionCall 95(testSparseTextureGatherLodOffsets()
-            5877:  7(f16vec4) Load 5753(result)
-            5878:  7(f16vec4) FAdd 5877 5876
-                              Store 5753(result) 5878
-            5879:  7(f16vec4) FunctionCall 97(testSparseImageLoad()
-            5880:  7(f16vec4) Load 5753(result)
-            5881:  7(f16vec4) FAdd 5880 5879
-                              Store 5753(result) 5881
-            5882:  7(f16vec4) FunctionCall 99(testSparseTextureClamp()
-            5883:  7(f16vec4) Load 5753(result)
-            5884:  7(f16vec4) FAdd 5883 5882
-                              Store 5753(result) 5884
-            5885:  7(f16vec4) FunctionCall 101(testTextureClamp()
-            5886:  7(f16vec4) Load 5753(result)
-            5887:  7(f16vec4) FAdd 5886 5885
-                              Store 5753(result) 5887
-            5888:  7(f16vec4) FunctionCall 103(testSparseTextureOffsetClamp()
-            5889:  7(f16vec4) Load 5753(result)
-            5890:  7(f16vec4) FAdd 5889 5888
-                              Store 5753(result) 5890
-            5891:  7(f16vec4) FunctionCall 105(testTextureOffsetClamp()
-            5892:  7(f16vec4) Load 5753(result)
-            5893:  7(f16vec4) FAdd 5892 5891
-                              Store 5753(result) 5893
-            5894:  7(f16vec4) FunctionCall 77(testSparseTextureGrad()
-            5895:  7(f16vec4) Load 5753(result)
-            5896:  7(f16vec4) FAdd 5895 5894
-                              Store 5753(result) 5896
-            5897:  7(f16vec4) FunctionCall 27(testTextureGrad()
-            5898:  7(f16vec4) Load 5753(result)
-            5899:  7(f16vec4) FAdd 5898 5897
-                              Store 5753(result) 5899
-            5900:  7(f16vec4) FunctionCall 111(testSparseTextureGradOffsetClamp()
-            5901:  7(f16vec4) Load 5753(result)
-            5902:  7(f16vec4) FAdd 5901 5900
-                              Store 5753(result) 5902
-            5903:  7(f16vec4) FunctionCall 113(testTextureGradOffsetClamp()
-            5904:  7(f16vec4) Load 5753(result)
-            5905:  7(f16vec4) FAdd 5904 5903
-                              Store 5753(result) 5905
-            5906:  7(f16vec4) FunctionCall 115(testCombinedTextureSampler()
-            5907:  7(f16vec4) Load 5753(result)
-            5908:  7(f16vec4) FAdd 5907 5906
-                              Store 5753(result) 5908
-            5909:  7(f16vec4) FunctionCall 117(testSubpassLoad()
-            5910:  7(f16vec4) Load 5753(result)
-            5911:  7(f16vec4) FAdd 5910 5909
-                              Store 5753(result) 5911
-            5914:  7(f16vec4) Load 5753(result)
-            5915:  249(fvec4) FConvert 5914
-                              Store 5913(fragColor) 5915
+                              Store 5763(result) 5811
+            5812:  7(f16vec4) FunctionCall 43(testTextureGatherLodOffset()
+            5813:  7(f16vec4) Load 5763(result)
+            5814:  7(f16vec4) FAdd 5813 5812
+                              Store 5763(result) 5814
+            5815:  7(f16vec4) FunctionCall 45(testTextureGatherLodOffsets()
+            5816:  7(f16vec4) Load 5763(result)
+            5817:  7(f16vec4) FAdd 5816 5815
+                              Store 5763(result) 5817
+            5818:   48(ivec4) FunctionCall 50(testTextureSize()
+            5819:  7(f16vec4) ConvertSToF 5818
+            5820:  7(f16vec4) Load 5763(result)
+            5821:  7(f16vec4) FAdd 5820 5819
+                              Store 5763(result) 5821
+            5822:   53(fvec2) FunctionCall 55(testTextureQueryLod()
+            5823:154(f16vec2) FConvert 5822
+            5824:  7(f16vec4) Load 5763(result)
+            5825:154(f16vec2) VectorShuffle 5824 5824 0 1
+            5826:154(f16vec2) FAdd 5825 5823
+            5827:  7(f16vec4) Load 5763(result)
+            5828:  7(f16vec4) VectorShuffle 5827 5826 4 5 2 3
+                              Store 5763(result) 5828
+            5829:     47(int) FunctionCall 58(testTextureQueryLevels()
+            5830:6(float16_t) ConvertSToF 5829
+            5831:    208(ptr) AccessChain 5763(result) 207
+            5832:6(float16_t) Load 5831
+            5833:6(float16_t) FAdd 5832 5830
+            5834:    208(ptr) AccessChain 5763(result) 207
+                              Store 5834 5833
+            5835:     47(int) FunctionCall 60(testTextureSamples()
+            5836:6(float16_t) ConvertSToF 5835
+            5837:    208(ptr) AccessChain 5763(result) 207
+            5838:6(float16_t) Load 5837
+            5839:6(float16_t) FAdd 5838 5836
+            5840:    208(ptr) AccessChain 5763(result) 207
+                              Store 5840 5839
+            5841:  7(f16vec4) FunctionCall 62(testImageLoad()
+            5842:  7(f16vec4) Load 5763(result)
+            5843:  7(f16vec4) FAdd 5842 5841
+                              Store 5763(result) 5843
+            5845:  7(f16vec4) Load 5763(result)
+                              Store 5844(param) 5845
+            5846:           2 FunctionCall 67(testImageStore(vf164;) 5844(param)
+            5847:  7(f16vec4) FunctionCall 69(testSparseTexture()
+            5848:  7(f16vec4) Load 5763(result)
+            5849:  7(f16vec4) FAdd 5848 5847
+                              Store 5763(result) 5849
+            5850:  7(f16vec4) FunctionCall 71(testSparseTextureLod()
+            5851:  7(f16vec4) Load 5763(result)
+            5852:  7(f16vec4) FAdd 5851 5850
+                              Store 5763(result) 5852
+            5853:  7(f16vec4) FunctionCall 73(testSparseTextureOffset()
+            5854:  7(f16vec4) Load 5763(result)
+            5855:  7(f16vec4) FAdd 5854 5853
+                              Store 5763(result) 5855
+            5856:  7(f16vec4) FunctionCall 75(testSparseTextureLodOffset()
+            5857:  7(f16vec4) Load 5763(result)
+            5858:  7(f16vec4) FAdd 5857 5856
+                              Store 5763(result) 5858
+            5859:  7(f16vec4) FunctionCall 77(testSparseTextureGrad()
+            5860:  7(f16vec4) Load 5763(result)
+            5861:  7(f16vec4) FAdd 5860 5859
+                              Store 5763(result) 5861
+            5862:  7(f16vec4) FunctionCall 79(testSparseTextureGradOffset()
+            5863:  7(f16vec4) Load 5763(result)
+            5864:  7(f16vec4) FAdd 5863 5862
+                              Store 5763(result) 5864
+            5865:  7(f16vec4) FunctionCall 81(testSparseTexelFetch()
+            5866:  7(f16vec4) Load 5763(result)
+            5867:  7(f16vec4) FAdd 5866 5865
+                              Store 5763(result) 5867
+            5868:  7(f16vec4) FunctionCall 83(testSparseTexelFetchOffset()
+            5869:  7(f16vec4) Load 5763(result)
+            5870:  7(f16vec4) FAdd 5869 5868
+                              Store 5763(result) 5870
+            5871:  7(f16vec4) FunctionCall 85(testSparseTextureGather()
+            5872:  7(f16vec4) Load 5763(result)
+            5873:  7(f16vec4) FAdd 5872 5871
+                              Store 5763(result) 5873
+            5874:  7(f16vec4) FunctionCall 87(testSparseTextureGatherOffset()
+            5875:  7(f16vec4) Load 5763(result)
+            5876:  7(f16vec4) FAdd 5875 5874
+                              Store 5763(result) 5876
+            5877:  7(f16vec4) FunctionCall 89(testSparseTextureGatherOffsets()
+            5878:  7(f16vec4) Load 5763(result)
+            5879:  7(f16vec4) FAdd 5878 5877
+                              Store 5763(result) 5879
+            5880:  7(f16vec4) FunctionCall 91(testSparseTextureGatherLod()
+            5881:  7(f16vec4) Load 5763(result)
+            5882:  7(f16vec4) FAdd 5881 5880
+                              Store 5763(result) 5882
+            5883:  7(f16vec4) FunctionCall 93(testSparseTextureGatherLodOffset()
+            5884:  7(f16vec4) Load 5763(result)
+            5885:  7(f16vec4) FAdd 5884 5883
+                              Store 5763(result) 5885
+            5886:  7(f16vec4) FunctionCall 95(testSparseTextureGatherLodOffsets()
+            5887:  7(f16vec4) Load 5763(result)
+            5888:  7(f16vec4) FAdd 5887 5886
+                              Store 5763(result) 5888
+            5889:  7(f16vec4) FunctionCall 97(testSparseImageLoad()
+            5890:  7(f16vec4) Load 5763(result)
+            5891:  7(f16vec4) FAdd 5890 5889
+                              Store 5763(result) 5891
+            5892:  7(f16vec4) FunctionCall 99(testSparseTextureClamp()
+            5893:  7(f16vec4) Load 5763(result)
+            5894:  7(f16vec4) FAdd 5893 5892
+                              Store 5763(result) 5894
+            5895:  7(f16vec4) FunctionCall 101(testTextureClamp()
+            5896:  7(f16vec4) Load 5763(result)
+            5897:  7(f16vec4) FAdd 5896 5895
+                              Store 5763(result) 5897
+            5898:  7(f16vec4) FunctionCall 103(testSparseTextureOffsetClamp()
+            5899:  7(f16vec4) Load 5763(result)
+            5900:  7(f16vec4) FAdd 5899 5898
+                              Store 5763(result) 5900
+            5901:  7(f16vec4) FunctionCall 105(testTextureOffsetClamp()
+            5902:  7(f16vec4) Load 5763(result)
+            5903:  7(f16vec4) FAdd 5902 5901
+                              Store 5763(result) 5903
+            5904:  7(f16vec4) FunctionCall 77(testSparseTextureGrad()
+            5905:  7(f16vec4) Load 5763(result)
+            5906:  7(f16vec4) FAdd 5905 5904
+                              Store 5763(result) 5906
+            5907:  7(f16vec4) FunctionCall 27(testTextureGrad()
+            5908:  7(f16vec4) Load 5763(result)
+            5909:  7(f16vec4) FAdd 5908 5907
+                              Store 5763(result) 5909
+            5910:  7(f16vec4) FunctionCall 111(testSparseTextureGradOffsetClamp()
+            5911:  7(f16vec4) Load 5763(result)
+            5912:  7(f16vec4) FAdd 5911 5910
+                              Store 5763(result) 5912
+            5913:  7(f16vec4) FunctionCall 113(testTextureGradOffsetClamp()
+            5914:  7(f16vec4) Load 5763(result)
+            5915:  7(f16vec4) FAdd 5914 5913
+                              Store 5763(result) 5915
+            5916:  7(f16vec4) FunctionCall 115(testCombinedTextureSampler()
+            5917:  7(f16vec4) Load 5763(result)
+            5918:  7(f16vec4) FAdd 5917 5916
+                              Store 5763(result) 5918
+            5919:  7(f16vec4) FunctionCall 117(testSubpassLoad()
+            5920:  7(f16vec4) Load 5763(result)
+            5921:  7(f16vec4) FAdd 5920 5919
+                              Store 5763(result) 5921
+            5924:  7(f16vec4) Load 5763(result)
+            5925:  249(fvec4) FConvert 5924
+                              Store 5923(fragColor) 5925
                               Return
                               FunctionEnd
  9(testTexture():  7(f16vec4) Function None 8
@@ -5123,1949 +5133,1949 @@
                               Store 4022(texel) 121
             4023:         143 Load 145(s2D)
             4024:   53(fvec2) Load 148(c2)
-            4025:3102(ResType) ImageSparseGather 4023 4024 2187 ConstOffsets 2380
-            4026:  7(f16vec4) CompositeExtract 4025 1
-                              Store 4022(texel) 4026
-            4027:     47(int) CompositeExtract 4025 0
-            4028:         143 Load 145(s2D)
-            4029:154(f16vec2) Load 156(f16c2)
-            4030:6(float16_t) Load 137(f16bias)
-            4031:3102(ResType) ImageSparseGather 4028 4029 2187 Bias ConstOffsets 4030 2380
-            4032:  7(f16vec4) CompositeExtract 4031 1
-                              Store 4022(texel) 4032
-            4033:     47(int) CompositeExtract 4031 0
-            4034:         284 Load 286(s2DArray)
-            4035:  167(fvec3) Load 169(c3)
-            4036:3102(ResType) ImageSparseGather 4034 4035 2187 ConstOffsets 2380
-            4037:  7(f16vec4) CompositeExtract 4036 1
-                              Store 4022(texel) 4037
-            4038:     47(int) CompositeExtract 4036 0
-            4039:         284 Load 286(s2DArray)
-            4040:175(f16vec3) Load 177(f16c3)
-            4041:6(float16_t) Load 137(f16bias)
-            4042:3102(ResType) ImageSparseGather 4039 4040 2187 Bias ConstOffsets 4041 2380
-            4043:  7(f16vec4) CompositeExtract 4042 1
-                              Store 4022(texel) 4043
-            4044:     47(int) CompositeExtract 4042 0
-            4045:         357 Load 359(s2DRect)
-            4046:   53(fvec2) Load 148(c2)
-            4047:3102(ResType) ImageSparseGather 4045 4046 2187 ConstOffsets 2380
-            4048:  7(f16vec4) CompositeExtract 4047 1
-                              Store 4022(texel) 4048
-            4049:     47(int) CompositeExtract 4047 0
-            4050:         357 Load 359(s2DRect)
-            4051:154(f16vec2) Load 156(f16c2)
-            4052:3102(ResType) ImageSparseGather 4050 4051 2187 ConstOffsets 2380
+            4035:3102(ResType) ImageSparseGather 4023 4024 2187 ConstOffsets 4034
+            4036:  7(f16vec4) CompositeExtract 4035 1
+                              Store 4022(texel) 4036
+            4037:     47(int) CompositeExtract 4035 0
+            4038:         143 Load 145(s2D)
+            4039:154(f16vec2) Load 156(f16c2)
+            4040:6(float16_t) Load 137(f16bias)
+            4041:3102(ResType) ImageSparseGather 4038 4039 2187 Bias ConstOffsets 4040 4034
+            4042:  7(f16vec4) CompositeExtract 4041 1
+                              Store 4022(texel) 4042
+            4043:     47(int) CompositeExtract 4041 0
+            4044:         284 Load 286(s2DArray)
+            4045:  167(fvec3) Load 169(c3)
+            4046:3102(ResType) ImageSparseGather 4044 4045 2187 ConstOffsets 4034
+            4047:  7(f16vec4) CompositeExtract 4046 1
+                              Store 4022(texel) 4047
+            4048:     47(int) CompositeExtract 4046 0
+            4049:         284 Load 286(s2DArray)
+            4050:175(f16vec3) Load 177(f16c3)
+            4051:6(float16_t) Load 137(f16bias)
+            4052:3102(ResType) ImageSparseGather 4049 4050 2187 Bias ConstOffsets 4051 4034
             4053:  7(f16vec4) CompositeExtract 4052 1
                               Store 4022(texel) 4053
             4054:     47(int) CompositeExtract 4052 0
-            4055:         224 Load 226(s2DShadow)
+            4055:         357 Load 359(s2DRect)
             4056:   53(fvec2) Load 148(c2)
-            4057:   52(float) Load 215(compare)
-            4058:3102(ResType) ImageSparseDrefGather 4055 4056 4057 ConstOffsets 2380
-            4059:  7(f16vec4) CompositeExtract 4058 1
-                              Store 4022(texel) 4059
-            4060:     47(int) CompositeExtract 4058 0
-            4061:         224 Load 226(s2DShadow)
-            4062:154(f16vec2) Load 156(f16c2)
-            4063:   52(float) Load 215(compare)
-            4064:3102(ResType) ImageSparseDrefGather 4061 4062 4063 ConstOffsets 2380
-            4065:  7(f16vec4) CompositeExtract 4064 1
-                              Store 4022(texel) 4065
-            4066:     47(int) CompositeExtract 4064 0
-            4067:         337 Load 339(s2DArrayShadow)
-            4068:  167(fvec3) Load 169(c3)
-            4069:   52(float) Load 215(compare)
-            4070:3102(ResType) ImageSparseDrefGather 4067 4068 4069 ConstOffsets 2380
-            4071:  7(f16vec4) CompositeExtract 4070 1
-                              Store 4022(texel) 4071
-            4072:     47(int) CompositeExtract 4070 0
-            4073:         337 Load 339(s2DArrayShadow)
-            4074:175(f16vec3) Load 177(f16c3)
-            4075:   52(float) Load 215(compare)
-            4076:3102(ResType) ImageSparseDrefGather 4073 4074 4075 ConstOffsets 2380
-            4077:  7(f16vec4) CompositeExtract 4076 1
-                              Store 4022(texel) 4077
-            4078:     47(int) CompositeExtract 4076 0
-            4079:         371 Load 373(s2DRectShadow)
-            4080:   53(fvec2) Load 148(c2)
-            4081:   52(float) Load 215(compare)
-            4082:3102(ResType) ImageSparseDrefGather 4079 4080 4081 ConstOffsets 2380
-            4083:  7(f16vec4) CompositeExtract 4082 1
-                              Store 4022(texel) 4083
-            4084:     47(int) CompositeExtract 4082 0
-            4085:         371 Load 373(s2DRectShadow)
-            4086:154(f16vec2) Load 156(f16c2)
-            4087:   52(float) Load 215(compare)
-            4088:3102(ResType) ImageSparseDrefGather 4085 4086 4087 ConstOffsets 2380
-            4089:  7(f16vec4) CompositeExtract 4088 1
-                              Store 4022(texel) 4089
-            4090:     47(int) CompositeExtract 4088 0
-            4091:  7(f16vec4) Load 4022(texel)
-                              ReturnValue 4091
+            4057:3102(ResType) ImageSparseGather 4055 4056 2187 ConstOffsets 4034
+            4058:  7(f16vec4) CompositeExtract 4057 1
+                              Store 4022(texel) 4058
+            4059:     47(int) CompositeExtract 4057 0
+            4060:         357 Load 359(s2DRect)
+            4061:154(f16vec2) Load 156(f16c2)
+            4062:3102(ResType) ImageSparseGather 4060 4061 2187 ConstOffsets 4034
+            4063:  7(f16vec4) CompositeExtract 4062 1
+                              Store 4022(texel) 4063
+            4064:     47(int) CompositeExtract 4062 0
+            4065:         224 Load 226(s2DShadow)
+            4066:   53(fvec2) Load 148(c2)
+            4067:   52(float) Load 215(compare)
+            4068:3102(ResType) ImageSparseDrefGather 4065 4066 4067 ConstOffsets 4034
+            4069:  7(f16vec4) CompositeExtract 4068 1
+                              Store 4022(texel) 4069
+            4070:     47(int) CompositeExtract 4068 0
+            4071:         224 Load 226(s2DShadow)
+            4072:154(f16vec2) Load 156(f16c2)
+            4073:   52(float) Load 215(compare)
+            4074:3102(ResType) ImageSparseDrefGather 4071 4072 4073 ConstOffsets 4034
+            4075:  7(f16vec4) CompositeExtract 4074 1
+                              Store 4022(texel) 4075
+            4076:     47(int) CompositeExtract 4074 0
+            4077:         337 Load 339(s2DArrayShadow)
+            4078:  167(fvec3) Load 169(c3)
+            4079:   52(float) Load 215(compare)
+            4080:3102(ResType) ImageSparseDrefGather 4077 4078 4079 ConstOffsets 4034
+            4081:  7(f16vec4) CompositeExtract 4080 1
+                              Store 4022(texel) 4081
+            4082:     47(int) CompositeExtract 4080 0
+            4083:         337 Load 339(s2DArrayShadow)
+            4084:175(f16vec3) Load 177(f16c3)
+            4085:   52(float) Load 215(compare)
+            4086:3102(ResType) ImageSparseDrefGather 4083 4084 4085 ConstOffsets 4034
+            4087:  7(f16vec4) CompositeExtract 4086 1
+                              Store 4022(texel) 4087
+            4088:     47(int) CompositeExtract 4086 0
+            4089:         371 Load 373(s2DRectShadow)
+            4090:   53(fvec2) Load 148(c2)
+            4091:   52(float) Load 215(compare)
+            4092:3102(ResType) ImageSparseDrefGather 4089 4090 4091 ConstOffsets 4034
+            4093:  7(f16vec4) CompositeExtract 4092 1
+                              Store 4022(texel) 4093
+            4094:     47(int) CompositeExtract 4092 0
+            4095:         371 Load 373(s2DRectShadow)
+            4096:154(f16vec2) Load 156(f16c2)
+            4097:   52(float) Load 215(compare)
+            4098:3102(ResType) ImageSparseDrefGather 4095 4096 4097 ConstOffsets 4034
+            4099:  7(f16vec4) CompositeExtract 4098 1
+                              Store 4022(texel) 4099
+            4100:     47(int) CompositeExtract 4098 0
+            4101:  7(f16vec4) Load 4022(texel)
+                              ReturnValue 4101
                               FunctionEnd
 91(testSparseTextureGatherLod():  7(f16vec4) Function None 8
               92:             Label
-     4094(texel):     64(ptr) Variable Function
-                              Store 4094(texel) 121
-            4095:         143 Load 145(s2D)
-            4096:   53(fvec2) Load 148(c2)
-            4097:   52(float) Load 565(lod)
-            4098:3102(ResType) ImageSparseGather 4095 4096 2187 Lod 4097
-            4099:  7(f16vec4) CompositeExtract 4098 1
-                              Store 4094(texel) 4099
-            4100:     47(int) CompositeExtract 4098 0
-            4101:         143 Load 145(s2D)
-            4102:154(f16vec2) Load 156(f16c2)
-            4103:6(float16_t) Load 572(f16lod)
-            4104:3102(ResType) ImageSparseGather 4101 4102 2187 Lod 4103
-            4105:  7(f16vec4) CompositeExtract 4104 1
-                              Store 4094(texel) 4105
-            4106:     47(int) CompositeExtract 4104 0
-            4107:         284 Load 286(s2DArray)
-            4108:  167(fvec3) Load 169(c3)
-            4109:   52(float) Load 565(lod)
-            4110:3102(ResType) ImageSparseGather 4107 4108 2187 Lod 4109
-            4111:  7(f16vec4) CompositeExtract 4110 1
-                              Store 4094(texel) 4111
-            4112:     47(int) CompositeExtract 4110 0
-            4113:         284 Load 286(s2DArray)
-            4114:175(f16vec3) Load 177(f16c3)
-            4115:6(float16_t) Load 572(f16lod)
-            4116:3102(ResType) ImageSparseGather 4113 4114 2187 Lod 4115
-            4117:  7(f16vec4) CompositeExtract 4116 1
-                              Store 4094(texel) 4117
-            4118:     47(int) CompositeExtract 4116 0
-            4119:         184 Load 186(sCube)
-            4120:  167(fvec3) Load 169(c3)
-            4121:   52(float) Load 565(lod)
-            4122:3102(ResType) ImageSparseGather 4119 4120 2187 Lod 4121
-            4123:  7(f16vec4) CompositeExtract 4122 1
-                              Store 4094(texel) 4123
-            4124:     47(int) CompositeExtract 4122 0
-            4125:         184 Load 186(sCube)
-            4126:175(f16vec3) Load 177(f16c3)
-            4127:6(float16_t) Load 572(f16lod)
-            4128:3102(ResType) ImageSparseGather 4125 4126 2187 Lod 4127
-            4129:  7(f16vec4) CompositeExtract 4128 1
-                              Store 4094(texel) 4129
-            4130:     47(int) CompositeExtract 4128 0
-            4131:         299 Load 301(sCubeArray)
-            4132:  249(fvec4) Load 251(c4)
-            4133:   52(float) Load 565(lod)
-            4134:3102(ResType) ImageSparseGather 4131 4132 2187 Lod 4133
-            4135:  7(f16vec4) CompositeExtract 4134 1
-                              Store 4094(texel) 4135
-            4136:     47(int) CompositeExtract 4134 0
-            4137:         299 Load 301(sCubeArray)
-            4138:  7(f16vec4) Load 309(f16c4)
-            4139:6(float16_t) Load 572(f16lod)
-            4140:3102(ResType) ImageSparseGather 4137 4138 2187 Lod 4139
-            4141:  7(f16vec4) CompositeExtract 4140 1
-                              Store 4094(texel) 4141
-            4142:     47(int) CompositeExtract 4140 0
-            4143:  7(f16vec4) Load 4094(texel)
-                              ReturnValue 4143
+     4104(texel):     64(ptr) Variable Function
+                              Store 4104(texel) 121
+            4105:         143 Load 145(s2D)
+            4106:   53(fvec2) Load 148(c2)
+            4107:   52(float) Load 565(lod)
+            4108:3102(ResType) ImageSparseGather 4105 4106 2187 Lod 4107
+            4109:  7(f16vec4) CompositeExtract 4108 1
+                              Store 4104(texel) 4109
+            4110:     47(int) CompositeExtract 4108 0
+            4111:         143 Load 145(s2D)
+            4112:154(f16vec2) Load 156(f16c2)
+            4113:6(float16_t) Load 572(f16lod)
+            4114:3102(ResType) ImageSparseGather 4111 4112 2187 Lod 4113
+            4115:  7(f16vec4) CompositeExtract 4114 1
+                              Store 4104(texel) 4115
+            4116:     47(int) CompositeExtract 4114 0
+            4117:         284 Load 286(s2DArray)
+            4118:  167(fvec3) Load 169(c3)
+            4119:   52(float) Load 565(lod)
+            4120:3102(ResType) ImageSparseGather 4117 4118 2187 Lod 4119
+            4121:  7(f16vec4) CompositeExtract 4120 1
+                              Store 4104(texel) 4121
+            4122:     47(int) CompositeExtract 4120 0
+            4123:         284 Load 286(s2DArray)
+            4124:175(f16vec3) Load 177(f16c3)
+            4125:6(float16_t) Load 572(f16lod)
+            4126:3102(ResType) ImageSparseGather 4123 4124 2187 Lod 4125
+            4127:  7(f16vec4) CompositeExtract 4126 1
+                              Store 4104(texel) 4127
+            4128:     47(int) CompositeExtract 4126 0
+            4129:         184 Load 186(sCube)
+            4130:  167(fvec3) Load 169(c3)
+            4131:   52(float) Load 565(lod)
+            4132:3102(ResType) ImageSparseGather 4129 4130 2187 Lod 4131
+            4133:  7(f16vec4) CompositeExtract 4132 1
+                              Store 4104(texel) 4133
+            4134:     47(int) CompositeExtract 4132 0
+            4135:         184 Load 186(sCube)
+            4136:175(f16vec3) Load 177(f16c3)
+            4137:6(float16_t) Load 572(f16lod)
+            4138:3102(ResType) ImageSparseGather 4135 4136 2187 Lod 4137
+            4139:  7(f16vec4) CompositeExtract 4138 1
+                              Store 4104(texel) 4139
+            4140:     47(int) CompositeExtract 4138 0
+            4141:         299 Load 301(sCubeArray)
+            4142:  249(fvec4) Load 251(c4)
+            4143:   52(float) Load 565(lod)
+            4144:3102(ResType) ImageSparseGather 4141 4142 2187 Lod 4143
+            4145:  7(f16vec4) CompositeExtract 4144 1
+                              Store 4104(texel) 4145
+            4146:     47(int) CompositeExtract 4144 0
+            4147:         299 Load 301(sCubeArray)
+            4148:  7(f16vec4) Load 309(f16c4)
+            4149:6(float16_t) Load 572(f16lod)
+            4150:3102(ResType) ImageSparseGather 4147 4148 2187 Lod 4149
+            4151:  7(f16vec4) CompositeExtract 4150 1
+                              Store 4104(texel) 4151
+            4152:     47(int) CompositeExtract 4150 0
+            4153:  7(f16vec4) Load 4104(texel)
+                              ReturnValue 4153
                               FunctionEnd
 93(testSparseTextureGatherLodOffset():  7(f16vec4) Function None 8
               94:             Label
-     4146(texel):     64(ptr) Variable Function
-                              Store 4146(texel) 121
-            4147:         143 Load 145(s2D)
-            4148:   53(fvec2) Load 148(c2)
-            4149:   52(float) Load 565(lod)
-            4150:3102(ResType) ImageSparseGather 4147 4148 2187 Lod ConstOffset 4149 722
-            4151:  7(f16vec4) CompositeExtract 4150 1
-                              Store 4146(texel) 4151
-            4152:     47(int) CompositeExtract 4150 0
-            4153:         143 Load 145(s2D)
-            4154:154(f16vec2) Load 156(f16c2)
-            4155:6(float16_t) Load 572(f16lod)
-            4156:3102(ResType) ImageSparseGather 4153 4154 2187 Lod ConstOffset 4155 722
-            4157:  7(f16vec4) CompositeExtract 4156 1
-                              Store 4146(texel) 4157
-            4158:     47(int) CompositeExtract 4156 0
-            4159:         284 Load 286(s2DArray)
-            4160:  167(fvec3) Load 169(c3)
-            4161:   52(float) Load 565(lod)
-            4162:3102(ResType) ImageSparseGather 4159 4160 2187 Lod ConstOffset 4161 722
-            4163:  7(f16vec4) CompositeExtract 4162 1
-                              Store 4146(texel) 4163
-            4164:     47(int) CompositeExtract 4162 0
-            4165:         284 Load 286(s2DArray)
-            4166:175(f16vec3) Load 177(f16c3)
-            4167:6(float16_t) Load 572(f16lod)
-            4168:3102(ResType) ImageSparseGather 4165 4166 2187 Lod ConstOffset 4167 722
-            4169:  7(f16vec4) CompositeExtract 4168 1
-                              Store 4146(texel) 4169
-            4170:     47(int) CompositeExtract 4168 0
-            4171:  7(f16vec4) Load 4146(texel)
-                              ReturnValue 4171
+     4156(texel):     64(ptr) Variable Function
+                              Store 4156(texel) 121
+            4157:         143 Load 145(s2D)
+            4158:   53(fvec2) Load 148(c2)
+            4159:   52(float) Load 565(lod)
+            4160:3102(ResType) ImageSparseGather 4157 4158 2187 Lod ConstOffset 4159 722
+            4161:  7(f16vec4) CompositeExtract 4160 1
+                              Store 4156(texel) 4161
+            4162:     47(int) CompositeExtract 4160 0
+            4163:         143 Load 145(s2D)
+            4164:154(f16vec2) Load 156(f16c2)
+            4165:6(float16_t) Load 572(f16lod)
+            4166:3102(ResType) ImageSparseGather 4163 4164 2187 Lod ConstOffset 4165 722
+            4167:  7(f16vec4) CompositeExtract 4166 1
+                              Store 4156(texel) 4167
+            4168:     47(int) CompositeExtract 4166 0
+            4169:         284 Load 286(s2DArray)
+            4170:  167(fvec3) Load 169(c3)
+            4171:   52(float) Load 565(lod)
+            4172:3102(ResType) ImageSparseGather 4169 4170 2187 Lod ConstOffset 4171 722
+            4173:  7(f16vec4) CompositeExtract 4172 1
+                              Store 4156(texel) 4173
+            4174:     47(int) CompositeExtract 4172 0
+            4175:         284 Load 286(s2DArray)
+            4176:175(f16vec3) Load 177(f16c3)
+            4177:6(float16_t) Load 572(f16lod)
+            4178:3102(ResType) ImageSparseGather 4175 4176 2187 Lod ConstOffset 4177 722
+            4179:  7(f16vec4) CompositeExtract 4178 1
+                              Store 4156(texel) 4179
+            4180:     47(int) CompositeExtract 4178 0
+            4181:  7(f16vec4) Load 4156(texel)
+                              ReturnValue 4181
                               FunctionEnd
 95(testSparseTextureGatherLodOffsets():  7(f16vec4) Function None 8
               96:             Label
-     4174(texel):     64(ptr) Variable Function
-                              Store 4174(texel) 121
-            4175:         143 Load 145(s2D)
-            4176:   53(fvec2) Load 148(c2)
-            4177:   52(float) Load 565(lod)
-            4178:3102(ResType) ImageSparseGather 4175 4176 2187 Lod ConstOffsets 4177 2380
-            4179:  7(f16vec4) CompositeExtract 4178 1
-                              Store 4174(texel) 4179
-            4180:     47(int) CompositeExtract 4178 0
-            4181:         143 Load 145(s2D)
-            4182:154(f16vec2) Load 156(f16c2)
-            4183:6(float16_t) Load 572(f16lod)
-            4184:3102(ResType) ImageSparseGather 4181 4182 2187 Lod ConstOffsets 4183 2380
-            4185:  7(f16vec4) CompositeExtract 4184 1
-                              Store 4174(texel) 4185
-            4186:     47(int) CompositeExtract 4184 0
-            4187:         284 Load 286(s2DArray)
-            4188:  167(fvec3) Load 169(c3)
-            4189:   52(float) Load 565(lod)
-            4190:3102(ResType) ImageSparseGather 4187 4188 2187 Lod ConstOffsets 4189 2380
-            4191:  7(f16vec4) CompositeExtract 4190 1
-                              Store 4174(texel) 4191
-            4192:     47(int) CompositeExtract 4190 0
-            4193:         284 Load 286(s2DArray)
-            4194:175(f16vec3) Load 177(f16c3)
-            4195:6(float16_t) Load 572(f16lod)
-            4196:3102(ResType) ImageSparseGather 4193 4194 2187 Lod ConstOffsets 4195 2380
-            4197:  7(f16vec4) CompositeExtract 4196 1
-                              Store 4174(texel) 4197
-            4198:     47(int) CompositeExtract 4196 0
-            4199:  7(f16vec4) Load 4174(texel)
-                              ReturnValue 4199
+     4184(texel):     64(ptr) Variable Function
+                              Store 4184(texel) 121
+            4185:         143 Load 145(s2D)
+            4186:   53(fvec2) Load 148(c2)
+            4187:   52(float) Load 565(lod)
+            4188:3102(ResType) ImageSparseGather 4185 4186 2187 Lod ConstOffsets 4187 2380
+            4189:  7(f16vec4) CompositeExtract 4188 1
+                              Store 4184(texel) 4189
+            4190:     47(int) CompositeExtract 4188 0
+            4191:         143 Load 145(s2D)
+            4192:154(f16vec2) Load 156(f16c2)
+            4193:6(float16_t) Load 572(f16lod)
+            4194:3102(ResType) ImageSparseGather 4191 4192 2187 Lod ConstOffsets 4193 2380
+            4195:  7(f16vec4) CompositeExtract 4194 1
+                              Store 4184(texel) 4195
+            4196:     47(int) CompositeExtract 4194 0
+            4197:         284 Load 286(s2DArray)
+            4198:  167(fvec3) Load 169(c3)
+            4199:   52(float) Load 565(lod)
+            4200:3102(ResType) ImageSparseGather 4197 4198 2187 Lod ConstOffsets 4199 2380
+            4201:  7(f16vec4) CompositeExtract 4200 1
+                              Store 4184(texel) 4201
+            4202:     47(int) CompositeExtract 4200 0
+            4203:         284 Load 286(s2DArray)
+            4204:175(f16vec3) Load 177(f16c3)
+            4205:6(float16_t) Load 572(f16lod)
+            4206:3102(ResType) ImageSparseGather 4203 4204 2187 Lod ConstOffsets 4205 2380
+            4207:  7(f16vec4) CompositeExtract 4206 1
+                              Store 4184(texel) 4207
+            4208:     47(int) CompositeExtract 4206 0
+            4209:  7(f16vec4) Load 4184(texel)
+                              ReturnValue 4209
                               FunctionEnd
 97(testSparseImageLoad():  7(f16vec4) Function None 8
               98:             Label
-     4202(texel):     64(ptr) Variable Function
-                              Store 4202(texel) 121
-            4203:        2962 Load 2964(i2D)
-            4204:   53(fvec2) Load 148(c2)
-            4205:  721(ivec2) ConvertFToS 4204
-            4206:3102(ResType) ImageSparseRead 4203 4205
-            4207:  7(f16vec4) CompositeExtract 4206 1
-                              Store 4202(texel) 4207
-            4208:     47(int) CompositeExtract 4206 0
-            4209:        2971 Load 2973(i3D)
-            4210:  167(fvec3) Load 169(c3)
-            4211:  734(ivec3) ConvertFToS 4210
-            4212:3102(ResType) ImageSparseRead 4209 4211
-            4213:  7(f16vec4) CompositeExtract 4212 1
-                              Store 4202(texel) 4213
-            4214:     47(int) CompositeExtract 4212 0
-            4215:        2980 Load 2982(i2DRect)
-            4216:   53(fvec2) Load 148(c2)
-            4217:  721(ivec2) ConvertFToS 4216
-            4218:3102(ResType) ImageSparseRead 4215 4217
-            4219:  7(f16vec4) CompositeExtract 4218 1
-                              Store 4202(texel) 4219
-            4220:     47(int) CompositeExtract 4218 0
-            4221:        2989 Load 2991(iCube)
-            4222:  167(fvec3) Load 169(c3)
-            4223:  734(ivec3) ConvertFToS 4222
-            4224:3102(ResType) ImageSparseRead 4221 4223
-            4225:  7(f16vec4) CompositeExtract 4224 1
-                              Store 4202(texel) 4225
-            4226:     47(int) CompositeExtract 4224 0
-            4227:        3016 Load 3018(i2DArray)
-            4228:  167(fvec3) Load 169(c3)
-            4229:  734(ivec3) ConvertFToS 4228
-            4230:3102(ResType) ImageSparseRead 4227 4229
-            4231:  7(f16vec4) CompositeExtract 4230 1
-                              Store 4202(texel) 4231
-            4232:     47(int) CompositeExtract 4230 0
-            4233:        3025 Load 3027(iCubeArray)
-            4234:  167(fvec3) Load 169(c3)
-            4235:  734(ivec3) ConvertFToS 4234
-            4236:3102(ResType) ImageSparseRead 4233 4235
-            4237:  7(f16vec4) CompositeExtract 4236 1
-                              Store 4202(texel) 4237
-            4238:     47(int) CompositeExtract 4236 0
-            4239:        3034 Load 3036(i2DMS)
-            4240:   53(fvec2) Load 148(c2)
-            4241:  721(ivec2) ConvertFToS 4240
-            4242:3102(ResType) ImageSparseRead 4239 4241 Sample 709
-            4243:  7(f16vec4) CompositeExtract 4242 1
-                              Store 4202(texel) 4243
-            4244:     47(int) CompositeExtract 4242 0
-            4245:        3043 Load 3045(i2DMSArray)
-            4246:  167(fvec3) Load 169(c3)
-            4247:  734(ivec3) ConvertFToS 4246
-            4248:3102(ResType) ImageSparseRead 4245 4247 Sample 1326
-            4249:  7(f16vec4) CompositeExtract 4248 1
-                              Store 4202(texel) 4249
-            4250:     47(int) CompositeExtract 4248 0
-            4251:  7(f16vec4) Load 4202(texel)
-                              ReturnValue 4251
+     4212(texel):     64(ptr) Variable Function
+                              Store 4212(texel) 121
+            4213:        2962 Load 2964(i2D)
+            4214:   53(fvec2) Load 148(c2)
+            4215:  721(ivec2) ConvertFToS 4214
+            4216:3102(ResType) ImageSparseRead 4213 4215
+            4217:  7(f16vec4) CompositeExtract 4216 1
+                              Store 4212(texel) 4217
+            4218:     47(int) CompositeExtract 4216 0
+            4219:        2971 Load 2973(i3D)
+            4220:  167(fvec3) Load 169(c3)
+            4221:  734(ivec3) ConvertFToS 4220
+            4222:3102(ResType) ImageSparseRead 4219 4221
+            4223:  7(f16vec4) CompositeExtract 4222 1
+                              Store 4212(texel) 4223
+            4224:     47(int) CompositeExtract 4222 0
+            4225:        2980 Load 2982(i2DRect)
+            4226:   53(fvec2) Load 148(c2)
+            4227:  721(ivec2) ConvertFToS 4226
+            4228:3102(ResType) ImageSparseRead 4225 4227
+            4229:  7(f16vec4) CompositeExtract 4228 1
+                              Store 4212(texel) 4229
+            4230:     47(int) CompositeExtract 4228 0
+            4231:        2989 Load 2991(iCube)
+            4232:  167(fvec3) Load 169(c3)
+            4233:  734(ivec3) ConvertFToS 4232
+            4234:3102(ResType) ImageSparseRead 4231 4233
+            4235:  7(f16vec4) CompositeExtract 4234 1
+                              Store 4212(texel) 4235
+            4236:     47(int) CompositeExtract 4234 0
+            4237:        3016 Load 3018(i2DArray)
+            4238:  167(fvec3) Load 169(c3)
+            4239:  734(ivec3) ConvertFToS 4238
+            4240:3102(ResType) ImageSparseRead 4237 4239
+            4241:  7(f16vec4) CompositeExtract 4240 1
+                              Store 4212(texel) 4241
+            4242:     47(int) CompositeExtract 4240 0
+            4243:        3025 Load 3027(iCubeArray)
+            4244:  167(fvec3) Load 169(c3)
+            4245:  734(ivec3) ConvertFToS 4244
+            4246:3102(ResType) ImageSparseRead 4243 4245
+            4247:  7(f16vec4) CompositeExtract 4246 1
+                              Store 4212(texel) 4247
+            4248:     47(int) CompositeExtract 4246 0
+            4249:        3034 Load 3036(i2DMS)
+            4250:   53(fvec2) Load 148(c2)
+            4251:  721(ivec2) ConvertFToS 4250
+            4252:3102(ResType) ImageSparseRead 4249 4251 Sample 709
+            4253:  7(f16vec4) CompositeExtract 4252 1
+                              Store 4212(texel) 4253
+            4254:     47(int) CompositeExtract 4252 0
+            4255:        3043 Load 3045(i2DMSArray)
+            4256:  167(fvec3) Load 169(c3)
+            4257:  734(ivec3) ConvertFToS 4256
+            4258:3102(ResType) ImageSparseRead 4255 4257 Sample 1326
+            4259:  7(f16vec4) CompositeExtract 4258 1
+                              Store 4212(texel) 4259
+            4260:     47(int) CompositeExtract 4258 0
+            4261:  7(f16vec4) Load 4212(texel)
+                              ReturnValue 4261
                               FunctionEnd
 99(testSparseTextureClamp():  7(f16vec4) Function None 8
              100:             Label
-     4254(texel):     64(ptr) Variable Function
-                              Store 4254(texel) 121
-            4255:         143 Load 145(s2D)
-            4256:   53(fvec2) Load 148(c2)
-            4258:   52(float) Load 4257(lodClamp)
-            4259:3102(ResType) ImageSparseSampleImplicitLod 4255 4256 MinLod 4258
-            4260:  7(f16vec4) CompositeExtract 4259 1
-                              Store 4254(texel) 4260
-            4261:     47(int) CompositeExtract 4259 0
-            4262:         143 Load 145(s2D)
-            4263:154(f16vec2) Load 156(f16c2)
-            4265:6(float16_t) Load 4264(f16lodClamp)
-            4266:6(float16_t) Load 137(f16bias)
-            4267:3102(ResType) ImageSparseSampleImplicitLod 4262 4263 Bias MinLod 4266 4265
-            4268:  7(f16vec4) CompositeExtract 4267 1
-                              Store 4254(texel) 4268
-            4269:     47(int) CompositeExtract 4267 0
-            4270:         163 Load 165(s3D)
-            4271:  167(fvec3) Load 169(c3)
-            4272:   52(float) Load 4257(lodClamp)
-            4273:3102(ResType) ImageSparseSampleImplicitLod 4270 4271 MinLod 4272
-            4274:  7(f16vec4) CompositeExtract 4273 1
-                              Store 4254(texel) 4274
-            4275:     47(int) CompositeExtract 4273 0
-            4276:         163 Load 165(s3D)
-            4277:175(f16vec3) Load 177(f16c3)
-            4278:6(float16_t) Load 4264(f16lodClamp)
-            4279:6(float16_t) Load 137(f16bias)
-            4280:3102(ResType) ImageSparseSampleImplicitLod 4276 4277 Bias MinLod 4279 4278
-            4281:  7(f16vec4) CompositeExtract 4280 1
-                              Store 4254(texel) 4281
-            4282:     47(int) CompositeExtract 4280 0
-            4283:         184 Load 186(sCube)
-            4284:  167(fvec3) Load 169(c3)
-            4285:   52(float) Load 4257(lodClamp)
-            4286:3102(ResType) ImageSparseSampleImplicitLod 4283 4284 MinLod 4285
-            4287:  7(f16vec4) CompositeExtract 4286 1
-                              Store 4254(texel) 4287
-            4288:     47(int) CompositeExtract 4286 0
-            4289:         184 Load 186(sCube)
-            4290:175(f16vec3) Load 177(f16c3)
-            4291:6(float16_t) Load 4264(f16lodClamp)
-            4292:6(float16_t) Load 137(f16bias)
-            4293:3102(ResType) ImageSparseSampleImplicitLod 4289 4290 Bias MinLod 4292 4291
-            4294:  7(f16vec4) CompositeExtract 4293 1
-                              Store 4254(texel) 4294
-            4295:     47(int) CompositeExtract 4293 0
-            4296:         224 Load 226(s2DShadow)
-            4297:  167(fvec3) Load 169(c3)
-            4298:   52(float) Load 4257(lodClamp)
-            4299:    208(ptr) AccessChain 4254(texel) 207
-            4300:   52(float) CompositeExtract 4297 2
-            4301:3138(ResType) ImageSparseSampleDrefImplicitLod 4296 4297 4300 MinLod 4298
-            4302:6(float16_t) CompositeExtract 4301 1
-                              Store 4299 4302
-            4303:     47(int) CompositeExtract 4301 0
-            4304:         224 Load 226(s2DShadow)
-            4305:154(f16vec2) Load 156(f16c2)
-            4306:   52(float) Load 215(compare)
-            4307:6(float16_t) Load 4264(f16lodClamp)
-            4308:    208(ptr) AccessChain 4254(texel) 207
-            4309:6(float16_t) Load 137(f16bias)
-            4310:3138(ResType) ImageSparseSampleDrefImplicitLod 4304 4305 4306 Bias MinLod 4309 4307
-            4311:6(float16_t) CompositeExtract 4310 1
-                              Store 4308 4311
-            4312:     47(int) CompositeExtract 4310 0
-            4313:         245 Load 247(sCubeShadow)
-            4314:  249(fvec4) Load 251(c4)
-            4315:   52(float) Load 4257(lodClamp)
-            4316:    208(ptr) AccessChain 4254(texel) 207
-            4317:   52(float) CompositeExtract 4314 3
-            4318:3138(ResType) ImageSparseSampleDrefImplicitLod 4313 4314 4317 MinLod 4315
-            4319:6(float16_t) CompositeExtract 4318 1
-                              Store 4316 4319
-            4320:     47(int) CompositeExtract 4318 0
-            4321:         245 Load 247(sCubeShadow)
-            4322:175(f16vec3) Load 177(f16c3)
-            4323:   52(float) Load 215(compare)
-            4324:6(float16_t) Load 4264(f16lodClamp)
-            4325:    208(ptr) AccessChain 4254(texel) 207
-            4326:6(float16_t) Load 137(f16bias)
-            4327:3138(ResType) ImageSparseSampleDrefImplicitLod 4321 4322 4323 Bias MinLod 4326 4324
-            4328:6(float16_t) CompositeExtract 4327 1
-                              Store 4325 4328
-            4329:     47(int) CompositeExtract 4327 0
-            4330:         284 Load 286(s2DArray)
-            4331:  167(fvec3) Load 169(c3)
-            4332:   52(float) Load 4257(lodClamp)
-            4333:3102(ResType) ImageSparseSampleImplicitLod 4330 4331 MinLod 4332
-            4334:  7(f16vec4) CompositeExtract 4333 1
-                              Store 4254(texel) 4334
-            4335:     47(int) CompositeExtract 4333 0
-            4336:         284 Load 286(s2DArray)
-            4337:175(f16vec3) Load 177(f16c3)
-            4338:6(float16_t) Load 4264(f16lodClamp)
-            4339:6(float16_t) Load 137(f16bias)
-            4340:3102(ResType) ImageSparseSampleImplicitLod 4336 4337 Bias MinLod 4339 4338
-            4341:  7(f16vec4) CompositeExtract 4340 1
-                              Store 4254(texel) 4341
-            4342:     47(int) CompositeExtract 4340 0
-            4343:         299 Load 301(sCubeArray)
-            4344:  249(fvec4) Load 251(c4)
-            4345:   52(float) Load 4257(lodClamp)
-            4346:3102(ResType) ImageSparseSampleImplicitLod 4343 4344 MinLod 4345
-            4347:  7(f16vec4) CompositeExtract 4346 1
-                              Store 4254(texel) 4347
-            4348:     47(int) CompositeExtract 4346 0
-            4349:         299 Load 301(sCubeArray)
-            4350:  7(f16vec4) Load 309(f16c4)
-            4351:6(float16_t) Load 4264(f16lodClamp)
-            4352:6(float16_t) Load 137(f16bias)
-            4353:3102(ResType) ImageSparseSampleImplicitLod 4349 4350 Bias MinLod 4352 4351
-            4354:  7(f16vec4) CompositeExtract 4353 1
-                              Store 4254(texel) 4354
-            4355:     47(int) CompositeExtract 4353 0
-            4356:         337 Load 339(s2DArrayShadow)
-            4357:  249(fvec4) Load 251(c4)
-            4358:   52(float) Load 4257(lodClamp)
-            4359:    208(ptr) AccessChain 4254(texel) 207
-            4360:   52(float) CompositeExtract 4357 3
-            4361:3138(ResType) ImageSparseSampleDrefImplicitLod 4356 4357 4360 MinLod 4358
-            4362:6(float16_t) CompositeExtract 4361 1
-                              Store 4359 4362
-            4363:     47(int) CompositeExtract 4361 0
-            4364:         337 Load 339(s2DArrayShadow)
-            4365:175(f16vec3) Load 177(f16c3)
-            4366:   52(float) Load 215(compare)
-            4367:6(float16_t) Load 4264(f16lodClamp)
-            4368:    208(ptr) AccessChain 4254(texel) 207
-            4369:3138(ResType) ImageSparseSampleDrefImplicitLod 4364 4365 4366 MinLod 4367
-            4370:6(float16_t) CompositeExtract 4369 1
-                              Store 4368 4370
-            4371:     47(int) CompositeExtract 4369 0
-            4372:         391 Load 393(sCubeArrayShadow)
-            4373:  249(fvec4) Load 251(c4)
-            4374:   52(float) Load 215(compare)
-            4375:   52(float) Load 4257(lodClamp)
-            4376:    208(ptr) AccessChain 4254(texel) 207
-            4377:3138(ResType) ImageSparseSampleDrefImplicitLod 4372 4373 4374 MinLod 4375
-            4378:6(float16_t) CompositeExtract 4377 1
-                              Store 4376 4378
-            4379:     47(int) CompositeExtract 4377 0
-            4380:         391 Load 393(sCubeArrayShadow)
-            4381:  7(f16vec4) Load 309(f16c4)
-            4382:   52(float) Load 215(compare)
-            4383:6(float16_t) Load 4264(f16lodClamp)
-            4384:    208(ptr) AccessChain 4254(texel) 207
-            4385:3138(ResType) ImageSparseSampleDrefImplicitLod 4380 4381 4382 MinLod 4383
-            4386:6(float16_t) CompositeExtract 4385 1
-                              Store 4384 4386
-            4387:     47(int) CompositeExtract 4385 0
-            4388:  7(f16vec4) Load 4254(texel)
-                              ReturnValue 4388
+     4264(texel):     64(ptr) Variable Function
+                              Store 4264(texel) 121
+            4265:         143 Load 145(s2D)
+            4266:   53(fvec2) Load 148(c2)
+            4268:   52(float) Load 4267(lodClamp)
+            4269:3102(ResType) ImageSparseSampleImplicitLod 4265 4266 MinLod 4268
+            4270:  7(f16vec4) CompositeExtract 4269 1
+                              Store 4264(texel) 4270
+            4271:     47(int) CompositeExtract 4269 0
+            4272:         143 Load 145(s2D)
+            4273:154(f16vec2) Load 156(f16c2)
+            4275:6(float16_t) Load 4274(f16lodClamp)
+            4276:6(float16_t) Load 137(f16bias)
+            4277:3102(ResType) ImageSparseSampleImplicitLod 4272 4273 Bias MinLod 4276 4275
+            4278:  7(f16vec4) CompositeExtract 4277 1
+                              Store 4264(texel) 4278
+            4279:     47(int) CompositeExtract 4277 0
+            4280:         163 Load 165(s3D)
+            4281:  167(fvec3) Load 169(c3)
+            4282:   52(float) Load 4267(lodClamp)
+            4283:3102(ResType) ImageSparseSampleImplicitLod 4280 4281 MinLod 4282
+            4284:  7(f16vec4) CompositeExtract 4283 1
+                              Store 4264(texel) 4284
+            4285:     47(int) CompositeExtract 4283 0
+            4286:         163 Load 165(s3D)
+            4287:175(f16vec3) Load 177(f16c3)
+            4288:6(float16_t) Load 4274(f16lodClamp)
+            4289:6(float16_t) Load 137(f16bias)
+            4290:3102(ResType) ImageSparseSampleImplicitLod 4286 4287 Bias MinLod 4289 4288
+            4291:  7(f16vec4) CompositeExtract 4290 1
+                              Store 4264(texel) 4291
+            4292:     47(int) CompositeExtract 4290 0
+            4293:         184 Load 186(sCube)
+            4294:  167(fvec3) Load 169(c3)
+            4295:   52(float) Load 4267(lodClamp)
+            4296:3102(ResType) ImageSparseSampleImplicitLod 4293 4294 MinLod 4295
+            4297:  7(f16vec4) CompositeExtract 4296 1
+                              Store 4264(texel) 4297
+            4298:     47(int) CompositeExtract 4296 0
+            4299:         184 Load 186(sCube)
+            4300:175(f16vec3) Load 177(f16c3)
+            4301:6(float16_t) Load 4274(f16lodClamp)
+            4302:6(float16_t) Load 137(f16bias)
+            4303:3102(ResType) ImageSparseSampleImplicitLod 4299 4300 Bias MinLod 4302 4301
+            4304:  7(f16vec4) CompositeExtract 4303 1
+                              Store 4264(texel) 4304
+            4305:     47(int) CompositeExtract 4303 0
+            4306:         224 Load 226(s2DShadow)
+            4307:  167(fvec3) Load 169(c3)
+            4308:   52(float) Load 4267(lodClamp)
+            4309:    208(ptr) AccessChain 4264(texel) 207
+            4310:   52(float) CompositeExtract 4307 2
+            4311:3138(ResType) ImageSparseSampleDrefImplicitLod 4306 4307 4310 MinLod 4308
+            4312:6(float16_t) CompositeExtract 4311 1
+                              Store 4309 4312
+            4313:     47(int) CompositeExtract 4311 0
+            4314:         224 Load 226(s2DShadow)
+            4315:154(f16vec2) Load 156(f16c2)
+            4316:   52(float) Load 215(compare)
+            4317:6(float16_t) Load 4274(f16lodClamp)
+            4318:    208(ptr) AccessChain 4264(texel) 207
+            4319:6(float16_t) Load 137(f16bias)
+            4320:3138(ResType) ImageSparseSampleDrefImplicitLod 4314 4315 4316 Bias MinLod 4319 4317
+            4321:6(float16_t) CompositeExtract 4320 1
+                              Store 4318 4321
+            4322:     47(int) CompositeExtract 4320 0
+            4323:         245 Load 247(sCubeShadow)
+            4324:  249(fvec4) Load 251(c4)
+            4325:   52(float) Load 4267(lodClamp)
+            4326:    208(ptr) AccessChain 4264(texel) 207
+            4327:   52(float) CompositeExtract 4324 3
+            4328:3138(ResType) ImageSparseSampleDrefImplicitLod 4323 4324 4327 MinLod 4325
+            4329:6(float16_t) CompositeExtract 4328 1
+                              Store 4326 4329
+            4330:     47(int) CompositeExtract 4328 0
+            4331:         245 Load 247(sCubeShadow)
+            4332:175(f16vec3) Load 177(f16c3)
+            4333:   52(float) Load 215(compare)
+            4334:6(float16_t) Load 4274(f16lodClamp)
+            4335:    208(ptr) AccessChain 4264(texel) 207
+            4336:6(float16_t) Load 137(f16bias)
+            4337:3138(ResType) ImageSparseSampleDrefImplicitLod 4331 4332 4333 Bias MinLod 4336 4334
+            4338:6(float16_t) CompositeExtract 4337 1
+                              Store 4335 4338
+            4339:     47(int) CompositeExtract 4337 0
+            4340:         284 Load 286(s2DArray)
+            4341:  167(fvec3) Load 169(c3)
+            4342:   52(float) Load 4267(lodClamp)
+            4343:3102(ResType) ImageSparseSampleImplicitLod 4340 4341 MinLod 4342
+            4344:  7(f16vec4) CompositeExtract 4343 1
+                              Store 4264(texel) 4344
+            4345:     47(int) CompositeExtract 4343 0
+            4346:         284 Load 286(s2DArray)
+            4347:175(f16vec3) Load 177(f16c3)
+            4348:6(float16_t) Load 4274(f16lodClamp)
+            4349:6(float16_t) Load 137(f16bias)
+            4350:3102(ResType) ImageSparseSampleImplicitLod 4346 4347 Bias MinLod 4349 4348
+            4351:  7(f16vec4) CompositeExtract 4350 1
+                              Store 4264(texel) 4351
+            4352:     47(int) CompositeExtract 4350 0
+            4353:         299 Load 301(sCubeArray)
+            4354:  249(fvec4) Load 251(c4)
+            4355:   52(float) Load 4267(lodClamp)
+            4356:3102(ResType) ImageSparseSampleImplicitLod 4353 4354 MinLod 4355
+            4357:  7(f16vec4) CompositeExtract 4356 1
+                              Store 4264(texel) 4357
+            4358:     47(int) CompositeExtract 4356 0
+            4359:         299 Load 301(sCubeArray)
+            4360:  7(f16vec4) Load 309(f16c4)
+            4361:6(float16_t) Load 4274(f16lodClamp)
+            4362:6(float16_t) Load 137(f16bias)
+            4363:3102(ResType) ImageSparseSampleImplicitLod 4359 4360 Bias MinLod 4362 4361
+            4364:  7(f16vec4) CompositeExtract 4363 1
+                              Store 4264(texel) 4364
+            4365:     47(int) CompositeExtract 4363 0
+            4366:         337 Load 339(s2DArrayShadow)
+            4367:  249(fvec4) Load 251(c4)
+            4368:   52(float) Load 4267(lodClamp)
+            4369:    208(ptr) AccessChain 4264(texel) 207
+            4370:   52(float) CompositeExtract 4367 3
+            4371:3138(ResType) ImageSparseSampleDrefImplicitLod 4366 4367 4370 MinLod 4368
+            4372:6(float16_t) CompositeExtract 4371 1
+                              Store 4369 4372
+            4373:     47(int) CompositeExtract 4371 0
+            4374:         337 Load 339(s2DArrayShadow)
+            4375:175(f16vec3) Load 177(f16c3)
+            4376:   52(float) Load 215(compare)
+            4377:6(float16_t) Load 4274(f16lodClamp)
+            4378:    208(ptr) AccessChain 4264(texel) 207
+            4379:3138(ResType) ImageSparseSampleDrefImplicitLod 4374 4375 4376 MinLod 4377
+            4380:6(float16_t) CompositeExtract 4379 1
+                              Store 4378 4380
+            4381:     47(int) CompositeExtract 4379 0
+            4382:         391 Load 393(sCubeArrayShadow)
+            4383:  249(fvec4) Load 251(c4)
+            4384:   52(float) Load 215(compare)
+            4385:   52(float) Load 4267(lodClamp)
+            4386:    208(ptr) AccessChain 4264(texel) 207
+            4387:3138(ResType) ImageSparseSampleDrefImplicitLod 4382 4383 4384 MinLod 4385
+            4388:6(float16_t) CompositeExtract 4387 1
+                              Store 4386 4388
+            4389:     47(int) CompositeExtract 4387 0
+            4390:         391 Load 393(sCubeArrayShadow)
+            4391:  7(f16vec4) Load 309(f16c4)
+            4392:   52(float) Load 215(compare)
+            4393:6(float16_t) Load 4274(f16lodClamp)
+            4394:    208(ptr) AccessChain 4264(texel) 207
+            4395:3138(ResType) ImageSparseSampleDrefImplicitLod 4390 4391 4392 MinLod 4393
+            4396:6(float16_t) CompositeExtract 4395 1
+                              Store 4394 4396
+            4397:     47(int) CompositeExtract 4395 0
+            4398:  7(f16vec4) Load 4264(texel)
+                              ReturnValue 4398
                               FunctionEnd
 101(testTextureClamp():  7(f16vec4) Function None 8
              102:             Label
-     4391(texel):     64(ptr) Variable Function
-                              Store 4391(texel) 121
-            4392:         123 Load 125(s1D)
-            4393:   52(float) Load 128(c1)
-            4394:   52(float) Load 4257(lodClamp)
-            4395:  7(f16vec4) ImageSampleImplicitLod 4392 4393 MinLod 4394
-            4396:  7(f16vec4) Load 4391(texel)
-            4397:  7(f16vec4) FAdd 4396 4395
-                              Store 4391(texel) 4397
-            4398:         123 Load 125(s1D)
-            4399:6(float16_t) Load 135(f16c1)
-            4400:6(float16_t) Load 4264(f16lodClamp)
-            4401:6(float16_t) Load 137(f16bias)
-            4402:  7(f16vec4) ImageSampleImplicitLod 4398 4399 Bias MinLod 4401 4400
-            4403:  7(f16vec4) Load 4391(texel)
-            4404:  7(f16vec4) FAdd 4403 4402
-                              Store 4391(texel) 4404
-            4405:         143 Load 145(s2D)
-            4406:   53(fvec2) Load 148(c2)
-            4407:   52(float) Load 4257(lodClamp)
-            4408:  7(f16vec4) ImageSampleImplicitLod 4405 4406 MinLod 4407
-            4409:  7(f16vec4) Load 4391(texel)
-            4410:  7(f16vec4) FAdd 4409 4408
-                              Store 4391(texel) 4410
-            4411:         143 Load 145(s2D)
-            4412:154(f16vec2) Load 156(f16c2)
-            4413:6(float16_t) Load 4264(f16lodClamp)
-            4414:6(float16_t) Load 137(f16bias)
-            4415:  7(f16vec4) ImageSampleImplicitLod 4411 4412 Bias MinLod 4414 4413
-            4416:  7(f16vec4) Load 4391(texel)
-            4417:  7(f16vec4) FAdd 4416 4415
-                              Store 4391(texel) 4417
-            4418:         163 Load 165(s3D)
-            4419:  167(fvec3) Load 169(c3)
-            4420:   52(float) Load 4257(lodClamp)
-            4421:  7(f16vec4) ImageSampleImplicitLod 4418 4419 MinLod 4420
-            4422:  7(f16vec4) Load 4391(texel)
-            4423:  7(f16vec4) FAdd 4422 4421
-                              Store 4391(texel) 4423
-            4424:         163 Load 165(s3D)
-            4425:175(f16vec3) Load 177(f16c3)
-            4426:6(float16_t) Load 4264(f16lodClamp)
-            4427:6(float16_t) Load 137(f16bias)
-            4428:  7(f16vec4) ImageSampleImplicitLod 4424 4425 Bias MinLod 4427 4426
-            4429:  7(f16vec4) Load 4391(texel)
-            4430:  7(f16vec4) FAdd 4429 4428
-                              Store 4391(texel) 4430
-            4431:         184 Load 186(sCube)
-            4432:  167(fvec3) Load 169(c3)
-            4433:   52(float) Load 4257(lodClamp)
-            4434:  7(f16vec4) ImageSampleImplicitLod 4431 4432 MinLod 4433
-            4435:  7(f16vec4) Load 4391(texel)
-            4436:  7(f16vec4) FAdd 4435 4434
-                              Store 4391(texel) 4436
-            4437:         184 Load 186(sCube)
-            4438:175(f16vec3) Load 177(f16c3)
-            4439:6(float16_t) Load 4264(f16lodClamp)
-            4440:6(float16_t) Load 137(f16bias)
-            4441:  7(f16vec4) ImageSampleImplicitLod 4437 4438 Bias MinLod 4440 4439
-            4442:  7(f16vec4) Load 4391(texel)
-            4443:  7(f16vec4) FAdd 4442 4441
-                              Store 4391(texel) 4443
-            4444:         199 Load 201(s1DShadow)
-            4445:  167(fvec3) Load 169(c3)
-            4446:   52(float) Load 4257(lodClamp)
-            4447:   52(float) CompositeExtract 4445 2
-            4448:6(float16_t) ImageSampleDrefImplicitLod 4444 4445 4447 MinLod 4446
-            4449:    208(ptr) AccessChain 4391(texel) 207
-            4450:6(float16_t) Load 4449
-            4451:6(float16_t) FAdd 4450 4448
-            4452:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4452 4451
-            4453:         199 Load 201(s1DShadow)
-            4454:154(f16vec2) Load 156(f16c2)
-            4455:   52(float) Load 215(compare)
-            4456:6(float16_t) Load 4264(f16lodClamp)
-            4457:6(float16_t) Load 137(f16bias)
-            4458:6(float16_t) ImageSampleDrefImplicitLod 4453 4454 4455 Bias MinLod 4457 4456
-            4459:    208(ptr) AccessChain 4391(texel) 207
+     4401(texel):     64(ptr) Variable Function
+                              Store 4401(texel) 121
+            4402:         123 Load 125(s1D)
+            4403:   52(float) Load 128(c1)
+            4404:   52(float) Load 4267(lodClamp)
+            4405:  7(f16vec4) ImageSampleImplicitLod 4402 4403 MinLod 4404
+            4406:  7(f16vec4) Load 4401(texel)
+            4407:  7(f16vec4) FAdd 4406 4405
+                              Store 4401(texel) 4407
+            4408:         123 Load 125(s1D)
+            4409:6(float16_t) Load 135(f16c1)
+            4410:6(float16_t) Load 4274(f16lodClamp)
+            4411:6(float16_t) Load 137(f16bias)
+            4412:  7(f16vec4) ImageSampleImplicitLod 4408 4409 Bias MinLod 4411 4410
+            4413:  7(f16vec4) Load 4401(texel)
+            4414:  7(f16vec4) FAdd 4413 4412
+                              Store 4401(texel) 4414
+            4415:         143 Load 145(s2D)
+            4416:   53(fvec2) Load 148(c2)
+            4417:   52(float) Load 4267(lodClamp)
+            4418:  7(f16vec4) ImageSampleImplicitLod 4415 4416 MinLod 4417
+            4419:  7(f16vec4) Load 4401(texel)
+            4420:  7(f16vec4) FAdd 4419 4418
+                              Store 4401(texel) 4420
+            4421:         143 Load 145(s2D)
+            4422:154(f16vec2) Load 156(f16c2)
+            4423:6(float16_t) Load 4274(f16lodClamp)
+            4424:6(float16_t) Load 137(f16bias)
+            4425:  7(f16vec4) ImageSampleImplicitLod 4421 4422 Bias MinLod 4424 4423
+            4426:  7(f16vec4) Load 4401(texel)
+            4427:  7(f16vec4) FAdd 4426 4425
+                              Store 4401(texel) 4427
+            4428:         163 Load 165(s3D)
+            4429:  167(fvec3) Load 169(c3)
+            4430:   52(float) Load 4267(lodClamp)
+            4431:  7(f16vec4) ImageSampleImplicitLod 4428 4429 MinLod 4430
+            4432:  7(f16vec4) Load 4401(texel)
+            4433:  7(f16vec4) FAdd 4432 4431
+                              Store 4401(texel) 4433
+            4434:         163 Load 165(s3D)
+            4435:175(f16vec3) Load 177(f16c3)
+            4436:6(float16_t) Load 4274(f16lodClamp)
+            4437:6(float16_t) Load 137(f16bias)
+            4438:  7(f16vec4) ImageSampleImplicitLod 4434 4435 Bias MinLod 4437 4436
+            4439:  7(f16vec4) Load 4401(texel)
+            4440:  7(f16vec4) FAdd 4439 4438
+                              Store 4401(texel) 4440
+            4441:         184 Load 186(sCube)
+            4442:  167(fvec3) Load 169(c3)
+            4443:   52(float) Load 4267(lodClamp)
+            4444:  7(f16vec4) ImageSampleImplicitLod 4441 4442 MinLod 4443
+            4445:  7(f16vec4) Load 4401(texel)
+            4446:  7(f16vec4) FAdd 4445 4444
+                              Store 4401(texel) 4446
+            4447:         184 Load 186(sCube)
+            4448:175(f16vec3) Load 177(f16c3)
+            4449:6(float16_t) Load 4274(f16lodClamp)
+            4450:6(float16_t) Load 137(f16bias)
+            4451:  7(f16vec4) ImageSampleImplicitLod 4447 4448 Bias MinLod 4450 4449
+            4452:  7(f16vec4) Load 4401(texel)
+            4453:  7(f16vec4) FAdd 4452 4451
+                              Store 4401(texel) 4453
+            4454:         199 Load 201(s1DShadow)
+            4455:  167(fvec3) Load 169(c3)
+            4456:   52(float) Load 4267(lodClamp)
+            4457:   52(float) CompositeExtract 4455 2
+            4458:6(float16_t) ImageSampleDrefImplicitLod 4454 4455 4457 MinLod 4456
+            4459:    208(ptr) AccessChain 4401(texel) 207
             4460:6(float16_t) Load 4459
             4461:6(float16_t) FAdd 4460 4458
-            4462:    208(ptr) AccessChain 4391(texel) 207
+            4462:    208(ptr) AccessChain 4401(texel) 207
                               Store 4462 4461
-            4463:         224 Load 226(s2DShadow)
-            4464:  167(fvec3) Load 169(c3)
-            4465:   52(float) Load 4257(lodClamp)
-            4466:   52(float) CompositeExtract 4464 2
-            4467:6(float16_t) ImageSampleDrefImplicitLod 4463 4464 4466 MinLod 4465
-            4468:    208(ptr) AccessChain 4391(texel) 207
-            4469:6(float16_t) Load 4468
-            4470:6(float16_t) FAdd 4469 4467
-            4471:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4471 4470
-            4472:         224 Load 226(s2DShadow)
-            4473:154(f16vec2) Load 156(f16c2)
-            4474:   52(float) Load 215(compare)
-            4475:6(float16_t) Load 4264(f16lodClamp)
-            4476:6(float16_t) Load 137(f16bias)
-            4477:6(float16_t) ImageSampleDrefImplicitLod 4472 4473 4474 Bias MinLod 4476 4475
-            4478:    208(ptr) AccessChain 4391(texel) 207
+            4463:         199 Load 201(s1DShadow)
+            4464:154(f16vec2) Load 156(f16c2)
+            4465:   52(float) Load 215(compare)
+            4466:6(float16_t) Load 4274(f16lodClamp)
+            4467:6(float16_t) Load 137(f16bias)
+            4468:6(float16_t) ImageSampleDrefImplicitLod 4463 4464 4465 Bias MinLod 4467 4466
+            4469:    208(ptr) AccessChain 4401(texel) 207
+            4470:6(float16_t) Load 4469
+            4471:6(float16_t) FAdd 4470 4468
+            4472:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4472 4471
+            4473:         224 Load 226(s2DShadow)
+            4474:  167(fvec3) Load 169(c3)
+            4475:   52(float) Load 4267(lodClamp)
+            4476:   52(float) CompositeExtract 4474 2
+            4477:6(float16_t) ImageSampleDrefImplicitLod 4473 4474 4476 MinLod 4475
+            4478:    208(ptr) AccessChain 4401(texel) 207
             4479:6(float16_t) Load 4478
             4480:6(float16_t) FAdd 4479 4477
-            4481:    208(ptr) AccessChain 4391(texel) 207
+            4481:    208(ptr) AccessChain 4401(texel) 207
                               Store 4481 4480
-            4482:         245 Load 247(sCubeShadow)
-            4483:  249(fvec4) Load 251(c4)
-            4484:   52(float) Load 4257(lodClamp)
-            4485:   52(float) CompositeExtract 4483 3
-            4486:6(float16_t) ImageSampleDrefImplicitLod 4482 4483 4485 MinLod 4484
-            4487:    208(ptr) AccessChain 4391(texel) 207
-            4488:6(float16_t) Load 4487
-            4489:6(float16_t) FAdd 4488 4486
-            4490:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4490 4489
-            4491:         245 Load 247(sCubeShadow)
-            4492:175(f16vec3) Load 177(f16c3)
-            4493:   52(float) Load 215(compare)
-            4494:6(float16_t) Load 4264(f16lodClamp)
-            4495:6(float16_t) Load 137(f16bias)
-            4496:6(float16_t) ImageSampleDrefImplicitLod 4491 4492 4493 Bias MinLod 4495 4494
-            4497:    208(ptr) AccessChain 4391(texel) 207
+            4482:         224 Load 226(s2DShadow)
+            4483:154(f16vec2) Load 156(f16c2)
+            4484:   52(float) Load 215(compare)
+            4485:6(float16_t) Load 4274(f16lodClamp)
+            4486:6(float16_t) Load 137(f16bias)
+            4487:6(float16_t) ImageSampleDrefImplicitLod 4482 4483 4484 Bias MinLod 4486 4485
+            4488:    208(ptr) AccessChain 4401(texel) 207
+            4489:6(float16_t) Load 4488
+            4490:6(float16_t) FAdd 4489 4487
+            4491:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4491 4490
+            4492:         245 Load 247(sCubeShadow)
+            4493:  249(fvec4) Load 251(c4)
+            4494:   52(float) Load 4267(lodClamp)
+            4495:   52(float) CompositeExtract 4493 3
+            4496:6(float16_t) ImageSampleDrefImplicitLod 4492 4493 4495 MinLod 4494
+            4497:    208(ptr) AccessChain 4401(texel) 207
             4498:6(float16_t) Load 4497
             4499:6(float16_t) FAdd 4498 4496
-            4500:    208(ptr) AccessChain 4391(texel) 207
+            4500:    208(ptr) AccessChain 4401(texel) 207
                               Store 4500 4499
-            4501:         269 Load 271(s1DArray)
-            4502:   53(fvec2) Load 148(c2)
-            4503:   52(float) Load 4257(lodClamp)
-            4504:  7(f16vec4) ImageSampleImplicitLod 4501 4502 MinLod 4503
-            4505:  7(f16vec4) Load 4391(texel)
-            4506:  7(f16vec4) FAdd 4505 4504
-                              Store 4391(texel) 4506
-            4507:         269 Load 271(s1DArray)
-            4508:154(f16vec2) Load 156(f16c2)
-            4509:6(float16_t) Load 4264(f16lodClamp)
-            4510:6(float16_t) Load 137(f16bias)
-            4511:  7(f16vec4) ImageSampleImplicitLod 4507 4508 Bias MinLod 4510 4509
-            4512:  7(f16vec4) Load 4391(texel)
-            4513:  7(f16vec4) FAdd 4512 4511
-                              Store 4391(texel) 4513
-            4514:         284 Load 286(s2DArray)
-            4515:  167(fvec3) Load 169(c3)
-            4516:   52(float) Load 4257(lodClamp)
-            4517:  7(f16vec4) ImageSampleImplicitLod 4514 4515 MinLod 4516
-            4518:  7(f16vec4) Load 4391(texel)
-            4519:  7(f16vec4) FAdd 4518 4517
-                              Store 4391(texel) 4519
-            4520:         284 Load 286(s2DArray)
-            4521:175(f16vec3) Load 177(f16c3)
-            4522:6(float16_t) Load 4264(f16lodClamp)
-            4523:6(float16_t) Load 137(f16bias)
-            4524:  7(f16vec4) ImageSampleImplicitLod 4520 4521 Bias MinLod 4523 4522
-            4525:  7(f16vec4) Load 4391(texel)
-            4526:  7(f16vec4) FAdd 4525 4524
-                              Store 4391(texel) 4526
-            4527:         299 Load 301(sCubeArray)
-            4528:  249(fvec4) Load 251(c4)
-            4529:   52(float) Load 4257(lodClamp)
-            4530:  7(f16vec4) ImageSampleImplicitLod 4527 4528 MinLod 4529
-            4531:  7(f16vec4) Load 4391(texel)
-            4532:  7(f16vec4) FAdd 4531 4530
-                              Store 4391(texel) 4532
-            4533:         299 Load 301(sCubeArray)
-            4534:  7(f16vec4) Load 309(f16c4)
-            4535:6(float16_t) Load 4264(f16lodClamp)
-            4536:6(float16_t) Load 137(f16bias)
-            4537:  7(f16vec4) ImageSampleImplicitLod 4533 4534 Bias MinLod 4536 4535
-            4538:  7(f16vec4) Load 4391(texel)
-            4539:  7(f16vec4) FAdd 4538 4537
-                              Store 4391(texel) 4539
-            4540:         316 Load 318(s1DArrayShadow)
-            4541:  167(fvec3) Load 169(c3)
-            4542:   52(float) Load 4257(lodClamp)
-            4543:   52(float) CompositeExtract 4541 2
-            4544:6(float16_t) ImageSampleDrefImplicitLod 4540 4541 4543 MinLod 4542
-            4545:    208(ptr) AccessChain 4391(texel) 207
-            4546:6(float16_t) Load 4545
-            4547:6(float16_t) FAdd 4546 4544
-            4548:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4548 4547
-            4549:         316 Load 318(s1DArrayShadow)
-            4550:154(f16vec2) Load 156(f16c2)
-            4551:   52(float) Load 215(compare)
-            4552:6(float16_t) Load 4264(f16lodClamp)
-            4553:6(float16_t) Load 137(f16bias)
-            4554:6(float16_t) ImageSampleDrefImplicitLod 4549 4550 4551 Bias MinLod 4553 4552
-            4555:    208(ptr) AccessChain 4391(texel) 207
+            4501:         245 Load 247(sCubeShadow)
+            4502:175(f16vec3) Load 177(f16c3)
+            4503:   52(float) Load 215(compare)
+            4504:6(float16_t) Load 4274(f16lodClamp)
+            4505:6(float16_t) Load 137(f16bias)
+            4506:6(float16_t) ImageSampleDrefImplicitLod 4501 4502 4503 Bias MinLod 4505 4504
+            4507:    208(ptr) AccessChain 4401(texel) 207
+            4508:6(float16_t) Load 4507
+            4509:6(float16_t) FAdd 4508 4506
+            4510:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4510 4509
+            4511:         269 Load 271(s1DArray)
+            4512:   53(fvec2) Load 148(c2)
+            4513:   52(float) Load 4267(lodClamp)
+            4514:  7(f16vec4) ImageSampleImplicitLod 4511 4512 MinLod 4513
+            4515:  7(f16vec4) Load 4401(texel)
+            4516:  7(f16vec4) FAdd 4515 4514
+                              Store 4401(texel) 4516
+            4517:         269 Load 271(s1DArray)
+            4518:154(f16vec2) Load 156(f16c2)
+            4519:6(float16_t) Load 4274(f16lodClamp)
+            4520:6(float16_t) Load 137(f16bias)
+            4521:  7(f16vec4) ImageSampleImplicitLod 4517 4518 Bias MinLod 4520 4519
+            4522:  7(f16vec4) Load 4401(texel)
+            4523:  7(f16vec4) FAdd 4522 4521
+                              Store 4401(texel) 4523
+            4524:         284 Load 286(s2DArray)
+            4525:  167(fvec3) Load 169(c3)
+            4526:   52(float) Load 4267(lodClamp)
+            4527:  7(f16vec4) ImageSampleImplicitLod 4524 4525 MinLod 4526
+            4528:  7(f16vec4) Load 4401(texel)
+            4529:  7(f16vec4) FAdd 4528 4527
+                              Store 4401(texel) 4529
+            4530:         284 Load 286(s2DArray)
+            4531:175(f16vec3) Load 177(f16c3)
+            4532:6(float16_t) Load 4274(f16lodClamp)
+            4533:6(float16_t) Load 137(f16bias)
+            4534:  7(f16vec4) ImageSampleImplicitLod 4530 4531 Bias MinLod 4533 4532
+            4535:  7(f16vec4) Load 4401(texel)
+            4536:  7(f16vec4) FAdd 4535 4534
+                              Store 4401(texel) 4536
+            4537:         299 Load 301(sCubeArray)
+            4538:  249(fvec4) Load 251(c4)
+            4539:   52(float) Load 4267(lodClamp)
+            4540:  7(f16vec4) ImageSampleImplicitLod 4537 4538 MinLod 4539
+            4541:  7(f16vec4) Load 4401(texel)
+            4542:  7(f16vec4) FAdd 4541 4540
+                              Store 4401(texel) 4542
+            4543:         299 Load 301(sCubeArray)
+            4544:  7(f16vec4) Load 309(f16c4)
+            4545:6(float16_t) Load 4274(f16lodClamp)
+            4546:6(float16_t) Load 137(f16bias)
+            4547:  7(f16vec4) ImageSampleImplicitLod 4543 4544 Bias MinLod 4546 4545
+            4548:  7(f16vec4) Load 4401(texel)
+            4549:  7(f16vec4) FAdd 4548 4547
+                              Store 4401(texel) 4549
+            4550:         316 Load 318(s1DArrayShadow)
+            4551:  167(fvec3) Load 169(c3)
+            4552:   52(float) Load 4267(lodClamp)
+            4553:   52(float) CompositeExtract 4551 2
+            4554:6(float16_t) ImageSampleDrefImplicitLod 4550 4551 4553 MinLod 4552
+            4555:    208(ptr) AccessChain 4401(texel) 207
             4556:6(float16_t) Load 4555
             4557:6(float16_t) FAdd 4556 4554
-            4558:    208(ptr) AccessChain 4391(texel) 207
+            4558:    208(ptr) AccessChain 4401(texel) 207
                               Store 4558 4557
-            4559:         337 Load 339(s2DArrayShadow)
-            4560:  249(fvec4) Load 251(c4)
-            4561:   52(float) Load 4257(lodClamp)
-            4562:   52(float) CompositeExtract 4560 3
-            4563:6(float16_t) ImageSampleDrefImplicitLod 4559 4560 4562 MinLod 4561
-            4564:    208(ptr) AccessChain 4391(texel) 207
-            4565:6(float16_t) Load 4564
-            4566:6(float16_t) FAdd 4565 4563
-            4567:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4567 4566
-            4568:         337 Load 339(s2DArrayShadow)
-            4569:175(f16vec3) Load 177(f16c3)
-            4570:   52(float) Load 215(compare)
-            4571:6(float16_t) Load 4264(f16lodClamp)
-            4572:6(float16_t) ImageSampleDrefImplicitLod 4568 4569 4570 MinLod 4571
-            4573:    208(ptr) AccessChain 4391(texel) 207
-            4574:6(float16_t) Load 4573
-            4575:6(float16_t) FAdd 4574 4572
-            4576:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4576 4575
-            4577:         391 Load 393(sCubeArrayShadow)
-            4578:  249(fvec4) Load 251(c4)
-            4579:   52(float) Load 215(compare)
-            4580:   52(float) Load 4257(lodClamp)
-            4581:6(float16_t) ImageSampleDrefImplicitLod 4577 4578 4579 MinLod 4580
-            4582:    208(ptr) AccessChain 4391(texel) 207
-            4583:6(float16_t) Load 4582
-            4584:6(float16_t) FAdd 4583 4581
-            4585:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4585 4584
-            4586:         391 Load 393(sCubeArrayShadow)
-            4587:  7(f16vec4) Load 309(f16c4)
-            4588:   52(float) Load 215(compare)
-            4589:6(float16_t) Load 4264(f16lodClamp)
-            4590:6(float16_t) ImageSampleDrefImplicitLod 4586 4587 4588 MinLod 4589
-            4591:    208(ptr) AccessChain 4391(texel) 207
-            4592:6(float16_t) Load 4591
-            4593:6(float16_t) FAdd 4592 4590
-            4594:    208(ptr) AccessChain 4391(texel) 207
-                              Store 4594 4593
-            4595:  7(f16vec4) Load 4391(texel)
-                              ReturnValue 4595
+            4559:         316 Load 318(s1DArrayShadow)
+            4560:154(f16vec2) Load 156(f16c2)
+            4561:   52(float) Load 215(compare)
+            4562:6(float16_t) Load 4274(f16lodClamp)
+            4563:6(float16_t) Load 137(f16bias)
+            4564:6(float16_t) ImageSampleDrefImplicitLod 4559 4560 4561 Bias MinLod 4563 4562
+            4565:    208(ptr) AccessChain 4401(texel) 207
+            4566:6(float16_t) Load 4565
+            4567:6(float16_t) FAdd 4566 4564
+            4568:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4568 4567
+            4569:         337 Load 339(s2DArrayShadow)
+            4570:  249(fvec4) Load 251(c4)
+            4571:   52(float) Load 4267(lodClamp)
+            4572:   52(float) CompositeExtract 4570 3
+            4573:6(float16_t) ImageSampleDrefImplicitLod 4569 4570 4572 MinLod 4571
+            4574:    208(ptr) AccessChain 4401(texel) 207
+            4575:6(float16_t) Load 4574
+            4576:6(float16_t) FAdd 4575 4573
+            4577:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4577 4576
+            4578:         337 Load 339(s2DArrayShadow)
+            4579:175(f16vec3) Load 177(f16c3)
+            4580:   52(float) Load 215(compare)
+            4581:6(float16_t) Load 4274(f16lodClamp)
+            4582:6(float16_t) ImageSampleDrefImplicitLod 4578 4579 4580 MinLod 4581
+            4583:    208(ptr) AccessChain 4401(texel) 207
+            4584:6(float16_t) Load 4583
+            4585:6(float16_t) FAdd 4584 4582
+            4586:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4586 4585
+            4587:         391 Load 393(sCubeArrayShadow)
+            4588:  249(fvec4) Load 251(c4)
+            4589:   52(float) Load 215(compare)
+            4590:   52(float) Load 4267(lodClamp)
+            4591:6(float16_t) ImageSampleDrefImplicitLod 4587 4588 4589 MinLod 4590
+            4592:    208(ptr) AccessChain 4401(texel) 207
+            4593:6(float16_t) Load 4592
+            4594:6(float16_t) FAdd 4593 4591
+            4595:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4595 4594
+            4596:         391 Load 393(sCubeArrayShadow)
+            4597:  7(f16vec4) Load 309(f16c4)
+            4598:   52(float) Load 215(compare)
+            4599:6(float16_t) Load 4274(f16lodClamp)
+            4600:6(float16_t) ImageSampleDrefImplicitLod 4596 4597 4598 MinLod 4599
+            4601:    208(ptr) AccessChain 4401(texel) 207
+            4602:6(float16_t) Load 4601
+            4603:6(float16_t) FAdd 4602 4600
+            4604:    208(ptr) AccessChain 4401(texel) 207
+                              Store 4604 4603
+            4605:  7(f16vec4) Load 4401(texel)
+                              ReturnValue 4605
                               FunctionEnd
 103(testSparseTextureOffsetClamp():  7(f16vec4) Function None 8
              104:             Label
-     4598(texel):     64(ptr) Variable Function
-                              Store 4598(texel) 121
-            4599:         143 Load 145(s2D)
-            4600:   53(fvec2) Load 148(c2)
-            4601:   52(float) Load 4257(lodClamp)
-            4602:3102(ResType) ImageSparseSampleImplicitLod 4599 4600 ConstOffset MinLod 722 4601
-            4603:  7(f16vec4) CompositeExtract 4602 1
-                              Store 4598(texel) 4603
-            4604:     47(int) CompositeExtract 4602 0
-            4605:         143 Load 145(s2D)
-            4606:154(f16vec2) Load 156(f16c2)
-            4607:6(float16_t) Load 4264(f16lodClamp)
-            4608:6(float16_t) Load 137(f16bias)
-            4609:3102(ResType) ImageSparseSampleImplicitLod 4605 4606 Bias ConstOffset MinLod 4608 722 4607
-            4610:  7(f16vec4) CompositeExtract 4609 1
-                              Store 4598(texel) 4610
-            4611:     47(int) CompositeExtract 4609 0
-            4612:         163 Load 165(s3D)
-            4613:  167(fvec3) Load 169(c3)
-            4614:   52(float) Load 4257(lodClamp)
-            4615:3102(ResType) ImageSparseSampleImplicitLod 4612 4613 ConstOffset MinLod 735 4614
-            4616:  7(f16vec4) CompositeExtract 4615 1
-                              Store 4598(texel) 4616
-            4617:     47(int) CompositeExtract 4615 0
-            4618:         163 Load 165(s3D)
-            4619:175(f16vec3) Load 177(f16c3)
-            4620:6(float16_t) Load 4264(f16lodClamp)
-            4621:6(float16_t) Load 137(f16bias)
-            4622:3102(ResType) ImageSparseSampleImplicitLod 4618 4619 Bias ConstOffset MinLod 4621 735 4620
-            4623:  7(f16vec4) CompositeExtract 4622 1
-                              Store 4598(texel) 4623
-            4624:     47(int) CompositeExtract 4622 0
-            4625:         224 Load 226(s2DShadow)
-            4626:  167(fvec3) Load 169(c3)
-            4627:   52(float) Load 4257(lodClamp)
-            4628:    208(ptr) AccessChain 4598(texel) 207
-            4629:   52(float) CompositeExtract 4626 2
-            4630:3138(ResType) ImageSparseSampleDrefImplicitLod 4625 4626 4629 ConstOffset MinLod 722 4627
-            4631:6(float16_t) CompositeExtract 4630 1
-                              Store 4628 4631
-            4632:     47(int) CompositeExtract 4630 0
-            4633:         224 Load 226(s2DShadow)
-            4634:154(f16vec2) Load 156(f16c2)
-            4635:   52(float) Load 215(compare)
-            4636:6(float16_t) Load 4264(f16lodClamp)
-            4637:    208(ptr) AccessChain 4598(texel) 207
-            4638:6(float16_t) Load 137(f16bias)
-            4639:3138(ResType) ImageSparseSampleDrefImplicitLod 4633 4634 4635 Bias ConstOffset MinLod 4638 722 4636
-            4640:6(float16_t) CompositeExtract 4639 1
-                              Store 4637 4640
-            4641:     47(int) CompositeExtract 4639 0
-            4642:         284 Load 286(s2DArray)
-            4643:  167(fvec3) Load 169(c3)
-            4644:   52(float) Load 4257(lodClamp)
-            4645:3102(ResType) ImageSparseSampleImplicitLod 4642 4643 ConstOffset MinLod 722 4644
-            4646:  7(f16vec4) CompositeExtract 4645 1
-                              Store 4598(texel) 4646
-            4647:     47(int) CompositeExtract 4645 0
-            4648:         284 Load 286(s2DArray)
-            4649:175(f16vec3) Load 177(f16c3)
-            4650:6(float16_t) Load 4264(f16lodClamp)
-            4651:6(float16_t) Load 137(f16bias)
-            4652:3102(ResType) ImageSparseSampleImplicitLod 4648 4649 Bias ConstOffset MinLod 4651 722 4650
-            4653:  7(f16vec4) CompositeExtract 4652 1
-                              Store 4598(texel) 4653
-            4654:     47(int) CompositeExtract 4652 0
-            4655:         337 Load 339(s2DArrayShadow)
-            4656:  249(fvec4) Load 251(c4)
-            4657:   52(float) Load 4257(lodClamp)
-            4658:    208(ptr) AccessChain 4598(texel) 207
-            4659:   52(float) CompositeExtract 4656 3
-            4660:3138(ResType) ImageSparseSampleDrefImplicitLod 4655 4656 4659 ConstOffset MinLod 722 4657
-            4661:6(float16_t) CompositeExtract 4660 1
-                              Store 4658 4661
-            4662:     47(int) CompositeExtract 4660 0
-            4663:         337 Load 339(s2DArrayShadow)
-            4664:175(f16vec3) Load 177(f16c3)
-            4665:   52(float) Load 215(compare)
-            4666:6(float16_t) Load 4264(f16lodClamp)
-            4667:    208(ptr) AccessChain 4598(texel) 207
-            4668:3138(ResType) ImageSparseSampleDrefImplicitLod 4663 4664 4665 ConstOffset MinLod 722 4666
-            4669:6(float16_t) CompositeExtract 4668 1
-                              Store 4667 4669
-            4670:     47(int) CompositeExtract 4668 0
-            4671:  7(f16vec4) Load 4598(texel)
-                              ReturnValue 4671
+     4608(texel):     64(ptr) Variable Function
+                              Store 4608(texel) 121
+            4609:         143 Load 145(s2D)
+            4610:   53(fvec2) Load 148(c2)
+            4611:   52(float) Load 4267(lodClamp)
+            4612:3102(ResType) ImageSparseSampleImplicitLod 4609 4610 ConstOffset MinLod 722 4611
+            4613:  7(f16vec4) CompositeExtract 4612 1
+                              Store 4608(texel) 4613
+            4614:     47(int) CompositeExtract 4612 0
+            4615:         143 Load 145(s2D)
+            4616:154(f16vec2) Load 156(f16c2)
+            4617:6(float16_t) Load 4274(f16lodClamp)
+            4618:6(float16_t) Load 137(f16bias)
+            4619:3102(ResType) ImageSparseSampleImplicitLod 4615 4616 Bias ConstOffset MinLod 4618 722 4617
+            4620:  7(f16vec4) CompositeExtract 4619 1
+                              Store 4608(texel) 4620
+            4621:     47(int) CompositeExtract 4619 0
+            4622:         163 Load 165(s3D)
+            4623:  167(fvec3) Load 169(c3)
+            4624:   52(float) Load 4267(lodClamp)
+            4625:3102(ResType) ImageSparseSampleImplicitLod 4622 4623 ConstOffset MinLod 735 4624
+            4626:  7(f16vec4) CompositeExtract 4625 1
+                              Store 4608(texel) 4626
+            4627:     47(int) CompositeExtract 4625 0
+            4628:         163 Load 165(s3D)
+            4629:175(f16vec3) Load 177(f16c3)
+            4630:6(float16_t) Load 4274(f16lodClamp)
+            4631:6(float16_t) Load 137(f16bias)
+            4632:3102(ResType) ImageSparseSampleImplicitLod 4628 4629 Bias ConstOffset MinLod 4631 735 4630
+            4633:  7(f16vec4) CompositeExtract 4632 1
+                              Store 4608(texel) 4633
+            4634:     47(int) CompositeExtract 4632 0
+            4635:         224 Load 226(s2DShadow)
+            4636:  167(fvec3) Load 169(c3)
+            4637:   52(float) Load 4267(lodClamp)
+            4638:    208(ptr) AccessChain 4608(texel) 207
+            4639:   52(float) CompositeExtract 4636 2
+            4640:3138(ResType) ImageSparseSampleDrefImplicitLod 4635 4636 4639 ConstOffset MinLod 722 4637
+            4641:6(float16_t) CompositeExtract 4640 1
+                              Store 4638 4641
+            4642:     47(int) CompositeExtract 4640 0
+            4643:         224 Load 226(s2DShadow)
+            4644:154(f16vec2) Load 156(f16c2)
+            4645:   52(float) Load 215(compare)
+            4646:6(float16_t) Load 4274(f16lodClamp)
+            4647:    208(ptr) AccessChain 4608(texel) 207
+            4648:6(float16_t) Load 137(f16bias)
+            4649:3138(ResType) ImageSparseSampleDrefImplicitLod 4643 4644 4645 Bias ConstOffset MinLod 4648 722 4646
+            4650:6(float16_t) CompositeExtract 4649 1
+                              Store 4647 4650
+            4651:     47(int) CompositeExtract 4649 0
+            4652:         284 Load 286(s2DArray)
+            4653:  167(fvec3) Load 169(c3)
+            4654:   52(float) Load 4267(lodClamp)
+            4655:3102(ResType) ImageSparseSampleImplicitLod 4652 4653 ConstOffset MinLod 722 4654
+            4656:  7(f16vec4) CompositeExtract 4655 1
+                              Store 4608(texel) 4656
+            4657:     47(int) CompositeExtract 4655 0
+            4658:         284 Load 286(s2DArray)
+            4659:175(f16vec3) Load 177(f16c3)
+            4660:6(float16_t) Load 4274(f16lodClamp)
+            4661:6(float16_t) Load 137(f16bias)
+            4662:3102(ResType) ImageSparseSampleImplicitLod 4658 4659 Bias ConstOffset MinLod 4661 722 4660
+            4663:  7(f16vec4) CompositeExtract 4662 1
+                              Store 4608(texel) 4663
+            4664:     47(int) CompositeExtract 4662 0
+            4665:         337 Load 339(s2DArrayShadow)
+            4666:  249(fvec4) Load 251(c4)
+            4667:   52(float) Load 4267(lodClamp)
+            4668:    208(ptr) AccessChain 4608(texel) 207
+            4669:   52(float) CompositeExtract 4666 3
+            4670:3138(ResType) ImageSparseSampleDrefImplicitLod 4665 4666 4669 ConstOffset MinLod 722 4667
+            4671:6(float16_t) CompositeExtract 4670 1
+                              Store 4668 4671
+            4672:     47(int) CompositeExtract 4670 0
+            4673:         337 Load 339(s2DArrayShadow)
+            4674:175(f16vec3) Load 177(f16c3)
+            4675:   52(float) Load 215(compare)
+            4676:6(float16_t) Load 4274(f16lodClamp)
+            4677:    208(ptr) AccessChain 4608(texel) 207
+            4678:3138(ResType) ImageSparseSampleDrefImplicitLod 4673 4674 4675 ConstOffset MinLod 722 4676
+            4679:6(float16_t) CompositeExtract 4678 1
+                              Store 4677 4679
+            4680:     47(int) CompositeExtract 4678 0
+            4681:  7(f16vec4) Load 4608(texel)
+                              ReturnValue 4681
                               FunctionEnd
 105(testTextureOffsetClamp():  7(f16vec4) Function None 8
              106:             Label
-     4674(texel):     64(ptr) Variable Function
-                              Store 4674(texel) 121
-            4675:         123 Load 125(s1D)
-            4676:   52(float) Load 128(c1)
-            4677:   52(float) Load 4257(lodClamp)
-            4678:  7(f16vec4) ImageSampleImplicitLod 4675 4676 ConstOffset MinLod 709 4677
-            4679:  7(f16vec4) Load 4674(texel)
-            4680:  7(f16vec4) FAdd 4679 4678
-                              Store 4674(texel) 4680
-            4681:         123 Load 125(s1D)
-            4682:6(float16_t) Load 135(f16c1)
-            4683:6(float16_t) Load 4264(f16lodClamp)
-            4684:6(float16_t) Load 137(f16bias)
-            4685:  7(f16vec4) ImageSampleImplicitLod 4681 4682 Bias ConstOffset MinLod 4684 709 4683
-            4686:  7(f16vec4) Load 4674(texel)
-            4687:  7(f16vec4) FAdd 4686 4685
-                              Store 4674(texel) 4687
-            4688:         143 Load 145(s2D)
-            4689:   53(fvec2) Load 148(c2)
-            4690:   52(float) Load 4257(lodClamp)
-            4691:  7(f16vec4) ImageSampleImplicitLod 4688 4689 ConstOffset MinLod 722 4690
-            4692:  7(f16vec4) Load 4674(texel)
-            4693:  7(f16vec4) FAdd 4692 4691
-                              Store 4674(texel) 4693
-            4694:         143 Load 145(s2D)
-            4695:154(f16vec2) Load 156(f16c2)
-            4696:6(float16_t) Load 4264(f16lodClamp)
-            4697:6(float16_t) Load 137(f16bias)
-            4698:  7(f16vec4) ImageSampleImplicitLod 4694 4695 Bias ConstOffset MinLod 4697 722 4696
-            4699:  7(f16vec4) Load 4674(texel)
-            4700:  7(f16vec4) FAdd 4699 4698
-                              Store 4674(texel) 4700
-            4701:         163 Load 165(s3D)
-            4702:  167(fvec3) Load 169(c3)
-            4703:   52(float) Load 4257(lodClamp)
-            4704:  7(f16vec4) ImageSampleImplicitLod 4701 4702 ConstOffset MinLod 735 4703
-            4705:  7(f16vec4) Load 4674(texel)
-            4706:  7(f16vec4) FAdd 4705 4704
-                              Store 4674(texel) 4706
-            4707:         163 Load 165(s3D)
-            4708:175(f16vec3) Load 177(f16c3)
-            4709:6(float16_t) Load 4264(f16lodClamp)
-            4710:6(float16_t) Load 137(f16bias)
-            4711:  7(f16vec4) ImageSampleImplicitLod 4707 4708 Bias ConstOffset MinLod 4710 735 4709
-            4712:  7(f16vec4) Load 4674(texel)
-            4713:  7(f16vec4) FAdd 4712 4711
-                              Store 4674(texel) 4713
-            4714:         199 Load 201(s1DShadow)
-            4715:  167(fvec3) Load 169(c3)
-            4716:   52(float) Load 4257(lodClamp)
-            4717:   52(float) CompositeExtract 4715 2
-            4718:6(float16_t) ImageSampleDrefImplicitLod 4714 4715 4717 ConstOffset MinLod 709 4716
-            4719:    208(ptr) AccessChain 4674(texel) 207
-            4720:6(float16_t) Load 4719
-            4721:6(float16_t) FAdd 4720 4718
-            4722:    208(ptr) AccessChain 4674(texel) 207
-                              Store 4722 4721
-            4723:         199 Load 201(s1DShadow)
-            4724:154(f16vec2) Load 156(f16c2)
-            4725:   52(float) Load 215(compare)
-            4726:6(float16_t) Load 4264(f16lodClamp)
-            4727:6(float16_t) Load 137(f16bias)
-            4728:6(float16_t) ImageSampleDrefImplicitLod 4723 4724 4725 Bias ConstOffset MinLod 4727 709 4726
-            4729:    208(ptr) AccessChain 4674(texel) 207
+     4684(texel):     64(ptr) Variable Function
+                              Store 4684(texel) 121
+            4685:         123 Load 125(s1D)
+            4686:   52(float) Load 128(c1)
+            4687:   52(float) Load 4267(lodClamp)
+            4688:  7(f16vec4) ImageSampleImplicitLod 4685 4686 ConstOffset MinLod 709 4687
+            4689:  7(f16vec4) Load 4684(texel)
+            4690:  7(f16vec4) FAdd 4689 4688
+                              Store 4684(texel) 4690
+            4691:         123 Load 125(s1D)
+            4692:6(float16_t) Load 135(f16c1)
+            4693:6(float16_t) Load 4274(f16lodClamp)
+            4694:6(float16_t) Load 137(f16bias)
+            4695:  7(f16vec4) ImageSampleImplicitLod 4691 4692 Bias ConstOffset MinLod 4694 709 4693
+            4696:  7(f16vec4) Load 4684(texel)
+            4697:  7(f16vec4) FAdd 4696 4695
+                              Store 4684(texel) 4697
+            4698:         143 Load 145(s2D)
+            4699:   53(fvec2) Load 148(c2)
+            4700:   52(float) Load 4267(lodClamp)
+            4701:  7(f16vec4) ImageSampleImplicitLod 4698 4699 ConstOffset MinLod 722 4700
+            4702:  7(f16vec4) Load 4684(texel)
+            4703:  7(f16vec4) FAdd 4702 4701
+                              Store 4684(texel) 4703
+            4704:         143 Load 145(s2D)
+            4705:154(f16vec2) Load 156(f16c2)
+            4706:6(float16_t) Load 4274(f16lodClamp)
+            4707:6(float16_t) Load 137(f16bias)
+            4708:  7(f16vec4) ImageSampleImplicitLod 4704 4705 Bias ConstOffset MinLod 4707 722 4706
+            4709:  7(f16vec4) Load 4684(texel)
+            4710:  7(f16vec4) FAdd 4709 4708
+                              Store 4684(texel) 4710
+            4711:         163 Load 165(s3D)
+            4712:  167(fvec3) Load 169(c3)
+            4713:   52(float) Load 4267(lodClamp)
+            4714:  7(f16vec4) ImageSampleImplicitLod 4711 4712 ConstOffset MinLod 735 4713
+            4715:  7(f16vec4) Load 4684(texel)
+            4716:  7(f16vec4) FAdd 4715 4714
+                              Store 4684(texel) 4716
+            4717:         163 Load 165(s3D)
+            4718:175(f16vec3) Load 177(f16c3)
+            4719:6(float16_t) Load 4274(f16lodClamp)
+            4720:6(float16_t) Load 137(f16bias)
+            4721:  7(f16vec4) ImageSampleImplicitLod 4717 4718 Bias ConstOffset MinLod 4720 735 4719
+            4722:  7(f16vec4) Load 4684(texel)
+            4723:  7(f16vec4) FAdd 4722 4721
+                              Store 4684(texel) 4723
+            4724:         199 Load 201(s1DShadow)
+            4725:  167(fvec3) Load 169(c3)
+            4726:   52(float) Load 4267(lodClamp)
+            4727:   52(float) CompositeExtract 4725 2
+            4728:6(float16_t) ImageSampleDrefImplicitLod 4724 4725 4727 ConstOffset MinLod 709 4726
+            4729:    208(ptr) AccessChain 4684(texel) 207
             4730:6(float16_t) Load 4729
             4731:6(float16_t) FAdd 4730 4728
-            4732:    208(ptr) AccessChain 4674(texel) 207
+            4732:    208(ptr) AccessChain 4684(texel) 207
                               Store 4732 4731
-            4733:         224 Load 226(s2DShadow)
-            4734:  167(fvec3) Load 169(c3)
-            4735:   52(float) Load 4257(lodClamp)
-            4736:   52(float) CompositeExtract 4734 2
-            4737:6(float16_t) ImageSampleDrefImplicitLod 4733 4734 4736 ConstOffset MinLod 722 4735
-            4738:    208(ptr) AccessChain 4674(texel) 207
-            4739:6(float16_t) Load 4738
-            4740:6(float16_t) FAdd 4739 4737
-            4741:    208(ptr) AccessChain 4674(texel) 207
-                              Store 4741 4740
-            4742:         224 Load 226(s2DShadow)
-            4743:154(f16vec2) Load 156(f16c2)
-            4744:   52(float) Load 215(compare)
-            4745:6(float16_t) Load 4264(f16lodClamp)
-            4746:6(float16_t) Load 137(f16bias)
-            4747:6(float16_t) ImageSampleDrefImplicitLod 4742 4743 4744 Bias ConstOffset MinLod 4746 722 4745
-            4748:    208(ptr) AccessChain 4674(texel) 207
+            4733:         199 Load 201(s1DShadow)
+            4734:154(f16vec2) Load 156(f16c2)
+            4735:   52(float) Load 215(compare)
+            4736:6(float16_t) Load 4274(f16lodClamp)
+            4737:6(float16_t) Load 137(f16bias)
+            4738:6(float16_t) ImageSampleDrefImplicitLod 4733 4734 4735 Bias ConstOffset MinLod 4737 709 4736
+            4739:    208(ptr) AccessChain 4684(texel) 207
+            4740:6(float16_t) Load 4739
+            4741:6(float16_t) FAdd 4740 4738
+            4742:    208(ptr) AccessChain 4684(texel) 207
+                              Store 4742 4741
+            4743:         224 Load 226(s2DShadow)
+            4744:  167(fvec3) Load 169(c3)
+            4745:   52(float) Load 4267(lodClamp)
+            4746:   52(float) CompositeExtract 4744 2
+            4747:6(float16_t) ImageSampleDrefImplicitLod 4743 4744 4746 ConstOffset MinLod 722 4745
+            4748:    208(ptr) AccessChain 4684(texel) 207
             4749:6(float16_t) Load 4748
             4750:6(float16_t) FAdd 4749 4747
-            4751:    208(ptr) AccessChain 4674(texel) 207
+            4751:    208(ptr) AccessChain 4684(texel) 207
                               Store 4751 4750
-            4752:         269 Load 271(s1DArray)
-            4753:   53(fvec2) Load 148(c2)
-            4754:   52(float) Load 4257(lodClamp)
-            4755:  7(f16vec4) ImageSampleImplicitLod 4752 4753 ConstOffset MinLod 709 4754
-            4756:  7(f16vec4) Load 4674(texel)
-            4757:  7(f16vec4) FAdd 4756 4755
-                              Store 4674(texel) 4757
-            4758:         269 Load 271(s1DArray)
-            4759:154(f16vec2) Load 156(f16c2)
-            4760:6(float16_t) Load 4264(f16lodClamp)
-            4761:6(float16_t) Load 137(f16bias)
-            4762:  7(f16vec4) ImageSampleImplicitLod 4758 4759 Bias ConstOffset MinLod 4761 709 4760
-            4763:  7(f16vec4) Load 4674(texel)
-            4764:  7(f16vec4) FAdd 4763 4762
-                              Store 4674(texel) 4764
-            4765:         284 Load 286(s2DArray)
-            4766:  167(fvec3) Load 169(c3)
-            4767:   52(float) Load 4257(lodClamp)
-            4768:  7(f16vec4) ImageSampleImplicitLod 4765 4766 ConstOffset MinLod 722 4767
-            4769:  7(f16vec4) Load 4674(texel)
-            4770:  7(f16vec4) FAdd 4769 4768
-                              Store 4674(texel) 4770
-            4771:         284 Load 286(s2DArray)
-            4772:175(f16vec3) Load 177(f16c3)
-            4773:6(float16_t) Load 4264(f16lodClamp)
-            4774:6(float16_t) Load 137(f16bias)
-            4775:  7(f16vec4) ImageSampleImplicitLod 4771 4772 Bias ConstOffset MinLod 4774 722 4773
-            4776:  7(f16vec4) Load 4674(texel)
-            4777:  7(f16vec4) FAdd 4776 4775
-                              Store 4674(texel) 4777
-            4778:         316 Load 318(s1DArrayShadow)
-            4779:  167(fvec3) Load 169(c3)
-            4780:   52(float) Load 4257(lodClamp)
-            4781:   52(float) CompositeExtract 4779 2
-            4782:6(float16_t) ImageSampleDrefImplicitLod 4778 4779 4781 ConstOffset MinLod 709 4780
-            4783:    208(ptr) AccessChain 4674(texel) 207
-            4784:6(float16_t) Load 4783
-            4785:6(float16_t) FAdd 4784 4782
-            4786:    208(ptr) AccessChain 4674(texel) 207
-                              Store 4786 4785
-            4787:         316 Load 318(s1DArrayShadow)
-            4788:154(f16vec2) Load 156(f16c2)
-            4789:   52(float) Load 215(compare)
-            4790:6(float16_t) Load 4264(f16lodClamp)
-            4791:6(float16_t) Load 137(f16bias)
-            4792:6(float16_t) ImageSampleDrefImplicitLod 4787 4788 4789 Bias ConstOffset MinLod 4791 709 4790
-            4793:    208(ptr) AccessChain 4674(texel) 207
+            4752:         224 Load 226(s2DShadow)
+            4753:154(f16vec2) Load 156(f16c2)
+            4754:   52(float) Load 215(compare)
+            4755:6(float16_t) Load 4274(f16lodClamp)
+            4756:6(float16_t) Load 137(f16bias)
+            4757:6(float16_t) ImageSampleDrefImplicitLod 4752 4753 4754 Bias ConstOffset MinLod 4756 722 4755
+            4758:    208(ptr) AccessChain 4684(texel) 207
+            4759:6(float16_t) Load 4758
+            4760:6(float16_t) FAdd 4759 4757
+            4761:    208(ptr) AccessChain 4684(texel) 207
+                              Store 4761 4760
+            4762:         269 Load 271(s1DArray)
+            4763:   53(fvec2) Load 148(c2)
+            4764:   52(float) Load 4267(lodClamp)
+            4765:  7(f16vec4) ImageSampleImplicitLod 4762 4763 ConstOffset MinLod 709 4764
+            4766:  7(f16vec4) Load 4684(texel)
+            4767:  7(f16vec4) FAdd 4766 4765
+                              Store 4684(texel) 4767
+            4768:         269 Load 271(s1DArray)
+            4769:154(f16vec2) Load 156(f16c2)
+            4770:6(float16_t) Load 4274(f16lodClamp)
+            4771:6(float16_t) Load 137(f16bias)
+            4772:  7(f16vec4) ImageSampleImplicitLod 4768 4769 Bias ConstOffset MinLod 4771 709 4770
+            4773:  7(f16vec4) Load 4684(texel)
+            4774:  7(f16vec4) FAdd 4773 4772
+                              Store 4684(texel) 4774
+            4775:         284 Load 286(s2DArray)
+            4776:  167(fvec3) Load 169(c3)
+            4777:   52(float) Load 4267(lodClamp)
+            4778:  7(f16vec4) ImageSampleImplicitLod 4775 4776 ConstOffset MinLod 722 4777
+            4779:  7(f16vec4) Load 4684(texel)
+            4780:  7(f16vec4) FAdd 4779 4778
+                              Store 4684(texel) 4780
+            4781:         284 Load 286(s2DArray)
+            4782:175(f16vec3) Load 177(f16c3)
+            4783:6(float16_t) Load 4274(f16lodClamp)
+            4784:6(float16_t) Load 137(f16bias)
+            4785:  7(f16vec4) ImageSampleImplicitLod 4781 4782 Bias ConstOffset MinLod 4784 722 4783
+            4786:  7(f16vec4) Load 4684(texel)
+            4787:  7(f16vec4) FAdd 4786 4785
+                              Store 4684(texel) 4787
+            4788:         316 Load 318(s1DArrayShadow)
+            4789:  167(fvec3) Load 169(c3)
+            4790:   52(float) Load 4267(lodClamp)
+            4791:   52(float) CompositeExtract 4789 2
+            4792:6(float16_t) ImageSampleDrefImplicitLod 4788 4789 4791 ConstOffset MinLod 709 4790
+            4793:    208(ptr) AccessChain 4684(texel) 207
             4794:6(float16_t) Load 4793
             4795:6(float16_t) FAdd 4794 4792
-            4796:    208(ptr) AccessChain 4674(texel) 207
+            4796:    208(ptr) AccessChain 4684(texel) 207
                               Store 4796 4795
-            4797:         337 Load 339(s2DArrayShadow)
-            4798:  249(fvec4) Load 251(c4)
-            4799:   52(float) Load 4257(lodClamp)
-            4800:   52(float) CompositeExtract 4798 3
-            4801:6(float16_t) ImageSampleDrefImplicitLod 4797 4798 4800 ConstOffset MinLod 722 4799
-            4802:    208(ptr) AccessChain 4674(texel) 207
-            4803:6(float16_t) Load 4802
-            4804:6(float16_t) FAdd 4803 4801
-            4805:    208(ptr) AccessChain 4674(texel) 207
-                              Store 4805 4804
-            4806:         337 Load 339(s2DArrayShadow)
-            4807:175(f16vec3) Load 177(f16c3)
-            4808:   52(float) Load 215(compare)
-            4809:6(float16_t) Load 4264(f16lodClamp)
-            4810:6(float16_t) ImageSampleDrefImplicitLod 4806 4807 4808 ConstOffset MinLod 722 4809
-            4811:    208(ptr) AccessChain 4674(texel) 207
-            4812:6(float16_t) Load 4811
-            4813:6(float16_t) FAdd 4812 4810
-            4814:    208(ptr) AccessChain 4674(texel) 207
-                              Store 4814 4813
-            4815:  7(f16vec4) Load 4674(texel)
-                              ReturnValue 4815
+            4797:         316 Load 318(s1DArrayShadow)
+            4798:154(f16vec2) Load 156(f16c2)
+            4799:   52(float) Load 215(compare)
+            4800:6(float16_t) Load 4274(f16lodClamp)
+            4801:6(float16_t) Load 137(f16bias)
+            4802:6(float16_t) ImageSampleDrefImplicitLod 4797 4798 4799 Bias ConstOffset MinLod 4801 709 4800
+            4803:    208(ptr) AccessChain 4684(texel) 207
+            4804:6(float16_t) Load 4803
+            4805:6(float16_t) FAdd 4804 4802
+            4806:    208(ptr) AccessChain 4684(texel) 207
+                              Store 4806 4805
+            4807:         337 Load 339(s2DArrayShadow)
+            4808:  249(fvec4) Load 251(c4)
+            4809:   52(float) Load 4267(lodClamp)
+            4810:   52(float) CompositeExtract 4808 3
+            4811:6(float16_t) ImageSampleDrefImplicitLod 4807 4808 4810 ConstOffset MinLod 722 4809
+            4812:    208(ptr) AccessChain 4684(texel) 207
+            4813:6(float16_t) Load 4812
+            4814:6(float16_t) FAdd 4813 4811
+            4815:    208(ptr) AccessChain 4684(texel) 207
+                              Store 4815 4814
+            4816:         337 Load 339(s2DArrayShadow)
+            4817:175(f16vec3) Load 177(f16c3)
+            4818:   52(float) Load 215(compare)
+            4819:6(float16_t) Load 4274(f16lodClamp)
+            4820:6(float16_t) ImageSampleDrefImplicitLod 4816 4817 4818 ConstOffset MinLod 722 4819
+            4821:    208(ptr) AccessChain 4684(texel) 207
+            4822:6(float16_t) Load 4821
+            4823:6(float16_t) FAdd 4822 4820
+            4824:    208(ptr) AccessChain 4684(texel) 207
+                              Store 4824 4823
+            4825:  7(f16vec4) Load 4684(texel)
+                              ReturnValue 4825
                               FunctionEnd
 107(testSparseTextureGradClamp():  7(f16vec4) Function None 8
              108:             Label
-     4818(texel):     64(ptr) Variable Function
-                              Store 4818(texel) 121
-            4819:         143 Load 145(s2D)
-            4820:   53(fvec2) Load 148(c2)
-            4821:   53(fvec2) Load 1409(dPdxy2)
-            4822:   53(fvec2) Load 1409(dPdxy2)
-            4823:   52(float) Load 4257(lodClamp)
-            4824:3102(ResType) ImageSparseSampleExplicitLod 4819 4820 Grad MinLod 4821 4822 4823
-            4825:  7(f16vec4) CompositeExtract 4824 1
-                              Store 4818(texel) 4825
-            4826:     47(int) CompositeExtract 4824 0
-            4827:         143 Load 145(s2D)
-            4828:154(f16vec2) Load 156(f16c2)
-            4829:154(f16vec2) Load 1417(f16dPdxy2)
-            4830:154(f16vec2) Load 1417(f16dPdxy2)
-            4831:6(float16_t) Load 4264(f16lodClamp)
-            4832:3102(ResType) ImageSparseSampleExplicitLod 4827 4828 Grad MinLod 4829 4830 4831
-            4833:  7(f16vec4) CompositeExtract 4832 1
-                              Store 4818(texel) 4833
-            4834:     47(int) CompositeExtract 4832 0
-            4835:         163 Load 165(s3D)
-            4836:  167(fvec3) Load 169(c3)
-            4837:  167(fvec3) Load 1425(dPdxy3)
-            4838:  167(fvec3) Load 1425(dPdxy3)
-            4839:   52(float) Load 4257(lodClamp)
-            4840:3102(ResType) ImageSparseSampleExplicitLod 4835 4836 Grad MinLod 4837 4838 4839
-            4841:  7(f16vec4) CompositeExtract 4840 1
-                              Store 4818(texel) 4841
-            4842:     47(int) CompositeExtract 4840 0
-            4843:         163 Load 165(s3D)
-            4844:175(f16vec3) Load 177(f16c3)
-            4845:175(f16vec3) Load 1433(f16dPdxy3)
-            4846:175(f16vec3) Load 1433(f16dPdxy3)
-            4847:6(float16_t) Load 4264(f16lodClamp)
-            4848:3102(ResType) ImageSparseSampleExplicitLod 4843 4844 Grad MinLod 4845 4846 4847
-            4849:  7(f16vec4) CompositeExtract 4848 1
-                              Store 4818(texel) 4849
-            4850:     47(int) CompositeExtract 4848 0
-            4851:         184 Load 186(sCube)
-            4852:  167(fvec3) Load 169(c3)
-            4853:  167(fvec3) Load 1425(dPdxy3)
-            4854:  167(fvec3) Load 1425(dPdxy3)
-            4855:   52(float) Load 4257(lodClamp)
-            4856:3102(ResType) ImageSparseSampleExplicitLod 4851 4852 Grad MinLod 4853 4854 4855
-            4857:  7(f16vec4) CompositeExtract 4856 1
-                              Store 4818(texel) 4857
-            4858:     47(int) CompositeExtract 4856 0
-            4859:         184 Load 186(sCube)
-            4860:175(f16vec3) Load 177(f16c3)
-            4861:175(f16vec3) Load 1433(f16dPdxy3)
-            4862:175(f16vec3) Load 1433(f16dPdxy3)
-            4863:6(float16_t) Load 4264(f16lodClamp)
-            4864:3102(ResType) ImageSparseSampleExplicitLod 4859 4860 Grad MinLod 4861 4862 4863
-            4865:  7(f16vec4) CompositeExtract 4864 1
-                              Store 4818(texel) 4865
-            4866:     47(int) CompositeExtract 4864 0
-            4867:         224 Load 226(s2DShadow)
-            4868:  167(fvec3) Load 169(c3)
-            4869:   53(fvec2) Load 1409(dPdxy2)
-            4870:   53(fvec2) Load 1409(dPdxy2)
-            4871:   52(float) Load 4257(lodClamp)
-            4872:    208(ptr) AccessChain 4818(texel) 207
-            4873:   52(float) CompositeExtract 4868 2
-            4874:3138(ResType) ImageSparseSampleDrefExplicitLod 4867 4868 4873 Grad MinLod 4869 4870 4871
-            4875:6(float16_t) CompositeExtract 4874 1
-                              Store 4872 4875
+     4828(texel):     64(ptr) Variable Function
+                              Store 4828(texel) 121
+            4829:         143 Load 145(s2D)
+            4830:   53(fvec2) Load 148(c2)
+            4831:   53(fvec2) Load 1409(dPdxy2)
+            4832:   53(fvec2) Load 1409(dPdxy2)
+            4833:   52(float) Load 4267(lodClamp)
+            4834:3102(ResType) ImageSparseSampleExplicitLod 4829 4830 Grad MinLod 4831 4832 4833
+            4835:  7(f16vec4) CompositeExtract 4834 1
+                              Store 4828(texel) 4835
+            4836:     47(int) CompositeExtract 4834 0
+            4837:         143 Load 145(s2D)
+            4838:154(f16vec2) Load 156(f16c2)
+            4839:154(f16vec2) Load 1417(f16dPdxy2)
+            4840:154(f16vec2) Load 1417(f16dPdxy2)
+            4841:6(float16_t) Load 4274(f16lodClamp)
+            4842:3102(ResType) ImageSparseSampleExplicitLod 4837 4838 Grad MinLod 4839 4840 4841
+            4843:  7(f16vec4) CompositeExtract 4842 1
+                              Store 4828(texel) 4843
+            4844:     47(int) CompositeExtract 4842 0
+            4845:         163 Load 165(s3D)
+            4846:  167(fvec3) Load 169(c3)
+            4847:  167(fvec3) Load 1425(dPdxy3)
+            4848:  167(fvec3) Load 1425(dPdxy3)
+            4849:   52(float) Load 4267(lodClamp)
+            4850:3102(ResType) ImageSparseSampleExplicitLod 4845 4846 Grad MinLod 4847 4848 4849
+            4851:  7(f16vec4) CompositeExtract 4850 1
+                              Store 4828(texel) 4851
+            4852:     47(int) CompositeExtract 4850 0
+            4853:         163 Load 165(s3D)
+            4854:175(f16vec3) Load 177(f16c3)
+            4855:175(f16vec3) Load 1433(f16dPdxy3)
+            4856:175(f16vec3) Load 1433(f16dPdxy3)
+            4857:6(float16_t) Load 4274(f16lodClamp)
+            4858:3102(ResType) ImageSparseSampleExplicitLod 4853 4854 Grad MinLod 4855 4856 4857
+            4859:  7(f16vec4) CompositeExtract 4858 1
+                              Store 4828(texel) 4859
+            4860:     47(int) CompositeExtract 4858 0
+            4861:         184 Load 186(sCube)
+            4862:  167(fvec3) Load 169(c3)
+            4863:  167(fvec3) Load 1425(dPdxy3)
+            4864:  167(fvec3) Load 1425(dPdxy3)
+            4865:   52(float) Load 4267(lodClamp)
+            4866:3102(ResType) ImageSparseSampleExplicitLod 4861 4862 Grad MinLod 4863 4864 4865
+            4867:  7(f16vec4) CompositeExtract 4866 1
+                              Store 4828(texel) 4867
+            4868:     47(int) CompositeExtract 4866 0
+            4869:         184 Load 186(sCube)
+            4870:175(f16vec3) Load 177(f16c3)
+            4871:175(f16vec3) Load 1433(f16dPdxy3)
+            4872:175(f16vec3) Load 1433(f16dPdxy3)
+            4873:6(float16_t) Load 4274(f16lodClamp)
+            4874:3102(ResType) ImageSparseSampleExplicitLod 4869 4870 Grad MinLod 4871 4872 4873
+            4875:  7(f16vec4) CompositeExtract 4874 1
+                              Store 4828(texel) 4875
             4876:     47(int) CompositeExtract 4874 0
             4877:         224 Load 226(s2DShadow)
-            4878:154(f16vec2) Load 156(f16c2)
-            4879:   52(float) Load 215(compare)
-            4880:154(f16vec2) Load 1417(f16dPdxy2)
-            4881:154(f16vec2) Load 1417(f16dPdxy2)
-            4882:6(float16_t) Load 4264(f16lodClamp)
-            4883:    208(ptr) AccessChain 4818(texel) 207
-            4884:3138(ResType) ImageSparseSampleDrefExplicitLod 4877 4878 4879 Grad MinLod 4880 4881 4882
+            4878:  167(fvec3) Load 169(c3)
+            4879:   53(fvec2) Load 1409(dPdxy2)
+            4880:   53(fvec2) Load 1409(dPdxy2)
+            4881:   52(float) Load 4267(lodClamp)
+            4882:    208(ptr) AccessChain 4828(texel) 207
+            4883:   52(float) CompositeExtract 4878 2
+            4884:3138(ResType) ImageSparseSampleDrefExplicitLod 4877 4878 4883 Grad MinLod 4879 4880 4881
             4885:6(float16_t) CompositeExtract 4884 1
-                              Store 4883 4885
+                              Store 4882 4885
             4886:     47(int) CompositeExtract 4884 0
-            4887:         245 Load 247(sCubeShadow)
-            4888:  249(fvec4) Load 251(c4)
-            4889:  167(fvec3) Load 1425(dPdxy3)
-            4890:  167(fvec3) Load 1425(dPdxy3)
-            4891:   52(float) Load 4257(lodClamp)
-            4892:    208(ptr) AccessChain 4818(texel) 207
-            4893:   52(float) CompositeExtract 4888 3
-            4894:3138(ResType) ImageSparseSampleDrefExplicitLod 4887 4888 4893 Grad MinLod 4889 4890 4891
+            4887:         224 Load 226(s2DShadow)
+            4888:154(f16vec2) Load 156(f16c2)
+            4889:   52(float) Load 215(compare)
+            4890:154(f16vec2) Load 1417(f16dPdxy2)
+            4891:154(f16vec2) Load 1417(f16dPdxy2)
+            4892:6(float16_t) Load 4274(f16lodClamp)
+            4893:    208(ptr) AccessChain 4828(texel) 207
+            4894:3138(ResType) ImageSparseSampleDrefExplicitLod 4887 4888 4889 Grad MinLod 4890 4891 4892
             4895:6(float16_t) CompositeExtract 4894 1
-                              Store 4892 4895
+                              Store 4893 4895
             4896:     47(int) CompositeExtract 4894 0
             4897:         245 Load 247(sCubeShadow)
-            4898:175(f16vec3) Load 177(f16c3)
-            4899:   52(float) Load 215(compare)
-            4900:175(f16vec3) Load 1433(f16dPdxy3)
-            4901:175(f16vec3) Load 1433(f16dPdxy3)
-            4902:6(float16_t) Load 4264(f16lodClamp)
-            4903:    208(ptr) AccessChain 4818(texel) 207
-            4904:3138(ResType) ImageSparseSampleDrefExplicitLod 4897 4898 4899 Grad MinLod 4900 4901 4902
+            4898:  249(fvec4) Load 251(c4)
+            4899:  167(fvec3) Load 1425(dPdxy3)
+            4900:  167(fvec3) Load 1425(dPdxy3)
+            4901:   52(float) Load 4267(lodClamp)
+            4902:    208(ptr) AccessChain 4828(texel) 207
+            4903:   52(float) CompositeExtract 4898 3
+            4904:3138(ResType) ImageSparseSampleDrefExplicitLod 4897 4898 4903 Grad MinLod 4899 4900 4901
             4905:6(float16_t) CompositeExtract 4904 1
-                              Store 4903 4905
+                              Store 4902 4905
             4906:     47(int) CompositeExtract 4904 0
-            4907:         284 Load 286(s2DArray)
-            4908:  167(fvec3) Load 169(c3)
-            4909:   53(fvec2) Load 1409(dPdxy2)
-            4910:   53(fvec2) Load 1409(dPdxy2)
-            4911:   52(float) Load 4257(lodClamp)
-            4912:3102(ResType) ImageSparseSampleExplicitLod 4907 4908 Grad MinLod 4909 4910 4911
-            4913:  7(f16vec4) CompositeExtract 4912 1
-                              Store 4818(texel) 4913
-            4914:     47(int) CompositeExtract 4912 0
-            4915:         284 Load 286(s2DArray)
-            4916:175(f16vec3) Load 177(f16c3)
-            4917:154(f16vec2) Load 1417(f16dPdxy2)
-            4918:154(f16vec2) Load 1417(f16dPdxy2)
-            4919:6(float16_t) Load 4264(f16lodClamp)
-            4920:3102(ResType) ImageSparseSampleExplicitLod 4915 4916 Grad MinLod 4917 4918 4919
-            4921:  7(f16vec4) CompositeExtract 4920 1
-                              Store 4818(texel) 4921
-            4922:     47(int) CompositeExtract 4920 0
-            4923:         337 Load 339(s2DArrayShadow)
-            4924:  249(fvec4) Load 251(c4)
-            4925:   53(fvec2) Load 1409(dPdxy2)
-            4926:   53(fvec2) Load 1409(dPdxy2)
-            4927:   52(float) Load 4257(lodClamp)
-            4928:    208(ptr) AccessChain 4818(texel) 207
-            4929:   52(float) CompositeExtract 4924 3
-            4930:3138(ResType) ImageSparseSampleDrefExplicitLod 4923 4924 4929 Grad MinLod 4925 4926 4927
-            4931:6(float16_t) CompositeExtract 4930 1
-                              Store 4928 4931
+            4907:         245 Load 247(sCubeShadow)
+            4908:175(f16vec3) Load 177(f16c3)
+            4909:   52(float) Load 215(compare)
+            4910:175(f16vec3) Load 1433(f16dPdxy3)
+            4911:175(f16vec3) Load 1433(f16dPdxy3)
+            4912:6(float16_t) Load 4274(f16lodClamp)
+            4913:    208(ptr) AccessChain 4828(texel) 207
+            4914:3138(ResType) ImageSparseSampleDrefExplicitLod 4907 4908 4909 Grad MinLod 4910 4911 4912
+            4915:6(float16_t) CompositeExtract 4914 1
+                              Store 4913 4915
+            4916:     47(int) CompositeExtract 4914 0
+            4917:         284 Load 286(s2DArray)
+            4918:  167(fvec3) Load 169(c3)
+            4919:   53(fvec2) Load 1409(dPdxy2)
+            4920:   53(fvec2) Load 1409(dPdxy2)
+            4921:   52(float) Load 4267(lodClamp)
+            4922:3102(ResType) ImageSparseSampleExplicitLod 4917 4918 Grad MinLod 4919 4920 4921
+            4923:  7(f16vec4) CompositeExtract 4922 1
+                              Store 4828(texel) 4923
+            4924:     47(int) CompositeExtract 4922 0
+            4925:         284 Load 286(s2DArray)
+            4926:175(f16vec3) Load 177(f16c3)
+            4927:154(f16vec2) Load 1417(f16dPdxy2)
+            4928:154(f16vec2) Load 1417(f16dPdxy2)
+            4929:6(float16_t) Load 4274(f16lodClamp)
+            4930:3102(ResType) ImageSparseSampleExplicitLod 4925 4926 Grad MinLod 4927 4928 4929
+            4931:  7(f16vec4) CompositeExtract 4930 1
+                              Store 4828(texel) 4931
             4932:     47(int) CompositeExtract 4930 0
             4933:         337 Load 339(s2DArrayShadow)
-            4934:175(f16vec3) Load 177(f16c3)
-            4935:   52(float) Load 215(compare)
-            4936:154(f16vec2) Load 1417(f16dPdxy2)
-            4937:154(f16vec2) Load 1417(f16dPdxy2)
-            4938:6(float16_t) Load 4264(f16lodClamp)
-            4939:    208(ptr) AccessChain 4818(texel) 207
-            4940:3138(ResType) ImageSparseSampleDrefExplicitLod 4933 4934 4935 Grad MinLod 4936 4937 4938
+            4934:  249(fvec4) Load 251(c4)
+            4935:   53(fvec2) Load 1409(dPdxy2)
+            4936:   53(fvec2) Load 1409(dPdxy2)
+            4937:   52(float) Load 4267(lodClamp)
+            4938:    208(ptr) AccessChain 4828(texel) 207
+            4939:   52(float) CompositeExtract 4934 3
+            4940:3138(ResType) ImageSparseSampleDrefExplicitLod 4933 4934 4939 Grad MinLod 4935 4936 4937
             4941:6(float16_t) CompositeExtract 4940 1
-                              Store 4939 4941
+                              Store 4938 4941
             4942:     47(int) CompositeExtract 4940 0
-            4943:         299 Load 301(sCubeArray)
-            4944:  249(fvec4) Load 251(c4)
-            4945:  167(fvec3) Load 1425(dPdxy3)
-            4946:  167(fvec3) Load 1425(dPdxy3)
-            4947:   52(float) Load 4257(lodClamp)
-            4948:3102(ResType) ImageSparseSampleExplicitLod 4943 4944 Grad MinLod 4945 4946 4947
-            4949:  7(f16vec4) CompositeExtract 4948 1
-                              Store 4818(texel) 4949
-            4950:     47(int) CompositeExtract 4948 0
-            4951:         299 Load 301(sCubeArray)
-            4952:  7(f16vec4) Load 309(f16c4)
-            4953:175(f16vec3) Load 1433(f16dPdxy3)
-            4954:175(f16vec3) Load 1433(f16dPdxy3)
-            4955:6(float16_t) Load 4264(f16lodClamp)
-            4956:3102(ResType) ImageSparseSampleExplicitLod 4951 4952 Grad MinLod 4953 4954 4955
-            4957:  7(f16vec4) CompositeExtract 4956 1
-                              Store 4818(texel) 4957
-            4958:     47(int) CompositeExtract 4956 0
-            4959:  7(f16vec4) Load 4818(texel)
-                              ReturnValue 4959
+            4943:         337 Load 339(s2DArrayShadow)
+            4944:175(f16vec3) Load 177(f16c3)
+            4945:   52(float) Load 215(compare)
+            4946:154(f16vec2) Load 1417(f16dPdxy2)
+            4947:154(f16vec2) Load 1417(f16dPdxy2)
+            4948:6(float16_t) Load 4274(f16lodClamp)
+            4949:    208(ptr) AccessChain 4828(texel) 207
+            4950:3138(ResType) ImageSparseSampleDrefExplicitLod 4943 4944 4945 Grad MinLod 4946 4947 4948
+            4951:6(float16_t) CompositeExtract 4950 1
+                              Store 4949 4951
+            4952:     47(int) CompositeExtract 4950 0
+            4953:         299 Load 301(sCubeArray)
+            4954:  249(fvec4) Load 251(c4)
+            4955:  167(fvec3) Load 1425(dPdxy3)
+            4956:  167(fvec3) Load 1425(dPdxy3)
+            4957:   52(float) Load 4267(lodClamp)
+            4958:3102(ResType) ImageSparseSampleExplicitLod 4953 4954 Grad MinLod 4955 4956 4957
+            4959:  7(f16vec4) CompositeExtract 4958 1
+                              Store 4828(texel) 4959
+            4960:     47(int) CompositeExtract 4958 0
+            4961:         299 Load 301(sCubeArray)
+            4962:  7(f16vec4) Load 309(f16c4)
+            4963:175(f16vec3) Load 1433(f16dPdxy3)
+            4964:175(f16vec3) Load 1433(f16dPdxy3)
+            4965:6(float16_t) Load 4274(f16lodClamp)
+            4966:3102(ResType) ImageSparseSampleExplicitLod 4961 4962 Grad MinLod 4963 4964 4965
+            4967:  7(f16vec4) CompositeExtract 4966 1
+                              Store 4828(texel) 4967
+            4968:     47(int) CompositeExtract 4966 0
+            4969:  7(f16vec4) Load 4828(texel)
+                              ReturnValue 4969
                               FunctionEnd
 109(testTextureGradClamp():  7(f16vec4) Function None 8
              110:             Label
-     4962(texel):     64(ptr) Variable Function
-                              Store 4962(texel) 121
-            4963:         123 Load 125(s1D)
-            4964:   52(float) Load 128(c1)
-            4965:   52(float) Load 1393(dPdxy1)
-            4966:   52(float) Load 1393(dPdxy1)
-            4967:   52(float) Load 4257(lodClamp)
-            4968:  7(f16vec4) ImageSampleExplicitLod 4963 4964 Grad MinLod 4965 4966 4967
-            4969:  7(f16vec4) Load 4962(texel)
-            4970:  7(f16vec4) FAdd 4969 4968
-                              Store 4962(texel) 4970
-            4971:         123 Load 125(s1D)
-            4972:6(float16_t) Load 135(f16c1)
-            4973:6(float16_t) Load 1401(f16dPdxy1)
-            4974:6(float16_t) Load 1401(f16dPdxy1)
-            4975:6(float16_t) Load 4264(f16lodClamp)
-            4976:  7(f16vec4) ImageSampleExplicitLod 4971 4972 Grad MinLod 4973 4974 4975
-            4977:  7(f16vec4) Load 4962(texel)
-            4978:  7(f16vec4) FAdd 4977 4976
-                              Store 4962(texel) 4978
-            4979:         143 Load 145(s2D)
-            4980:   53(fvec2) Load 148(c2)
-            4981:   53(fvec2) Load 1409(dPdxy2)
-            4982:   53(fvec2) Load 1409(dPdxy2)
-            4983:   52(float) Load 4257(lodClamp)
-            4984:  7(f16vec4) ImageSampleExplicitLod 4979 4980 Grad MinLod 4981 4982 4983
-            4985:  7(f16vec4) Load 4962(texel)
-            4986:  7(f16vec4) FAdd 4985 4984
-                              Store 4962(texel) 4986
-            4987:         143 Load 145(s2D)
-            4988:154(f16vec2) Load 156(f16c2)
-            4989:154(f16vec2) Load 1417(f16dPdxy2)
-            4990:154(f16vec2) Load 1417(f16dPdxy2)
-            4991:6(float16_t) Load 4264(f16lodClamp)
-            4992:  7(f16vec4) ImageSampleExplicitLod 4987 4988 Grad MinLod 4989 4990 4991
-            4993:  7(f16vec4) Load 4962(texel)
-            4994:  7(f16vec4) FAdd 4993 4992
-                              Store 4962(texel) 4994
-            4995:         163 Load 165(s3D)
-            4996:  167(fvec3) Load 169(c3)
-            4997:  167(fvec3) Load 1425(dPdxy3)
-            4998:  167(fvec3) Load 1425(dPdxy3)
-            4999:   52(float) Load 4257(lodClamp)
-            5000:  7(f16vec4) ImageSampleExplicitLod 4995 4996 Grad MinLod 4997 4998 4999
-            5001:  7(f16vec4) Load 4962(texel)
-            5002:  7(f16vec4) FAdd 5001 5000
-                              Store 4962(texel) 5002
-            5003:         163 Load 165(s3D)
-            5004:175(f16vec3) Load 177(f16c3)
-            5005:175(f16vec3) Load 1433(f16dPdxy3)
-            5006:175(f16vec3) Load 1433(f16dPdxy3)
-            5007:6(float16_t) Load 4264(f16lodClamp)
-            5008:  7(f16vec4) ImageSampleExplicitLod 5003 5004 Grad MinLod 5005 5006 5007
-            5009:  7(f16vec4) Load 4962(texel)
-            5010:  7(f16vec4) FAdd 5009 5008
-                              Store 4962(texel) 5010
-            5011:         184 Load 186(sCube)
-            5012:  167(fvec3) Load 169(c3)
-            5013:  167(fvec3) Load 1425(dPdxy3)
-            5014:  167(fvec3) Load 1425(dPdxy3)
-            5015:   52(float) Load 4257(lodClamp)
-            5016:  7(f16vec4) ImageSampleExplicitLod 5011 5012 Grad MinLod 5013 5014 5015
-            5017:  7(f16vec4) Load 4962(texel)
-            5018:  7(f16vec4) FAdd 5017 5016
-                              Store 4962(texel) 5018
-            5019:         184 Load 186(sCube)
-            5020:175(f16vec3) Load 177(f16c3)
-            5021:175(f16vec3) Load 1433(f16dPdxy3)
-            5022:175(f16vec3) Load 1433(f16dPdxy3)
-            5023:6(float16_t) Load 4264(f16lodClamp)
-            5024:  7(f16vec4) ImageSampleExplicitLod 5019 5020 Grad MinLod 5021 5022 5023
-            5025:  7(f16vec4) Load 4962(texel)
-            5026:  7(f16vec4) FAdd 5025 5024
-                              Store 4962(texel) 5026
-            5027:         199 Load 201(s1DShadow)
-            5028:  167(fvec3) Load 169(c3)
-            5029:   52(float) Load 1393(dPdxy1)
-            5030:   52(float) Load 1393(dPdxy1)
-            5031:   52(float) Load 4257(lodClamp)
-            5032:   52(float) CompositeExtract 5028 2
-            5033:6(float16_t) ImageSampleDrefExplicitLod 5027 5028 5032 Grad MinLod 5029 5030 5031
-            5034:    208(ptr) AccessChain 4962(texel) 207
-            5035:6(float16_t) Load 5034
-            5036:6(float16_t) FAdd 5035 5033
-            5037:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5037 5036
-            5038:         199 Load 201(s1DShadow)
-            5039:154(f16vec2) Load 156(f16c2)
-            5040:   52(float) Load 215(compare)
-            5041:6(float16_t) Load 1401(f16dPdxy1)
-            5042:6(float16_t) Load 1401(f16dPdxy1)
-            5043:6(float16_t) Load 4264(f16lodClamp)
-            5044:6(float16_t) ImageSampleDrefExplicitLod 5038 5039 5040 Grad MinLod 5041 5042 5043
-            5045:    208(ptr) AccessChain 4962(texel) 207
-            5046:6(float16_t) Load 5045
-            5047:6(float16_t) FAdd 5046 5044
-            5048:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5048 5047
-            5049:         224 Load 226(s2DShadow)
-            5050:  167(fvec3) Load 169(c3)
-            5051:   53(fvec2) Load 1409(dPdxy2)
-            5052:   53(fvec2) Load 1409(dPdxy2)
-            5053:   52(float) Load 4257(lodClamp)
-            5054:   52(float) CompositeExtract 5050 2
-            5055:6(float16_t) ImageSampleDrefExplicitLod 5049 5050 5054 Grad MinLod 5051 5052 5053
-            5056:    208(ptr) AccessChain 4962(texel) 207
-            5057:6(float16_t) Load 5056
-            5058:6(float16_t) FAdd 5057 5055
-            5059:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5059 5058
-            5060:         224 Load 226(s2DShadow)
-            5061:154(f16vec2) Load 156(f16c2)
-            5062:   52(float) Load 215(compare)
-            5063:154(f16vec2) Load 1417(f16dPdxy2)
-            5064:154(f16vec2) Load 1417(f16dPdxy2)
-            5065:6(float16_t) Load 4264(f16lodClamp)
-            5066:6(float16_t) ImageSampleDrefExplicitLod 5060 5061 5062 Grad MinLod 5063 5064 5065
-            5067:    208(ptr) AccessChain 4962(texel) 207
-            5068:6(float16_t) Load 5067
-            5069:6(float16_t) FAdd 5068 5066
-            5070:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5070 5069
-            5071:         245 Load 247(sCubeShadow)
-            5072:  249(fvec4) Load 251(c4)
-            5073:  167(fvec3) Load 1425(dPdxy3)
-            5074:  167(fvec3) Load 1425(dPdxy3)
-            5075:   52(float) Load 4257(lodClamp)
-            5076:   52(float) CompositeExtract 5072 3
-            5077:6(float16_t) ImageSampleDrefExplicitLod 5071 5072 5076 Grad MinLod 5073 5074 5075
-            5078:    208(ptr) AccessChain 4962(texel) 207
-            5079:6(float16_t) Load 5078
-            5080:6(float16_t) FAdd 5079 5077
-            5081:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5081 5080
-            5082:         245 Load 247(sCubeShadow)
-            5083:175(f16vec3) Load 177(f16c3)
-            5084:   52(float) Load 215(compare)
-            5085:175(f16vec3) Load 1433(f16dPdxy3)
-            5086:175(f16vec3) Load 1433(f16dPdxy3)
-            5087:6(float16_t) Load 4264(f16lodClamp)
-            5088:6(float16_t) ImageSampleDrefExplicitLod 5082 5083 5084 Grad MinLod 5085 5086 5087
-            5089:    208(ptr) AccessChain 4962(texel) 207
-            5090:6(float16_t) Load 5089
-            5091:6(float16_t) FAdd 5090 5088
-            5092:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5092 5091
-            5093:         269 Load 271(s1DArray)
-            5094:   53(fvec2) Load 148(c2)
-            5095:   52(float) Load 1393(dPdxy1)
-            5096:   52(float) Load 1393(dPdxy1)
-            5097:   52(float) Load 4257(lodClamp)
-            5098:  7(f16vec4) ImageSampleExplicitLod 5093 5094 Grad MinLod 5095 5096 5097
-            5099:  7(f16vec4) Load 4962(texel)
-            5100:  7(f16vec4) FAdd 5099 5098
-                              Store 4962(texel) 5100
-            5101:         269 Load 271(s1DArray)
-            5102:154(f16vec2) Load 156(f16c2)
-            5103:6(float16_t) Load 1401(f16dPdxy1)
-            5104:6(float16_t) Load 1401(f16dPdxy1)
-            5105:6(float16_t) Load 4264(f16lodClamp)
-            5106:  7(f16vec4) ImageSampleExplicitLod 5101 5102 Grad MinLod 5103 5104 5105
-            5107:  7(f16vec4) Load 4962(texel)
-            5108:  7(f16vec4) FAdd 5107 5106
-                              Store 4962(texel) 5108
-            5109:         284 Load 286(s2DArray)
-            5110:  167(fvec3) Load 169(c3)
-            5111:   53(fvec2) Load 1409(dPdxy2)
-            5112:   53(fvec2) Load 1409(dPdxy2)
-            5113:   52(float) Load 4257(lodClamp)
-            5114:  7(f16vec4) ImageSampleExplicitLod 5109 5110 Grad MinLod 5111 5112 5113
-            5115:  7(f16vec4) Load 4962(texel)
-            5116:  7(f16vec4) FAdd 5115 5114
-                              Store 4962(texel) 5116
-            5117:         284 Load 286(s2DArray)
-            5118:175(f16vec3) Load 177(f16c3)
-            5119:154(f16vec2) Load 1417(f16dPdxy2)
-            5120:154(f16vec2) Load 1417(f16dPdxy2)
-            5121:6(float16_t) Load 4264(f16lodClamp)
-            5122:  7(f16vec4) ImageSampleExplicitLod 5117 5118 Grad MinLod 5119 5120 5121
-            5123:  7(f16vec4) Load 4962(texel)
-            5124:  7(f16vec4) FAdd 5123 5122
-                              Store 4962(texel) 5124
-            5125:         316 Load 318(s1DArrayShadow)
-            5126:  167(fvec3) Load 169(c3)
-            5127:   52(float) Load 1393(dPdxy1)
-            5128:   52(float) Load 1393(dPdxy1)
-            5129:   52(float) Load 4257(lodClamp)
-            5130:   52(float) CompositeExtract 5126 2
-            5131:6(float16_t) ImageSampleDrefExplicitLod 5125 5126 5130 Grad MinLod 5127 5128 5129
-            5132:    208(ptr) AccessChain 4962(texel) 207
-            5133:6(float16_t) Load 5132
-            5134:6(float16_t) FAdd 5133 5131
-            5135:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5135 5134
-            5136:         316 Load 318(s1DArrayShadow)
-            5137:154(f16vec2) Load 156(f16c2)
-            5138:   52(float) Load 215(compare)
-            5139:6(float16_t) Load 1401(f16dPdxy1)
-            5140:6(float16_t) Load 1401(f16dPdxy1)
-            5141:6(float16_t) Load 4264(f16lodClamp)
-            5142:6(float16_t) ImageSampleDrefExplicitLod 5136 5137 5138 Grad MinLod 5139 5140 5141
-            5143:    208(ptr) AccessChain 4962(texel) 207
-            5144:6(float16_t) Load 5143
-            5145:6(float16_t) FAdd 5144 5142
-            5146:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5146 5145
-            5147:         337 Load 339(s2DArrayShadow)
-            5148:  249(fvec4) Load 251(c4)
-            5149:   53(fvec2) Load 1409(dPdxy2)
-            5150:   53(fvec2) Load 1409(dPdxy2)
-            5151:   52(float) Load 4257(lodClamp)
-            5152:   52(float) CompositeExtract 5148 3
-            5153:6(float16_t) ImageSampleDrefExplicitLod 5147 5148 5152 Grad MinLod 5149 5150 5151
-            5154:    208(ptr) AccessChain 4962(texel) 207
-            5155:6(float16_t) Load 5154
-            5156:6(float16_t) FAdd 5155 5153
-            5157:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5157 5156
-            5158:         337 Load 339(s2DArrayShadow)
-            5159:175(f16vec3) Load 177(f16c3)
-            5160:   52(float) Load 215(compare)
-            5161:154(f16vec2) Load 1417(f16dPdxy2)
-            5162:154(f16vec2) Load 1417(f16dPdxy2)
-            5163:6(float16_t) Load 4264(f16lodClamp)
-            5164:6(float16_t) ImageSampleDrefExplicitLod 5158 5159 5160 Grad MinLod 5161 5162 5163
-            5165:    208(ptr) AccessChain 4962(texel) 207
-            5166:6(float16_t) Load 5165
-            5167:6(float16_t) FAdd 5166 5164
-            5168:    208(ptr) AccessChain 4962(texel) 207
-                              Store 5168 5167
-            5169:         299 Load 301(sCubeArray)
-            5170:  249(fvec4) Load 251(c4)
-            5171:  167(fvec3) Load 1425(dPdxy3)
-            5172:  167(fvec3) Load 1425(dPdxy3)
-            5173:   52(float) Load 4257(lodClamp)
-            5174:  7(f16vec4) ImageSampleExplicitLod 5169 5170 Grad MinLod 5171 5172 5173
-            5175:  7(f16vec4) Load 4962(texel)
-            5176:  7(f16vec4) FAdd 5175 5174
-                              Store 4962(texel) 5176
-            5177:         299 Load 301(sCubeArray)
-            5178:  7(f16vec4) Load 309(f16c4)
-            5179:175(f16vec3) Load 1433(f16dPdxy3)
-            5180:175(f16vec3) Load 1433(f16dPdxy3)
-            5181:6(float16_t) Load 4264(f16lodClamp)
-            5182:  7(f16vec4) ImageSampleExplicitLod 5177 5178 Grad MinLod 5179 5180 5181
-            5183:  7(f16vec4) Load 4962(texel)
-            5184:  7(f16vec4) FAdd 5183 5182
-                              Store 4962(texel) 5184
-            5185:  7(f16vec4) Load 4962(texel)
-                              ReturnValue 5185
+     4972(texel):     64(ptr) Variable Function
+                              Store 4972(texel) 121
+            4973:         123 Load 125(s1D)
+            4974:   52(float) Load 128(c1)
+            4975:   52(float) Load 1393(dPdxy1)
+            4976:   52(float) Load 1393(dPdxy1)
+            4977:   52(float) Load 4267(lodClamp)
+            4978:  7(f16vec4) ImageSampleExplicitLod 4973 4974 Grad MinLod 4975 4976 4977
+            4979:  7(f16vec4) Load 4972(texel)
+            4980:  7(f16vec4) FAdd 4979 4978
+                              Store 4972(texel) 4980
+            4981:         123 Load 125(s1D)
+            4982:6(float16_t) Load 135(f16c1)
+            4983:6(float16_t) Load 1401(f16dPdxy1)
+            4984:6(float16_t) Load 1401(f16dPdxy1)
+            4985:6(float16_t) Load 4274(f16lodClamp)
+            4986:  7(f16vec4) ImageSampleExplicitLod 4981 4982 Grad MinLod 4983 4984 4985
+            4987:  7(f16vec4) Load 4972(texel)
+            4988:  7(f16vec4) FAdd 4987 4986
+                              Store 4972(texel) 4988
+            4989:         143 Load 145(s2D)
+            4990:   53(fvec2) Load 148(c2)
+            4991:   53(fvec2) Load 1409(dPdxy2)
+            4992:   53(fvec2) Load 1409(dPdxy2)
+            4993:   52(float) Load 4267(lodClamp)
+            4994:  7(f16vec4) ImageSampleExplicitLod 4989 4990 Grad MinLod 4991 4992 4993
+            4995:  7(f16vec4) Load 4972(texel)
+            4996:  7(f16vec4) FAdd 4995 4994
+                              Store 4972(texel) 4996
+            4997:         143 Load 145(s2D)
+            4998:154(f16vec2) Load 156(f16c2)
+            4999:154(f16vec2) Load 1417(f16dPdxy2)
+            5000:154(f16vec2) Load 1417(f16dPdxy2)
+            5001:6(float16_t) Load 4274(f16lodClamp)
+            5002:  7(f16vec4) ImageSampleExplicitLod 4997 4998 Grad MinLod 4999 5000 5001
+            5003:  7(f16vec4) Load 4972(texel)
+            5004:  7(f16vec4) FAdd 5003 5002
+                              Store 4972(texel) 5004
+            5005:         163 Load 165(s3D)
+            5006:  167(fvec3) Load 169(c3)
+            5007:  167(fvec3) Load 1425(dPdxy3)
+            5008:  167(fvec3) Load 1425(dPdxy3)
+            5009:   52(float) Load 4267(lodClamp)
+            5010:  7(f16vec4) ImageSampleExplicitLod 5005 5006 Grad MinLod 5007 5008 5009
+            5011:  7(f16vec4) Load 4972(texel)
+            5012:  7(f16vec4) FAdd 5011 5010
+                              Store 4972(texel) 5012
+            5013:         163 Load 165(s3D)
+            5014:175(f16vec3) Load 177(f16c3)
+            5015:175(f16vec3) Load 1433(f16dPdxy3)
+            5016:175(f16vec3) Load 1433(f16dPdxy3)
+            5017:6(float16_t) Load 4274(f16lodClamp)
+            5018:  7(f16vec4) ImageSampleExplicitLod 5013 5014 Grad MinLod 5015 5016 5017
+            5019:  7(f16vec4) Load 4972(texel)
+            5020:  7(f16vec4) FAdd 5019 5018
+                              Store 4972(texel) 5020
+            5021:         184 Load 186(sCube)
+            5022:  167(fvec3) Load 169(c3)
+            5023:  167(fvec3) Load 1425(dPdxy3)
+            5024:  167(fvec3) Load 1425(dPdxy3)
+            5025:   52(float) Load 4267(lodClamp)
+            5026:  7(f16vec4) ImageSampleExplicitLod 5021 5022 Grad MinLod 5023 5024 5025
+            5027:  7(f16vec4) Load 4972(texel)
+            5028:  7(f16vec4) FAdd 5027 5026
+                              Store 4972(texel) 5028
+            5029:         184 Load 186(sCube)
+            5030:175(f16vec3) Load 177(f16c3)
+            5031:175(f16vec3) Load 1433(f16dPdxy3)
+            5032:175(f16vec3) Load 1433(f16dPdxy3)
+            5033:6(float16_t) Load 4274(f16lodClamp)
+            5034:  7(f16vec4) ImageSampleExplicitLod 5029 5030 Grad MinLod 5031 5032 5033
+            5035:  7(f16vec4) Load 4972(texel)
+            5036:  7(f16vec4) FAdd 5035 5034
+                              Store 4972(texel) 5036
+            5037:         199 Load 201(s1DShadow)
+            5038:  167(fvec3) Load 169(c3)
+            5039:   52(float) Load 1393(dPdxy1)
+            5040:   52(float) Load 1393(dPdxy1)
+            5041:   52(float) Load 4267(lodClamp)
+            5042:   52(float) CompositeExtract 5038 2
+            5043:6(float16_t) ImageSampleDrefExplicitLod 5037 5038 5042 Grad MinLod 5039 5040 5041
+            5044:    208(ptr) AccessChain 4972(texel) 207
+            5045:6(float16_t) Load 5044
+            5046:6(float16_t) FAdd 5045 5043
+            5047:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5047 5046
+            5048:         199 Load 201(s1DShadow)
+            5049:154(f16vec2) Load 156(f16c2)
+            5050:   52(float) Load 215(compare)
+            5051:6(float16_t) Load 1401(f16dPdxy1)
+            5052:6(float16_t) Load 1401(f16dPdxy1)
+            5053:6(float16_t) Load 4274(f16lodClamp)
+            5054:6(float16_t) ImageSampleDrefExplicitLod 5048 5049 5050 Grad MinLod 5051 5052 5053
+            5055:    208(ptr) AccessChain 4972(texel) 207
+            5056:6(float16_t) Load 5055
+            5057:6(float16_t) FAdd 5056 5054
+            5058:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5058 5057
+            5059:         224 Load 226(s2DShadow)
+            5060:  167(fvec3) Load 169(c3)
+            5061:   53(fvec2) Load 1409(dPdxy2)
+            5062:   53(fvec2) Load 1409(dPdxy2)
+            5063:   52(float) Load 4267(lodClamp)
+            5064:   52(float) CompositeExtract 5060 2
+            5065:6(float16_t) ImageSampleDrefExplicitLod 5059 5060 5064 Grad MinLod 5061 5062 5063
+            5066:    208(ptr) AccessChain 4972(texel) 207
+            5067:6(float16_t) Load 5066
+            5068:6(float16_t) FAdd 5067 5065
+            5069:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5069 5068
+            5070:         224 Load 226(s2DShadow)
+            5071:154(f16vec2) Load 156(f16c2)
+            5072:   52(float) Load 215(compare)
+            5073:154(f16vec2) Load 1417(f16dPdxy2)
+            5074:154(f16vec2) Load 1417(f16dPdxy2)
+            5075:6(float16_t) Load 4274(f16lodClamp)
+            5076:6(float16_t) ImageSampleDrefExplicitLod 5070 5071 5072 Grad MinLod 5073 5074 5075
+            5077:    208(ptr) AccessChain 4972(texel) 207
+            5078:6(float16_t) Load 5077
+            5079:6(float16_t) FAdd 5078 5076
+            5080:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5080 5079
+            5081:         245 Load 247(sCubeShadow)
+            5082:  249(fvec4) Load 251(c4)
+            5083:  167(fvec3) Load 1425(dPdxy3)
+            5084:  167(fvec3) Load 1425(dPdxy3)
+            5085:   52(float) Load 4267(lodClamp)
+            5086:   52(float) CompositeExtract 5082 3
+            5087:6(float16_t) ImageSampleDrefExplicitLod 5081 5082 5086 Grad MinLod 5083 5084 5085
+            5088:    208(ptr) AccessChain 4972(texel) 207
+            5089:6(float16_t) Load 5088
+            5090:6(float16_t) FAdd 5089 5087
+            5091:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5091 5090
+            5092:         245 Load 247(sCubeShadow)
+            5093:175(f16vec3) Load 177(f16c3)
+            5094:   52(float) Load 215(compare)
+            5095:175(f16vec3) Load 1433(f16dPdxy3)
+            5096:175(f16vec3) Load 1433(f16dPdxy3)
+            5097:6(float16_t) Load 4274(f16lodClamp)
+            5098:6(float16_t) ImageSampleDrefExplicitLod 5092 5093 5094 Grad MinLod 5095 5096 5097
+            5099:    208(ptr) AccessChain 4972(texel) 207
+            5100:6(float16_t) Load 5099
+            5101:6(float16_t) FAdd 5100 5098
+            5102:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5102 5101
+            5103:         269 Load 271(s1DArray)
+            5104:   53(fvec2) Load 148(c2)
+            5105:   52(float) Load 1393(dPdxy1)
+            5106:   52(float) Load 1393(dPdxy1)
+            5107:   52(float) Load 4267(lodClamp)
+            5108:  7(f16vec4) ImageSampleExplicitLod 5103 5104 Grad MinLod 5105 5106 5107
+            5109:  7(f16vec4) Load 4972(texel)
+            5110:  7(f16vec4) FAdd 5109 5108
+                              Store 4972(texel) 5110
+            5111:         269 Load 271(s1DArray)
+            5112:154(f16vec2) Load 156(f16c2)
+            5113:6(float16_t) Load 1401(f16dPdxy1)
+            5114:6(float16_t) Load 1401(f16dPdxy1)
+            5115:6(float16_t) Load 4274(f16lodClamp)
+            5116:  7(f16vec4) ImageSampleExplicitLod 5111 5112 Grad MinLod 5113 5114 5115
+            5117:  7(f16vec4) Load 4972(texel)
+            5118:  7(f16vec4) FAdd 5117 5116
+                              Store 4972(texel) 5118
+            5119:         284 Load 286(s2DArray)
+            5120:  167(fvec3) Load 169(c3)
+            5121:   53(fvec2) Load 1409(dPdxy2)
+            5122:   53(fvec2) Load 1409(dPdxy2)
+            5123:   52(float) Load 4267(lodClamp)
+            5124:  7(f16vec4) ImageSampleExplicitLod 5119 5120 Grad MinLod 5121 5122 5123
+            5125:  7(f16vec4) Load 4972(texel)
+            5126:  7(f16vec4) FAdd 5125 5124
+                              Store 4972(texel) 5126
+            5127:         284 Load 286(s2DArray)
+            5128:175(f16vec3) Load 177(f16c3)
+            5129:154(f16vec2) Load 1417(f16dPdxy2)
+            5130:154(f16vec2) Load 1417(f16dPdxy2)
+            5131:6(float16_t) Load 4274(f16lodClamp)
+            5132:  7(f16vec4) ImageSampleExplicitLod 5127 5128 Grad MinLod 5129 5130 5131
+            5133:  7(f16vec4) Load 4972(texel)
+            5134:  7(f16vec4) FAdd 5133 5132
+                              Store 4972(texel) 5134
+            5135:         316 Load 318(s1DArrayShadow)
+            5136:  167(fvec3) Load 169(c3)
+            5137:   52(float) Load 1393(dPdxy1)
+            5138:   52(float) Load 1393(dPdxy1)
+            5139:   52(float) Load 4267(lodClamp)
+            5140:   52(float) CompositeExtract 5136 2
+            5141:6(float16_t) ImageSampleDrefExplicitLod 5135 5136 5140 Grad MinLod 5137 5138 5139
+            5142:    208(ptr) AccessChain 4972(texel) 207
+            5143:6(float16_t) Load 5142
+            5144:6(float16_t) FAdd 5143 5141
+            5145:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5145 5144
+            5146:         316 Load 318(s1DArrayShadow)
+            5147:154(f16vec2) Load 156(f16c2)
+            5148:   52(float) Load 215(compare)
+            5149:6(float16_t) Load 1401(f16dPdxy1)
+            5150:6(float16_t) Load 1401(f16dPdxy1)
+            5151:6(float16_t) Load 4274(f16lodClamp)
+            5152:6(float16_t) ImageSampleDrefExplicitLod 5146 5147 5148 Grad MinLod 5149 5150 5151
+            5153:    208(ptr) AccessChain 4972(texel) 207
+            5154:6(float16_t) Load 5153
+            5155:6(float16_t) FAdd 5154 5152
+            5156:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5156 5155
+            5157:         337 Load 339(s2DArrayShadow)
+            5158:  249(fvec4) Load 251(c4)
+            5159:   53(fvec2) Load 1409(dPdxy2)
+            5160:   53(fvec2) Load 1409(dPdxy2)
+            5161:   52(float) Load 4267(lodClamp)
+            5162:   52(float) CompositeExtract 5158 3
+            5163:6(float16_t) ImageSampleDrefExplicitLod 5157 5158 5162 Grad MinLod 5159 5160 5161
+            5164:    208(ptr) AccessChain 4972(texel) 207
+            5165:6(float16_t) Load 5164
+            5166:6(float16_t) FAdd 5165 5163
+            5167:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5167 5166
+            5168:         337 Load 339(s2DArrayShadow)
+            5169:175(f16vec3) Load 177(f16c3)
+            5170:   52(float) Load 215(compare)
+            5171:154(f16vec2) Load 1417(f16dPdxy2)
+            5172:154(f16vec2) Load 1417(f16dPdxy2)
+            5173:6(float16_t) Load 4274(f16lodClamp)
+            5174:6(float16_t) ImageSampleDrefExplicitLod 5168 5169 5170 Grad MinLod 5171 5172 5173
+            5175:    208(ptr) AccessChain 4972(texel) 207
+            5176:6(float16_t) Load 5175
+            5177:6(float16_t) FAdd 5176 5174
+            5178:    208(ptr) AccessChain 4972(texel) 207
+                              Store 5178 5177
+            5179:         299 Load 301(sCubeArray)
+            5180:  249(fvec4) Load 251(c4)
+            5181:  167(fvec3) Load 1425(dPdxy3)
+            5182:  167(fvec3) Load 1425(dPdxy3)
+            5183:   52(float) Load 4267(lodClamp)
+            5184:  7(f16vec4) ImageSampleExplicitLod 5179 5180 Grad MinLod 5181 5182 5183
+            5185:  7(f16vec4) Load 4972(texel)
+            5186:  7(f16vec4) FAdd 5185 5184
+                              Store 4972(texel) 5186
+            5187:         299 Load 301(sCubeArray)
+            5188:  7(f16vec4) Load 309(f16c4)
+            5189:175(f16vec3) Load 1433(f16dPdxy3)
+            5190:175(f16vec3) Load 1433(f16dPdxy3)
+            5191:6(float16_t) Load 4274(f16lodClamp)
+            5192:  7(f16vec4) ImageSampleExplicitLod 5187 5188 Grad MinLod 5189 5190 5191
+            5193:  7(f16vec4) Load 4972(texel)
+            5194:  7(f16vec4) FAdd 5193 5192
+                              Store 4972(texel) 5194
+            5195:  7(f16vec4) Load 4972(texel)
+                              ReturnValue 5195
                               FunctionEnd
 111(testSparseTextureGradOffsetClamp():  7(f16vec4) Function None 8
              112:             Label
-     5188(texel):     64(ptr) Variable Function
-                              Store 5188(texel) 121
-            5189:         143 Load 145(s2D)
-            5190:   53(fvec2) Load 148(c2)
-            5191:   53(fvec2) Load 1409(dPdxy2)
-            5192:   53(fvec2) Load 1409(dPdxy2)
-            5193:   52(float) Load 4257(lodClamp)
-            5194:3102(ResType) ImageSparseSampleExplicitLod 5189 5190 Grad ConstOffset MinLod 5191 5192 722 5193
-            5195:  7(f16vec4) CompositeExtract 5194 1
-                              Store 5188(texel) 5195
-            5196:     47(int) CompositeExtract 5194 0
-            5197:         143 Load 145(s2D)
-            5198:154(f16vec2) Load 156(f16c2)
-            5199:154(f16vec2) Load 1417(f16dPdxy2)
-            5200:154(f16vec2) Load 1417(f16dPdxy2)
-            5201:6(float16_t) Load 4264(f16lodClamp)
-            5202:3102(ResType) ImageSparseSampleExplicitLod 5197 5198 Grad ConstOffset MinLod 5199 5200 722 5201
-            5203:  7(f16vec4) CompositeExtract 5202 1
-                              Store 5188(texel) 5203
-            5204:     47(int) CompositeExtract 5202 0
-            5205:         163 Load 165(s3D)
-            5206:  167(fvec3) Load 169(c3)
-            5207:  167(fvec3) Load 1425(dPdxy3)
-            5208:  167(fvec3) Load 1425(dPdxy3)
-            5209:   52(float) Load 4257(lodClamp)
-            5210:3102(ResType) ImageSparseSampleExplicitLod 5205 5206 Grad ConstOffset MinLod 5207 5208 735 5209
-            5211:  7(f16vec4) CompositeExtract 5210 1
-                              Store 5188(texel) 5211
-            5212:     47(int) CompositeExtract 5210 0
-            5213:         163 Load 165(s3D)
-            5214:175(f16vec3) Load 177(f16c3)
-            5215:175(f16vec3) Load 1433(f16dPdxy3)
-            5216:175(f16vec3) Load 1433(f16dPdxy3)
-            5217:6(float16_t) Load 4264(f16lodClamp)
-            5218:3102(ResType) ImageSparseSampleExplicitLod 5213 5214 Grad ConstOffset MinLod 5215 5216 735 5217
-            5219:  7(f16vec4) CompositeExtract 5218 1
-                              Store 5188(texel) 5219
-            5220:     47(int) CompositeExtract 5218 0
-            5221:         224 Load 226(s2DShadow)
-            5222:  167(fvec3) Load 169(c3)
-            5223:   53(fvec2) Load 1409(dPdxy2)
-            5224:   53(fvec2) Load 1409(dPdxy2)
-            5225:   52(float) Load 4257(lodClamp)
-            5226:    208(ptr) AccessChain 5188(texel) 207
-            5227:   52(float) CompositeExtract 5222 2
-            5228:3138(ResType) ImageSparseSampleDrefExplicitLod 5221 5222 5227 Grad ConstOffset MinLod 5223 5224 722 5225
-            5229:6(float16_t) CompositeExtract 5228 1
-                              Store 5226 5229
+     5198(texel):     64(ptr) Variable Function
+                              Store 5198(texel) 121
+            5199:         143 Load 145(s2D)
+            5200:   53(fvec2) Load 148(c2)
+            5201:   53(fvec2) Load 1409(dPdxy2)
+            5202:   53(fvec2) Load 1409(dPdxy2)
+            5203:   52(float) Load 4267(lodClamp)
+            5204:3102(ResType) ImageSparseSampleExplicitLod 5199 5200 Grad ConstOffset MinLod 5201 5202 722 5203
+            5205:  7(f16vec4) CompositeExtract 5204 1
+                              Store 5198(texel) 5205
+            5206:     47(int) CompositeExtract 5204 0
+            5207:         143 Load 145(s2D)
+            5208:154(f16vec2) Load 156(f16c2)
+            5209:154(f16vec2) Load 1417(f16dPdxy2)
+            5210:154(f16vec2) Load 1417(f16dPdxy2)
+            5211:6(float16_t) Load 4274(f16lodClamp)
+            5212:3102(ResType) ImageSparseSampleExplicitLod 5207 5208 Grad ConstOffset MinLod 5209 5210 722 5211
+            5213:  7(f16vec4) CompositeExtract 5212 1
+                              Store 5198(texel) 5213
+            5214:     47(int) CompositeExtract 5212 0
+            5215:         163 Load 165(s3D)
+            5216:  167(fvec3) Load 169(c3)
+            5217:  167(fvec3) Load 1425(dPdxy3)
+            5218:  167(fvec3) Load 1425(dPdxy3)
+            5219:   52(float) Load 4267(lodClamp)
+            5220:3102(ResType) ImageSparseSampleExplicitLod 5215 5216 Grad ConstOffset MinLod 5217 5218 735 5219
+            5221:  7(f16vec4) CompositeExtract 5220 1
+                              Store 5198(texel) 5221
+            5222:     47(int) CompositeExtract 5220 0
+            5223:         163 Load 165(s3D)
+            5224:175(f16vec3) Load 177(f16c3)
+            5225:175(f16vec3) Load 1433(f16dPdxy3)
+            5226:175(f16vec3) Load 1433(f16dPdxy3)
+            5227:6(float16_t) Load 4274(f16lodClamp)
+            5228:3102(ResType) ImageSparseSampleExplicitLod 5223 5224 Grad ConstOffset MinLod 5225 5226 735 5227
+            5229:  7(f16vec4) CompositeExtract 5228 1
+                              Store 5198(texel) 5229
             5230:     47(int) CompositeExtract 5228 0
             5231:         224 Load 226(s2DShadow)
-            5232:154(f16vec2) Load 156(f16c2)
-            5233:   52(float) Load 215(compare)
-            5234:154(f16vec2) Load 1417(f16dPdxy2)
-            5235:154(f16vec2) Load 1417(f16dPdxy2)
-            5236:6(float16_t) Load 4264(f16lodClamp)
-            5237:    208(ptr) AccessChain 5188(texel) 207
-            5238:3138(ResType) ImageSparseSampleDrefExplicitLod 5231 5232 5233 Grad ConstOffset MinLod 5234 5235 722 5236
+            5232:  167(fvec3) Load 169(c3)
+            5233:   53(fvec2) Load 1409(dPdxy2)
+            5234:   53(fvec2) Load 1409(dPdxy2)
+            5235:   52(float) Load 4267(lodClamp)
+            5236:    208(ptr) AccessChain 5198(texel) 207
+            5237:   52(float) CompositeExtract 5232 2
+            5238:3138(ResType) ImageSparseSampleDrefExplicitLod 5231 5232 5237 Grad ConstOffset MinLod 5233 5234 722 5235
             5239:6(float16_t) CompositeExtract 5238 1
-                              Store 5237 5239
+                              Store 5236 5239
             5240:     47(int) CompositeExtract 5238 0
-            5241:         284 Load 286(s2DArray)
-            5242:  167(fvec3) Load 169(c3)
-            5243:   53(fvec2) Load 1409(dPdxy2)
-            5244:   53(fvec2) Load 1409(dPdxy2)
-            5245:   52(float) Load 4257(lodClamp)
-            5246:3102(ResType) ImageSparseSampleExplicitLod 5241 5242 Grad ConstOffset MinLod 5243 5244 722 5245
-            5247:  7(f16vec4) CompositeExtract 5246 1
-                              Store 5188(texel) 5247
-            5248:     47(int) CompositeExtract 5246 0
-            5249:         284 Load 286(s2DArray)
-            5250:175(f16vec3) Load 177(f16c3)
-            5251:154(f16vec2) Load 1417(f16dPdxy2)
-            5252:154(f16vec2) Load 1417(f16dPdxy2)
-            5253:6(float16_t) Load 4264(f16lodClamp)
-            5254:3102(ResType) ImageSparseSampleExplicitLod 5249 5250 Grad ConstOffset MinLod 5251 5252 722 5253
-            5255:  7(f16vec4) CompositeExtract 5254 1
-                              Store 5188(texel) 5255
-            5256:     47(int) CompositeExtract 5254 0
-            5257:         337 Load 339(s2DArrayShadow)
-            5258:  249(fvec4) Load 251(c4)
-            5259:   53(fvec2) Load 1409(dPdxy2)
-            5260:   53(fvec2) Load 1409(dPdxy2)
-            5261:   52(float) Load 4257(lodClamp)
-            5262:    208(ptr) AccessChain 5188(texel) 207
-            5263:   52(float) CompositeExtract 5258 3
-            5264:3138(ResType) ImageSparseSampleDrefExplicitLod 5257 5258 5263 Grad ConstOffset MinLod 5259 5260 722 5261
-            5265:6(float16_t) CompositeExtract 5264 1
-                              Store 5262 5265
+            5241:         224 Load 226(s2DShadow)
+            5242:154(f16vec2) Load 156(f16c2)
+            5243:   52(float) Load 215(compare)
+            5244:154(f16vec2) Load 1417(f16dPdxy2)
+            5245:154(f16vec2) Load 1417(f16dPdxy2)
+            5246:6(float16_t) Load 4274(f16lodClamp)
+            5247:    208(ptr) AccessChain 5198(texel) 207
+            5248:3138(ResType) ImageSparseSampleDrefExplicitLod 5241 5242 5243 Grad ConstOffset MinLod 5244 5245 722 5246
+            5249:6(float16_t) CompositeExtract 5248 1
+                              Store 5247 5249
+            5250:     47(int) CompositeExtract 5248 0
+            5251:         284 Load 286(s2DArray)
+            5252:  167(fvec3) Load 169(c3)
+            5253:   53(fvec2) Load 1409(dPdxy2)
+            5254:   53(fvec2) Load 1409(dPdxy2)
+            5255:   52(float) Load 4267(lodClamp)
+            5256:3102(ResType) ImageSparseSampleExplicitLod 5251 5252 Grad ConstOffset MinLod 5253 5254 722 5255
+            5257:  7(f16vec4) CompositeExtract 5256 1
+                              Store 5198(texel) 5257
+            5258:     47(int) CompositeExtract 5256 0
+            5259:         284 Load 286(s2DArray)
+            5260:175(f16vec3) Load 177(f16c3)
+            5261:154(f16vec2) Load 1417(f16dPdxy2)
+            5262:154(f16vec2) Load 1417(f16dPdxy2)
+            5263:6(float16_t) Load 4274(f16lodClamp)
+            5264:3102(ResType) ImageSparseSampleExplicitLod 5259 5260 Grad ConstOffset MinLod 5261 5262 722 5263
+            5265:  7(f16vec4) CompositeExtract 5264 1
+                              Store 5198(texel) 5265
             5266:     47(int) CompositeExtract 5264 0
             5267:         337 Load 339(s2DArrayShadow)
-            5268:175(f16vec3) Load 177(f16c3)
-            5269:   52(float) Load 215(compare)
-            5270:154(f16vec2) Load 1417(f16dPdxy2)
-            5271:154(f16vec2) Load 1417(f16dPdxy2)
-            5272:6(float16_t) Load 4264(f16lodClamp)
-            5273:    208(ptr) AccessChain 5188(texel) 207
-            5274:3138(ResType) ImageSparseSampleDrefExplicitLod 5267 5268 5269 Grad ConstOffset MinLod 5270 5271 722 5272
+            5268:  249(fvec4) Load 251(c4)
+            5269:   53(fvec2) Load 1409(dPdxy2)
+            5270:   53(fvec2) Load 1409(dPdxy2)
+            5271:   52(float) Load 4267(lodClamp)
+            5272:    208(ptr) AccessChain 5198(texel) 207
+            5273:   52(float) CompositeExtract 5268 3
+            5274:3138(ResType) ImageSparseSampleDrefExplicitLod 5267 5268 5273 Grad ConstOffset MinLod 5269 5270 722 5271
             5275:6(float16_t) CompositeExtract 5274 1
-                              Store 5273 5275
+                              Store 5272 5275
             5276:     47(int) CompositeExtract 5274 0
-            5277:  7(f16vec4) Load 5188(texel)
-                              ReturnValue 5277
+            5277:         337 Load 339(s2DArrayShadow)
+            5278:175(f16vec3) Load 177(f16c3)
+            5279:   52(float) Load 215(compare)
+            5280:154(f16vec2) Load 1417(f16dPdxy2)
+            5281:154(f16vec2) Load 1417(f16dPdxy2)
+            5282:6(float16_t) Load 4274(f16lodClamp)
+            5283:    208(ptr) AccessChain 5198(texel) 207
+            5284:3138(ResType) ImageSparseSampleDrefExplicitLod 5277 5278 5279 Grad ConstOffset MinLod 5280 5281 722 5282
+            5285:6(float16_t) CompositeExtract 5284 1
+                              Store 5283 5285
+            5286:     47(int) CompositeExtract 5284 0
+            5287:  7(f16vec4) Load 5198(texel)
+                              ReturnValue 5287
                               FunctionEnd
 113(testTextureGradOffsetClamp():  7(f16vec4) Function None 8
              114:             Label
-     5280(texel):     64(ptr) Variable Function
-                              Store 5280(texel) 121
-            5281:         123 Load 125(s1D)
-            5282:   52(float) Load 128(c1)
-            5283:   52(float) Load 1393(dPdxy1)
-            5284:   52(float) Load 1393(dPdxy1)
-            5285:   52(float) Load 4257(lodClamp)
-            5286:  7(f16vec4) ImageSampleExplicitLod 5281 5282 Grad ConstOffset MinLod 5283 5284 709 5285
-            5287:  7(f16vec4) Load 5280(texel)
-            5288:  7(f16vec4) FAdd 5287 5286
-                              Store 5280(texel) 5288
-            5289:         123 Load 125(s1D)
-            5290:6(float16_t) Load 135(f16c1)
-            5291:6(float16_t) Load 1401(f16dPdxy1)
-            5292:6(float16_t) Load 1401(f16dPdxy1)
-            5293:6(float16_t) Load 4264(f16lodClamp)
-            5294:  7(f16vec4) ImageSampleExplicitLod 5289 5290 Grad ConstOffset MinLod 5291 5292 709 5293
-            5295:  7(f16vec4) Load 5280(texel)
-            5296:  7(f16vec4) FAdd 5295 5294
-                              Store 5280(texel) 5296
-            5297:         143 Load 145(s2D)
-            5298:   53(fvec2) Load 148(c2)
-            5299:   53(fvec2) Load 1409(dPdxy2)
-            5300:   53(fvec2) Load 1409(dPdxy2)
-            5301:   52(float) Load 4257(lodClamp)
-            5302:  7(f16vec4) ImageSampleExplicitLod 5297 5298 Grad ConstOffset MinLod 5299 5300 722 5301
-            5303:  7(f16vec4) Load 5280(texel)
-            5304:  7(f16vec4) FAdd 5303 5302
-                              Store 5280(texel) 5304
-            5305:         143 Load 145(s2D)
-            5306:154(f16vec2) Load 156(f16c2)
-            5307:154(f16vec2) Load 1417(f16dPdxy2)
-            5308:154(f16vec2) Load 1417(f16dPdxy2)
-            5309:6(float16_t) Load 4264(f16lodClamp)
-            5310:  7(f16vec4) ImageSampleExplicitLod 5305 5306 Grad ConstOffset MinLod 5307 5308 722 5309
-            5311:  7(f16vec4) Load 5280(texel)
-            5312:  7(f16vec4) FAdd 5311 5310
-                              Store 5280(texel) 5312
-            5313:         163 Load 165(s3D)
-            5314:  167(fvec3) Load 169(c3)
-            5315:  167(fvec3) Load 1425(dPdxy3)
-            5316:  167(fvec3) Load 1425(dPdxy3)
-            5317:   52(float) Load 4257(lodClamp)
-            5318:  7(f16vec4) ImageSampleExplicitLod 5313 5314 Grad ConstOffset MinLod 5315 5316 735 5317
-            5319:  7(f16vec4) Load 5280(texel)
-            5320:  7(f16vec4) FAdd 5319 5318
-                              Store 5280(texel) 5320
-            5321:         163 Load 165(s3D)
-            5322:175(f16vec3) Load 177(f16c3)
-            5323:175(f16vec3) Load 1433(f16dPdxy3)
-            5324:175(f16vec3) Load 1433(f16dPdxy3)
-            5325:6(float16_t) Load 4264(f16lodClamp)
-            5326:  7(f16vec4) ImageSampleExplicitLod 5321 5322 Grad ConstOffset MinLod 5323 5324 735 5325
-            5327:  7(f16vec4) Load 5280(texel)
-            5328:  7(f16vec4) FAdd 5327 5326
-                              Store 5280(texel) 5328
-            5329:         199 Load 201(s1DShadow)
-            5330:  167(fvec3) Load 169(c3)
-            5331:   52(float) Load 1393(dPdxy1)
-            5332:   52(float) Load 1393(dPdxy1)
-            5333:   52(float) Load 4257(lodClamp)
-            5334:   52(float) CompositeExtract 5330 2
-            5335:6(float16_t) ImageSampleDrefExplicitLod 5329 5330 5334 Grad ConstOffset MinLod 5331 5332 709 5333
-            5336:    208(ptr) AccessChain 5280(texel) 207
-            5337:6(float16_t) Load 5336
-            5338:6(float16_t) FAdd 5337 5335
-            5339:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5339 5338
-            5340:         199 Load 201(s1DShadow)
-            5341:154(f16vec2) Load 156(f16c2)
-            5342:   52(float) Load 215(compare)
-            5343:6(float16_t) Load 1401(f16dPdxy1)
-            5344:6(float16_t) Load 1401(f16dPdxy1)
-            5345:6(float16_t) Load 4264(f16lodClamp)
-            5346:6(float16_t) ImageSampleDrefExplicitLod 5340 5341 5342 Grad ConstOffset MinLod 5343 5344 709 5345
-            5347:    208(ptr) AccessChain 5280(texel) 207
-            5348:6(float16_t) Load 5347
-            5349:6(float16_t) FAdd 5348 5346
-            5350:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5350 5349
-            5351:         224 Load 226(s2DShadow)
-            5352:  167(fvec3) Load 169(c3)
-            5353:   53(fvec2) Load 1409(dPdxy2)
-            5354:   53(fvec2) Load 1409(dPdxy2)
-            5355:   52(float) Load 4257(lodClamp)
-            5356:   52(float) CompositeExtract 5352 2
-            5357:6(float16_t) ImageSampleDrefExplicitLod 5351 5352 5356 Grad ConstOffset MinLod 5353 5354 722 5355
-            5358:    208(ptr) AccessChain 5280(texel) 207
-            5359:6(float16_t) Load 5358
-            5360:6(float16_t) FAdd 5359 5357
-            5361:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5361 5360
-            5362:         224 Load 226(s2DShadow)
-            5363:154(f16vec2) Load 156(f16c2)
-            5364:   52(float) Load 215(compare)
-            5365:154(f16vec2) Load 1417(f16dPdxy2)
-            5366:154(f16vec2) Load 1417(f16dPdxy2)
-            5367:6(float16_t) Load 4264(f16lodClamp)
-            5368:6(float16_t) ImageSampleDrefExplicitLod 5362 5363 5364 Grad ConstOffset MinLod 5365 5366 722 5367
-            5369:    208(ptr) AccessChain 5280(texel) 207
-            5370:6(float16_t) Load 5369
-            5371:6(float16_t) FAdd 5370 5368
-            5372:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5372 5371
-            5373:         269 Load 271(s1DArray)
-            5374:   53(fvec2) Load 148(c2)
-            5375:   52(float) Load 1393(dPdxy1)
-            5376:   52(float) Load 1393(dPdxy1)
-            5377:   52(float) Load 4257(lodClamp)
-            5378:  7(f16vec4) ImageSampleExplicitLod 5373 5374 Grad ConstOffset MinLod 5375 5376 709 5377
-            5379:  7(f16vec4) Load 5280(texel)
-            5380:  7(f16vec4) FAdd 5379 5378
-                              Store 5280(texel) 5380
-            5381:         269 Load 271(s1DArray)
-            5382:154(f16vec2) Load 156(f16c2)
-            5383:6(float16_t) Load 1401(f16dPdxy1)
-            5384:6(float16_t) Load 1401(f16dPdxy1)
-            5385:6(float16_t) Load 4264(f16lodClamp)
-            5386:  7(f16vec4) ImageSampleExplicitLod 5381 5382 Grad ConstOffset MinLod 5383 5384 709 5385
-            5387:  7(f16vec4) Load 5280(texel)
-            5388:  7(f16vec4) FAdd 5387 5386
-                              Store 5280(texel) 5388
-            5389:         284 Load 286(s2DArray)
-            5390:  167(fvec3) Load 169(c3)
-            5391:   53(fvec2) Load 1409(dPdxy2)
-            5392:   53(fvec2) Load 1409(dPdxy2)
-            5393:   52(float) Load 4257(lodClamp)
-            5394:  7(f16vec4) ImageSampleExplicitLod 5389 5390 Grad ConstOffset MinLod 5391 5392 722 5393
-            5395:  7(f16vec4) Load 5280(texel)
-            5396:  7(f16vec4) FAdd 5395 5394
-                              Store 5280(texel) 5396
-            5397:         284 Load 286(s2DArray)
-            5398:175(f16vec3) Load 177(f16c3)
-            5399:154(f16vec2) Load 1417(f16dPdxy2)
-            5400:154(f16vec2) Load 1417(f16dPdxy2)
-            5401:6(float16_t) Load 4264(f16lodClamp)
-            5402:  7(f16vec4) ImageSampleExplicitLod 5397 5398 Grad ConstOffset MinLod 5399 5400 722 5401
-            5403:  7(f16vec4) Load 5280(texel)
-            5404:  7(f16vec4) FAdd 5403 5402
-                              Store 5280(texel) 5404
-            5405:         316 Load 318(s1DArrayShadow)
-            5406:  167(fvec3) Load 169(c3)
-            5407:   52(float) Load 1393(dPdxy1)
-            5408:   52(float) Load 1393(dPdxy1)
-            5409:   52(float) Load 4257(lodClamp)
-            5410:   52(float) CompositeExtract 5406 2
-            5411:6(float16_t) ImageSampleDrefExplicitLod 5405 5406 5410 Grad ConstOffset MinLod 5407 5408 709 5409
-            5412:    208(ptr) AccessChain 5280(texel) 207
-            5413:6(float16_t) Load 5412
-            5414:6(float16_t) FAdd 5413 5411
-            5415:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5415 5414
-            5416:         316 Load 318(s1DArrayShadow)
-            5417:154(f16vec2) Load 156(f16c2)
-            5418:   52(float) Load 215(compare)
-            5419:6(float16_t) Load 1401(f16dPdxy1)
-            5420:6(float16_t) Load 1401(f16dPdxy1)
-            5421:6(float16_t) Load 4264(f16lodClamp)
-            5422:6(float16_t) ImageSampleDrefExplicitLod 5416 5417 5418 Grad ConstOffset MinLod 5419 5420 709 5421
-            5423:    208(ptr) AccessChain 5280(texel) 207
-            5424:6(float16_t) Load 5423
-            5425:6(float16_t) FAdd 5424 5422
-            5426:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5426 5425
-            5427:         337 Load 339(s2DArrayShadow)
-            5428:  249(fvec4) Load 251(c4)
-            5429:   53(fvec2) Load 1409(dPdxy2)
-            5430:   53(fvec2) Load 1409(dPdxy2)
-            5431:   52(float) Load 4257(lodClamp)
-            5432:   52(float) CompositeExtract 5428 3
-            5433:6(float16_t) ImageSampleDrefExplicitLod 5427 5428 5432 Grad ConstOffset MinLod 5429 5430 722 5431
-            5434:    208(ptr) AccessChain 5280(texel) 207
-            5435:6(float16_t) Load 5434
-            5436:6(float16_t) FAdd 5435 5433
-            5437:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5437 5436
-            5438:         337 Load 339(s2DArrayShadow)
-            5439:175(f16vec3) Load 177(f16c3)
-            5440:   52(float) Load 215(compare)
-            5441:154(f16vec2) Load 1417(f16dPdxy2)
-            5442:154(f16vec2) Load 1417(f16dPdxy2)
-            5443:6(float16_t) Load 4264(f16lodClamp)
-            5444:6(float16_t) ImageSampleDrefExplicitLod 5438 5439 5440 Grad ConstOffset MinLod 5441 5442 722 5443
-            5445:    208(ptr) AccessChain 5280(texel) 207
-            5446:6(float16_t) Load 5445
-            5447:6(float16_t) FAdd 5446 5444
-            5448:    208(ptr) AccessChain 5280(texel) 207
-                              Store 5448 5447
-            5449:  7(f16vec4) Load 5280(texel)
-                              ReturnValue 5449
+     5290(texel):     64(ptr) Variable Function
+                              Store 5290(texel) 121
+            5291:         123 Load 125(s1D)
+            5292:   52(float) Load 128(c1)
+            5293:   52(float) Load 1393(dPdxy1)
+            5294:   52(float) Load 1393(dPdxy1)
+            5295:   52(float) Load 4267(lodClamp)
+            5296:  7(f16vec4) ImageSampleExplicitLod 5291 5292 Grad ConstOffset MinLod 5293 5294 709 5295
+            5297:  7(f16vec4) Load 5290(texel)
+            5298:  7(f16vec4) FAdd 5297 5296
+                              Store 5290(texel) 5298
+            5299:         123 Load 125(s1D)
+            5300:6(float16_t) Load 135(f16c1)
+            5301:6(float16_t) Load 1401(f16dPdxy1)
+            5302:6(float16_t) Load 1401(f16dPdxy1)
+            5303:6(float16_t) Load 4274(f16lodClamp)
+            5304:  7(f16vec4) ImageSampleExplicitLod 5299 5300 Grad ConstOffset MinLod 5301 5302 709 5303
+            5305:  7(f16vec4) Load 5290(texel)
+            5306:  7(f16vec4) FAdd 5305 5304
+                              Store 5290(texel) 5306
+            5307:         143 Load 145(s2D)
+            5308:   53(fvec2) Load 148(c2)
+            5309:   53(fvec2) Load 1409(dPdxy2)
+            5310:   53(fvec2) Load 1409(dPdxy2)
+            5311:   52(float) Load 4267(lodClamp)
+            5312:  7(f16vec4) ImageSampleExplicitLod 5307 5308 Grad ConstOffset MinLod 5309 5310 722 5311
+            5313:  7(f16vec4) Load 5290(texel)
+            5314:  7(f16vec4) FAdd 5313 5312
+                              Store 5290(texel) 5314
+            5315:         143 Load 145(s2D)
+            5316:154(f16vec2) Load 156(f16c2)
+            5317:154(f16vec2) Load 1417(f16dPdxy2)
+            5318:154(f16vec2) Load 1417(f16dPdxy2)
+            5319:6(float16_t) Load 4274(f16lodClamp)
+            5320:  7(f16vec4) ImageSampleExplicitLod 5315 5316 Grad ConstOffset MinLod 5317 5318 722 5319
+            5321:  7(f16vec4) Load 5290(texel)
+            5322:  7(f16vec4) FAdd 5321 5320
+                              Store 5290(texel) 5322
+            5323:         163 Load 165(s3D)
+            5324:  167(fvec3) Load 169(c3)
+            5325:  167(fvec3) Load 1425(dPdxy3)
+            5326:  167(fvec3) Load 1425(dPdxy3)
+            5327:   52(float) Load 4267(lodClamp)
+            5328:  7(f16vec4) ImageSampleExplicitLod 5323 5324 Grad ConstOffset MinLod 5325 5326 735 5327
+            5329:  7(f16vec4) Load 5290(texel)
+            5330:  7(f16vec4) FAdd 5329 5328
+                              Store 5290(texel) 5330
+            5331:         163 Load 165(s3D)
+            5332:175(f16vec3) Load 177(f16c3)
+            5333:175(f16vec3) Load 1433(f16dPdxy3)
+            5334:175(f16vec3) Load 1433(f16dPdxy3)
+            5335:6(float16_t) Load 4274(f16lodClamp)
+            5336:  7(f16vec4) ImageSampleExplicitLod 5331 5332 Grad ConstOffset MinLod 5333 5334 735 5335
+            5337:  7(f16vec4) Load 5290(texel)
+            5338:  7(f16vec4) FAdd 5337 5336
+                              Store 5290(texel) 5338
+            5339:         199 Load 201(s1DShadow)
+            5340:  167(fvec3) Load 169(c3)
+            5341:   52(float) Load 1393(dPdxy1)
+            5342:   52(float) Load 1393(dPdxy1)
+            5343:   52(float) Load 4267(lodClamp)
+            5344:   52(float) CompositeExtract 5340 2
+            5345:6(float16_t) ImageSampleDrefExplicitLod 5339 5340 5344 Grad ConstOffset MinLod 5341 5342 709 5343
+            5346:    208(ptr) AccessChain 5290(texel) 207
+            5347:6(float16_t) Load 5346
+            5348:6(float16_t) FAdd 5347 5345
+            5349:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5349 5348
+            5350:         199 Load 201(s1DShadow)
+            5351:154(f16vec2) Load 156(f16c2)
+            5352:   52(float) Load 215(compare)
+            5353:6(float16_t) Load 1401(f16dPdxy1)
+            5354:6(float16_t) Load 1401(f16dPdxy1)
+            5355:6(float16_t) Load 4274(f16lodClamp)
+            5356:6(float16_t) ImageSampleDrefExplicitLod 5350 5351 5352 Grad ConstOffset MinLod 5353 5354 709 5355
+            5357:    208(ptr) AccessChain 5290(texel) 207
+            5358:6(float16_t) Load 5357
+            5359:6(float16_t) FAdd 5358 5356
+            5360:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5360 5359
+            5361:         224 Load 226(s2DShadow)
+            5362:  167(fvec3) Load 169(c3)
+            5363:   53(fvec2) Load 1409(dPdxy2)
+            5364:   53(fvec2) Load 1409(dPdxy2)
+            5365:   52(float) Load 4267(lodClamp)
+            5366:   52(float) CompositeExtract 5362 2
+            5367:6(float16_t) ImageSampleDrefExplicitLod 5361 5362 5366 Grad ConstOffset MinLod 5363 5364 722 5365
+            5368:    208(ptr) AccessChain 5290(texel) 207
+            5369:6(float16_t) Load 5368
+            5370:6(float16_t) FAdd 5369 5367
+            5371:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5371 5370
+            5372:         224 Load 226(s2DShadow)
+            5373:154(f16vec2) Load 156(f16c2)
+            5374:   52(float) Load 215(compare)
+            5375:154(f16vec2) Load 1417(f16dPdxy2)
+            5376:154(f16vec2) Load 1417(f16dPdxy2)
+            5377:6(float16_t) Load 4274(f16lodClamp)
+            5378:6(float16_t) ImageSampleDrefExplicitLod 5372 5373 5374 Grad ConstOffset MinLod 5375 5376 722 5377
+            5379:    208(ptr) AccessChain 5290(texel) 207
+            5380:6(float16_t) Load 5379
+            5381:6(float16_t) FAdd 5380 5378
+            5382:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5382 5381
+            5383:         269 Load 271(s1DArray)
+            5384:   53(fvec2) Load 148(c2)
+            5385:   52(float) Load 1393(dPdxy1)
+            5386:   52(float) Load 1393(dPdxy1)
+            5387:   52(float) Load 4267(lodClamp)
+            5388:  7(f16vec4) ImageSampleExplicitLod 5383 5384 Grad ConstOffset MinLod 5385 5386 709 5387
+            5389:  7(f16vec4) Load 5290(texel)
+            5390:  7(f16vec4) FAdd 5389 5388
+                              Store 5290(texel) 5390
+            5391:         269 Load 271(s1DArray)
+            5392:154(f16vec2) Load 156(f16c2)
+            5393:6(float16_t) Load 1401(f16dPdxy1)
+            5394:6(float16_t) Load 1401(f16dPdxy1)
+            5395:6(float16_t) Load 4274(f16lodClamp)
+            5396:  7(f16vec4) ImageSampleExplicitLod 5391 5392 Grad ConstOffset MinLod 5393 5394 709 5395
+            5397:  7(f16vec4) Load 5290(texel)
+            5398:  7(f16vec4) FAdd 5397 5396
+                              Store 5290(texel) 5398
+            5399:         284 Load 286(s2DArray)
+            5400:  167(fvec3) Load 169(c3)
+            5401:   53(fvec2) Load 1409(dPdxy2)
+            5402:   53(fvec2) Load 1409(dPdxy2)
+            5403:   52(float) Load 4267(lodClamp)
+            5404:  7(f16vec4) ImageSampleExplicitLod 5399 5400 Grad ConstOffset MinLod 5401 5402 722 5403
+            5405:  7(f16vec4) Load 5290(texel)
+            5406:  7(f16vec4) FAdd 5405 5404
+                              Store 5290(texel) 5406
+            5407:         284 Load 286(s2DArray)
+            5408:175(f16vec3) Load 177(f16c3)
+            5409:154(f16vec2) Load 1417(f16dPdxy2)
+            5410:154(f16vec2) Load 1417(f16dPdxy2)
+            5411:6(float16_t) Load 4274(f16lodClamp)
+            5412:  7(f16vec4) ImageSampleExplicitLod 5407 5408 Grad ConstOffset MinLod 5409 5410 722 5411
+            5413:  7(f16vec4) Load 5290(texel)
+            5414:  7(f16vec4) FAdd 5413 5412
+                              Store 5290(texel) 5414
+            5415:         316 Load 318(s1DArrayShadow)
+            5416:  167(fvec3) Load 169(c3)
+            5417:   52(float) Load 1393(dPdxy1)
+            5418:   52(float) Load 1393(dPdxy1)
+            5419:   52(float) Load 4267(lodClamp)
+            5420:   52(float) CompositeExtract 5416 2
+            5421:6(float16_t) ImageSampleDrefExplicitLod 5415 5416 5420 Grad ConstOffset MinLod 5417 5418 709 5419
+            5422:    208(ptr) AccessChain 5290(texel) 207
+            5423:6(float16_t) Load 5422
+            5424:6(float16_t) FAdd 5423 5421
+            5425:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5425 5424
+            5426:         316 Load 318(s1DArrayShadow)
+            5427:154(f16vec2) Load 156(f16c2)
+            5428:   52(float) Load 215(compare)
+            5429:6(float16_t) Load 1401(f16dPdxy1)
+            5430:6(float16_t) Load 1401(f16dPdxy1)
+            5431:6(float16_t) Load 4274(f16lodClamp)
+            5432:6(float16_t) ImageSampleDrefExplicitLod 5426 5427 5428 Grad ConstOffset MinLod 5429 5430 709 5431
+            5433:    208(ptr) AccessChain 5290(texel) 207
+            5434:6(float16_t) Load 5433
+            5435:6(float16_t) FAdd 5434 5432
+            5436:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5436 5435
+            5437:         337 Load 339(s2DArrayShadow)
+            5438:  249(fvec4) Load 251(c4)
+            5439:   53(fvec2) Load 1409(dPdxy2)
+            5440:   53(fvec2) Load 1409(dPdxy2)
+            5441:   52(float) Load 4267(lodClamp)
+            5442:   52(float) CompositeExtract 5438 3
+            5443:6(float16_t) ImageSampleDrefExplicitLod 5437 5438 5442 Grad ConstOffset MinLod 5439 5440 722 5441
+            5444:    208(ptr) AccessChain 5290(texel) 207
+            5445:6(float16_t) Load 5444
+            5446:6(float16_t) FAdd 5445 5443
+            5447:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5447 5446
+            5448:         337 Load 339(s2DArrayShadow)
+            5449:175(f16vec3) Load 177(f16c3)
+            5450:   52(float) Load 215(compare)
+            5451:154(f16vec2) Load 1417(f16dPdxy2)
+            5452:154(f16vec2) Load 1417(f16dPdxy2)
+            5453:6(float16_t) Load 4274(f16lodClamp)
+            5454:6(float16_t) ImageSampleDrefExplicitLod 5448 5449 5450 Grad ConstOffset MinLod 5451 5452 722 5453
+            5455:    208(ptr) AccessChain 5290(texel) 207
+            5456:6(float16_t) Load 5455
+            5457:6(float16_t) FAdd 5456 5454
+            5458:    208(ptr) AccessChain 5290(texel) 207
+                              Store 5458 5457
+            5459:  7(f16vec4) Load 5290(texel)
+                              ReturnValue 5459
                               FunctionEnd
 115(testCombinedTextureSampler():  7(f16vec4) Function None 8
              116:             Label
-     5452(texel):     64(ptr) Variable Function
-                              Store 5452(texel) 121
-            5455:         122 Load 5454(t1D)
-            5459:        5456 Load 5458(s)
-            5460:         123 SampledImage 5455 5459
-            5461:   52(float) Load 128(c1)
-            5462:  7(f16vec4) ImageSampleImplicitLod 5460 5461
-            5463:  7(f16vec4) Load 5452(texel)
-            5464:  7(f16vec4) FAdd 5463 5462
-                              Store 5452(texel) 5464
-            5465:         122 Load 5454(t1D)
-            5466:        5456 Load 5458(s)
-            5467:         123 SampledImage 5465 5466
-            5468:6(float16_t) Load 135(f16c1)
-            5469:6(float16_t) Load 137(f16bias)
-            5470:  7(f16vec4) ImageSampleImplicitLod 5467 5468 Bias 5469
-            5471:  7(f16vec4) Load 5452(texel)
-            5472:  7(f16vec4) FAdd 5471 5470
-                              Store 5452(texel) 5472
-            5475:         142 Load 5474(t2D)
-            5476:        5456 Load 5458(s)
-            5477:         143 SampledImage 5475 5476
-            5478:   53(fvec2) Load 148(c2)
-            5479:  7(f16vec4) ImageSampleImplicitLod 5477 5478
-            5480:  7(f16vec4) Load 5452(texel)
-            5481:  7(f16vec4) FAdd 5480 5479
-                              Store 5452(texel) 5481
-            5482:         142 Load 5474(t2D)
-            5483:        5456 Load 5458(s)
-            5484:         143 SampledImage 5482 5483
-            5485:154(f16vec2) Load 156(f16c2)
-            5486:6(float16_t) Load 137(f16bias)
-            5487:  7(f16vec4) ImageSampleImplicitLod 5484 5485 Bias 5486
-            5488:  7(f16vec4) Load 5452(texel)
-            5489:  7(f16vec4) FAdd 5488 5487
-                              Store 5452(texel) 5489
-            5492:         162 Load 5491(t3D)
-            5493:        5456 Load 5458(s)
-            5494:         163 SampledImage 5492 5493
-            5495:  167(fvec3) Load 169(c3)
-            5496:  7(f16vec4) ImageSampleImplicitLod 5494 5495
-            5497:  7(f16vec4) Load 5452(texel)
-            5498:  7(f16vec4) FAdd 5497 5496
-                              Store 5452(texel) 5498
-            5499:         162 Load 5491(t3D)
-            5500:        5456 Load 5458(s)
-            5501:         163 SampledImage 5499 5500
-            5502:175(f16vec3) Load 177(f16c3)
-            5503:6(float16_t) Load 137(f16bias)
-            5504:  7(f16vec4) ImageSampleImplicitLod 5501 5502 Bias 5503
-            5505:  7(f16vec4) Load 5452(texel)
-            5506:  7(f16vec4) FAdd 5505 5504
-                              Store 5452(texel) 5506
-            5509:         183 Load 5508(tCube)
-            5510:        5456 Load 5458(s)
-            5511:         184 SampledImage 5509 5510
-            5512:  167(fvec3) Load 169(c3)
-            5513:  7(f16vec4) ImageSampleImplicitLod 5511 5512
-            5514:  7(f16vec4) Load 5452(texel)
-            5515:  7(f16vec4) FAdd 5514 5513
-                              Store 5452(texel) 5515
-            5516:         183 Load 5508(tCube)
-            5517:        5456 Load 5458(s)
-            5518:         184 SampledImage 5516 5517
-            5519:175(f16vec3) Load 177(f16c3)
-            5520:6(float16_t) Load 137(f16bias)
-            5521:  7(f16vec4) ImageSampleImplicitLod 5518 5519 Bias 5520
-            5522:  7(f16vec4) Load 5452(texel)
-            5523:  7(f16vec4) FAdd 5522 5521
-                              Store 5452(texel) 5523
-            5524:         122 Load 5454(t1D)
-            5526:        5456 Load 5525(sShadow)
-            5527:         199 SampledImage 5524 5526
-            5528:  167(fvec3) Load 169(c3)
-            5529:   52(float) CompositeExtract 5528 2
-            5530:6(float16_t) ImageSampleDrefImplicitLod 5527 5528 5529
-            5531:    208(ptr) AccessChain 5452(texel) 207
-            5532:6(float16_t) Load 5531
-            5533:6(float16_t) FAdd 5532 5530
-            5534:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5534 5533
-            5535:         122 Load 5454(t1D)
-            5536:        5456 Load 5525(sShadow)
-            5537:         199 SampledImage 5535 5536
-            5538:154(f16vec2) Load 156(f16c2)
-            5539:   52(float) Load 215(compare)
-            5540:6(float16_t) Load 137(f16bias)
-            5541:6(float16_t) ImageSampleDrefImplicitLod 5537 5538 5539 Bias 5540
-            5542:    208(ptr) AccessChain 5452(texel) 207
-            5543:6(float16_t) Load 5542
-            5544:6(float16_t) FAdd 5543 5541
-            5545:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5545 5544
-            5546:         142 Load 5474(t2D)
-            5547:        5456 Load 5525(sShadow)
-            5548:         224 SampledImage 5546 5547
-            5549:  167(fvec3) Load 169(c3)
-            5550:   52(float) CompositeExtract 5549 2
-            5551:6(float16_t) ImageSampleDrefImplicitLod 5548 5549 5550
-            5552:    208(ptr) AccessChain 5452(texel) 207
+     5462(texel):     64(ptr) Variable Function
+                              Store 5462(texel) 121
+            5465:         122 Load 5464(t1D)
+            5469:        5466 Load 5468(s)
+            5470:         123 SampledImage 5465 5469
+            5471:   52(float) Load 128(c1)
+            5472:  7(f16vec4) ImageSampleImplicitLod 5470 5471
+            5473:  7(f16vec4) Load 5462(texel)
+            5474:  7(f16vec4) FAdd 5473 5472
+                              Store 5462(texel) 5474
+            5475:         122 Load 5464(t1D)
+            5476:        5466 Load 5468(s)
+            5477:         123 SampledImage 5475 5476
+            5478:6(float16_t) Load 135(f16c1)
+            5479:6(float16_t) Load 137(f16bias)
+            5480:  7(f16vec4) ImageSampleImplicitLod 5477 5478 Bias 5479
+            5481:  7(f16vec4) Load 5462(texel)
+            5482:  7(f16vec4) FAdd 5481 5480
+                              Store 5462(texel) 5482
+            5485:         142 Load 5484(t2D)
+            5486:        5466 Load 5468(s)
+            5487:         143 SampledImage 5485 5486
+            5488:   53(fvec2) Load 148(c2)
+            5489:  7(f16vec4) ImageSampleImplicitLod 5487 5488
+            5490:  7(f16vec4) Load 5462(texel)
+            5491:  7(f16vec4) FAdd 5490 5489
+                              Store 5462(texel) 5491
+            5492:         142 Load 5484(t2D)
+            5493:        5466 Load 5468(s)
+            5494:         143 SampledImage 5492 5493
+            5495:154(f16vec2) Load 156(f16c2)
+            5496:6(float16_t) Load 137(f16bias)
+            5497:  7(f16vec4) ImageSampleImplicitLod 5494 5495 Bias 5496
+            5498:  7(f16vec4) Load 5462(texel)
+            5499:  7(f16vec4) FAdd 5498 5497
+                              Store 5462(texel) 5499
+            5502:         162 Load 5501(t3D)
+            5503:        5466 Load 5468(s)
+            5504:         163 SampledImage 5502 5503
+            5505:  167(fvec3) Load 169(c3)
+            5506:  7(f16vec4) ImageSampleImplicitLod 5504 5505
+            5507:  7(f16vec4) Load 5462(texel)
+            5508:  7(f16vec4) FAdd 5507 5506
+                              Store 5462(texel) 5508
+            5509:         162 Load 5501(t3D)
+            5510:        5466 Load 5468(s)
+            5511:         163 SampledImage 5509 5510
+            5512:175(f16vec3) Load 177(f16c3)
+            5513:6(float16_t) Load 137(f16bias)
+            5514:  7(f16vec4) ImageSampleImplicitLod 5511 5512 Bias 5513
+            5515:  7(f16vec4) Load 5462(texel)
+            5516:  7(f16vec4) FAdd 5515 5514
+                              Store 5462(texel) 5516
+            5519:         183 Load 5518(tCube)
+            5520:        5466 Load 5468(s)
+            5521:         184 SampledImage 5519 5520
+            5522:  167(fvec3) Load 169(c3)
+            5523:  7(f16vec4) ImageSampleImplicitLod 5521 5522
+            5524:  7(f16vec4) Load 5462(texel)
+            5525:  7(f16vec4) FAdd 5524 5523
+                              Store 5462(texel) 5525
+            5526:         183 Load 5518(tCube)
+            5527:        5466 Load 5468(s)
+            5528:         184 SampledImage 5526 5527
+            5529:175(f16vec3) Load 177(f16c3)
+            5530:6(float16_t) Load 137(f16bias)
+            5531:  7(f16vec4) ImageSampleImplicitLod 5528 5529 Bias 5530
+            5532:  7(f16vec4) Load 5462(texel)
+            5533:  7(f16vec4) FAdd 5532 5531
+                              Store 5462(texel) 5533
+            5534:         122 Load 5464(t1D)
+            5536:        5466 Load 5535(sShadow)
+            5537:         199 SampledImage 5534 5536
+            5538:  167(fvec3) Load 169(c3)
+            5539:   52(float) CompositeExtract 5538 2
+            5540:6(float16_t) ImageSampleDrefImplicitLod 5537 5538 5539
+            5541:    208(ptr) AccessChain 5462(texel) 207
+            5542:6(float16_t) Load 5541
+            5543:6(float16_t) FAdd 5542 5540
+            5544:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5544 5543
+            5545:         122 Load 5464(t1D)
+            5546:        5466 Load 5535(sShadow)
+            5547:         199 SampledImage 5545 5546
+            5548:154(f16vec2) Load 156(f16c2)
+            5549:   52(float) Load 215(compare)
+            5550:6(float16_t) Load 137(f16bias)
+            5551:6(float16_t) ImageSampleDrefImplicitLod 5547 5548 5549 Bias 5550
+            5552:    208(ptr) AccessChain 5462(texel) 207
             5553:6(float16_t) Load 5552
             5554:6(float16_t) FAdd 5553 5551
-            5555:    208(ptr) AccessChain 5452(texel) 207
+            5555:    208(ptr) AccessChain 5462(texel) 207
                               Store 5555 5554
-            5556:         142 Load 5474(t2D)
-            5557:        5456 Load 5525(sShadow)
+            5556:         142 Load 5484(t2D)
+            5557:        5466 Load 5535(sShadow)
             5558:         224 SampledImage 5556 5557
-            5559:154(f16vec2) Load 156(f16c2)
-            5560:   52(float) Load 215(compare)
-            5561:6(float16_t) Load 137(f16bias)
-            5562:6(float16_t) ImageSampleDrefImplicitLod 5558 5559 5560 Bias 5561
-            5563:    208(ptr) AccessChain 5452(texel) 207
-            5564:6(float16_t) Load 5563
-            5565:6(float16_t) FAdd 5564 5562
-            5566:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5566 5565
-            5567:         183 Load 5508(tCube)
-            5568:        5456 Load 5525(sShadow)
-            5569:         245 SampledImage 5567 5568
-            5570:  249(fvec4) Load 251(c4)
-            5571:   52(float) CompositeExtract 5570 3
-            5572:6(float16_t) ImageSampleDrefImplicitLod 5569 5570 5571
-            5573:    208(ptr) AccessChain 5452(texel) 207
+            5559:  167(fvec3) Load 169(c3)
+            5560:   52(float) CompositeExtract 5559 2
+            5561:6(float16_t) ImageSampleDrefImplicitLod 5558 5559 5560
+            5562:    208(ptr) AccessChain 5462(texel) 207
+            5563:6(float16_t) Load 5562
+            5564:6(float16_t) FAdd 5563 5561
+            5565:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5565 5564
+            5566:         142 Load 5484(t2D)
+            5567:        5466 Load 5535(sShadow)
+            5568:         224 SampledImage 5566 5567
+            5569:154(f16vec2) Load 156(f16c2)
+            5570:   52(float) Load 215(compare)
+            5571:6(float16_t) Load 137(f16bias)
+            5572:6(float16_t) ImageSampleDrefImplicitLod 5568 5569 5570 Bias 5571
+            5573:    208(ptr) AccessChain 5462(texel) 207
             5574:6(float16_t) Load 5573
             5575:6(float16_t) FAdd 5574 5572
-            5576:    208(ptr) AccessChain 5452(texel) 207
+            5576:    208(ptr) AccessChain 5462(texel) 207
                               Store 5576 5575
-            5577:         183 Load 5508(tCube)
-            5578:        5456 Load 5525(sShadow)
+            5577:         183 Load 5518(tCube)
+            5578:        5466 Load 5535(sShadow)
             5579:         245 SampledImage 5577 5578
-            5580:175(f16vec3) Load 177(f16c3)
-            5581:   52(float) Load 215(compare)
-            5582:6(float16_t) Load 137(f16bias)
-            5583:6(float16_t) ImageSampleDrefImplicitLod 5579 5580 5581 Bias 5582
-            5584:    208(ptr) AccessChain 5452(texel) 207
-            5585:6(float16_t) Load 5584
-            5586:6(float16_t) FAdd 5585 5583
-            5587:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5587 5586
-            5590:         268 Load 5589(t1DArray)
-            5591:        5456 Load 5458(s)
-            5592:         269 SampledImage 5590 5591
-            5593:   53(fvec2) Load 148(c2)
-            5594:  7(f16vec4) ImageSampleImplicitLod 5592 5593
-            5595:  7(f16vec4) Load 5452(texel)
-            5596:  7(f16vec4) FAdd 5595 5594
-                              Store 5452(texel) 5596
-            5597:         268 Load 5589(t1DArray)
-            5598:        5456 Load 5458(s)
-            5599:         269 SampledImage 5597 5598
-            5600:154(f16vec2) Load 156(f16c2)
-            5601:6(float16_t) Load 137(f16bias)
-            5602:  7(f16vec4) ImageSampleImplicitLod 5599 5600 Bias 5601
-            5603:  7(f16vec4) Load 5452(texel)
-            5604:  7(f16vec4) FAdd 5603 5602
-                              Store 5452(texel) 5604
-            5607:         283 Load 5606(t2DArray)
-            5608:        5456 Load 5458(s)
-            5609:         284 SampledImage 5607 5608
-            5610:  167(fvec3) Load 169(c3)
-            5611:  7(f16vec4) ImageSampleImplicitLod 5609 5610
-            5612:  7(f16vec4) Load 5452(texel)
-            5613:  7(f16vec4) FAdd 5612 5611
-                              Store 5452(texel) 5613
-            5614:         283 Load 5606(t2DArray)
-            5615:        5456 Load 5458(s)
-            5616:         284 SampledImage 5614 5615
-            5617:175(f16vec3) Load 177(f16c3)
-            5618:6(float16_t) Load 137(f16bias)
-            5619:  7(f16vec4) ImageSampleImplicitLod 5616 5617 Bias 5618
-            5620:  7(f16vec4) Load 5452(texel)
-            5621:  7(f16vec4) FAdd 5620 5619
-                              Store 5452(texel) 5621
-            5624:         298 Load 5623(tCubeArray)
-            5625:        5456 Load 5458(s)
-            5626:         299 SampledImage 5624 5625
-            5627:  249(fvec4) Load 251(c4)
-            5628:  7(f16vec4) ImageSampleImplicitLod 5626 5627
-            5629:  7(f16vec4) Load 5452(texel)
-            5630:  7(f16vec4) FAdd 5629 5628
-                              Store 5452(texel) 5630
-            5631:         298 Load 5623(tCubeArray)
-            5632:        5456 Load 5458(s)
-            5633:         299 SampledImage 5631 5632
-            5634:  7(f16vec4) Load 309(f16c4)
-            5635:6(float16_t) Load 137(f16bias)
-            5636:  7(f16vec4) ImageSampleImplicitLod 5633 5634 Bias 5635
-            5637:  7(f16vec4) Load 5452(texel)
-            5638:  7(f16vec4) FAdd 5637 5636
-                              Store 5452(texel) 5638
-            5639:         268 Load 5589(t1DArray)
-            5640:        5456 Load 5525(sShadow)
-            5641:         316 SampledImage 5639 5640
-            5642:  167(fvec3) Load 169(c3)
-            5643:   52(float) CompositeExtract 5642 2
-            5644:6(float16_t) ImageSampleDrefImplicitLod 5641 5642 5643
-            5645:    208(ptr) AccessChain 5452(texel) 207
-            5646:6(float16_t) Load 5645
-            5647:6(float16_t) FAdd 5646 5644
-            5648:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5648 5647
-            5649:         268 Load 5589(t1DArray)
-            5650:        5456 Load 5525(sShadow)
+            5580:  249(fvec4) Load 251(c4)
+            5581:   52(float) CompositeExtract 5580 3
+            5582:6(float16_t) ImageSampleDrefImplicitLod 5579 5580 5581
+            5583:    208(ptr) AccessChain 5462(texel) 207
+            5584:6(float16_t) Load 5583
+            5585:6(float16_t) FAdd 5584 5582
+            5586:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5586 5585
+            5587:         183 Load 5518(tCube)
+            5588:        5466 Load 5535(sShadow)
+            5589:         245 SampledImage 5587 5588
+            5590:175(f16vec3) Load 177(f16c3)
+            5591:   52(float) Load 215(compare)
+            5592:6(float16_t) Load 137(f16bias)
+            5593:6(float16_t) ImageSampleDrefImplicitLod 5589 5590 5591 Bias 5592
+            5594:    208(ptr) AccessChain 5462(texel) 207
+            5595:6(float16_t) Load 5594
+            5596:6(float16_t) FAdd 5595 5593
+            5597:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5597 5596
+            5600:         268 Load 5599(t1DArray)
+            5601:        5466 Load 5468(s)
+            5602:         269 SampledImage 5600 5601
+            5603:   53(fvec2) Load 148(c2)
+            5604:  7(f16vec4) ImageSampleImplicitLod 5602 5603
+            5605:  7(f16vec4) Load 5462(texel)
+            5606:  7(f16vec4) FAdd 5605 5604
+                              Store 5462(texel) 5606
+            5607:         268 Load 5599(t1DArray)
+            5608:        5466 Load 5468(s)
+            5609:         269 SampledImage 5607 5608
+            5610:154(f16vec2) Load 156(f16c2)
+            5611:6(float16_t) Load 137(f16bias)
+            5612:  7(f16vec4) ImageSampleImplicitLod 5609 5610 Bias 5611
+            5613:  7(f16vec4) Load 5462(texel)
+            5614:  7(f16vec4) FAdd 5613 5612
+                              Store 5462(texel) 5614
+            5617:         283 Load 5616(t2DArray)
+            5618:        5466 Load 5468(s)
+            5619:         284 SampledImage 5617 5618
+            5620:  167(fvec3) Load 169(c3)
+            5621:  7(f16vec4) ImageSampleImplicitLod 5619 5620
+            5622:  7(f16vec4) Load 5462(texel)
+            5623:  7(f16vec4) FAdd 5622 5621
+                              Store 5462(texel) 5623
+            5624:         283 Load 5616(t2DArray)
+            5625:        5466 Load 5468(s)
+            5626:         284 SampledImage 5624 5625
+            5627:175(f16vec3) Load 177(f16c3)
+            5628:6(float16_t) Load 137(f16bias)
+            5629:  7(f16vec4) ImageSampleImplicitLod 5626 5627 Bias 5628
+            5630:  7(f16vec4) Load 5462(texel)
+            5631:  7(f16vec4) FAdd 5630 5629
+                              Store 5462(texel) 5631
+            5634:         298 Load 5633(tCubeArray)
+            5635:        5466 Load 5468(s)
+            5636:         299 SampledImage 5634 5635
+            5637:  249(fvec4) Load 251(c4)
+            5638:  7(f16vec4) ImageSampleImplicitLod 5636 5637
+            5639:  7(f16vec4) Load 5462(texel)
+            5640:  7(f16vec4) FAdd 5639 5638
+                              Store 5462(texel) 5640
+            5641:         298 Load 5633(tCubeArray)
+            5642:        5466 Load 5468(s)
+            5643:         299 SampledImage 5641 5642
+            5644:  7(f16vec4) Load 309(f16c4)
+            5645:6(float16_t) Load 137(f16bias)
+            5646:  7(f16vec4) ImageSampleImplicitLod 5643 5644 Bias 5645
+            5647:  7(f16vec4) Load 5462(texel)
+            5648:  7(f16vec4) FAdd 5647 5646
+                              Store 5462(texel) 5648
+            5649:         268 Load 5599(t1DArray)
+            5650:        5466 Load 5535(sShadow)
             5651:         316 SampledImage 5649 5650
-            5652:154(f16vec2) Load 156(f16c2)
-            5653:   52(float) Load 215(compare)
-            5654:6(float16_t) Load 137(f16bias)
-            5655:6(float16_t) ImageSampleDrefImplicitLod 5651 5652 5653 Bias 5654
-            5656:    208(ptr) AccessChain 5452(texel) 207
-            5657:6(float16_t) Load 5656
-            5658:6(float16_t) FAdd 5657 5655
-            5659:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5659 5658
-            5660:         283 Load 5606(t2DArray)
-            5661:        5456 Load 5525(sShadow)
-            5662:         337 SampledImage 5660 5661
-            5663:  249(fvec4) Load 251(c4)
-            5664:   52(float) CompositeExtract 5663 3
-            5665:6(float16_t) ImageSampleDrefImplicitLod 5662 5663 5664
-            5666:    208(ptr) AccessChain 5452(texel) 207
+            5652:  167(fvec3) Load 169(c3)
+            5653:   52(float) CompositeExtract 5652 2
+            5654:6(float16_t) ImageSampleDrefImplicitLod 5651 5652 5653
+            5655:    208(ptr) AccessChain 5462(texel) 207
+            5656:6(float16_t) Load 5655
+            5657:6(float16_t) FAdd 5656 5654
+            5658:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5658 5657
+            5659:         268 Load 5599(t1DArray)
+            5660:        5466 Load 5535(sShadow)
+            5661:         316 SampledImage 5659 5660
+            5662:154(f16vec2) Load 156(f16c2)
+            5663:   52(float) Load 215(compare)
+            5664:6(float16_t) Load 137(f16bias)
+            5665:6(float16_t) ImageSampleDrefImplicitLod 5661 5662 5663 Bias 5664
+            5666:    208(ptr) AccessChain 5462(texel) 207
             5667:6(float16_t) Load 5666
             5668:6(float16_t) FAdd 5667 5665
-            5669:    208(ptr) AccessChain 5452(texel) 207
+            5669:    208(ptr) AccessChain 5462(texel) 207
                               Store 5669 5668
-            5670:         283 Load 5606(t2DArray)
-            5671:        5456 Load 5525(sShadow)
+            5670:         283 Load 5616(t2DArray)
+            5671:        5466 Load 5535(sShadow)
             5672:         337 SampledImage 5670 5671
-            5673:175(f16vec3) Load 177(f16c3)
-            5674:   52(float) Load 215(compare)
+            5673:  249(fvec4) Load 251(c4)
+            5674:   52(float) CompositeExtract 5673 3
             5675:6(float16_t) ImageSampleDrefImplicitLod 5672 5673 5674
-            5676:    208(ptr) AccessChain 5452(texel) 207
+            5676:    208(ptr) AccessChain 5462(texel) 207
             5677:6(float16_t) Load 5676
             5678:6(float16_t) FAdd 5677 5675
-            5679:    208(ptr) AccessChain 5452(texel) 207
+            5679:    208(ptr) AccessChain 5462(texel) 207
                               Store 5679 5678
-            5682:         356 Load 5681(t2DRect)
-            5683:        5456 Load 5458(s)
-            5684:         357 SampledImage 5682 5683
-            5685:   53(fvec2) Load 148(c2)
-            5686:  7(f16vec4) ImageSampleImplicitLod 5684 5685
-            5687:  7(f16vec4) Load 5452(texel)
-            5688:  7(f16vec4) FAdd 5687 5686
-                              Store 5452(texel) 5688
-            5689:         356 Load 5681(t2DRect)
-            5690:        5456 Load 5458(s)
-            5691:         357 SampledImage 5689 5690
-            5692:154(f16vec2) Load 156(f16c2)
-            5693:  7(f16vec4) ImageSampleImplicitLod 5691 5692
-            5694:  7(f16vec4) Load 5452(texel)
-            5695:  7(f16vec4) FAdd 5694 5693
-                              Store 5452(texel) 5695
-            5696:         356 Load 5681(t2DRect)
-            5697:        5456 Load 5525(sShadow)
-            5698:         371 SampledImage 5696 5697
-            5699:  167(fvec3) Load 169(c3)
-            5700:   52(float) CompositeExtract 5699 2
-            5701:6(float16_t) ImageSampleDrefImplicitLod 5698 5699 5700
-            5702:    208(ptr) AccessChain 5452(texel) 207
-            5703:6(float16_t) Load 5702
-            5704:6(float16_t) FAdd 5703 5701
-            5705:    208(ptr) AccessChain 5452(texel) 207
-                              Store 5705 5704
-            5706:         356 Load 5681(t2DRect)
-            5707:        5456 Load 5525(sShadow)
+            5680:         283 Load 5616(t2DArray)
+            5681:        5466 Load 5535(sShadow)
+            5682:         337 SampledImage 5680 5681
+            5683:175(f16vec3) Load 177(f16c3)
+            5684:   52(float) Load 215(compare)
+            5685:6(float16_t) ImageSampleDrefImplicitLod 5682 5683 5684
+            5686:    208(ptr) AccessChain 5462(texel) 207
+            5687:6(float16_t) Load 5686
+            5688:6(float16_t) FAdd 5687 5685
+            5689:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5689 5688
+            5692:         356 Load 5691(t2DRect)
+            5693:        5466 Load 5468(s)
+            5694:         357 SampledImage 5692 5693
+            5695:   53(fvec2) Load 148(c2)
+            5696:  7(f16vec4) ImageSampleImplicitLod 5694 5695
+            5697:  7(f16vec4) Load 5462(texel)
+            5698:  7(f16vec4) FAdd 5697 5696
+                              Store 5462(texel) 5698
+            5699:         356 Load 5691(t2DRect)
+            5700:        5466 Load 5468(s)
+            5701:         357 SampledImage 5699 5700
+            5702:154(f16vec2) Load 156(f16c2)
+            5703:  7(f16vec4) ImageSampleImplicitLod 5701 5702
+            5704:  7(f16vec4) Load 5462(texel)
+            5705:  7(f16vec4) FAdd 5704 5703
+                              Store 5462(texel) 5705
+            5706:         356 Load 5691(t2DRect)
+            5707:        5466 Load 5535(sShadow)
             5708:         371 SampledImage 5706 5707
-            5709:154(f16vec2) Load 156(f16c2)
-            5710:   52(float) Load 215(compare)
+            5709:  167(fvec3) Load 169(c3)
+            5710:   52(float) CompositeExtract 5709 2
             5711:6(float16_t) ImageSampleDrefImplicitLod 5708 5709 5710
-            5712:    208(ptr) AccessChain 5452(texel) 207
+            5712:    208(ptr) AccessChain 5462(texel) 207
             5713:6(float16_t) Load 5712
             5714:6(float16_t) FAdd 5713 5711
-            5715:    208(ptr) AccessChain 5452(texel) 207
+            5715:    208(ptr) AccessChain 5462(texel) 207
                               Store 5715 5714
-            5716:         298 Load 5623(tCubeArray)
-            5717:        5456 Load 5525(sShadow)
-            5718:         391 SampledImage 5716 5717
-            5719:  249(fvec4) Load 251(c4)
+            5716:         356 Load 5691(t2DRect)
+            5717:        5466 Load 5535(sShadow)
+            5718:         371 SampledImage 5716 5717
+            5719:154(f16vec2) Load 156(f16c2)
             5720:   52(float) Load 215(compare)
             5721:6(float16_t) ImageSampleDrefImplicitLod 5718 5719 5720
-            5722:    208(ptr) AccessChain 5452(texel) 207
+            5722:    208(ptr) AccessChain 5462(texel) 207
             5723:6(float16_t) Load 5722
             5724:6(float16_t) FAdd 5723 5721
-            5725:    208(ptr) AccessChain 5452(texel) 207
+            5725:    208(ptr) AccessChain 5462(texel) 207
                               Store 5725 5724
-            5726:         298 Load 5623(tCubeArray)
-            5727:        5456 Load 5525(sShadow)
+            5726:         298 Load 5633(tCubeArray)
+            5727:        5466 Load 5535(sShadow)
             5728:         391 SampledImage 5726 5727
-            5729:  7(f16vec4) Load 309(f16c4)
+            5729:  249(fvec4) Load 251(c4)
             5730:   52(float) Load 215(compare)
             5731:6(float16_t) ImageSampleDrefImplicitLod 5728 5729 5730
-            5732:    208(ptr) AccessChain 5452(texel) 207
+            5732:    208(ptr) AccessChain 5462(texel) 207
             5733:6(float16_t) Load 5732
             5734:6(float16_t) FAdd 5733 5731
-            5735:    208(ptr) AccessChain 5452(texel) 207
+            5735:    208(ptr) AccessChain 5462(texel) 207
                               Store 5735 5734
-            5736:  7(f16vec4) Load 5452(texel)
-                              ReturnValue 5736
+            5736:         298 Load 5633(tCubeArray)
+            5737:        5466 Load 5535(sShadow)
+            5738:         391 SampledImage 5736 5737
+            5739:  7(f16vec4) Load 309(f16c4)
+            5740:   52(float) Load 215(compare)
+            5741:6(float16_t) ImageSampleDrefImplicitLod 5738 5739 5740
+            5742:    208(ptr) AccessChain 5462(texel) 207
+            5743:6(float16_t) Load 5742
+            5744:6(float16_t) FAdd 5743 5741
+            5745:    208(ptr) AccessChain 5462(texel) 207
+                              Store 5745 5744
+            5746:  7(f16vec4) Load 5462(texel)
+                              ReturnValue 5746
                               FunctionEnd
 117(testSubpassLoad():  7(f16vec4) Function None 8
              118:             Label
-            5742:        5739 Load 5741(subpass)
-            5744:  7(f16vec4) ImageRead 5742 5743
-            5748:        5745 Load 5747(subpassMS)
-            5749:  7(f16vec4) ImageRead 5748 5743 Sample 1326
-            5750:  7(f16vec4) FAdd 5744 5749
-                              ReturnValue 5750
+            5752:        5749 Load 5751(subpass)
+            5754:  7(f16vec4) ImageRead 5752 5753
+            5758:        5755 Load 5757(subpassMS)
+            5759:  7(f16vec4) ImageRead 5758 5753 Sample 1326
+            5760:  7(f16vec4) FAdd 5754 5759
+                              ReturnValue 5760
                               FunctionEnd
diff --git a/Test/baseResults/spv.intcoopmat.comp.out b/Test/baseResults/spv.intcoopmat.comp.out
index e74f44e..6a69743 100644
--- a/Test/baseResults/spv.intcoopmat.comp.out
+++ b/Test/baseResults/spv.intcoopmat.comp.out
@@ -10,8 +10,8 @@
                               Capability VulkanMemoryModelKHR
                               Capability PhysicalStorageBufferAddressesEXT
                               Capability CooperativeMatrixNV
-                              Extension  "SPV_EXT_physical_storage_buffer"
                               Extension  "SPV_KHR_8bit_storage"
+                              Extension  "SPV_KHR_physical_storage_buffer"
                               Extension  "SPV_KHR_storage_buffer_storage_class"
                               Extension  "SPV_KHR_vulkan_memory_model"
                               Extension  "SPV_NV_cooperative_matrix"
diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out
index 973147d..1d31230 100644
--- a/Test/baseResults/spv.precision.frag.out
+++ b/Test/baseResults/spv.precision.frag.out
@@ -1,14 +1,15 @@
 spv.precision.frag
 // Module Version 10000
 // Generated by (magic number): 8000a
-// Id's are bound by 146
+// Id's are bound by 165
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 23 62 64 76 119
+                              EntryPoint Fragment 4  "main" 23 62 64 76 119 149
                               ExecutionMode 4 OriginUpperLeft
                               Source ESSL 310
+                              SourceExtension  "GL_OES_sample_variables"
                               Name 4  "main"
                               Name 12  "foo(vf3;"
                               Name 11  "mv3"
@@ -33,6 +34,7 @@
                               MemberName 117(S) 0  "a"
                               MemberName 117(S) 1  "b"
                               Name 119  "s"
+                              Name 149  "gl_SampleMaskIn"
                               Decorate 12(foo(vf3;) RelaxedPrecision
                               Decorate 11(mv3) RelaxedPrecision
                               Decorate 23(highfin) Location 2
@@ -97,6 +99,15 @@
                               Decorate 143 RelaxedPrecision
                               Decorate 144 RelaxedPrecision
                               Decorate 145 RelaxedPrecision
+                              Decorate 149(gl_SampleMaskIn) Flat
+                              Decorate 149(gl_SampleMaskIn) BuiltIn SampleMask
+                              Decorate 153 RelaxedPrecision
+                              Decorate 156 RelaxedPrecision
+                              Decorate 159 RelaxedPrecision
+                              Decorate 160 RelaxedPrecision
+                              Decorate 162 RelaxedPrecision
+                              Decorate 163 RelaxedPrecision
+                              Decorate 164 RelaxedPrecision
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -147,6 +158,11 @@
              133:    6(float) Constant 1082549862
              138:    6(float) Constant 1073741824
              142:    6(float) Constant 1077936128
+             146:     95(int) Constant 1
+             147:             TypeArray 39(int) 146
+             148:             TypePointer Input 147
+149(gl_SampleMaskIn):    148(ptr) Variable Input
+             150:             TypePointer Input 39(int)
          4(main):           2 Function None 3
                5:             Label
          41(sum):     40(ptr) Variable Function
@@ -156,6 +172,7 @@
  72(local_highp):     71(ptr) Variable Function
       108(param):     16(ptr) Variable Function
              135:     71(ptr) Variable Function
+             156:     71(ptr) Variable Function
               44:     39(int) Load 43(uniform_medium)
               46:     39(int) Load 45(uniform_high)
               47:     39(int) IAdd 44 46
@@ -249,6 +266,26 @@
              137:             Label
              145:   21(fvec4) Load 135
                               Store 76(mediumfout) 145
+             151:    150(ptr) AccessChain 149(gl_SampleMaskIn) 120
+             152:     39(int) Load 151
+             153:     39(int) Load 43(uniform_medium)
+             154:     39(int) ShiftRightArithmetic 152 153
+             155:    14(bool) SGreaterThan 154 120
+                              SelectionMerge 158 None
+                              BranchConditional 155 157 161
+             157:               Label
+             159:   21(fvec4)   Load 76(mediumfout)
+             160:   21(fvec4)   VectorTimesScalar 159 138
+                                Store 156 160
+                                Branch 158
+             161:               Label
+             162:   21(fvec4)   Load 76(mediumfout)
+             163:   21(fvec4)   VectorTimesScalar 162 142
+                                Store 156 163
+                                Branch 158
+             158:             Label
+             164:   21(fvec4) Load 156
+                              Store 76(mediumfout) 164
                               Return
                               FunctionEnd
     12(foo(vf3;):    9(fvec2) Function None 10
diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out
index 0f7c687..bf44b81 100644
--- a/Test/baseResults/spv.sparseTexture.frag.out
+++ b/Test/baseResults/spv.sparseTexture.frag.out
@@ -2,7 +2,7 @@
 Validation failed
 // Module Version 10000
 // Generated by (magic number): 8000a
-// Id's are bound by 438
+// Id's are bound by 442
 
                               Capability Shader
                               Capability ImageGatherExtended
@@ -12,7 +12,7 @@
                               Capability SampledCubeArray
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 33 48 89 365 393 405 423
+                              EntryPoint Fragment 4  "main" 33 48 89 397 409 427
                               ExecutionMode 4 OriginUpperLeft
                               Source GLSL 450
                               SourceExtension  "GL_ARB_sparse_texture2"
@@ -40,13 +40,12 @@
                               Name 228  "is2DArray"
                               Name 261  "sCubeShadow"
                               Name 294  "s2DRectShadow"
-                              Name 365  "offsets"
-                              Name 390  "i2D"
-                              Name 393  "ic2"
-                              Name 402  "ii3D"
-                              Name 405  "ic3"
-                              Name 414  "i2DMS"
-                              Name 423  "outColor"
+                              Name 394  "i2D"
+                              Name 397  "ic2"
+                              Name 406  "ii3D"
+                              Name 409  "ic3"
+                              Name 418  "i2DMS"
+                              Name 427  "outColor"
                               Decorate 29(s2D) DescriptorSet 0
                               Decorate 29(s2D) Binding 0
                               Decorate 33(c2) Location 0
@@ -74,19 +73,17 @@
                               Decorate 261(sCubeShadow) Binding 3
                               Decorate 294(s2DRectShadow) DescriptorSet 0
                               Decorate 294(s2DRectShadow) Binding 5
-                              Decorate 365(offsets) Flat
-                              Decorate 365(offsets) Location 5
-                              Decorate 390(i2D) DescriptorSet 0
-                              Decorate 390(i2D) Binding 12
-                              Decorate 393(ic2) Flat
-                              Decorate 393(ic2) Location 3
-                              Decorate 402(ii3D) DescriptorSet 0
-                              Decorate 402(ii3D) Binding 13
-                              Decorate 405(ic3) Flat
-                              Decorate 405(ic3) Location 4
-                              Decorate 414(i2DMS) DescriptorSet 0
-                              Decorate 414(i2DMS) Binding 14
-                              Decorate 423(outColor) Location 0
+                              Decorate 394(i2D) DescriptorSet 0
+                              Decorate 394(i2D) Binding 12
+                              Decorate 397(ic2) Flat
+                              Decorate 397(ic2) Location 3
+                              Decorate 406(ii3D) DescriptorSet 0
+                              Decorate 406(ii3D) Binding 13
+                              Decorate 409(ic3) Flat
+                              Decorate 409(ic3) Location 4
+                              Decorate 418(i2DMS) DescriptorSet 0
+                              Decorate 418(i2DMS) Binding 14
+                              Decorate 427(outColor) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -189,31 +186,38 @@
              340:  143(ivec2) ConstantComposite 192 192
              362:     20(int) Constant 4
              363:             TypeArray 143(ivec2) 362
-             364:             TypePointer Input 363
-    365(offsets):    364(ptr) Variable Input
-             388:             TypeImage 10(float) 2D nonsampled format:Rgba32f
-             389:             TypePointer UniformConstant 388
-        390(i2D):    389(ptr) Variable UniformConstant
-             392:             TypePointer Input 143(ivec2)
-        393(ic2):    392(ptr) Variable Input
-             400:             TypeImage 6(int) 3D nonsampled format:Rgba32i
-             401:             TypePointer UniformConstant 400
-       402(ii3D):    401(ptr) Variable UniformConstant
-             404:             TypePointer Input 129(ivec3)
-        405(ic3):    404(ptr) Variable Input
-             412:             TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
-             413:             TypePointer UniformConstant 412
-      414(i2DMS):    413(ptr) Variable UniformConstant
-             422:             TypePointer Output 11(fvec4)
-   423(outColor):    422(ptr) Variable Output
-             425:             TypeBool
+             364:      6(int) Constant 1
+             365:  143(ivec2) ConstantComposite 364 130
+             366:  143(ivec2) ConstantComposite 144 192
+             367:      6(int) Constant 15
+             368:      6(int) Constant 16
+             369:  143(ivec2) ConstantComposite 367 368
+             370:      6(int) Constant 4294967294
+             371:  143(ivec2) ConstantComposite 370 9
+             372:         363 ConstantComposite 365 366 369 371
+             392:             TypeImage 10(float) 2D nonsampled format:Rgba32f
+             393:             TypePointer UniformConstant 392
+        394(i2D):    393(ptr) Variable UniformConstant
+             396:             TypePointer Input 143(ivec2)
+        397(ic2):    396(ptr) Variable Input
+             404:             TypeImage 6(int) 3D nonsampled format:Rgba32i
+             405:             TypePointer UniformConstant 404
+       406(ii3D):    405(ptr) Variable UniformConstant
+             408:             TypePointer Input 129(ivec3)
+        409(ic3):    408(ptr) Variable Input
+             416:             TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
+             417:             TypePointer UniformConstant 416
+      418(i2DMS):    417(ptr) Variable UniformConstant
+             426:             TypePointer Output 11(fvec4)
+   427(outColor):    426(ptr) Variable Output
+             429:             TypeBool
          4(main):           2 Function None 3
                5:             Label
      8(resident):      7(ptr) Variable Function
        13(texel):     12(ptr) Variable Function
       18(itexel):     17(ptr) Variable Function
       23(utexel):     22(ptr) Variable Function
-             427:     12(ptr) Variable Function
+             431:     12(ptr) Variable Function
                               Store 8(resident) 9
                               Store 13(texel) 15
                               Store 18(itexel) 19
@@ -534,79 +538,76 @@
                               Store 8(resident) 359
              360:          27 Load 29(s2D)
              361:   31(fvec2) Load 33(c2)
-             366:         363 Load 365(offsets)
-             367: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 366
-             368:   11(fvec4) CompositeExtract 367 1
-                              Store 13(texel) 368
-             369:      6(int) CompositeExtract 367 0
-             370:      6(int) Load 8(resident)
-             371:      6(int) BitwiseOr 370 369
-                              Store 8(resident) 371
-             372:         226 Load 228(is2DArray)
-             373:   46(fvec3) Load 48(c3)
-             374:         363 Load 365(offsets)
-             375: 62(ResType) ImageSparseGather 372 373 130 ConstOffsets 374
-             376:   16(ivec4) CompositeExtract 375 1
-                              Store 18(itexel) 376
-             377:      6(int) CompositeExtract 375 0
-             378:      6(int) Load 8(resident)
-             379:      6(int) BitwiseOr 378 377
-                              Store 8(resident) 379
-             380:         292 Load 294(s2DRectShadow)
-             381:   31(fvec2) Load 33(c2)
-             382:         363 Load 365(offsets)
-             383: 35(ResType) ImageSparseDrefGather 380 381 50 ConstOffsets 382
-             384:   11(fvec4) CompositeExtract 383 1
-                              Store 13(texel) 384
-             385:      6(int) CompositeExtract 383 0
-             386:      6(int) Load 8(resident)
-             387:      6(int) BitwiseOr 386 385
-                              Store 8(resident) 387
-             391:         388 Load 390(i2D)
-             394:  143(ivec2) Load 393(ic2)
-             395: 35(ResType) ImageSparseRead 391 394
-             396:   11(fvec4) CompositeExtract 395 1
-                              Store 13(texel) 396
-             397:      6(int) CompositeExtract 395 0
-             398:      6(int) Load 8(resident)
-             399:      6(int) BitwiseOr 398 397
-                              Store 8(resident) 399
-             403:         400 Load 402(ii3D)
-             406:  129(ivec3) Load 405(ic3)
-             407: 62(ResType) ImageSparseRead 403 406
-             408:   16(ivec4) CompositeExtract 407 1
-                              Store 18(itexel) 408
-             409:      6(int) CompositeExtract 407 0
-             410:      6(int) Load 8(resident)
-             411:      6(int) BitwiseOr 410 409
-                              Store 8(resident) 411
-             415:         412 Load 414(i2DMS)
-             416:  143(ivec2) Load 393(ic2)
-             417: 35(ResType) ImageSparseRead 415 416 Sample 144
-             418:   11(fvec4) CompositeExtract 417 1
-                              Store 13(texel) 418
-             419:      6(int) CompositeExtract 417 0
-             420:      6(int) Load 8(resident)
-             421:      6(int) BitwiseOr 420 419
-                              Store 8(resident) 421
+             373: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 372
+             374:   11(fvec4) CompositeExtract 373 1
+                              Store 13(texel) 374
+             375:      6(int) CompositeExtract 373 0
+             376:      6(int) Load 8(resident)
+             377:      6(int) BitwiseOr 376 375
+                              Store 8(resident) 377
+             378:         226 Load 228(is2DArray)
+             379:   46(fvec3) Load 48(c3)
+             380: 62(ResType) ImageSparseGather 378 379 130 ConstOffsets 372
+             381:   16(ivec4) CompositeExtract 380 1
+                              Store 18(itexel) 381
+             382:      6(int) CompositeExtract 380 0
+             383:      6(int) Load 8(resident)
+             384:      6(int) BitwiseOr 383 382
+                              Store 8(resident) 384
+             385:         292 Load 294(s2DRectShadow)
+             386:   31(fvec2) Load 33(c2)
+             387: 35(ResType) ImageSparseDrefGather 385 386 50 ConstOffsets 372
+             388:   11(fvec4) CompositeExtract 387 1
+                              Store 13(texel) 388
+             389:      6(int) CompositeExtract 387 0
+             390:      6(int) Load 8(resident)
+             391:      6(int) BitwiseOr 390 389
+                              Store 8(resident) 391
+             395:         392 Load 394(i2D)
+             398:  143(ivec2) Load 397(ic2)
+             399: 35(ResType) ImageSparseRead 395 398
+             400:   11(fvec4) CompositeExtract 399 1
+                              Store 13(texel) 400
+             401:      6(int) CompositeExtract 399 0
+             402:      6(int) Load 8(resident)
+             403:      6(int) BitwiseOr 402 401
+                              Store 8(resident) 403
+             407:         404 Load 406(ii3D)
+             410:  129(ivec3) Load 409(ic3)
+             411: 62(ResType) ImageSparseRead 407 410
+             412:   16(ivec4) CompositeExtract 411 1
+                              Store 18(itexel) 412
+             413:      6(int) CompositeExtract 411 0
+             414:      6(int) Load 8(resident)
+             415:      6(int) BitwiseOr 414 413
+                              Store 8(resident) 415
+             419:         416 Load 418(i2DMS)
+             420:  143(ivec2) Load 397(ic2)
+             421: 35(ResType) ImageSparseRead 419 420 Sample 144
+             422:   11(fvec4) CompositeExtract 421 1
+                              Store 13(texel) 422
+             423:      6(int) CompositeExtract 421 0
              424:      6(int) Load 8(resident)
-             426:   425(bool) ImageSparseTexelsResident 424
-                              SelectionMerge 429 None
-                              BranchConditional 426 428 431
-             428:               Label
-             430:   11(fvec4)   Load 13(texel)
-                                Store 427 430
-                                Branch 429
-             431:               Label
-             432:   16(ivec4)   Load 18(itexel)
-             433:   11(fvec4)   ConvertSToF 432
-             434:   21(ivec4)   Load 23(utexel)
-             435:   11(fvec4)   ConvertUToF 434
-             436:   11(fvec4)   FAdd 433 435
-                                Store 427 436
-                                Branch 429
-             429:             Label
-             437:   11(fvec4) Load 427
-                              Store 423(outColor) 437
+             425:      6(int) BitwiseOr 424 423
+                              Store 8(resident) 425
+             428:      6(int) Load 8(resident)
+             430:   429(bool) ImageSparseTexelsResident 428
+                              SelectionMerge 433 None
+                              BranchConditional 430 432 435
+             432:               Label
+             434:   11(fvec4)   Load 13(texel)
+                                Store 431 434
+                                Branch 433
+             435:               Label
+             436:   16(ivec4)   Load 18(itexel)
+             437:   11(fvec4)   ConvertSToF 436
+             438:   21(ivec4)   Load 23(utexel)
+             439:   11(fvec4)   ConvertUToF 438
+             440:   11(fvec4)   FAdd 437 439
+                                Store 431 440
+                                Branch 433
+             433:             Label
+             441:   11(fvec4) Load 431
+                              Store 427(outColor) 441
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/textureoffset_sampler2darrayshadow.vert.out b/Test/baseResults/textureoffset_sampler2darrayshadow.vert.out
new file mode 100644
index 0000000..44d8e97
--- /dev/null
+++ b/Test/baseResults/textureoffset_sampler2darrayshadow.vert.out
@@ -0,0 +1,63 @@
+textureoffset_sampler2darrayshadow.vert
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 1 compilation errors.  No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:7  Function Definition: main( ( global void)
+0:7    Function Parameters: 
+0:9    Sequence
+0:9      move second child to first child ( temp highp 4-component vector of float)
+0:9        'gl_Position' ( gl_Position highp 4-component vector of float Position)
+0:9        Construct vec4 ( temp highp 4-component vector of float)
+0:9          textureOffset ( global mediump float)
+0:9            's' ( uniform mediump sampler2DArrayShadow)
+0:9            Constant:
+0:9              0.000000
+0:9              0.000000
+0:9              0.000000
+0:9              0.000000
+0:9            Constant:
+0:9              0 (const int)
+0:9              0 (const int)
+0:10      move second child to first child ( temp highp 4-component vector of float)
+0:10        'gl_Position' ( gl_Position highp 4-component vector of float Position)
+0:10        'dEQP_Position' ( in highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'dEQP_Position' ( in highp 4-component vector of float)
+0:?     's' ( uniform mediump sampler2DArrayShadow)
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:7  Function Definition: main( ( global void)
+0:7    Function Parameters: 
+0:9    Sequence
+0:9      move second child to first child ( temp highp 4-component vector of float)
+0:9        'gl_Position' ( gl_Position highp 4-component vector of float Position)
+0:9        Construct vec4 ( temp highp 4-component vector of float)
+0:9          textureOffset ( global mediump float)
+0:9            's' ( uniform mediump sampler2DArrayShadow)
+0:9            Constant:
+0:9              0.000000
+0:9              0.000000
+0:9              0.000000
+0:9              0.000000
+0:9            Constant:
+0:9              0 (const int)
+0:9              0 (const int)
+0:10      move second child to first child ( temp highp 4-component vector of float)
+0:10        'gl_Position' ( gl_Position highp 4-component vector of float Position)
+0:10        'dEQP_Position' ( in highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'dEQP_Position' ( in highp 4-component vector of float)
+0:?     's' ( uniform mediump sampler2DArrayShadow)
+0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
+
diff --git a/Test/baseResults/vk.relaxed.changeSet.vert.out b/Test/baseResults/vk.relaxed.changeSet.vert.out
new file mode 100755
index 0000000..f6bce29
--- /dev/null
+++ b/Test/baseResults/vk.relaxed.changeSet.vert.out
@@ -0,0 +1,281 @@
+vk.relaxed.changeSet.vert
+Shader version: 460
+0:? Sequence
+0:11  Function Definition: main( ( global void)
+0:11    Function Parameters: 
+0:13    Sequence
+0:13      move second child to first child ( temp highp 4-component vector of float)
+0:13        'Color' ( smooth out highp 4-component vector of float)
+0:13        'aColor' ( in highp 4-component vector of float)
+0:14      move second child to first child ( temp highp 2-component vector of float)
+0:14        'UV' ( smooth out highp 2-component vector of float)
+0:14        'aUV' ( in highp 2-component vector of float)
+0:15      move second child to first child ( temp highp 4-component vector of float)
+0:15        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:15          'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance,  out unsized 1-element array of float CullDistance gl_CullDistance})
+0:15          Constant:
+0:15            0 (const uint)
+0:15        matrix-times-vector ( temp highp 4-component vector of float)
+0:15          projectionMatrix: direct index for structure ( uniform highp 4X4 matrix of float)
+0:15            'anon@0' (layout( column_major std140) uniform block{ uniform highp 4X4 matrix of float projectionMatrix})
+0:15            Constant:
+0:15              0 (const uint)
+0:15          Construct vec4 ( temp highp 4-component vector of float)
+0:15            'aPos' ( in highp 2-component vector of float)
+0:15            Constant:
+0:15              0.000000
+0:15            Constant:
+0:15              1.000000
+0:?   Linker Objects
+0:?     'aPos' ( in highp 2-component vector of float)
+0:?     'aUV' ( in highp 2-component vector of float)
+0:?     'aColor' ( in highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4X4 matrix of float projectionMatrix})
+0:?     'Color' ( smooth out highp 4-component vector of float)
+0:?     'UV' ( smooth out highp 2-component vector of float)
+0:?     'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out unsized 1-element array of float ClipDistance gl_ClipDistance,  out unsized 1-element array of float CullDistance gl_CullDistance})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+
+vk.relaxed.changeSet.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      move second child to first child ( temp highp 4-component vector of float)
+0:12        'fragColor' (layout( location=0) out highp 4-component vector of float)
+0:12        vector-scale ( temp highp 4-component vector of float)
+0:12          'Color' ( smooth in highp 4-component vector of float)
+0:12          direct index ( temp highp float)
+0:12            texture ( global highp 4-component vector of float)
+0:12              'sTexture' ( uniform highp sampler2D)
+0:12              vector swizzle ( temp highp 2-component vector of float)
+0:12                'UV' ( smooth in highp 2-component vector of float)
+0:12                Sequence
+0:12                  Constant:
+0:12                    0 (const int)
+0:12                  Constant:
+0:12                    1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:?   Linker Objects
+0:?     'fragColor' (layout( location=0) out highp 4-component vector of float)
+0:?     'sTexture' ( uniform highp sampler2D)
+0:?     'Color' ( smooth in highp 4-component vector of float)
+0:?     'UV' ( smooth in highp 2-component vector of float)
+
+
+Linked vertex stage:
+
+
+Linked fragment stage:
+
+
+Shader version: 460
+0:? Sequence
+0:11  Function Definition: main( ( global void)
+0:11    Function Parameters: 
+0:13    Sequence
+0:13      move second child to first child ( temp highp 4-component vector of float)
+0:13        'Color' ( smooth out highp 4-component vector of float)
+0:13        'aColor' ( in highp 4-component vector of float)
+0:14      move second child to first child ( temp highp 2-component vector of float)
+0:14        'UV' ( smooth out highp 2-component vector of float)
+0:14        'aUV' ( in highp 2-component vector of float)
+0:15      move second child to first child ( temp highp 4-component vector of float)
+0:15        gl_Position: direct index for structure ( gl_Position highp 4-component vector of float Position)
+0:15          'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out 1-element array of float ClipDistance gl_ClipDistance,  out 1-element array of float CullDistance gl_CullDistance})
+0:15          Constant:
+0:15            0 (const uint)
+0:15        matrix-times-vector ( temp highp 4-component vector of float)
+0:15          projectionMatrix: direct index for structure ( uniform highp 4X4 matrix of float)
+0:15            'anon@0' (layout( column_major std140) uniform block{ uniform highp 4X4 matrix of float projectionMatrix})
+0:15            Constant:
+0:15              0 (const uint)
+0:15          Construct vec4 ( temp highp 4-component vector of float)
+0:15            'aPos' ( in highp 2-component vector of float)
+0:15            Constant:
+0:15              0.000000
+0:15            Constant:
+0:15              1.000000
+0:?   Linker Objects
+0:?     'aPos' ( in highp 2-component vector of float)
+0:?     'aUV' ( in highp 2-component vector of float)
+0:?     'aColor' ( in highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4X4 matrix of float projectionMatrix})
+0:?     'Color' ( smooth out highp 4-component vector of float)
+0:?     'UV' ( smooth out highp 2-component vector of float)
+0:?     'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position,  gl_PointSize float PointSize gl_PointSize,  out 1-element array of float ClipDistance gl_ClipDistance,  out 1-element array of float CullDistance gl_CullDistance})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      move second child to first child ( temp highp 4-component vector of float)
+0:12        'fragColor' (layout( location=0) out highp 4-component vector of float)
+0:12        vector-scale ( temp highp 4-component vector of float)
+0:12          'Color' ( smooth in highp 4-component vector of float)
+0:12          direct index ( temp highp float)
+0:12            texture ( global highp 4-component vector of float)
+0:12              'sTexture' ( uniform highp sampler2D)
+0:12              vector swizzle ( temp highp 2-component vector of float)
+0:12                'UV' ( smooth in highp 2-component vector of float)
+0:12                Sequence
+0:12                  Constant:
+0:12                    0 (const int)
+0:12                  Constant:
+0:12                    1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:?   Linker Objects
+0:?     'fragColor' (layout( location=0) out highp 4-component vector of float)
+0:?     'sTexture' ( uniform highp sampler2D)
+0:?     'Color' ( smooth in highp 4-component vector of float)
+0:?     'UV' ( smooth in highp 2-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 46
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 9 11 15 17 24 34 44 45
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "Color"
+                              Name 11  "aColor"
+                              Name 15  "UV"
+                              Name 17  "aUV"
+                              Name 22  "gl_PerVertex"
+                              MemberName 22(gl_PerVertex) 0  "gl_Position"
+                              MemberName 22(gl_PerVertex) 1  "gl_PointSize"
+                              MemberName 22(gl_PerVertex) 2  "gl_ClipDistance"
+                              MemberName 22(gl_PerVertex) 3  "gl_CullDistance"
+                              Name 24  ""
+                              Name 28  "gl_DefaultUniformBlock"
+                              MemberName 28(gl_DefaultUniformBlock) 0  "projectionMatrix"
+                              Name 30  ""
+                              Name 34  "aPos"
+                              Name 44  "gl_VertexID"
+                              Name 45  "gl_InstanceID"
+                              Decorate 9(Color) Location 0
+                              Decorate 11(aColor) Location 2
+                              Decorate 15(UV) Location 1
+                              Decorate 17(aUV) Location 1
+                              MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position
+                              MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize
+                              MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance
+                              MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance
+                              Decorate 22(gl_PerVertex) Block
+                              MemberDecorate 28(gl_DefaultUniformBlock) 0 ColMajor
+                              MemberDecorate 28(gl_DefaultUniformBlock) 0 Offset 0
+                              MemberDecorate 28(gl_DefaultUniformBlock) 0 MatrixStride 16
+                              Decorate 28(gl_DefaultUniformBlock) Block
+                              Decorate 30 DescriptorSet 0
+                              Decorate 30 Binding 0
+                              Decorate 34(aPos) Location 0
+                              Decorate 44(gl_VertexID) BuiltIn VertexIndex
+                              Decorate 45(gl_InstanceID) BuiltIn InstanceIndex
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+        9(Color):      8(ptr) Variable Output
+              10:             TypePointer Input 7(fvec4)
+      11(aColor):     10(ptr) Variable Input
+              13:             TypeVector 6(float) 2
+              14:             TypePointer Output 13(fvec2)
+          15(UV):     14(ptr) Variable Output
+              16:             TypePointer Input 13(fvec2)
+         17(aUV):     16(ptr) Variable Input
+              19:             TypeInt 32 0
+              20:     19(int) Constant 1
+              21:             TypeArray 6(float) 20
+22(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 21 21
+              23:             TypePointer Output 22(gl_PerVertex)
+              24:     23(ptr) Variable Output
+              25:             TypeInt 32 1
+              26:     25(int) Constant 0
+              27:             TypeMatrix 7(fvec4) 4
+28(gl_DefaultUniformBlock):             TypeStruct 27
+              29:             TypePointer Uniform 28(gl_DefaultUniformBlock)
+              30:     29(ptr) Variable Uniform
+              31:             TypePointer Uniform 27
+        34(aPos):     16(ptr) Variable Input
+              36:    6(float) Constant 0
+              37:    6(float) Constant 1065353216
+              43:             TypePointer Input 25(int)
+ 44(gl_VertexID):     43(ptr) Variable Input
+45(gl_InstanceID):     43(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+              12:    7(fvec4) Load 11(aColor)
+                              Store 9(Color) 12
+              18:   13(fvec2) Load 17(aUV)
+                              Store 15(UV) 18
+              32:     31(ptr) AccessChain 30 26
+              33:          27 Load 32
+              35:   13(fvec2) Load 34(aPos)
+              38:    6(float) CompositeExtract 35 0
+              39:    6(float) CompositeExtract 35 1
+              40:    7(fvec4) CompositeConstruct 38 39 36 37
+              41:    7(fvec4) MatrixTimesVector 33 40
+              42:      8(ptr) AccessChain 24 26
+                              Store 42 41
+                              Return
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 27
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 9 11 20
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "fragColor"
+                              Name 11  "Color"
+                              Name 16  "sTexture"
+                              Name 20  "UV"
+                              Decorate 9(fragColor) Location 0
+                              Decorate 11(Color) Location 0
+                              Decorate 16(sTexture) DescriptorSet 1
+                              Decorate 16(sTexture) Binding 0
+                              Decorate 20(UV) Location 1
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+    9(fragColor):      8(ptr) Variable Output
+              10:             TypePointer Input 7(fvec4)
+       11(Color):     10(ptr) Variable Input
+              13:             TypeImage 6(float) 2D sampled format:Unknown
+              14:             TypeSampledImage 13
+              15:             TypePointer UniformConstant 14
+    16(sTexture):     15(ptr) Variable UniformConstant
+              18:             TypeVector 6(float) 2
+              19:             TypePointer Input 18(fvec2)
+          20(UV):     19(ptr) Variable Input
+              23:             TypeInt 32 0
+              24:     23(int) Constant 0
+         4(main):           2 Function None 3
+               5:             Label
+              12:    7(fvec4) Load 11(Color)
+              17:          14 Load 16(sTexture)
+              21:   18(fvec2) Load 20(UV)
+              22:    7(fvec4) ImageSampleImplicitLod 17 21
+              25:    6(float) CompositeExtract 22 0
+              26:    7(fvec4) VectorTimesScalar 12 25
+                              Store 9(fragColor) 26
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/vk.relaxed.errorcheck.vert.out b/Test/baseResults/vk.relaxed.errorcheck.vert.out
new file mode 100644
index 0000000..f19eae6
--- /dev/null
+++ b/Test/baseResults/vk.relaxed.errorcheck.vert.out
@@ -0,0 +1,124 @@
+vk.relaxed.errorcheck.vert
+Shader version: 460
+0:? Sequence
+0:9  Function Definition: foo( ( global highp 4-component vector of float)
+0:9    Function Parameters: 
+0:10    Sequence
+0:10      Branch: Return with expression
+0:10        vector swizzle ( temp highp 4-component vector of float)
+0:10          a: direct index for structure ( uniform highp 2-component vector of float)
+0:10            'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
+0:10            Constant:
+0:10              0 (const uint)
+0:10          Sequence
+0:10            Constant:
+0:10              0 (const int)
+0:10            Constant:
+0:10              1 (const int)
+0:10            Constant:
+0:10              0 (const int)
+0:10            Constant:
+0:10              1 (const int)
+0:13  Function Definition: main( ( global void)
+0:13    Function Parameters: 
+0:14    Sequence
+0:14      move second child to first child ( temp highp 4-component vector of float)
+0:14        'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:14        Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+
+vk.relaxed.errorcheck.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10  Function Definition: foo( ( global highp 4-component vector of float)
+0:10    Function Parameters: 
+0:11    Sequence
+0:11      Branch: Return with expression
+0:11        a: direct index for structure ( uniform highp 4-component vector of float)
+0:11          'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
+0:11          Constant:
+0:11            0 (const uint)
+0:14  Function Definition: main( ( global void)
+0:14    Function Parameters: 
+0:15    Sequence
+0:15      move second child to first child ( temp highp 4-component vector of float)
+0:15        'o' ( out highp 4-component vector of float)
+0:15        add ( temp highp 4-component vector of float)
+0:15          'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:15          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
+
+
+Linked vertex stage:
+
+
+Linked fragment stage:
+
+ERROR: Linking unknown stage stage: Types must match:
+    a: " uniform highp 2-component vector of float" versus " uniform highp 4-component vector of float"
+
+Shader version: 460
+0:? Sequence
+0:9  Function Definition: foo( ( global highp 4-component vector of float)
+0:9    Function Parameters: 
+0:10    Sequence
+0:10      Branch: Return with expression
+0:10        vector swizzle ( temp highp 4-component vector of float)
+0:10          a: direct index for structure ( uniform highp 2-component vector of float)
+0:10            'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
+0:10            Constant:
+0:10              0 (const uint)
+0:10          Sequence
+0:10            Constant:
+0:10              0 (const int)
+0:10            Constant:
+0:10              1 (const int)
+0:10            Constant:
+0:10              0 (const int)
+0:10            Constant:
+0:10              1 (const int)
+0:13  Function Definition: main( ( global void)
+0:13    Function Parameters: 
+0:14    Sequence
+0:14      move second child to first child ( temp highp 4-component vector of float)
+0:14        'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:14        Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10  Function Definition: foo( ( global highp 4-component vector of float)
+0:10    Function Parameters: 
+0:11    Sequence
+0:11      Branch: Return with expression
+0:11        a: direct index for structure ( uniform highp 4-component vector of float)
+0:11          'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
+0:11          Constant:
+0:11            0 (const uint)
+0:14  Function Definition: main( ( global void)
+0:14    Function Parameters: 
+0:15    Sequence
+0:15      move second child to first child ( temp highp 4-component vector of float)
+0:15        'o' ( out highp 4-component vector of float)
+0:15        add ( temp highp 4-component vector of float)
+0:15          'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:15          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
+
+Validation failed
+SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/vk.relaxed.frag.out b/Test/baseResults/vk.relaxed.frag.out
new file mode 100644
index 0000000..d98910e
--- /dev/null
+++ b/Test/baseResults/vk.relaxed.frag.out
@@ -0,0 +1,826 @@
+vk.relaxed.frag
+WARNING: 0:7: 'b' : Ignoring initializer for uniform 
+WARNING: 0:8: 'c' : ignoring layout qualifier for uniform location
+
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:36  Function Definition: bar( ( global highp uint)
+0:36    Function Parameters: 
+0:37    Sequence
+0:37      Sequence
+0:37        move second child to first child ( temp highp uint)
+0:37          'j' ( temp highp uint)
+0:37          Constant:
+0:37            0 (const uint)
+0:38      move second child to first child ( temp highp uint)
+0:38        'j' ( temp highp uint)
+0:38        AtomicAdd ( global highp uint)
+0:38          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:38            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:38            Constant:
+0:38              0 (const uint)
+0:38          Constant:
+0:38            1 (const uint)
+0:39      move second child to first child ( temp highp uint)
+0:39        'j' ( temp highp uint)
+0:39        subtract ( temp highp uint)
+0:39          AtomicAdd ( global highp uint)
+0:39            counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:39              'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:39              Constant:
+0:39                0 (const uint)
+0:39            Constant:
+0:39              4294967295 (const uint)
+0:39          Constant:
+0:39            1 (const uint)
+0:40      move second child to first child ( temp highp uint)
+0:40        'j' ( temp highp uint)
+0:40        counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:40          'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:40          Constant:
+0:40            0 (const uint)
+0:42      move second child to first child ( temp highp uint)
+0:42        'j' ( temp highp uint)
+0:42        AtomicAdd ( global highp uint)
+0:42          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:42            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:42            Constant:
+0:42              0 (const uint)
+0:42          Constant:
+0:42            1 (const uint)
+0:43      move second child to first child ( temp highp uint)
+0:43        'j' ( temp highp uint)
+0:43        AtomicAdd ( global highp uint)
+0:43          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:43            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:43            Constant:
+0:43              0 (const uint)
+0:43          Constant:
+0:43            4294967295 (const uint)
+0:44      move second child to first child ( temp highp uint)
+0:44        'j' ( temp highp uint)
+0:44        AtomicSubtract ( global highp uint)
+0:44          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:44            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:44            Constant:
+0:44              0 (const uint)
+0:44          Constant:
+0:44            1 (const uint)
+0:46      move second child to first child ( temp highp uint)
+0:46        'j' ( temp highp uint)
+0:46        AtomicMin ( global highp uint)
+0:46          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:46            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:46            Constant:
+0:46              0 (const uint)
+0:46          'j' ( temp highp uint)
+0:47      move second child to first child ( temp highp uint)
+0:47        'j' ( temp highp uint)
+0:47        AtomicMax ( global highp uint)
+0:47          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:47            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:47            Constant:
+0:47              0 (const uint)
+0:47          'j' ( temp highp uint)
+0:48      move second child to first child ( temp highp uint)
+0:48        'j' ( temp highp uint)
+0:48        AtomicAnd ( global highp uint)
+0:48          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:48            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:48            Constant:
+0:48              0 (const uint)
+0:48          'j' ( temp highp uint)
+0:50      move second child to first child ( temp highp uint)
+0:50        'j' ( temp highp uint)
+0:50        AtomicOr ( global highp uint)
+0:50          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:50            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:50            Constant:
+0:50              0 (const uint)
+0:50          'j' ( temp highp uint)
+0:51      move second child to first child ( temp highp uint)
+0:51        'j' ( temp highp uint)
+0:51        AtomicXor ( global highp uint)
+0:51          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:51            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:51            Constant:
+0:51              0 (const uint)
+0:51          'j' ( temp highp uint)
+0:53      move second child to first child ( temp highp uint)
+0:53        'j' ( temp highp uint)
+0:53        AtomicExchange ( global highp uint)
+0:53          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:53            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:53            Constant:
+0:53              0 (const uint)
+0:53          'j' ( temp highp uint)
+0:54      move second child to first child ( temp highp uint)
+0:54        'j' ( temp highp uint)
+0:54        AtomicCompSwap ( global highp uint)
+0:54          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:54            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:54            Constant:
+0:54              0 (const uint)
+0:54          Constant:
+0:54            0 (const uint)
+0:54          'j' ( temp highp uint)
+0:56      AtomicAdd ( global highp uint)
+0:56        counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:56          'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:56          Constant:
+0:56            1 (const uint)
+0:56        Constant:
+0:56          1 (const uint)
+0:57      AtomicAdd ( global highp uint)
+0:57        counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:57          'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
+0:57          Constant:
+0:57            0 (const uint)
+0:57        Constant:
+0:57          1 (const uint)
+0:59      MemoryBarrierBuffer ( global void)
+0:61      Branch: Return with expression
+0:61        'j' ( temp highp uint)
+0:64  Function Definition: foo( ( global highp 4-component vector of float)
+0:64    Function Parameters: 
+0:65    Sequence
+0:65      Sequence
+0:65        move second child to first child ( temp highp float)
+0:65          'f' ( temp highp float)
+0:65          add ( temp highp float)
+0:65            add ( temp highp float)
+0:65              add ( temp highp float)
+0:65                j: direct index for structure (layout( column_major std140) uniform highp float)
+0:65                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:65                  Constant:
+0:65                    0 (const uint)
+0:65                j: direct index for structure (layout( column_major std430) buffer highp float)
+0:65                  'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:65                  Constant:
+0:65                    0 (const int)
+0:65              y: direct index for structure ( global highp float)
+0:65                structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:65                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:65                  Constant:
+0:65                    4 (const uint)
+0:65                Constant:
+0:65                  1 (const int)
+0:65            Convert uint to float ( temp highp float)
+0:65              z: direct index for structure ( global highp uint)
+0:65                structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:65                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:65                  Constant:
+0:65                    4 (const uint)
+0:65                Constant:
+0:65                  2 (const int)
+0:66      Sequence
+0:66        move second child to first child ( temp highp 2-component vector of float)
+0:66          'v2' ( temp highp 2-component vector of float)
+0:66          add ( temp highp 2-component vector of float)
+0:66            add ( temp highp 2-component vector of float)
+0:66              b: direct index for structure ( uniform highp 2-component vector of float)
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  1 (const uint)
+0:66              c: direct index for structure ( uniform highp 2-component vector of float)
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  2 (const uint)
+0:66            x: direct index for structure ( global highp 2-component vector of float)
+0:66              structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  4 (const uint)
+0:66              Constant:
+0:66                0 (const int)
+0:67      Sequence
+0:67        move second child to first child ( temp highp 4-component vector of float)
+0:67          'v4' ( temp highp 4-component vector of float)
+0:67          add ( temp highp 4-component vector of float)
+0:67            add ( temp highp 4-component vector of float)
+0:67              add ( temp highp 4-component vector of float)
+0:67                add ( temp highp 4-component vector of float)
+0:67                  add ( temp highp 4-component vector of float)
+0:67                    add ( temp highp 4-component vector of float)
+0:67                      a: direct index for structure ( uniform highp 4-component vector of float)
+0:67                        'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                        Constant:
+0:67                          0 (const uint)
+0:67                      direct index ( temp highp 4-component vector of float)
+0:67                        d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                          'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                          Constant:
+0:67                            3 (const uint)
+0:67                        Constant:
+0:67                          0 (const int)
+0:67                    direct index ( temp highp 4-component vector of float)
+0:67                      d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                        'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                        Constant:
+0:67                          3 (const uint)
+0:67                      Constant:
+0:67                        1 (const int)
+0:67                  direct index ( temp highp 4-component vector of float)
+0:67                    d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                      Constant:
+0:67                        3 (const uint)
+0:67                    Constant:
+0:67                      2 (const int)
+0:67                k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:67                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:67                  Constant:
+0:67                    1 (const uint)
+0:67              k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float)
+0:67                'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:67                Constant:
+0:67                  1 (const int)
+0:67            texture ( global highp 4-component vector of float)
+0:67              't1' ( uniform highp sampler2D)
+0:67              Constant:
+0:67                0.000000
+0:67                0.000000
+0:68      Branch: Return with expression
+0:68        component-wise multiply ( temp highp 4-component vector of float)
+0:68          component-wise multiply ( temp highp 4-component vector of float)
+0:68            Construct vec4 ( temp highp 4-component vector of float)
+0:68              'f' ( temp highp float)
+0:68            Construct vec4 ( temp highp 4-component vector of float)
+0:68              'v2' ( temp highp 2-component vector of float)
+0:68              Constant:
+0:68                1.000000
+0:68              Constant:
+0:68                1.000000
+0:68          'v4' ( temp highp 4-component vector of float)
+0:71  Function Definition: main( ( global void)
+0:71    Function Parameters: 
+0:72    Sequence
+0:72      Sequence
+0:72        move second child to first child ( temp highp float)
+0:72          'j' ( temp highp float)
+0:72          Convert uint to float ( temp highp float)
+0:72            Function Call: bar( ( global highp uint)
+0:73      move second child to first child ( temp highp 4-component vector of float)
+0:73        'o' ( out highp 4-component vector of float)
+0:73        vector-scale ( temp highp 4-component vector of float)
+0:73          'j' ( temp highp float)
+0:73          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:?     't1' ( uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:?     'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:?     'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:?     'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
+
+
+Linked fragment stage:
+
+
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:36  Function Definition: bar( ( global highp uint)
+0:36    Function Parameters: 
+0:37    Sequence
+0:37      Sequence
+0:37        move second child to first child ( temp highp uint)
+0:37          'j' ( temp highp uint)
+0:37          Constant:
+0:37            0 (const uint)
+0:38      move second child to first child ( temp highp uint)
+0:38        'j' ( temp highp uint)
+0:38        AtomicAdd ( global highp uint)
+0:38          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:38            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:38            Constant:
+0:38              0 (const uint)
+0:38          Constant:
+0:38            1 (const uint)
+0:39      move second child to first child ( temp highp uint)
+0:39        'j' ( temp highp uint)
+0:39        subtract ( temp highp uint)
+0:39          AtomicAdd ( global highp uint)
+0:39            counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:39              'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:39              Constant:
+0:39                0 (const uint)
+0:39            Constant:
+0:39              4294967295 (const uint)
+0:39          Constant:
+0:39            1 (const uint)
+0:40      move second child to first child ( temp highp uint)
+0:40        'j' ( temp highp uint)
+0:40        counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:40          'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:40          Constant:
+0:40            0 (const uint)
+0:42      move second child to first child ( temp highp uint)
+0:42        'j' ( temp highp uint)
+0:42        AtomicAdd ( global highp uint)
+0:42          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:42            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:42            Constant:
+0:42              0 (const uint)
+0:42          Constant:
+0:42            1 (const uint)
+0:43      move second child to first child ( temp highp uint)
+0:43        'j' ( temp highp uint)
+0:43        AtomicAdd ( global highp uint)
+0:43          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:43            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:43            Constant:
+0:43              0 (const uint)
+0:43          Constant:
+0:43            4294967295 (const uint)
+0:44      move second child to first child ( temp highp uint)
+0:44        'j' ( temp highp uint)
+0:44        AtomicSubtract ( global highp uint)
+0:44          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:44            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:44            Constant:
+0:44              0 (const uint)
+0:44          Constant:
+0:44            1 (const uint)
+0:46      move second child to first child ( temp highp uint)
+0:46        'j' ( temp highp uint)
+0:46        AtomicMin ( global highp uint)
+0:46          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:46            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:46            Constant:
+0:46              0 (const uint)
+0:46          'j' ( temp highp uint)
+0:47      move second child to first child ( temp highp uint)
+0:47        'j' ( temp highp uint)
+0:47        AtomicMax ( global highp uint)
+0:47          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:47            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:47            Constant:
+0:47              0 (const uint)
+0:47          'j' ( temp highp uint)
+0:48      move second child to first child ( temp highp uint)
+0:48        'j' ( temp highp uint)
+0:48        AtomicAnd ( global highp uint)
+0:48          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:48            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:48            Constant:
+0:48              0 (const uint)
+0:48          'j' ( temp highp uint)
+0:50      move second child to first child ( temp highp uint)
+0:50        'j' ( temp highp uint)
+0:50        AtomicOr ( global highp uint)
+0:50          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:50            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:50            Constant:
+0:50              0 (const uint)
+0:50          'j' ( temp highp uint)
+0:51      move second child to first child ( temp highp uint)
+0:51        'j' ( temp highp uint)
+0:51        AtomicXor ( global highp uint)
+0:51          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:51            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:51            Constant:
+0:51              0 (const uint)
+0:51          'j' ( temp highp uint)
+0:53      move second child to first child ( temp highp uint)
+0:53        'j' ( temp highp uint)
+0:53        AtomicExchange ( global highp uint)
+0:53          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:53            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:53            Constant:
+0:53              0 (const uint)
+0:53          'j' ( temp highp uint)
+0:54      move second child to first child ( temp highp uint)
+0:54        'j' ( temp highp uint)
+0:54        AtomicCompSwap ( global highp uint)
+0:54          counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:54            'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:54            Constant:
+0:54              0 (const uint)
+0:54          Constant:
+0:54            0 (const uint)
+0:54          'j' ( temp highp uint)
+0:56      AtomicAdd ( global highp uint)
+0:56        counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:56          'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:56          Constant:
+0:56            1 (const uint)
+0:56        Constant:
+0:56          1 (const uint)
+0:57      AtomicAdd ( global highp uint)
+0:57        counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:57          'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
+0:57          Constant:
+0:57            0 (const uint)
+0:57        Constant:
+0:57          1 (const uint)
+0:59      MemoryBarrierBuffer ( global void)
+0:61      Branch: Return with expression
+0:61        'j' ( temp highp uint)
+0:64  Function Definition: foo( ( global highp 4-component vector of float)
+0:64    Function Parameters: 
+0:65    Sequence
+0:65      Sequence
+0:65        move second child to first child ( temp highp float)
+0:65          'f' ( temp highp float)
+0:65          add ( temp highp float)
+0:65            add ( temp highp float)
+0:65              add ( temp highp float)
+0:65                j: direct index for structure (layout( column_major std140) uniform highp float)
+0:65                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:65                  Constant:
+0:65                    0 (const uint)
+0:65                j: direct index for structure (layout( column_major std430) buffer highp float)
+0:65                  'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:65                  Constant:
+0:65                    0 (const int)
+0:65              y: direct index for structure ( global highp float)
+0:65                structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:65                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:65                  Constant:
+0:65                    4 (const uint)
+0:65                Constant:
+0:65                  1 (const int)
+0:65            Convert uint to float ( temp highp float)
+0:65              z: direct index for structure ( global highp uint)
+0:65                structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:65                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:65                  Constant:
+0:65                    4 (const uint)
+0:65                Constant:
+0:65                  2 (const int)
+0:66      Sequence
+0:66        move second child to first child ( temp highp 2-component vector of float)
+0:66          'v2' ( temp highp 2-component vector of float)
+0:66          add ( temp highp 2-component vector of float)
+0:66            add ( temp highp 2-component vector of float)
+0:66              b: direct index for structure ( uniform highp 2-component vector of float)
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  1 (const uint)
+0:66              c: direct index for structure ( uniform highp 2-component vector of float)
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  2 (const uint)
+0:66            x: direct index for structure ( global highp 2-component vector of float)
+0:66              structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z})
+0:66                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:66                Constant:
+0:66                  4 (const uint)
+0:66              Constant:
+0:66                0 (const int)
+0:67      Sequence
+0:67        move second child to first child ( temp highp 4-component vector of float)
+0:67          'v4' ( temp highp 4-component vector of float)
+0:67          add ( temp highp 4-component vector of float)
+0:67            add ( temp highp 4-component vector of float)
+0:67              add ( temp highp 4-component vector of float)
+0:67                add ( temp highp 4-component vector of float)
+0:67                  add ( temp highp 4-component vector of float)
+0:67                    add ( temp highp 4-component vector of float)
+0:67                      a: direct index for structure ( uniform highp 4-component vector of float)
+0:67                        'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                        Constant:
+0:67                          0 (const uint)
+0:67                      direct index ( temp highp 4-component vector of float)
+0:67                        d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                          'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                          Constant:
+0:67                            3 (const uint)
+0:67                        Constant:
+0:67                          0 (const int)
+0:67                    direct index ( temp highp 4-component vector of float)
+0:67                      d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                        'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                        Constant:
+0:67                          3 (const uint)
+0:67                      Constant:
+0:67                        1 (const int)
+0:67                  direct index ( temp highp 4-component vector of float)
+0:67                    d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
+0:67                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:67                      Constant:
+0:67                        3 (const uint)
+0:67                    Constant:
+0:67                      2 (const int)
+0:67                k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
+0:67                  'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:67                  Constant:
+0:67                    1 (const uint)
+0:67              k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float)
+0:67                'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:67                Constant:
+0:67                  1 (const int)
+0:67            texture ( global highp 4-component vector of float)
+0:67              't1' ( uniform highp sampler2D)
+0:67              Constant:
+0:67                0.000000
+0:67                0.000000
+0:68      Branch: Return with expression
+0:68        component-wise multiply ( temp highp 4-component vector of float)
+0:68          component-wise multiply ( temp highp 4-component vector of float)
+0:68            Construct vec4 ( temp highp 4-component vector of float)
+0:68              'f' ( temp highp float)
+0:68            Construct vec4 ( temp highp 4-component vector of float)
+0:68              'v2' ( temp highp 2-component vector of float)
+0:68              Constant:
+0:68                1.000000
+0:68              Constant:
+0:68                1.000000
+0:68          'v4' ( temp highp 4-component vector of float)
+0:71  Function Definition: main( ( global void)
+0:71    Function Parameters: 
+0:72    Sequence
+0:72      Sequence
+0:72        move second child to first child ( temp highp float)
+0:72          'j' ( temp highp float)
+0:72          Convert uint to float ( temp highp float)
+0:72            Function Call: bar( ( global highp uint)
+0:73      move second child to first child ( temp highp 4-component vector of float)
+0:73        'o' ( out highp 4-component vector of float)
+0:73        vector-scale ( temp highp 4-component vector of float)
+0:73          'j' ( temp highp float)
+0:73          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b,  uniform highp 2-component vector of float c,  uniform 10-element array of highp 4-component vector of float d,  uniform structure{ global highp 2-component vector of float x,  global highp float y,  global highp uint z} structUniform})
+0:?     't1' ( uniform highp sampler2D)
+0:?     'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
+0:?     'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
+0:?     'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:?     'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 163
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 159
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "bar("
+                              Name 13  "foo("
+                              Name 16  "j"
+                              Name 18  "gl_AtomicCounterBlock_0"
+                              MemberName 18(gl_AtomicCounterBlock_0) 0  "counter1"
+                              MemberName 18(gl_AtomicCounterBlock_0) 1  "counter2"
+                              Name 20  ""
+                              Name 63  "gl_AtomicCounterBlock_1"
+                              MemberName 63(gl_AtomicCounterBlock_1) 0  "counter3"
+                              Name 65  ""
+                              Name 73  "f"
+                              Name 74  "UniformBlock"
+                              MemberName 74(UniformBlock) 0  "j"
+                              MemberName 74(UniformBlock) 1  "k"
+                              Name 76  ""
+                              Name 80  "BufferBlock"
+                              MemberName 80(BufferBlock) 0  "j"
+                              MemberName 80(BufferBlock) 1  "k"
+                              Name 82  "bufferInstance"
+                              Name 89  "e"
+                              MemberName 89(e) 0  "x"
+                              MemberName 89(e) 1  "y"
+                              MemberName 89(e) 2  "z"
+                              Name 90  "gl_DefaultUniformBlock"
+                              MemberName 90(gl_DefaultUniformBlock) 0  "a"
+                              MemberName 90(gl_DefaultUniformBlock) 1  "b"
+                              MemberName 90(gl_DefaultUniformBlock) 2  "c"
+                              MemberName 90(gl_DefaultUniformBlock) 3  "d"
+                              MemberName 90(gl_DefaultUniformBlock) 4  "structUniform"
+                              Name 92  ""
+                              Name 103  "v2"
+                              Name 114  "v4"
+                              Name 137  "t1"
+                              Name 155  "j"
+                              Name 159  "o"
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Volatile
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Offset 0
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Volatile
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Offset 4
+                              Decorate 18(gl_AtomicCounterBlock_0) BufferBlock
+                              Decorate 20 DescriptorSet 0
+                              Decorate 20 Binding 4
+                              MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent
+                              MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Volatile
+                              MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent
+                              MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Offset 0
+                              Decorate 63(gl_AtomicCounterBlock_1) BufferBlock
+                              Decorate 65 DescriptorSet 0
+                              Decorate 65 Binding 5
+                              MemberDecorate 74(UniformBlock) 0 Offset 0
+                              MemberDecorate 74(UniformBlock) 1 Offset 16
+                              Decorate 74(UniformBlock) Block
+                              Decorate 76 DescriptorSet 0
+                              Decorate 76 Binding 2
+                              MemberDecorate 80(BufferBlock) 0 Offset 0
+                              MemberDecorate 80(BufferBlock) 1 Offset 16
+                              Decorate 80(BufferBlock) BufferBlock
+                              Decorate 82(bufferInstance) DescriptorSet 0
+                              Decorate 82(bufferInstance) Binding 3
+                              Decorate 88 ArrayStride 16
+                              MemberDecorate 89(e) 0 Offset 0
+                              MemberDecorate 89(e) 1 Offset 8
+                              MemberDecorate 89(e) 2 Offset 12
+                              MemberDecorate 90(gl_DefaultUniformBlock) 0 Offset 0
+                              MemberDecorate 90(gl_DefaultUniformBlock) 1 Offset 16
+                              MemberDecorate 90(gl_DefaultUniformBlock) 2 Offset 24
+                              MemberDecorate 90(gl_DefaultUniformBlock) 3 Offset 32
+                              MemberDecorate 90(gl_DefaultUniformBlock) 4 Offset 192
+                              Decorate 90(gl_DefaultUniformBlock) Block
+                              Decorate 92 DescriptorSet 0
+                              Decorate 92 Binding 0
+                              Decorate 137(t1) DescriptorSet 0
+                              Decorate 137(t1) Binding 1
+                              Decorate 159(o) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 0
+               7:             TypeFunction 6(int)
+              10:             TypeFloat 32
+              11:             TypeVector 10(float) 4
+              12:             TypeFunction 11(fvec4)
+              15:             TypePointer Function 6(int)
+              17:      6(int) Constant 0
+18(gl_AtomicCounterBlock_0):             TypeStruct 6(int) 6(int)
+              19:             TypePointer Uniform 18(gl_AtomicCounterBlock_0)
+              20:     19(ptr) Variable Uniform
+              21:             TypeInt 32 1
+              22:     21(int) Constant 0
+              23:             TypePointer Uniform 6(int)
+              25:      6(int) Constant 1
+              28:      6(int) Constant 4294967295
+              60:     21(int) Constant 1
+63(gl_AtomicCounterBlock_1):             TypeStruct 6(int)
+              64:             TypePointer Uniform 63(gl_AtomicCounterBlock_1)
+              65:     64(ptr) Variable Uniform
+              68:      6(int) Constant 72
+              72:             TypePointer Function 10(float)
+74(UniformBlock):             TypeStruct 10(float) 11(fvec4)
+              75:             TypePointer Uniform 74(UniformBlock)
+              76:     75(ptr) Variable Uniform
+              77:             TypePointer Uniform 10(float)
+ 80(BufferBlock):             TypeStruct 10(float) 11(fvec4)
+              81:             TypePointer Uniform 80(BufferBlock)
+82(bufferInstance):     81(ptr) Variable Uniform
+              86:             TypeVector 10(float) 2
+              87:      6(int) Constant 10
+              88:             TypeArray 11(fvec4) 87
+           89(e):             TypeStruct 86(fvec2) 10(float) 6(int)
+90(gl_DefaultUniformBlock):             TypeStruct 11(fvec4) 86(fvec2) 86(fvec2) 88 89(e)
+              91:             TypePointer Uniform 90(gl_DefaultUniformBlock)
+              92:     91(ptr) Variable Uniform
+              93:     21(int) Constant 4
+              97:     21(int) Constant 2
+             102:             TypePointer Function 86(fvec2)
+             104:             TypePointer Uniform 86(fvec2)
+             113:             TypePointer Function 11(fvec4)
+             115:             TypePointer Uniform 11(fvec4)
+             118:     21(int) Constant 3
+             134:             TypeImage 10(float) 2D sampled format:Unknown
+             135:             TypeSampledImage 134
+             136:             TypePointer UniformConstant 135
+         137(t1):    136(ptr) Variable UniformConstant
+             139:   10(float) Constant 0
+             140:   86(fvec2) ConstantComposite 139 139
+             146:   10(float) Constant 1065353216
+             158:             TypePointer Output 11(fvec4)
+          159(o):    158(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+          155(j):     72(ptr) Variable Function
+             156:      6(int) FunctionCall 8(bar()
+             157:   10(float) ConvertUToF 156
+                              Store 155(j) 157
+             160:   10(float) Load 155(j)
+             161:   11(fvec4) FunctionCall 13(foo()
+             162:   11(fvec4) VectorTimesScalar 161 160
+                              Store 159(o) 162
+                              Return
+                              FunctionEnd
+         8(bar():      6(int) Function None 7
+               9:             Label
+           16(j):     15(ptr) Variable Function
+                              Store 16(j) 17
+              24:     23(ptr) AccessChain 20 22
+              26:      6(int) AtomicIAdd 24 25 17 25
+                              Store 16(j) 26
+              27:     23(ptr) AccessChain 20 22
+              29:      6(int) AtomicIAdd 27 25 17 28
+              30:      6(int) ISub 29 25
+                              Store 16(j) 30
+              31:     23(ptr) AccessChain 20 22
+              32:      6(int) Load 31
+                              Store 16(j) 32
+              33:     23(ptr) AccessChain 20 22
+              34:      6(int) AtomicIAdd 33 25 17 25
+                              Store 16(j) 34
+              35:     23(ptr) AccessChain 20 22
+              36:      6(int) AtomicIAdd 35 25 17 28
+                              Store 16(j) 36
+              37:     23(ptr) AccessChain 20 22
+              38:      6(int) AtomicISub 37 25 17 25
+                              Store 16(j) 38
+              39:     23(ptr) AccessChain 20 22
+              40:      6(int) Load 16(j)
+              41:      6(int) AtomicUMin 39 25 17 40
+                              Store 16(j) 41
+              42:     23(ptr) AccessChain 20 22
+              43:      6(int) Load 16(j)
+              44:      6(int) AtomicUMax 42 25 17 43
+                              Store 16(j) 44
+              45:     23(ptr) AccessChain 20 22
+              46:      6(int) Load 16(j)
+              47:      6(int) AtomicAnd 45 25 17 46
+                              Store 16(j) 47
+              48:     23(ptr) AccessChain 20 22
+              49:      6(int) Load 16(j)
+              50:      6(int) AtomicOr 48 25 17 49
+                              Store 16(j) 50
+              51:     23(ptr) AccessChain 20 22
+              52:      6(int) Load 16(j)
+              53:      6(int) AtomicXor 51 25 17 52
+                              Store 16(j) 53
+              54:     23(ptr) AccessChain 20 22
+              55:      6(int) Load 16(j)
+              56:      6(int) AtomicExchange 54 25 17 55
+                              Store 16(j) 56
+              57:     23(ptr) AccessChain 20 22
+              58:      6(int) Load 16(j)
+              59:      6(int) AtomicCompareExchange 57 25 17 17 58 17
+                              Store 16(j) 59
+              61:     23(ptr) AccessChain 20 60
+              62:      6(int) AtomicIAdd 61 25 17 25
+              66:     23(ptr) AccessChain 65 22
+              67:      6(int) AtomicIAdd 66 25 17 25
+                              MemoryBarrier 25 68
+              69:      6(int) Load 16(j)
+                              ReturnValue 69
+                              FunctionEnd
+        13(foo():   11(fvec4) Function None 12
+              14:             Label
+           73(f):     72(ptr) Variable Function
+         103(v2):    102(ptr) Variable Function
+         114(v4):    113(ptr) Variable Function
+              78:     77(ptr) AccessChain 76 22
+              79:   10(float) Load 78
+              83:     77(ptr) AccessChain 82(bufferInstance) 22
+              84:   10(float) Load 83
+              85:   10(float) FAdd 79 84
+              94:     77(ptr) AccessChain 92 93 60
+              95:   10(float) Load 94
+              96:   10(float) FAdd 85 95
+              98:     23(ptr) AccessChain 92 93 97
+              99:      6(int) Load 98
+             100:   10(float) ConvertUToF 99
+             101:   10(float) FAdd 96 100
+                              Store 73(f) 101
+             105:    104(ptr) AccessChain 92 60
+             106:   86(fvec2) Load 105
+             107:    104(ptr) AccessChain 92 97
+             108:   86(fvec2) Load 107
+             109:   86(fvec2) FAdd 106 108
+             110:    104(ptr) AccessChain 92 93 22
+             111:   86(fvec2) Load 110
+             112:   86(fvec2) FAdd 109 111
+                              Store 103(v2) 112
+             116:    115(ptr) AccessChain 92 22
+             117:   11(fvec4) Load 116
+             119:    115(ptr) AccessChain 92 118 22
+             120:   11(fvec4) Load 119
+             121:   11(fvec4) FAdd 117 120
+             122:    115(ptr) AccessChain 92 118 60
+             123:   11(fvec4) Load 122
+             124:   11(fvec4) FAdd 121 123
+             125:    115(ptr) AccessChain 92 118 97
+             126:   11(fvec4) Load 125
+             127:   11(fvec4) FAdd 124 126
+             128:    115(ptr) AccessChain 76 60
+             129:   11(fvec4) Load 128
+             130:   11(fvec4) FAdd 127 129
+             131:    115(ptr) AccessChain 82(bufferInstance) 60
+             132:   11(fvec4) Load 131
+             133:   11(fvec4) FAdd 130 132
+             138:         135 Load 137(t1)
+             141:   11(fvec4) ImageSampleImplicitLod 138 140
+             142:   11(fvec4) FAdd 133 141
+                              Store 114(v4) 142
+             143:   10(float) Load 73(f)
+             144:   11(fvec4) CompositeConstruct 143 143 143 143
+             145:   86(fvec2) Load 103(v2)
+             147:   10(float) CompositeExtract 145 0
+             148:   10(float) CompositeExtract 145 1
+             149:   11(fvec4) CompositeConstruct 147 148 146 146
+             150:   11(fvec4) FMul 144 149
+             151:   11(fvec4) Load 114(v4)
+             152:   11(fvec4) FMul 150 151
+                              ReturnValue 152
+                              FunctionEnd
diff --git a/Test/baseResults/vk.relaxed.link1.frag.out b/Test/baseResults/vk.relaxed.link1.frag.out
new file mode 100644
index 0000000..9dac4c6
--- /dev/null
+++ b/Test/baseResults/vk.relaxed.link1.frag.out
@@ -0,0 +1,515 @@
+vk.relaxed.link1.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:19  Function Definition: bar( ( global highp 4-component vector of float)
+0:19    Function Parameters: 
+0:20    Sequence
+0:20      Sequence
+0:20        move second child to first child ( temp highp uint)
+0:20          'j' ( temp highp uint)
+0:20          add ( temp highp uint)
+0:20            AtomicAdd ( global highp uint)
+0:20              counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:20                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                Constant:
+0:20                  0 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:20            subtract ( temp highp uint)
+0:20              AtomicAdd ( global highp uint)
+0:20                counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:20                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                  Constant:
+0:20                    1 (const uint)
+0:20                Constant:
+0:20                  4294967295 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:21      Sequence
+0:21        move second child to first child ( temp highp 4-component vector of float)
+0:21          'v' ( temp highp 4-component vector of float)
+0:21          add ( temp highp 4-component vector of float)
+0:21            add ( temp highp 4-component vector of float)
+0:21              add ( temp highp 4-component vector of float)
+0:21                a: direct index for structure ( uniform highp 4-component vector of float)
+0:21                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                  Constant:
+0:21                    0 (const uint)
+0:21                Construct vec4 ( temp highp 4-component vector of float)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21              c1: direct index for structure ( uniform highp 4-component vector of float)
+0:21                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                Constant:
+0:21                  3 (const uint)
+0:21            d: direct index for structure ( uniform highp 4-component vector of float)
+0:21              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21              Constant:
+0:21                4 (const uint)
+0:23      Branch: Return with expression
+0:23        vector-scale ( temp highp 4-component vector of float)
+0:23          Convert uint to float ( temp highp float)
+0:23            'j' ( temp highp uint)
+0:23          'v' ( temp highp 4-component vector of float)
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:27    Sequence
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        'o' ( out highp 4-component vector of float)
+0:27        add ( temp highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:27          Function Call: bar( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+
+vk.relaxed.link2.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:14  Function Definition: foo( ( global highp 4-component vector of float)
+0:14    Function Parameters: 
+0:15    Sequence
+0:15      Sequence
+0:15        move second child to first child ( temp highp uint)
+0:15          'j' ( temp highp uint)
+0:15          add ( temp highp uint)
+0:15            AtomicAdd ( global highp uint)
+0:15              counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:15                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:15                Constant:
+0:15                  1 (const uint)
+0:15              Constant:
+0:15                1 (const uint)
+0:15            subtract ( temp highp uint)
+0:15              AtomicAdd ( global highp uint)
+0:15                counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:15                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:15                  Constant:
+0:15                    0 (const uint)
+0:15                Constant:
+0:15                  4294967295 (const uint)
+0:15              Constant:
+0:15                1 (const uint)
+0:16      Sequence
+0:16        move second child to first child ( temp highp 4-component vector of float)
+0:16          'v' ( temp highp 4-component vector of float)
+0:16          add ( temp highp 4-component vector of float)
+0:16            add ( temp highp 4-component vector of float)
+0:16              add ( temp highp 4-component vector of float)
+0:16                a: direct index for structure ( uniform highp 4-component vector of float)
+0:16                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                  Constant:
+0:16                    0 (const uint)
+0:16                Construct vec4 ( temp highp 4-component vector of float)
+0:16                  direct index ( temp highp float)
+0:16                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      1 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                      Constant:
+0:16                        1 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                      Constant:
+0:16                        1 (const uint)
+0:16                    Constant:
+0:16                      1 (const int)
+0:16              c2: direct index for structure ( uniform highp 4-component vector of float)
+0:16                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16                Constant:
+0:16                  3 (const uint)
+0:16            d: direct index for structure ( uniform highp 4-component vector of float)
+0:16              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:16              Constant:
+0:16                4 (const uint)
+0:18      Branch: Return with expression
+0:18        vector-scale ( temp highp 4-component vector of float)
+0:18          Convert uint to float ( temp highp float)
+0:18            'j' ( temp highp uint)
+0:18          'v' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+
+
+Linked fragment stage:
+
+
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:19  Function Definition: bar( ( global highp 4-component vector of float)
+0:19    Function Parameters: 
+0:20    Sequence
+0:20      Sequence
+0:20        move second child to first child ( temp highp uint)
+0:20          'j' ( temp highp uint)
+0:20          add ( temp highp uint)
+0:20            AtomicAdd ( global highp uint)
+0:20              counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:20                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2,  coherent volatile buffer highp uint counter3})
+0:20                Constant:
+0:20                  0 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:20            subtract ( temp highp uint)
+0:20              AtomicAdd ( global highp uint)
+0:20                counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:20                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2,  coherent volatile buffer highp uint counter3})
+0:20                  Constant:
+0:20                    1 (const uint)
+0:20                Constant:
+0:20                  4294967295 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:21      Sequence
+0:21        move second child to first child ( temp highp 4-component vector of float)
+0:21          'v' ( temp highp 4-component vector of float)
+0:21          add ( temp highp 4-component vector of float)
+0:21            add ( temp highp 4-component vector of float)
+0:21              add ( temp highp 4-component vector of float)
+0:21                a: direct index for structure ( uniform highp 4-component vector of float)
+0:21                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                  Constant:
+0:21                    0 (const uint)
+0:21                Construct vec4 ( temp highp 4-component vector of float)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21              c1: direct index for structure ( uniform highp 4-component vector of float)
+0:21                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21                Constant:
+0:21                  3 (const uint)
+0:21            d: direct index for structure ( uniform highp 4-component vector of float)
+0:21              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:21              Constant:
+0:21                4 (const uint)
+0:23      Branch: Return with expression
+0:23        vector-scale ( temp highp 4-component vector of float)
+0:23          Convert uint to float ( temp highp float)
+0:23            'j' ( temp highp uint)
+0:23          'v' ( temp highp 4-component vector of float)
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:27    Sequence
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        'o' ( out highp 4-component vector of float)
+0:27        add ( temp highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:27          Function Call: bar( ( global highp 4-component vector of float)
+0:14  Function Definition: foo( ( global highp 4-component vector of float)
+0:14    Function Parameters: 
+0:15    Sequence
+0:15      Sequence
+0:15        move second child to first child ( temp highp uint)
+0:15          'j' ( temp highp uint)
+0:15          add ( temp highp uint)
+0:15            AtomicAdd ( global highp uint)
+0:15              counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:15                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2,  coherent volatile buffer highp uint counter3})
+0:15                Constant:
+0:15                  1 (const uint)
+0:15              Constant:
+0:15                1 (const uint)
+0:15            subtract ( temp highp uint)
+0:15              AtomicAdd ( global highp uint)
+0:15                counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:15                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2,  coherent volatile buffer highp uint counter3})
+0:15                  Constant:
+0:15                    2 (const uint)
+0:15                Constant:
+0:15                  4294967295 (const uint)
+0:15              Constant:
+0:15                1 (const uint)
+0:16      Sequence
+0:16        move second child to first child ( temp highp 4-component vector of float)
+0:16          'v' ( temp highp 4-component vector of float)
+0:16          add ( temp highp 4-component vector of float)
+0:16            add ( temp highp 4-component vector of float)
+0:16              add ( temp highp 4-component vector of float)
+0:16                a: direct index for structure ( uniform highp 4-component vector of float)
+0:16                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                  Constant:
+0:16                    0 (const uint)
+0:16                Construct vec4 ( temp highp 4-component vector of float)
+0:16                  direct index ( temp highp float)
+0:16                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                      Constant:
+0:16                        1 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                      Constant:
+0:16                        1 (const uint)
+0:16                    Constant:
+0:16                      1 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                  direct index ( temp highp float)
+0:16                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:16                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      1 (const int)
+0:16              c2: direct index for structure ( uniform highp 4-component vector of float)
+0:16                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16                Constant:
+0:16                  5 (const uint)
+0:16            d: direct index for structure ( uniform highp 4-component vector of float)
+0:16              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:16              Constant:
+0:16                4 (const uint)
+0:18      Branch: Return with expression
+0:18        vector-scale ( temp highp 4-component vector of float)
+0:18          Convert uint to float ( temp highp float)
+0:18            'j' ( temp highp uint)
+0:18          'v' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d,  uniform highp 4-component vector of float c2})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2,  coherent volatile buffer highp uint counter3})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 105
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 68
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "bar("
+                              Name 11  "foo("
+                              Name 15  "j"
+                              Name 16  "gl_AtomicCounterBlock_0"
+                              MemberName 16(gl_AtomicCounterBlock_0) 0  "counter1"
+                              MemberName 16(gl_AtomicCounterBlock_0) 1  "counter2"
+                              MemberName 16(gl_AtomicCounterBlock_0) 2  "counter3"
+                              Name 18  ""
+                              Name 33  "v"
+                              Name 35  "gl_DefaultUniformBlock"
+                              MemberName 35(gl_DefaultUniformBlock) 0  "a"
+                              MemberName 35(gl_DefaultUniformBlock) 1  "b1"
+                              MemberName 35(gl_DefaultUniformBlock) 2  "b2"
+                              MemberName 35(gl_DefaultUniformBlock) 3  "c1"
+                              MemberName 35(gl_DefaultUniformBlock) 4  "d"
+                              MemberName 35(gl_DefaultUniformBlock) 5  "c2"
+                              Name 37  ""
+                              Name 68  "o"
+                              Name 72  "j"
+                              Name 79  "v"
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Volatile
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Offset 0
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Volatile
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Offset 4
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Volatile
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Offset 8
+                              Decorate 16(gl_AtomicCounterBlock_0) BufferBlock
+                              Decorate 18 DescriptorSet 0
+                              Decorate 18 Binding 1
+                              MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
+                              MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
+                              MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
+                              MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
+                              MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
+                              MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
+                              Decorate 35(gl_DefaultUniformBlock) Block
+                              Decorate 37 DescriptorSet 0
+                              Decorate 37 Binding 0
+                              Decorate 68(o) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              13:             TypeInt 32 0
+              14:             TypePointer Function 13(int)
+16(gl_AtomicCounterBlock_0):             TypeStruct 13(int) 13(int) 13(int)
+              17:             TypePointer Uniform 16(gl_AtomicCounterBlock_0)
+              18:     17(ptr) Variable Uniform
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              21:             TypePointer Uniform 13(int)
+              23:     13(int) Constant 1
+              24:     13(int) Constant 0
+              26:     19(int) Constant 1
+              28:     13(int) Constant 4294967295
+              32:             TypePointer Function 7(fvec4)
+              34:             TypeVector 6(float) 2
+35(gl_DefaultUniformBlock):             TypeStruct 7(fvec4) 34(fvec2) 34(fvec2) 7(fvec4) 7(fvec4) 7(fvec4)
+              36:             TypePointer Uniform 35(gl_DefaultUniformBlock)
+              37:     36(ptr) Variable Uniform
+              38:             TypePointer Uniform 7(fvec4)
+              41:             TypePointer Uniform 6(float)
+              46:     19(int) Constant 2
+              53:     19(int) Constant 3
+              57:     19(int) Constant 4
+              67:             TypePointer Output 7(fvec4)
+           68(o):     67(ptr) Variable Output
+              92:     19(int) Constant 5
+         4(main):           2 Function None 3
+               5:             Label
+              69:    7(fvec4) FunctionCall 11(foo()
+              70:    7(fvec4) FunctionCall 9(bar()
+              71:    7(fvec4) FAdd 69 70
+                              Store 68(o) 71
+                              Return
+                              FunctionEnd
+         9(bar():    7(fvec4) Function None 8
+              10:             Label
+           15(j):     14(ptr) Variable Function
+           33(v):     32(ptr) Variable Function
+              22:     21(ptr) AccessChain 18 20
+              25:     13(int) AtomicIAdd 22 23 24 23
+              27:     21(ptr) AccessChain 18 26
+              29:     13(int) AtomicIAdd 27 23 24 28
+              30:     13(int) ISub 29 23
+              31:     13(int) IAdd 25 30
+                              Store 15(j) 31
+              39:     38(ptr) AccessChain 37 20
+              40:    7(fvec4) Load 39
+              42:     41(ptr) AccessChain 37 26 24
+              43:    6(float) Load 42
+              44:     41(ptr) AccessChain 37 26 23
+              45:    6(float) Load 44
+              47:     41(ptr) AccessChain 37 46 24
+              48:    6(float) Load 47
+              49:     41(ptr) AccessChain 37 46 23
+              50:    6(float) Load 49
+              51:    7(fvec4) CompositeConstruct 43 45 48 50
+              52:    7(fvec4) FAdd 40 51
+              54:     38(ptr) AccessChain 37 53
+              55:    7(fvec4) Load 54
+              56:    7(fvec4) FAdd 52 55
+              58:     38(ptr) AccessChain 37 57
+              59:    7(fvec4) Load 58
+              60:    7(fvec4) FAdd 56 59
+                              Store 33(v) 60
+              61:     13(int) Load 15(j)
+              62:    6(float) ConvertUToF 61
+              63:    7(fvec4) Load 33(v)
+              64:    7(fvec4) VectorTimesScalar 63 62
+                              ReturnValue 64
+                              FunctionEnd
+        11(foo():    7(fvec4) Function None 8
+              12:             Label
+           72(j):     14(ptr) Variable Function
+           79(v):     32(ptr) Variable Function
+              73:     21(ptr) AccessChain 18 26
+              74:     13(int) AtomicIAdd 73 23 24 23
+              75:     21(ptr) AccessChain 18 46
+              76:     13(int) AtomicIAdd 75 23 24 28
+              77:     13(int) ISub 76 23
+              78:     13(int) IAdd 74 77
+                              Store 72(j) 78
+              80:     38(ptr) AccessChain 37 20
+              81:    7(fvec4) Load 80
+              82:     41(ptr) AccessChain 37 26 24
+              83:    6(float) Load 82
+              84:     41(ptr) AccessChain 37 26 23
+              85:    6(float) Load 84
+              86:     41(ptr) AccessChain 37 46 24
+              87:    6(float) Load 86
+              88:     41(ptr) AccessChain 37 46 23
+              89:    6(float) Load 88
+              90:    7(fvec4) CompositeConstruct 83 85 87 89
+              91:    7(fvec4) FAdd 81 90
+              93:     38(ptr) AccessChain 37 92
+              94:    7(fvec4) Load 93
+              95:    7(fvec4) FAdd 91 94
+              96:     38(ptr) AccessChain 37 57
+              97:    7(fvec4) Load 96
+              98:    7(fvec4) FAdd 95 97
+                              Store 79(v) 98
+              99:     13(int) Load 72(j)
+             100:    6(float) ConvertUToF 99
+             101:    7(fvec4) Load 79(v)
+             102:    7(fvec4) VectorTimesScalar 101 100
+                              ReturnValue 102
+                              FunctionEnd
diff --git a/Test/baseResults/vk.relaxed.stagelink.vert.out b/Test/baseResults/vk.relaxed.stagelink.vert.out
new file mode 100644
index 0000000..a63f10c
--- /dev/null
+++ b/Test/baseResults/vk.relaxed.stagelink.vert.out
@@ -0,0 +1,717 @@
+vk.relaxed.stagelink.vert
+Shader version: 460
+0:? Sequence
+0:18  Function Definition: foo( ( global highp 4-component vector of float)
+0:18    Function Parameters: 
+0:19    Sequence
+0:19      Sequence
+0:19        move second child to first child ( temp highp uint)
+0:19          'j' ( temp highp uint)
+0:19          add ( temp highp uint)
+0:19            AtomicAdd ( global highp uint)
+0:19              counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:19                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:19                Constant:
+0:19                  1 (const uint)
+0:19              Constant:
+0:19                1 (const uint)
+0:19            subtract ( temp highp uint)
+0:19              AtomicAdd ( global highp uint)
+0:19                counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:19                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:19                  Constant:
+0:19                    0 (const uint)
+0:19                Constant:
+0:19                  4294967295 (const uint)
+0:19              Constant:
+0:19                1 (const uint)
+0:20      Sequence
+0:20        move second child to first child ( temp highp 4-component vector of float)
+0:20          'v' ( temp highp 4-component vector of float)
+0:20          add ( temp highp 4-component vector of float)
+0:20            add ( temp highp 4-component vector of float)
+0:20              add ( temp highp 4-component vector of float)
+0:20                a: direct index for structure ( uniform highp 4-component vector of float)
+0:20                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                  Constant:
+0:20                    0 (const uint)
+0:20                Construct vec4 ( temp highp 4-component vector of float)
+0:20                  direct index ( temp highp float)
+0:20                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        2 (const uint)
+0:20                    Constant:
+0:20                      0 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        2 (const uint)
+0:20                    Constant:
+0:20                      1 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        1 (const uint)
+0:20                    Constant:
+0:20                      0 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        1 (const uint)
+0:20                    Constant:
+0:20                      1 (const int)
+0:20              c2: direct index for structure ( uniform highp 4-component vector of float)
+0:20                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                Constant:
+0:20                  3 (const uint)
+0:20            d: direct index for structure ( uniform highp 4-component vector of float)
+0:20              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20              Constant:
+0:20                4 (const uint)
+0:22      Branch: Return with expression
+0:22        vector-scale ( temp highp 4-component vector of float)
+0:22          Convert uint to float ( temp highp float)
+0:22            'j' ( temp highp uint)
+0:22          'v' ( temp highp 4-component vector of float)
+0:25  Function Definition: main( ( global void)
+0:25    Function Parameters: 
+0:27    Sequence
+0:27      Sequence
+0:27        move second child to first child ( temp highp 4-component vector of float)
+0:27          'v' ( temp highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:28      move second child to first child ( temp highp 4-component vector of float)
+0:28        'v' ( temp highp 4-component vector of float)
+0:28        add ( temp highp 4-component vector of float)
+0:28          'v' ( temp highp 4-component vector of float)
+0:28          indirect index ( temp highp 4-component vector of float)
+0:28            s: direct index for structure ( uniform 4-element array of highp 4-component vector of float)
+0:28              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:28              Constant:
+0:28                5 (const uint)
+0:28            'gl_VertexID' ( in int VertexIndex)
+0:29      move second child to first child ( temp highp float)
+0:29        direct index ( temp highp float)
+0:29          'v' ( temp highp 4-component vector of float)
+0:29          Constant:
+0:29            0 (const int)
+0:29        subtract ( temp highp float)
+0:29          direct index ( temp highp float)
+0:29            'v' ( temp highp 4-component vector of float)
+0:29            Constant:
+0:29              0 (const int)
+0:29          Convert int to float ( temp highp float)
+0:29            'gl_InstanceID' ( in highp int InstanceIndex)
+0:30      move second child to first child ( temp highp 4-component vector of float)
+0:30        'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:30        'v' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+
+vk.relaxed.stagelink.frag
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:19  Function Definition: foo( ( global highp 4-component vector of float)
+0:19    Function Parameters: 
+0:20    Sequence
+0:20      Sequence
+0:20        move second child to first child ( temp highp uint)
+0:20          'j' ( temp highp uint)
+0:20          add ( temp highp uint)
+0:20            AtomicAdd ( global highp uint)
+0:20              counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:20                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                Constant:
+0:20                  0 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:20            subtract ( temp highp uint)
+0:20              AtomicAdd ( global highp uint)
+0:20                counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:20                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                  Constant:
+0:20                    1 (const uint)
+0:20                Constant:
+0:20                  4294967295 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:21      Sequence
+0:21        move second child to first child ( temp highp 4-component vector of float)
+0:21          'v' ( temp highp 4-component vector of float)
+0:21          add ( temp highp 4-component vector of float)
+0:21            add ( temp highp 4-component vector of float)
+0:21              add ( temp highp 4-component vector of float)
+0:21                a: direct index for structure ( uniform highp 4-component vector of float)
+0:21                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                  Constant:
+0:21                    0 (const uint)
+0:21                Construct vec4 ( temp highp 4-component vector of float)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21              c1: direct index for structure ( uniform highp 4-component vector of float)
+0:21                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                Constant:
+0:21                  3 (const uint)
+0:21            d: direct index for structure ( uniform highp 4-component vector of float)
+0:21              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21              Constant:
+0:21                4 (const uint)
+0:23      Branch: Return with expression
+0:23        vector-scale ( temp highp 4-component vector of float)
+0:23          Convert uint to float ( temp highp float)
+0:23            'j' ( temp highp uint)
+0:23          'v' ( temp highp 4-component vector of float)
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:27    Sequence
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        'o' ( out highp 4-component vector of float)
+0:27        add ( temp highp 4-component vector of float)
+0:27          'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+
+
+Linked vertex stage:
+
+
+Linked fragment stage:
+
+
+Shader version: 460
+0:? Sequence
+0:18  Function Definition: foo( ( global highp 4-component vector of float)
+0:18    Function Parameters: 
+0:19    Sequence
+0:19      Sequence
+0:19        move second child to first child ( temp highp uint)
+0:19          'j' ( temp highp uint)
+0:19          add ( temp highp uint)
+0:19            AtomicAdd ( global highp uint)
+0:19              counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:19                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:19                Constant:
+0:19                  1 (const uint)
+0:19              Constant:
+0:19                1 (const uint)
+0:19            subtract ( temp highp uint)
+0:19              AtomicAdd ( global highp uint)
+0:19                counter3: direct index for structure ( coherent volatile buffer highp uint)
+0:19                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:19                  Constant:
+0:19                    0 (const uint)
+0:19                Constant:
+0:19                  4294967295 (const uint)
+0:19              Constant:
+0:19                1 (const uint)
+0:20      Sequence
+0:20        move second child to first child ( temp highp 4-component vector of float)
+0:20          'v' ( temp highp 4-component vector of float)
+0:20          add ( temp highp 4-component vector of float)
+0:20            add ( temp highp 4-component vector of float)
+0:20              add ( temp highp 4-component vector of float)
+0:20                a: direct index for structure ( uniform highp 4-component vector of float)
+0:20                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                  Constant:
+0:20                    0 (const uint)
+0:20                Construct vec4 ( temp highp 4-component vector of float)
+0:20                  direct index ( temp highp float)
+0:20                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        2 (const uint)
+0:20                    Constant:
+0:20                      0 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        2 (const uint)
+0:20                    Constant:
+0:20                      1 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        1 (const uint)
+0:20                    Constant:
+0:20                      0 (const int)
+0:20                  direct index ( temp highp float)
+0:20                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:20                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                      Constant:
+0:20                        1 (const uint)
+0:20                    Constant:
+0:20                      1 (const int)
+0:20              c2: direct index for structure ( uniform highp 4-component vector of float)
+0:20                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20                Constant:
+0:20                  3 (const uint)
+0:20            d: direct index for structure ( uniform highp 4-component vector of float)
+0:20              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:20              Constant:
+0:20                4 (const uint)
+0:22      Branch: Return with expression
+0:22        vector-scale ( temp highp 4-component vector of float)
+0:22          Convert uint to float ( temp highp float)
+0:22            'j' ( temp highp uint)
+0:22          'v' ( temp highp 4-component vector of float)
+0:25  Function Definition: main( ( global void)
+0:25    Function Parameters: 
+0:27    Sequence
+0:27      Sequence
+0:27        move second child to first child ( temp highp 4-component vector of float)
+0:27          'v' ( temp highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:28      move second child to first child ( temp highp 4-component vector of float)
+0:28        'v' ( temp highp 4-component vector of float)
+0:28        add ( temp highp 4-component vector of float)
+0:28          'v' ( temp highp 4-component vector of float)
+0:28          indirect index ( temp highp 4-component vector of float)
+0:28            s: direct index for structure ( uniform 4-element array of highp 4-component vector of float)
+0:28              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:28              Constant:
+0:28                5 (const uint)
+0:28            'gl_VertexID' ( in int VertexIndex)
+0:29      move second child to first child ( temp highp float)
+0:29        direct index ( temp highp float)
+0:29          'v' ( temp highp 4-component vector of float)
+0:29          Constant:
+0:29            0 (const int)
+0:29        subtract ( temp highp float)
+0:29          direct index ( temp highp float)
+0:29            'v' ( temp highp 4-component vector of float)
+0:29            Constant:
+0:29              0 (const int)
+0:29          Convert int to float ( temp highp float)
+0:29            'gl_InstanceID' ( in highp int InstanceIndex)
+0:30      move second child to first child ( temp highp 4-component vector of float)
+0:30        'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:30        'v' ( temp highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b2,  uniform highp 2-component vector of float b1,  uniform highp 4-component vector of float c2,  uniform highp 4-component vector of float d,  uniform 4-element array of highp 4-component vector of float s})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3,  coherent volatile buffer highp uint counter2})
+0:?     'gl_VertexID' ( in int VertexIndex)
+0:?     'gl_InstanceID' ( in int InstanceIndex)
+Shader version: 460
+gl_FragCoord origin is upper left
+0:? Sequence
+0:19  Function Definition: foo( ( global highp 4-component vector of float)
+0:19    Function Parameters: 
+0:20    Sequence
+0:20      Sequence
+0:20        move second child to first child ( temp highp uint)
+0:20          'j' ( temp highp uint)
+0:20          add ( temp highp uint)
+0:20            AtomicAdd ( global highp uint)
+0:20              counter1: direct index for structure ( coherent volatile buffer highp uint)
+0:20                'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                Constant:
+0:20                  0 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:20            subtract ( temp highp uint)
+0:20              AtomicAdd ( global highp uint)
+0:20                counter2: direct index for structure ( coherent volatile buffer highp uint)
+0:20                  'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+0:20                  Constant:
+0:20                    1 (const uint)
+0:20                Constant:
+0:20                  4294967295 (const uint)
+0:20              Constant:
+0:20                1 (const uint)
+0:21      Sequence
+0:21        move second child to first child ( temp highp 4-component vector of float)
+0:21          'v' ( temp highp 4-component vector of float)
+0:21          add ( temp highp 4-component vector of float)
+0:21            add ( temp highp 4-component vector of float)
+0:21              add ( temp highp 4-component vector of float)
+0:21                a: direct index for structure ( uniform highp 4-component vector of float)
+0:21                  'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                  Constant:
+0:21                    0 (const uint)
+0:21                Construct vec4 ( temp highp 4-component vector of float)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b1: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        1 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      0 (const int)
+0:21                  direct index ( temp highp float)
+0:21                    b2: direct index for structure ( uniform highp 2-component vector of float)
+0:21                      'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                      Constant:
+0:21                        2 (const uint)
+0:21                    Constant:
+0:21                      1 (const int)
+0:21              c1: direct index for structure ( uniform highp 4-component vector of float)
+0:21                'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21                Constant:
+0:21                  3 (const uint)
+0:21            d: direct index for structure ( uniform highp 4-component vector of float)
+0:21              'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:21              Constant:
+0:21                4 (const uint)
+0:23      Branch: Return with expression
+0:23        vector-scale ( temp highp 4-component vector of float)
+0:23          Convert uint to float ( temp highp float)
+0:23            'j' ( temp highp uint)
+0:23          'v' ( temp highp 4-component vector of float)
+0:26  Function Definition: main( ( global void)
+0:26    Function Parameters: 
+0:27    Sequence
+0:27      move second child to first child ( temp highp 4-component vector of float)
+0:27        'o' ( out highp 4-component vector of float)
+0:27        add ( temp highp 4-component vector of float)
+0:27          'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:27          Function Call: foo( ( global highp 4-component vector of float)
+0:?   Linker Objects
+0:?     'io' (layout( location=0) smooth in highp 4-component vector of float)
+0:?     'o' ( out highp 4-component vector of float)
+0:?     'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a,  uniform highp 2-component vector of float b1,  uniform highp 2-component vector of float b2,  uniform highp 4-component vector of float c1,  uniform highp 4-component vector of float d})
+0:?     'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1,  coherent volatile buffer highp uint counter2})
+
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 88
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 72 80 86
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "foo("
+                              Name 13  "j"
+                              Name 14  "gl_AtomicCounterBlock_0"
+                              MemberName 14(gl_AtomicCounterBlock_0) 0  "counter3"
+                              MemberName 14(gl_AtomicCounterBlock_0) 1  "counter2"
+                              MemberName 14(gl_AtomicCounterBlock_0) 2  "counter1"
+                              Name 16  ""
+                              Name 31  "v"
+                              Name 35  "gl_DefaultUniformBlock"
+                              MemberName 35(gl_DefaultUniformBlock) 0  "a"
+                              MemberName 35(gl_DefaultUniformBlock) 1  "b2"
+                              MemberName 35(gl_DefaultUniformBlock) 2  "b1"
+                              MemberName 35(gl_DefaultUniformBlock) 3  "c2"
+                              MemberName 35(gl_DefaultUniformBlock) 4  "d"
+                              MemberName 35(gl_DefaultUniformBlock) 5  "s"
+                              MemberName 35(gl_DefaultUniformBlock) 6  "c1"
+                              Name 37  ""
+                              Name 67  "v"
+                              Name 72  "gl_VertexID"
+                              Name 80  "gl_InstanceID"
+                              Name 86  "io"
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Offset 0
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Offset 4
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Offset 8
+                              Decorate 14(gl_AtomicCounterBlock_0) BufferBlock
+                              Decorate 16 DescriptorSet 0
+                              Decorate 16 Binding 1
+                              Decorate 34 ArrayStride 16
+                              MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
+                              MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
+                              MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
+                              MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
+                              MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
+                              MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
+                              MemberDecorate 35(gl_DefaultUniformBlock) 6 Offset 128
+                              Decorate 35(gl_DefaultUniformBlock) Block
+                              Decorate 37 DescriptorSet 0
+                              Decorate 37 Binding 0
+                              Decorate 72(gl_VertexID) BuiltIn VertexIndex
+                              Decorate 80(gl_InstanceID) BuiltIn InstanceIndex
+                              Decorate 86(io) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              11:             TypeInt 32 0
+              12:             TypePointer Function 11(int)
+14(gl_AtomicCounterBlock_0):             TypeStruct 11(int) 11(int) 11(int)
+              15:             TypePointer Uniform 14(gl_AtomicCounterBlock_0)
+              16:     15(ptr) Variable Uniform
+              17:             TypeInt 32 1
+              18:     17(int) Constant 1
+              19:             TypePointer Uniform 11(int)
+              21:     11(int) Constant 1
+              22:     11(int) Constant 0
+              24:     17(int) Constant 0
+              26:     11(int) Constant 4294967295
+              30:             TypePointer Function 7(fvec4)
+              32:             TypeVector 6(float) 2
+              33:     11(int) Constant 4
+              34:             TypeArray 7(fvec4) 33
+35(gl_DefaultUniformBlock):             TypeStruct 7(fvec4) 32(fvec2) 32(fvec2) 7(fvec4) 7(fvec4) 34 7(fvec4)
+              36:             TypePointer Uniform 35(gl_DefaultUniformBlock)
+              37:     36(ptr) Variable Uniform
+              38:             TypePointer Uniform 7(fvec4)
+              41:     17(int) Constant 2
+              42:             TypePointer Uniform 6(float)
+              53:     17(int) Constant 3
+              57:     17(int) Constant 4
+              70:     17(int) Constant 5
+              71:             TypePointer Input 17(int)
+ 72(gl_VertexID):     71(ptr) Variable Input
+              77:             TypePointer Function 6(float)
+80(gl_InstanceID):     71(ptr) Variable Input
+              85:             TypePointer Output 7(fvec4)
+          86(io):     85(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           67(v):     30(ptr) Variable Function
+              68:    7(fvec4) FunctionCall 9(foo()
+                              Store 67(v) 68
+              69:    7(fvec4) Load 67(v)
+              73:     17(int) Load 72(gl_VertexID)
+              74:     38(ptr) AccessChain 37 70 73
+              75:    7(fvec4) Load 74
+              76:    7(fvec4) FAdd 69 75
+                              Store 67(v) 76
+              78:     77(ptr) AccessChain 67(v) 22
+              79:    6(float) Load 78
+              81:     17(int) Load 80(gl_InstanceID)
+              82:    6(float) ConvertSToF 81
+              83:    6(float) FSub 79 82
+              84:     77(ptr) AccessChain 67(v) 22
+                              Store 84 83
+              87:    7(fvec4) Load 67(v)
+                              Store 86(io) 87
+                              Return
+                              FunctionEnd
+         9(foo():    7(fvec4) Function None 8
+              10:             Label
+           13(j):     12(ptr) Variable Function
+           31(v):     30(ptr) Variable Function
+              20:     19(ptr) AccessChain 16 18
+              23:     11(int) AtomicIAdd 20 21 22 21
+              25:     19(ptr) AccessChain 16 24
+              27:     11(int) AtomicIAdd 25 21 22 26
+              28:     11(int) ISub 27 21
+              29:     11(int) IAdd 23 28
+                              Store 13(j) 29
+              39:     38(ptr) AccessChain 37 24
+              40:    7(fvec4) Load 39
+              43:     42(ptr) AccessChain 37 41 22
+              44:    6(float) Load 43
+              45:     42(ptr) AccessChain 37 41 21
+              46:    6(float) Load 45
+              47:     42(ptr) AccessChain 37 18 22
+              48:    6(float) Load 47
+              49:     42(ptr) AccessChain 37 18 21
+              50:    6(float) Load 49
+              51:    7(fvec4) CompositeConstruct 44 46 48 50
+              52:    7(fvec4) FAdd 40 51
+              54:     38(ptr) AccessChain 37 53
+              55:    7(fvec4) Load 54
+              56:    7(fvec4) FAdd 52 55
+              58:     38(ptr) AccessChain 37 57
+              59:    7(fvec4) Load 58
+              60:    7(fvec4) FAdd 56 59
+                              Store 31(v) 60
+              61:     11(int) Load 13(j)
+              62:    6(float) ConvertUToF 61
+              63:    7(fvec4) Load 31(v)
+              64:    7(fvec4) VectorTimesScalar 63 62
+                              ReturnValue 64
+                              FunctionEnd
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 74
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 68 70
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 9  "foo("
+                              Name 13  "j"
+                              Name 14  "gl_AtomicCounterBlock_0"
+                              MemberName 14(gl_AtomicCounterBlock_0) 0  "counter3"
+                              MemberName 14(gl_AtomicCounterBlock_0) 1  "counter2"
+                              MemberName 14(gl_AtomicCounterBlock_0) 2  "counter1"
+                              Name 16  ""
+                              Name 31  "v"
+                              Name 35  "gl_DefaultUniformBlock"
+                              MemberName 35(gl_DefaultUniformBlock) 0  "a"
+                              MemberName 35(gl_DefaultUniformBlock) 1  "b2"
+                              MemberName 35(gl_DefaultUniformBlock) 2  "b1"
+                              MemberName 35(gl_DefaultUniformBlock) 3  "c2"
+                              MemberName 35(gl_DefaultUniformBlock) 4  "d"
+                              MemberName 35(gl_DefaultUniformBlock) 5  "s"
+                              MemberName 35(gl_DefaultUniformBlock) 6  "c1"
+                              Name 37  ""
+                              Name 68  "o"
+                              Name 70  "io"
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Offset 0
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Offset 4
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Volatile
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
+                              MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Offset 8
+                              Decorate 14(gl_AtomicCounterBlock_0) BufferBlock
+                              Decorate 16 DescriptorSet 0
+                              Decorate 16 Binding 1
+                              Decorate 34 ArrayStride 16
+                              MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
+                              MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
+                              MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
+                              MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
+                              MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
+                              MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
+                              MemberDecorate 35(gl_DefaultUniformBlock) 6 Offset 128
+                              Decorate 35(gl_DefaultUniformBlock) Block
+                              Decorate 37 DescriptorSet 0
+                              Decorate 37 Binding 0
+                              Decorate 68(o) Location 0
+                              Decorate 70(io) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              11:             TypeInt 32 0
+              12:             TypePointer Function 11(int)
+14(gl_AtomicCounterBlock_0):             TypeStruct 11(int) 11(int) 11(int)
+              15:             TypePointer Uniform 14(gl_AtomicCounterBlock_0)
+              16:     15(ptr) Variable Uniform
+              17:             TypeInt 32 1
+              18:     17(int) Constant 2
+              19:             TypePointer Uniform 11(int)
+              21:     11(int) Constant 1
+              22:     11(int) Constant 0
+              24:     17(int) Constant 1
+              26:     11(int) Constant 4294967295
+              30:             TypePointer Function 7(fvec4)
+              32:             TypeVector 6(float) 2
+              33:     11(int) Constant 4
+              34:             TypeArray 7(fvec4) 33
+35(gl_DefaultUniformBlock):             TypeStruct 7(fvec4) 32(fvec2) 32(fvec2) 7(fvec4) 7(fvec4) 34 7(fvec4)
+              36:             TypePointer Uniform 35(gl_DefaultUniformBlock)
+              37:     36(ptr) Variable Uniform
+              38:     17(int) Constant 0
+              39:             TypePointer Uniform 7(fvec4)
+              42:             TypePointer Uniform 6(float)
+              53:     17(int) Constant 6
+              57:     17(int) Constant 4
+              67:             TypePointer Output 7(fvec4)
+           68(o):     67(ptr) Variable Output
+              69:             TypePointer Input 7(fvec4)
+          70(io):     69(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+              71:    7(fvec4) Load 70(io)
+              72:    7(fvec4) FunctionCall 9(foo()
+              73:    7(fvec4) FAdd 71 72
+                              Store 68(o) 73
+                              Return
+                              FunctionEnd
+         9(foo():    7(fvec4) Function None 8
+              10:             Label
+           13(j):     12(ptr) Variable Function
+           31(v):     30(ptr) Variable Function
+              20:     19(ptr) AccessChain 16 18
+              23:     11(int) AtomicIAdd 20 21 22 21
+              25:     19(ptr) AccessChain 16 24
+              27:     11(int) AtomicIAdd 25 21 22 26
+              28:     11(int) ISub 27 21
+              29:     11(int) IAdd 23 28
+                              Store 13(j) 29
+              40:     39(ptr) AccessChain 37 38
+              41:    7(fvec4) Load 40
+              43:     42(ptr) AccessChain 37 18 22
+              44:    6(float) Load 43
+              45:     42(ptr) AccessChain 37 18 21
+              46:    6(float) Load 45
+              47:     42(ptr) AccessChain 37 24 22
+              48:    6(float) Load 47
+              49:     42(ptr) AccessChain 37 24 21
+              50:    6(float) Load 49
+              51:    7(fvec4) CompositeConstruct 44 46 48 50
+              52:    7(fvec4) FAdd 41 51
+              54:     39(ptr) AccessChain 37 53
+              55:    7(fvec4) Load 54
+              56:    7(fvec4) FAdd 52 55
+              58:     39(ptr) AccessChain 37 57
+              59:    7(fvec4) Load 58
+              60:    7(fvec4) FAdd 56 59
+                              Store 31(v) 60
+              61:     11(int) Load 13(j)
+              62:    6(float) ConvertUToF 61
+              63:    7(fvec4) Load 31(v)
+              64:    7(fvec4) VectorTimesScalar 63 62
+                              ReturnValue 64
+                              FunctionEnd
diff --git a/Test/hlsl.intrinsics.evalfns.frag b/Test/hlsl.intrinsics.evalfns.frag
index 9638706..7b7509d 100644
--- a/Test/hlsl.intrinsics.evalfns.frag
+++ b/Test/hlsl.intrinsics.evalfns.frag
@@ -1,10 +1,33 @@
-
-void main(float inF1, float2 inF2, float3 inF3, float4 inF4, int2 inI2) : COLOR
+struct PS_INPUT
 {
-    EvaluateAttributeSnapped(inF1, int2(8,15));
-    EvaluateAttributeSnapped(inF2, int2(0,1));
-    EvaluateAttributeSnapped(inF3, int2(3,10));
-    EvaluateAttributeSnapped(inF4, int2(7,8));
+        float2 vPos: TEXCOORD0;
+};
 
-    EvaluateAttributeSnapped(inF1, inI2);
+float4 main(float inF1, float2 inF2, float3 inF3, float4 inF4, int2 inI2, PS_INPUT i) : COLOR
+{
+    float  oF1 = EvaluateAttributeSnapped(inF1, int2(8,15));
+    float2 oF2 = EvaluateAttributeSnapped(inF2, int2(0,1));
+    float3 oF3 = EvaluateAttributeSnapped(inF3, int2(3,10));
+    float4 oF4 = EvaluateAttributeSnapped(inF4, int2(7,8));
+
+    oF1 += EvaluateAttributeSnapped(inF1, inI2);
+
+    oF1 += EvaluateAttributeAtSample(inF1, 3);
+    oF2 += EvaluateAttributeAtSample(inF2, 3);
+    oF3 += EvaluateAttributeAtSample(inF3, 3);
+    oF4 += EvaluateAttributeAtSample(inF4, 3);
+
+    oF1 += EvaluateAttributeAtSample(inF1, inI2.x);
+
+    oF1 += EvaluateAttributeAtCentroid(inF1);
+    oF2 += EvaluateAttributeAtCentroid(inF2);
+    oF3 += EvaluateAttributeAtCentroid(inF3);
+    oF4 += EvaluateAttributeAtCentroid(inF4);
+
+    oF2 += EvaluateAttributeSnapped(i.vPos, int2(0,1));
+    oF2 += EvaluateAttributeAtSample(i.vPos, 3);
+    oF2 += EvaluateAttributeAtCentroid(i.vPos);
+
+    float4 color = float4(oF1, oF2.y, oF3.z, oF4.w);
+    return color;
 }
diff --git a/Test/iomap.crossStage.2.frag b/Test/iomap.crossStage.2.frag
new file mode 100644
index 0000000..25756a6
--- /dev/null
+++ b/Test/iomap.crossStage.2.frag
@@ -0,0 +1,42 @@
+#version 460

+

+

+layout(location = 5) in outBlock {

+    vec4 o3;

+};

+

+

+in vec4 gfo1;

+in vec2 gfo2;

+

+out vec4 outColor;

+

+uniform vec2 u1;

+uniform vec3 u2;           // initializer present in vertex stage

+uniform vec4 u3 = vec4(0); // initializer matches initializer in vertex stage

+

+uniform mat2 um2 = mat2(4.0);

+

+layout (location = 0, binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+buffer fragOnlyBlock {

+    vec2 fb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName2 [2]; // instance name different from vert

+

+

+void main()

+{

+    vec4 color = gfo1 * u1.rgrg * u2.rgbr * u3.rgba;        // o1 is statically used

+    outColor = color;

+}

+

diff --git a/Test/iomap.crossStage.2.geom b/Test/iomap.crossStage.2.geom
new file mode 100644
index 0000000..91508ab
--- /dev/null
+++ b/Test/iomap.crossStage.2.geom
@@ -0,0 +1,39 @@
+#version 460

+

+layout(points) in;

+layout(triangle_strip, max_vertices=3) out;

+

+in vec4 vgo1[];

+in vec2 vgo2[];

+

+layout(location = 5) in outBlock {

+    vec4 o3;

+} inBlock[];

+

+out vec4 gfo1;

+out vec2 gfo2;

+

+layout(location = 5) out outBlock {

+    vec4 o3;

+} gf_out;

+

+uniform vec2 u1;

+uniform vec3 u2 = vec3(0); // initializer not present in fragment stage

+uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName1 [2]; // instance name different from frag

+

+void main()

+{

+    for (int i = 0; i < 3; i++) {

+        gfo1 = vec4(0);

+        gfo2 = vec2(0);

+        gf_out.o3 = inBlock[i].o3;

+        EmitVertex();

+    }

+    EndPrimitive();

+}

+

diff --git a/Test/iomap.crossStage.2.vert b/Test/iomap.crossStage.2.vert
new file mode 100644
index 0000000..ebb0d9d
--- /dev/null
+++ b/Test/iomap.crossStage.2.vert
@@ -0,0 +1,38 @@
+#version 460

+

+out vec4 vgo1; // declaration order different than fragment shader

+out vec2 vgo2; // declaration order different than fragment shader

+

+layout(location = 5) out outBlock {

+    vec4 o3;

+};

+

+uniform vec2 u1;

+uniform vec3 u2 = vec3(0); // initializer not present in fragment stage

+uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage

+

+uniform mat2 um2 = mat2(4.0);

+

+layout (location = 0, binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+buffer vertOnlyBlock {

+    vec2 vb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName1 [2]; // instance name different from frag

+

+void main()

+{

+    vgo1 = vec4(0);

+    vgo2 = vec2(0);

+    o3 = vec4(0);

+}

+

diff --git a/Test/iomap.crossStage.frag b/Test/iomap.crossStage.frag
new file mode 100644
index 0000000..1624703
--- /dev/null
+++ b/Test/iomap.crossStage.frag
@@ -0,0 +1,41 @@
+#version 460

+

+

+layout(location = 5) in outBlock {

+    vec4 o3;

+};

+

+in vec2 o2; // declaration order different than vertex shader

+in vec4 o1; // declaration order different than vertex shader

+

+out vec4 outColor;

+

+uniform vec2 u1;

+uniform vec3 u2;    // initializer present in vertex stage

+uniform vec4 u3 = vec4(0); // initializer matches initializer in vertex stage

+

+uniform mat2 um2 = mat2(4.0);

+

+layout (location = 0, binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+buffer fragOnlyBlock {

+    vec2 fb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName2 [2]; // instance name different from vert

+

+

+void main()

+{

+    vec4 color = o1 * u1.rgrg * u2.rgbr * u3.rgba;        // o1 is statically used

+    outColor = color;

+}

+

diff --git a/Test/iomap.crossStage.vert b/Test/iomap.crossStage.vert
new file mode 100644
index 0000000..d05874f
--- /dev/null
+++ b/Test/iomap.crossStage.vert
@@ -0,0 +1,38 @@
+#version 460

+

+out vec4 o1; // declaration order different than fragment shader

+out vec2 o2; // declaration order different than fragment shader

+

+layout(location = 5) out outBlock {

+    vec4 o3;

+};

+

+uniform vec2 u1;

+uniform vec3 u2 = vec3(0); // initializer not present in fragment stage

+uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage

+

+uniform mat2 um2 = mat2(4.0);

+

+layout (location = 0, binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+buffer vertOnlyBlock {

+    vec2 vb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName1 [2]; // instance name different from frag

+

+void main()

+{

+    o1 = vec4(0);

+    o2 = vec2(0);

+    o3 = vec4(0);

+}

+

diff --git a/Test/iomap.crossStage.vk.frag b/Test/iomap.crossStage.vk.frag
new file mode 100644
index 0000000..d09e687
--- /dev/null
+++ b/Test/iomap.crossStage.vk.frag
@@ -0,0 +1,50 @@
+#version 460

+

+

+layout(location = 5) in outBlock {

+    vec4 o3;

+};

+

+

+in vec4 gfo1;

+in vec2 gfo2;

+

+out vec4 outColor;

+

+layout (binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+readonly buffer fragOnlyBlock {

+    vec2 fb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName2 [2]; // instance name different from vert

+

+vec2 Bar() {

+    return  fb1 + 

+            blockName2[0].b +

+            blockName2[1].b;

+}

+

+vec4 Foo() {

+    return  a + 

+            b + 

+            blockName2[0].a +

+            blockName2[1].a +

+            vec4(Bar(), 0.0, 0.0);

+}

+

+void main()

+{

+    vec4 color = gfo1; // o1 is statically used

+    color = color + Foo();

+    outColor = color;

+}

+

diff --git a/Test/iomap.crossStage.vk.geom b/Test/iomap.crossStage.vk.geom
new file mode 100644
index 0000000..b951737
--- /dev/null
+++ b/Test/iomap.crossStage.vk.geom
@@ -0,0 +1,35 @@
+#version 460

+

+layout(points) in;

+layout(triangle_strip, max_vertices=3) out;

+

+in vec4 vgo1[];

+in vec2 vgo2[];

+

+layout(location = 5) in outBlock {

+    vec4 o3;

+} inBlock[];

+

+out vec4 gfo1;

+out vec2 gfo2;

+

+layout(location = 5) out outBlock {

+    vec4 o3;

+} gf_out;

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName1 [2]; // instance name different from frag

+

+void main()

+{

+    for (int i = 0; i < 3; i++) {

+        gfo1 = vec4(0);

+        gfo2 = vec2(0);

+        gf_out.o3 = inBlock[i].o3;

+        EmitVertex();

+    }

+    EndPrimitive();

+}

+

diff --git a/Test/iomap.crossStage.vk.vert b/Test/iomap.crossStage.vk.vert
new file mode 100644
index 0000000..e422131
--- /dev/null
+++ b/Test/iomap.crossStage.vk.vert
@@ -0,0 +1,32 @@
+#version 460

+

+out vec4 vgo1; // declaration order different than fragment shader

+out vec2 vgo2; // declaration order different than fragment shader

+

+layout(location = 5) out outBlock {

+    vec4 o3;

+};

+

+layout (binding = 0) uniform sampler2D glass;

+

+uniform crossStageBlock1 {

+    uniform vec4 a;

+    vec4 b;

+};

+

+readonly buffer vertOnlyBlock {

+    vec2 vb1;

+};

+

+uniform crossStageBlock2 {

+    uniform vec4 a;

+    vec2 b;

+} blockName1 [2]; // instance name different from frag

+

+void main()

+{

+    vgo1 = vec4(0);

+    vgo2 = vec2(0);

+    o3 = vec4(0);

+}

+

diff --git a/Test/link.vk.inconsistentGLPerVertex.0.geom b/Test/link.vk.inconsistentGLPerVertex.0.geom
new file mode 100755
index 0000000..4d192d6
--- /dev/null
+++ b/Test/link.vk.inconsistentGLPerVertex.0.geom
@@ -0,0 +1,27 @@
+#version 460 core
+
+layout(lines_adjacency) in; 
+layout(triangle_strip, max_vertices = 50) out;
+
+in vs_output 
+{ 
+	vec4 color;
+} gs_in[]; 
+
+out gs_output
+{
+	vec4 color;
+} gs_out;
+
+void main()
+{
+	gl_Position = gl_in[0].gl_Position;
+	gs_out.color = gs_in[0].color;
+	EmitVertex();
+	gs_out.color = gs_in[1].color;
+	gl_Position = gl_in[1].gl_Position;
+	EmitVertex();
+	gs_out.color = gs_in[0].color;
+	gl_Position = gl_in[0].gl_Position;
+	EmitVertex();
+}
diff --git a/Test/link.vk.inconsistentGLPerVertex.0.vert b/Test/link.vk.inconsistentGLPerVertex.0.vert
new file mode 100755
index 0000000..7658c68
--- /dev/null
+++ b/Test/link.vk.inconsistentGLPerVertex.0.vert
@@ -0,0 +1,20 @@
+#version 460 core
+
+// This test is to test isInconsistentGLPerVertexMember() workarounds.
+// Without that workaround this compile fails due to block declarations
+// in gl_PerVertex not being consistent for:
+// gl_SecondaryPositionNV
+// gl_PositionPerViewNV
+
+out vs_output 
+{ 
+	vec4 color;
+} vs_out; 
+
+in vec4 P;
+void main()
+{
+	vs_out.color = vec4(1.);
+	gl_PointSize = 1.0;
+	gl_Position = P;
+}
diff --git a/Test/negativeWorkGroupSize.comp b/Test/negativeWorkGroupSize.comp
new file mode 100644
index 0000000..1f007d0
--- /dev/null
+++ b/Test/negativeWorkGroupSize.comp
@@ -0,0 +1,12 @@
+#version 460
+
+void fn(){
+    uvec3 wgs = gl_WorkGroupSize; // error: fixed workgroup size has not been declared
+}
+
+layout(local_size_x = 64) in; // declare workgroup size
+
+void main(){
+    fn();
+    uvec3 wgs = gl_WorkGroupSize; // valid
+}
diff --git a/Test/spv.atomicStoreInt64.comp b/Test/spv.atomicStoreInt64.comp
new file mode 100644
index 0000000..879c37a
--- /dev/null
+++ b/Test/spv.atomicStoreInt64.comp
@@ -0,0 +1,11 @@
+#version 450
+#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable
+#extension GL_EXT_shader_atomic_int64 : enable
+#extension GL_KHR_memory_scope_semantics : enable
+
+layout(set = 0, binding = 0) buffer ssbo { uint64_t y; };
+layout(set = 0, binding = 1) uniform ubo { uint64_t z; };
+
+void main() {
+    atomicStore(y, z, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
+}
diff --git a/Test/spv.depthUnchanged.frag b/Test/spv.depthUnchanged.frag
new file mode 100644
index 0000000..bbc5139
--- /dev/null
+++ b/Test/spv.depthUnchanged.frag
@@ -0,0 +1,8 @@
+#version 430
+layout(location = 0) out vec4 outColor;
+layout(depth_unchanged) out float gl_FragDepth;
+void main() {
+  outColor = vec4(1.0, 0.0, 0.0, 1.0);
+  gl_FragDepth = gl_FragCoord.y;
+}
+
diff --git a/Test/spv.ext.MissShader.rmiss b/Test/spv.ext.MissShader.rmiss
index 982bd84..05311c9 100644
--- a/Test/spv.ext.MissShader.rmiss
+++ b/Test/spv.ext.MissShader.rmiss
@@ -4,9 +4,16 @@
 #extension GL_KHR_shader_subgroup_ballot : enable
 #extension GL_ARB_shader_ballot : enable
 #extension GL_NV_shader_sm_builtins : enable
+#extension GL_ARB_sparse_texture_clamp: enable
+
 layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
 layout(location = 0) rayPayloadEXT vec4 localPayload;
 layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
+
+layout(binding = 1, set = 0) uniform sampler2D    s2D;
+layout(location = 2) in vec2 c2;
+layout(location = 3) in float lodClamp;
+
 void main()
 {
 	uvec3 v0 = gl_LaunchIDEXT;
@@ -17,4 +24,5 @@
 	float v5 = gl_RayTmaxEXT;
 	traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
     incomingPayload.x = float(gl_SubGroupSizeARB) + float(gl_SubgroupEqMask) + float(gl_WarpIDNV);
+        vec4 texel = textureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp);
 }
diff --git a/Test/spv.float16Fetch.frag b/Test/spv.float16Fetch.frag
index b1ba98c..eeda1dd 100644
--- a/Test/spv.float16Fetch.frag
+++ b/Test/spv.float16Fetch.frag
@@ -889,19 +889,20 @@
 f16vec4 testSparseTextureGatherOffsets()

 {

     f16vec4 texel = f16vec4(0.0hf);

+    const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));

 

-    sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel, 0);

-    sparseTextureGatherOffsetsARB(s2D, f16c2, offsets, texel, 0, f16bias);

-    sparseTextureGatherOffsetsARB(s2DArray, c3, offsets, texel, 0);

-    sparseTextureGatherOffsetsARB(s2DArray, f16c3, offsets, texel, 0, f16bias);

-    sparseTextureGatherOffsetsARB(s2DRect, c2, offsets, texel, 0);

-    sparseTextureGatherOffsetsARB(s2DRect, f16c2, offsets, texel, 0);

-    sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, offsets, texel);

-    sparseTextureGatherOffsetsARB(s2DShadow, f16c2, compare, offsets, texel);

-    sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, offsets, texel);

-    sparseTextureGatherOffsetsARB(s2DArrayShadow, f16c3, compare, offsets, texel);

-    sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, offsets, texel);

-    sparseTextureGatherOffsetsARB(s2DRectShadow, f16c2, compare, offsets, texel);

+    sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel, 0);

+    sparseTextureGatherOffsetsARB(s2D, f16c2, constOffsets, texel, 0, f16bias);

+    sparseTextureGatherOffsetsARB(s2DArray, c3, constOffsets, texel, 0);

+    sparseTextureGatherOffsetsARB(s2DArray, f16c3, constOffsets, texel, 0, f16bias);

+    sparseTextureGatherOffsetsARB(s2DRect, c2, constOffsets, texel, 0);

+    sparseTextureGatherOffsetsARB(s2DRect, f16c2, constOffsets, texel, 0);

+    sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(s2DShadow, f16c2, compare, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(s2DArrayShadow, f16c3, compare, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, constOffsets, texel);

+    sparseTextureGatherOffsetsARB(s2DRectShadow, f16c2, compare, constOffsets, texel);

 

     return texel;

 }

diff --git a/Test/spv.precision.frag b/Test/spv.precision.frag
index 463afdf..d887ce9 100644
--- a/Test/spv.precision.frag
+++ b/Test/spv.precision.frag
@@ -1,4 +1,5 @@
 #version 310 es

+#extension GL_OES_sample_variables : enable

 precision mediump float;

 in lowp float lowfin;

 in mediump float mediumfin;

@@ -59,4 +60,5 @@
     mediumfout *= s.b;

 

     mediumfout = ((mediumfin * mediumfin > 4.2) ? 2.0 * mediumfout : 3.0 * mediumfout);

+    mediumfout = ((gl_SampleMaskIn[0] >> uniform_medium > 0) ? 2.0 * mediumfout : 3.0 * mediumfout);

 }

diff --git a/Test/spv.sparseTexture.frag b/Test/spv.sparseTexture.frag
index c995ee2..50ea272 100644
--- a/Test/spv.sparseTexture.frag
+++ b/Test/spv.sparseTexture.frag
@@ -27,8 +27,6 @@
 in flat ivec2 ic2;

 in flat ivec3 ic3;

 

-in flat ivec2 offsets[4];

-

 out vec4 outColor;

 

 void main()

@@ -79,9 +77,10 @@
     resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);

     resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);

 

-    resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel);

-    resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2);

-    resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel);

+    const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));

+    resident |= sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel);

+    resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, constOffsets, itexel, 2);

+    resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, constOffsets, texel);

 

     resident |= sparseImageLoadARB(i2D, ic2, texel);

     resident |= sparseImageLoadARB(ii3D, ic3, itexel);

diff --git a/Test/textureoffset_sampler2darrayshadow.vert b/Test/textureoffset_sampler2darrayshadow.vert
new file mode 100644
index 0000000..6ce2dbc
--- /dev/null
+++ b/Test/textureoffset_sampler2darrayshadow.vert
@@ -0,0 +1,11 @@
+#version 300 es

+precision mediump float;

+in highp vec4 dEQP_Position;

+

+uniform mediump sampler2DArrayShadow s;

+

+void main()

+{

+	gl_Position = vec4(textureOffset(s, vec4(0), ivec2(0)));

+	gl_Position = dEQP_Position;

+}

diff --git a/Test/vk.relaxed.changeSet.frag b/Test/vk.relaxed.changeSet.frag
new file mode 100755
index 0000000..e2f2403
--- /dev/null
+++ b/Test/vk.relaxed.changeSet.frag
@@ -0,0 +1,13 @@
+#version 460
+
+layout(location = 0) out vec4 fragColor;
+
+uniform sampler2D sTexture;
+
+in vec4 Color;
+in vec2 UV;
+
+void main()
+{
+    fragColor = Color * texture(sTexture, UV.st).r;
+}
diff --git a/Test/vk.relaxed.changeSet.vert b/Test/vk.relaxed.changeSet.vert
new file mode 100755
index 0000000..419adba
--- /dev/null
+++ b/Test/vk.relaxed.changeSet.vert
@@ -0,0 +1,16 @@
+#version 460
+
+in vec2 aPos;
+in vec2 aUV;
+in vec4 aColor;
+uniform mat4 projectionMatrix;
+
+out vec4 Color;
+out vec2 UV;
+
+void main()
+{
+    Color = aColor;
+    UV = aUV;
+    gl_Position = projectionMatrix * vec4(aPos, 0, 1);
+}
diff --git a/Test/vk.relaxed.errorcheck.frag b/Test/vk.relaxed.errorcheck.frag
new file mode 100644
index 0000000..b75b50b
--- /dev/null
+++ b/Test/vk.relaxed.errorcheck.frag
@@ -0,0 +1,16 @@
+#version 460

+

+layout (location = 0) in vec4 io;

+

+out vec4 o;

+

+// default uniforms will be gathered into a uniform block

+uniform vec4 a;     // declared in both stages with different types

+

+vec4 foo() {

+    return a;

+}

+

+void main() {

+    o = io + foo();

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.errorcheck.vert b/Test/vk.relaxed.errorcheck.vert
new file mode 100644
index 0000000..b1bdbbe
--- /dev/null
+++ b/Test/vk.relaxed.errorcheck.vert
@@ -0,0 +1,15 @@
+#version 460

+

+layout (location = 0) out vec4 io;

+

+// default uniforms will be gathered into a uniform block

+// final global block will merge uniforms from all linked files

+uniform vec2 a;     // declared in both stages with different type

+

+vec4 foo() {

+    return a.xyxy;

+}

+

+void main() {

+    io = foo();

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.frag b/Test/vk.relaxed.frag
new file mode 100644
index 0000000..d43416e
--- /dev/null
+++ b/Test/vk.relaxed.frag
@@ -0,0 +1,74 @@
+#version 460

+

+out vec4 o;

+

+// default uniforms will be gathered into a uniform block

+uniform vec4 a;

+uniform vec2 b = vec2(0, 0);            // initializer will be ignored

+layout(location = 0) uniform vec2 c;    // location qualifier will be ignored

+uniform vec4 d[10];

+uniform struct e {                      

+    vec2 x;

+    float y;

+    uint z;

+} structUniform; 

+

+// opaque types will not be grouped into uniform block

+uniform sampler2D t1;

+

+// shared and packed layout qualifier are silently ignored

+layout(shared) uniform UniformBlock {

+    float j;

+    vec4 k;

+};

+

+layout(packed) buffer BufferBlock {

+    float j;

+    vec4 k;

+} bufferInstance;

+

+// atomic_uint will be converted to uint and gathered in a buffer block

+layout(binding = 0) uniform atomic_uint counter1; // offset not used

+layout(binding = 0) uniform atomic_uint counter2; // offset not used

+layout(binding = 1) uniform atomic_uint counter3; // offset not used

+

+// atomic counter functions will be converted to equivalent integer atomic operations

+uint bar() {

+    uint j = 0;

+    j = atomicCounterIncrement(counter1);

+    j = atomicCounterDecrement(counter1);

+    j = atomicCounter(counter1);

+

+    j = atomicCounterAdd(counter1, 1);

+    j = atomicCounterAdd(counter1, -1);

+    j = atomicCounterSubtract(counter1, 1);

+

+    j = atomicCounterMin(counter1, j);

+    j = atomicCounterMax(counter1, j);

+    j = atomicCounterAnd(counter1, j);

+

+    j = atomicCounterOr(counter1, j);

+    j = atomicCounterXor(counter1, j);

+    

+    j = atomicCounterExchange(counter1, j);

+    j = atomicCounterCompSwap(counter1, 0, j);

+

+    atomicCounterIncrement(counter2);

+    atomicCounterIncrement(counter3);

+

+    memoryBarrierAtomicCounter();

+    

+    return j;

+}

+

+vec4 foo() {

+    float f = j + bufferInstance.j + structUniform.y + structUniform.z;

+    vec2 v2 = b + c + structUniform.x;

+    vec4 v4 = a + d[0] + d[1] + d[2] + k + bufferInstance.k + texture(t1, vec2(0, 0));

+    return vec4(f) * vec4(v2, 1, 1) * v4;

+}

+

+void main() {

+    float j = float(bar());

+    o = j * foo();

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.link1.frag b/Test/vk.relaxed.link1.frag
new file mode 100644
index 0000000..95b609f
--- /dev/null
+++ b/Test/vk.relaxed.link1.frag
@@ -0,0 +1,28 @@
+#version 460

+

+out vec4 o;

+

+// default uniforms will be gathered into a uniform block

+// final global block will merge uniforms from all linked files

+uniform vec4 a;     // declared in both stages

+uniform vec2 b1;    // declaration order swapped in other stage

+uniform vec2 b2;

+uniform vec4 c1;    // not delcared in other file

+uniform vec4 d;

+

+// final global buffer will berge buffers from all linked files

+layout (binding = 0) uniform atomic_uint counter1;

+layout (binding = 0) uniform atomic_uint counter2;

+

+vec4 foo();

+

+vec4 bar() {

+    uint j = atomicCounterIncrement(counter1) + atomicCounterDecrement(counter2);

+    vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c1 + d;

+

+    return float(j) * v;

+}

+

+void main() {

+    o = foo() + bar();

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.link2.frag b/Test/vk.relaxed.link2.frag
new file mode 100644
index 0000000..a4f468a
--- /dev/null
+++ b/Test/vk.relaxed.link2.frag
@@ -0,0 +1,19 @@
+#version 460

+

+// default uniforms will be gathered into a uniform block

+// final global block will merge uniforms from all linked files

+uniform vec4 a;     // declared in both stages

+uniform vec2 b2;    // declaration order swapped in other stage

+uniform vec2 b1;

+uniform vec4 c2;    // not delcared in other file

+uniform vec4 d;

+

+layout (binding = 0) uniform atomic_uint counter3;

+layout (binding = 0) uniform atomic_uint counter2;

+

+vec4 foo() {

+    uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);

+    vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;

+

+    return float(j) * v;

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.stagelink.frag b/Test/vk.relaxed.stagelink.frag
new file mode 100644
index 0000000..d1eebba
--- /dev/null
+++ b/Test/vk.relaxed.stagelink.frag
@@ -0,0 +1,28 @@
+#version 460

+

+layout (location = 0) in vec4 io;

+

+out vec4 o;

+

+// default uniforms will be gathered into a uniform block

+// final global block will merge uniforms from all linked files

+uniform vec4 a;     // declared in both stages

+uniform vec2 b1;    // declaration order swapped in other stage

+uniform vec2 b2;

+uniform vec4 c1;    // not delcared in other file

+uniform vec4 d;

+

+// final global buffer will berge buffers from all linked files

+layout (binding = 0) uniform atomic_uint counter1;

+layout (binding = 0) uniform atomic_uint counter2;

+

+vec4 foo() {

+    uint j = atomicCounterIncrement(counter1) + atomicCounterDecrement(counter2);

+    vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c1 + d;

+

+    return float(j) * v;

+}

+

+void main() {

+    o = io + foo();

+}
\ No newline at end of file
diff --git a/Test/vk.relaxed.stagelink.vert b/Test/vk.relaxed.stagelink.vert
new file mode 100644
index 0000000..52396ac
--- /dev/null
+++ b/Test/vk.relaxed.stagelink.vert
@@ -0,0 +1,31 @@
+#version 460

+

+layout (location = 0) out vec4 io;

+

+// default uniforms will be gathered into a uniform block

+// final global block will merge uniforms from all linked files

+uniform vec4 a;     // declared in both stages

+uniform vec2 b2;    // declaration order swapped in other stage

+uniform vec2 b1;

+uniform vec4 c2;    // not delcared in other file

+uniform vec4 d;

+

+uniform vec4 s[4];

+

+layout (binding = 0) uniform atomic_uint counter3;

+layout (binding = 0) uniform atomic_uint counter2;

+

+vec4 foo() {

+    uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);

+    vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;

+

+    return float(j) * v;

+}

+

+void main() {

+

+    vec4 v = foo();

+    v = v + s[gl_VertexID];

+    v.x = v.x - float(gl_InstanceID);

+    io = v;

+}
\ No newline at end of file
diff --git a/glslang/HLSL/hlslGrammar.cpp b/glslang/HLSL/hlslGrammar.cpp
index f30c640..df1625e 100644
--- a/glslang/HLSL/hlslGrammar.cpp
+++ b/glslang/HLSL/hlslGrammar.cpp
@@ -161,8 +161,10 @@
             return true;
 
         // declaration
-        if (! acceptDeclaration(nodeList))
+        if (! acceptDeclaration(nodeList)) {
+            expected("declaration");
             return false;
+        }
     } while (true);
 
     return true;
diff --git a/glslang/HLSL/hlslParseHelper.cpp b/glslang/HLSL/hlslParseHelper.cpp
index 63dd8e3..d62f392 100644
--- a/glslang/HLSL/hlslParseHelper.cpp
+++ b/glslang/HLSL/hlslParseHelper.cpp
@@ -6075,8 +6075,12 @@
     case EOpInterpolateAtCentroid:
     case EOpInterpolateAtSample:
     case EOpInterpolateAtOffset:
+        // TODO(greg-lunarg): Re-enable this check. It currently gives false errors for builtins
+        // defined and passed as members of a struct. In this case the storage class is showing to be
+        // Function. See glslang #2584
+
         // Make sure the first argument is an interpolant, or an array element of an interpolant
-        if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
+        // if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
             // It might still be an array element.
             //
             // We could check more, but the semantics of the first argument are already met; the
@@ -6084,11 +6088,11 @@
             //
             // ES and desktop 4.3 and earlier:  swizzles may not be used
             // desktop 4.4 and later: swizzles may be used
-            const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true);
-            if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
-                error(loc, "first argument must be an interpolant, or interpolant-array element",
-                      fnCandidate.getName().c_str(), "");
-        }
+            // const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true);
+            // if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
+            //     error(loc, "first argument must be an interpolant, or interpolant-array element",
+            //           fnCandidate.getName().c_str(), "");
+        // }
         break;
 
     default:
diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h
index b628cdc..89f0192 100644
--- a/glslang/Include/Common.h
+++ b/glslang/Include/Common.h
@@ -286,6 +286,18 @@
     return ! (number & (powerOf2 - 1));
 }
 
+// Returns log2 of an integer power of 2.
+// T should be integral.
+template <class T> int IntLog2(T n)
+{
+    assert(IsPow2(n));
+    int result = 0;
+    while ((T(1) << result) != n) {
+      result++;
+    }
+    return result;
+}
+
 } // end namespace glslang
 
 #endif // _COMMON_INCLUDED_
diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h
index 603203d..149ba76 100644
--- a/glslang/Include/Types.h
+++ b/glslang/Include/Types.h
@@ -115,6 +115,7 @@
 #endif
 
     bool is1D()          const { return dim == Esd1D; }
+    bool is2D()          const { return dim == Esd2D; }
     bool isBuffer()      const { return dim == EsdBuffer; }
     bool isRect()        const { return dim == EsdRect; }
     bool isSubpass()     const { return dim == EsdSubpass; }
@@ -501,6 +502,7 @@
         noContraction = false;
         nullInit = false;
 #endif
+        defaultBlock = false;
     }
 
     // drop qualifiers that don't belong in a temporary variable
@@ -514,6 +516,7 @@
         specConstant = false;
         nonUniform = false;
         nullInit = false;
+        defaultBlock = false;
         clearLayout();
     }
 
@@ -572,6 +575,7 @@
     bool specConstant : 1;
     bool nonUniform   : 1;
     bool explicitOffset   : 1;
+    bool defaultBlock : 1; // default blocks with matching names have structures merged when linking
 
 #ifdef GLSLANG_WEB
     bool isWriteOnly() const { return false; }
@@ -756,6 +760,46 @@
         }
     }
 
+    TBlockStorageClass getBlockStorage() const {
+        if (storage == EvqUniform && !isPushConstant()) {
+            return EbsUniform;
+        }
+        else if (storage == EvqUniform) {
+            return EbsPushConstant;
+        }
+        else if (storage == EvqBuffer) {
+            return EbsStorageBuffer;
+        }
+        return EbsNone;
+    }
+
+    void setBlockStorage(TBlockStorageClass newBacking) {
+#ifndef GLSLANG_WEB
+        layoutPushConstant = (newBacking == EbsPushConstant);
+#endif
+        switch (newBacking) {
+        case EbsUniform :
+            if (layoutPacking == ElpStd430) {
+                // std430 would not be valid
+                layoutPacking = ElpStd140;
+            }
+            storage = EvqUniform;
+            break;
+        case EbsStorageBuffer : 
+            storage = EvqBuffer;
+            break;
+#ifndef GLSLANG_WEB
+        case EbsPushConstant :
+            storage = EvqUniform;
+            layoutSet = TQualifier::layoutSetEnd;
+            layoutBinding = TQualifier::layoutBindingEnd;
+            break;
+#endif
+        default:
+            break;
+        }
+    }
+
 #ifdef GLSLANG_WEB
     bool isPerView() const { return false; }
     bool isTaskMemory() const { return false; }
@@ -852,6 +896,7 @@
         return hasNonXfbLayout() ||
                hasXfb();
     }
+
     TLayoutMatrix  layoutMatrix  : 3;
     TLayoutPacking layoutPacking : 4;
     int layoutOffset;
@@ -1694,6 +1739,7 @@
 
     virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); }
     virtual bool isScalarOrVec1() const { return isScalar() || vector1; }
+    virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); }
     virtual bool isVector() const { return vectorSize > 1 || vector1; }
     virtual bool isMatrix() const { return matrixCols ? true : false; }
     virtual bool isArray()  const { return arraySizes != nullptr; }
@@ -2292,6 +2338,17 @@
         name += ';' ;
     }
 
+    // These variables are inconsistently declared inside and outside of gl_PerVertex in glslang right now.
+    // They are declared inside of 'in gl_PerVertex', but sitting as standalone when they are 'out'puts.
+    bool isInconsistentGLPerVertexMember(const TString& name) const
+    {
+        if (name == "gl_SecondaryPositionNV" ||
+            name == "gl_PositionPerViewNV")
+            return true;
+        return false;
+    }
+
+
     // Do two structure types match?  They could be declared independently,
     // in different places, but still might satisfy the definition of matching.
     // From the spec:
@@ -2307,22 +2364,48 @@
             (isStruct() && right.isStruct() && structure == right.structure))
             return true;
 
-        // Both being nullptr was caught above, now they both have to be structures of the same number of elements
-        if (!isStruct() || !right.isStruct() ||
-            structure->size() != right.structure->size())
-            return false;
-
         // Structure names have to match
         if (*typeName != *right.typeName)
             return false;
 
-        // Compare the names and types of all the members, which have to match
-        for (unsigned int i = 0; i < structure->size(); ++i) {
-            if ((*structure)[i].type->getFieldName() != (*right.structure)[i].type->getFieldName())
-                return false;
+        // There are inconsistencies with how gl_PerVertex is setup. For now ignore those as errors if they
+        // are known inconsistencies.
+        bool isGLPerVertex = *typeName == "gl_PerVertex";
 
-            if (*(*structure)[i].type != *(*right.structure)[i].type)
-                return false;
+        // Both being nullptr was caught above, now they both have to be structures of the same number of elements
+        if (!isStruct() || !right.isStruct() ||
+            (structure->size() != right.structure->size() && !isGLPerVertex))
+            return false;
+
+        // Compare the names and types of all the members, which have to match
+        for (size_t li = 0, ri = 0; li < structure->size() || ri < right.structure->size(); ++li, ++ri) {
+            if (li < structure->size() && ri < right.structure->size()) {
+                if ((*structure)[li].type->getFieldName() == (*right.structure)[ri].type->getFieldName()) {
+                    if (*(*structure)[li].type != *(*right.structure)[ri].type)
+                        return false;
+                } else {
+                    // If one of the members is something that's inconsistently declared, skip over it
+                    // for now.
+                    if (isGLPerVertex) {
+                        if (isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) {
+                            ri--;
+                            continue;
+                        } else if (isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) {
+                            li--;
+                            continue;
+                        }
+                    } else {
+                        return false;
+                    }
+                }
+            // If we get here, then there should only be inconsistently declared members left
+            } else if (li < structure->size()) {
+                if (!isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName()))
+                    return false;
+            } else {
+                if (!isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName()))
+                    return false;
+            }
         }
 
         return true;
diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h
index 85edd63..f50d3ba 100644
--- a/glslang/Include/intermediate.h
+++ b/glslang/Include/intermediate.h
@@ -593,6 +593,7 @@
     EOpTime,
 
     EOpAtomicAdd,
+    EOpAtomicSubtract,
     EOpAtomicMin,
     EOpAtomicMax,
     EOpAtomicAnd,
@@ -1135,6 +1136,8 @@
     virtual TBasicType getBasicType() const { return type.getBasicType(); }
     virtual TQualifier& getQualifier() { return type.getQualifier(); }
     virtual const TQualifier& getQualifier() const { return type.getQualifier(); }
+    virtual TArraySizes* getArraySizes() { return type.getArraySizes(); }
+    virtual const TArraySizes* getArraySizes() const { return type.getArraySizes(); }
     virtual void propagatePrecision(TPrecisionQualifier);
     virtual int getVectorSize() const { return type.getVectorSize(); }
     virtual int getMatrixCols() const { return type.getMatrixCols(); }
@@ -1672,6 +1675,7 @@
         flatten(false), dontFlatten(false) {}
     virtual void traverse(TIntermTraverser*);
     virtual TIntermTyped* getCondition() const { return condition; }
+    virtual void setCondition(TIntermTyped* c) { condition = c; }
     virtual TIntermNode* getTrueBlock() const { return trueBlock; }
     virtual TIntermNode* getFalseBlock() const { return falseBlock; }
     virtual       TIntermSelection* getAsSelectionNode()       { return this; }
diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp
index e21cf42..8dc04a4 100644
--- a/glslang/MachineIndependent/Constant.cpp
+++ b/glslang/MachineIndependent/Constant.cpp
@@ -599,17 +599,11 @@
             newConstArray[i].setDConst(log(unionArray[i].getDConst()));
             break;
         case EOpExp2:
-            {
-                const double inv_log2_e = 0.69314718055994530941723212145818;
-                newConstArray[i].setDConst(exp(unionArray[i].getDConst() * inv_log2_e));
-                break;
-            }
+            newConstArray[i].setDConst(exp2(unionArray[i].getDConst()));
+            break;
         case EOpLog2:
-            {
-                const double log2_e = 1.4426950408889634073599246810019;
-                newConstArray[i].setDConst(log2_e * log(unionArray[i].getDConst()));
-                break;
-            }
+            newConstArray[i].setDConst(log2(unionArray[i].getDConst()));
+            break;
         case EOpSqrt:
             newConstArray[i].setDConst(sqrt(unionArray[i].getDConst()));
             break;
diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp
index a5ef6cc..7f10a0a 100644
--- a/glslang/MachineIndependent/Initialize.cpp
+++ b/glslang/MachineIndependent/Initialize.cpp
@@ -931,7 +931,203 @@
             "\n");
     }
 
-    if (profile != EEsProfile && version >= 450) {
+    if (profile == EEsProfile && version >= 310) {  // Explicit Types
+      commonBuiltins.append(
+
+        "float64_t sqrt(float64_t);"
+        "f64vec2  sqrt(f64vec2);"
+        "f64vec3  sqrt(f64vec3);"
+        "f64vec4  sqrt(f64vec4);"
+
+        "float64_t inversesqrt(float64_t);"
+        "f64vec2  inversesqrt(f64vec2);"
+        "f64vec3  inversesqrt(f64vec3);"
+        "f64vec4  inversesqrt(f64vec4);"
+
+        "float64_t abs(float64_t);"
+        "f64vec2  abs(f64vec2);"
+        "f64vec3  abs(f64vec3);"
+        "f64vec4  abs(f64vec4);"
+
+        "float64_t sign(float64_t);"
+        "f64vec2  sign(f64vec2);"
+        "f64vec3  sign(f64vec3);"
+        "f64vec4  sign(f64vec4);"
+
+        "float64_t floor(float64_t);"
+        "f64vec2  floor(f64vec2);"
+        "f64vec3  floor(f64vec3);"
+        "f64vec4  floor(f64vec4);"
+
+        "float64_t trunc(float64_t);"
+        "f64vec2  trunc(f64vec2);"
+        "f64vec3  trunc(f64vec3);"
+        "f64vec4  trunc(f64vec4);"
+
+        "float64_t round(float64_t);"
+        "f64vec2  round(f64vec2);"
+        "f64vec3  round(f64vec3);"
+        "f64vec4  round(f64vec4);"
+
+        "float64_t roundEven(float64_t);"
+        "f64vec2  roundEven(f64vec2);"
+        "f64vec3  roundEven(f64vec3);"
+        "f64vec4  roundEven(f64vec4);"
+
+        "float64_t ceil(float64_t);"
+        "f64vec2  ceil(f64vec2);"
+        "f64vec3  ceil(f64vec3);"
+        "f64vec4  ceil(f64vec4);"
+
+        "float64_t fract(float64_t);"
+        "f64vec2  fract(f64vec2);"
+        "f64vec3  fract(f64vec3);"
+        "f64vec4  fract(f64vec4);"
+
+        "float64_t mod(float64_t, float64_t);"
+        "f64vec2  mod(f64vec2 , float64_t);"
+        "f64vec3  mod(f64vec3 , float64_t);"
+        "f64vec4  mod(f64vec4 , float64_t);"
+        "f64vec2  mod(f64vec2 , f64vec2);"
+        "f64vec3  mod(f64vec3 , f64vec3);"
+        "f64vec4  mod(f64vec4 , f64vec4);"
+
+        "float64_t modf(float64_t, out float64_t);"
+        "f64vec2  modf(f64vec2,  out f64vec2);"
+        "f64vec3  modf(f64vec3,  out f64vec3);"
+        "f64vec4  modf(f64vec4,  out f64vec4);"
+
+        "float64_t min(float64_t, float64_t);"
+        "f64vec2  min(f64vec2,  float64_t);"
+        "f64vec3  min(f64vec3,  float64_t);"
+        "f64vec4  min(f64vec4,  float64_t);"
+        "f64vec2  min(f64vec2,  f64vec2);"
+        "f64vec3  min(f64vec3,  f64vec3);"
+        "f64vec4  min(f64vec4,  f64vec4);"
+
+        "float64_t max(float64_t, float64_t);"
+        "f64vec2  max(f64vec2 , float64_t);"
+        "f64vec3  max(f64vec3 , float64_t);"
+        "f64vec4  max(f64vec4 , float64_t);"
+        "f64vec2  max(f64vec2 , f64vec2);"
+        "f64vec3  max(f64vec3 , f64vec3);"
+        "f64vec4  max(f64vec4 , f64vec4);"
+
+        "float64_t clamp(float64_t, float64_t, float64_t);"
+        "f64vec2  clamp(f64vec2 , float64_t, float64_t);"
+        "f64vec3  clamp(f64vec3 , float64_t, float64_t);"
+        "f64vec4  clamp(f64vec4 , float64_t, float64_t);"
+        "f64vec2  clamp(f64vec2 , f64vec2 , f64vec2);"
+        "f64vec3  clamp(f64vec3 , f64vec3 , f64vec3);"
+        "f64vec4  clamp(f64vec4 , f64vec4 , f64vec4);"
+
+        "float64_t mix(float64_t, float64_t, float64_t);"
+        "f64vec2  mix(f64vec2,  f64vec2,  float64_t);"
+        "f64vec3  mix(f64vec3,  f64vec3,  float64_t);"
+        "f64vec4  mix(f64vec4,  f64vec4,  float64_t);"
+        "f64vec2  mix(f64vec2,  f64vec2,  f64vec2);"
+        "f64vec3  mix(f64vec3,  f64vec3,  f64vec3);"
+        "f64vec4  mix(f64vec4,  f64vec4,  f64vec4);"
+        "float64_t mix(float64_t, float64_t, bool);"
+        "f64vec2  mix(f64vec2,  f64vec2,  bvec2);"
+        "f64vec3  mix(f64vec3,  f64vec3,  bvec3);"
+        "f64vec4  mix(f64vec4,  f64vec4,  bvec4);"
+
+        "float64_t step(float64_t, float64_t);"
+        "f64vec2  step(f64vec2 , f64vec2);"
+        "f64vec3  step(f64vec3 , f64vec3);"
+        "f64vec4  step(f64vec4 , f64vec4);"
+        "f64vec2  step(float64_t, f64vec2);"
+        "f64vec3  step(float64_t, f64vec3);"
+        "f64vec4  step(float64_t, f64vec4);"
+
+        "float64_t smoothstep(float64_t, float64_t, float64_t);"
+        "f64vec2  smoothstep(f64vec2 , f64vec2 , f64vec2);"
+        "f64vec3  smoothstep(f64vec3 , f64vec3 , f64vec3);"
+        "f64vec4  smoothstep(f64vec4 , f64vec4 , f64vec4);"
+        "f64vec2  smoothstep(float64_t, float64_t, f64vec2);"
+        "f64vec3  smoothstep(float64_t, float64_t, f64vec3);"
+        "f64vec4  smoothstep(float64_t, float64_t, f64vec4);"
+
+        "float64_t length(float64_t);"
+        "float64_t length(f64vec2);"
+        "float64_t length(f64vec3);"
+        "float64_t length(f64vec4);"
+
+        "float64_t distance(float64_t, float64_t);"
+        "float64_t distance(f64vec2 , f64vec2);"
+        "float64_t distance(f64vec3 , f64vec3);"
+        "float64_t distance(f64vec4 , f64vec4);"
+
+        "float64_t dot(float64_t, float64_t);"
+        "float64_t dot(f64vec2 , f64vec2);"
+        "float64_t dot(f64vec3 , f64vec3);"
+        "float64_t dot(f64vec4 , f64vec4);"
+
+        "f64vec3 cross(f64vec3, f64vec3);"
+
+        "float64_t normalize(float64_t);"
+        "f64vec2  normalize(f64vec2);"
+        "f64vec3  normalize(f64vec3);"
+        "f64vec4  normalize(f64vec4);"
+
+        "float64_t faceforward(float64_t, float64_t, float64_t);"
+        "f64vec2  faceforward(f64vec2,  f64vec2,  f64vec2);"
+        "f64vec3  faceforward(f64vec3,  f64vec3,  f64vec3);"
+        "f64vec4  faceforward(f64vec4,  f64vec4,  f64vec4);"
+
+        "float64_t reflect(float64_t, float64_t);"
+        "f64vec2  reflect(f64vec2 , f64vec2 );"
+        "f64vec3  reflect(f64vec3 , f64vec3 );"
+        "f64vec4  reflect(f64vec4 , f64vec4 );"
+
+        "float64_t refract(float64_t, float64_t, float64_t);"
+        "f64vec2  refract(f64vec2 , f64vec2 , float64_t);"
+        "f64vec3  refract(f64vec3 , f64vec3 , float64_t);"
+        "f64vec4  refract(f64vec4 , f64vec4 , float64_t);"
+
+        "f64mat2 matrixCompMult(f64mat2, f64mat2);"
+        "f64mat3 matrixCompMult(f64mat3, f64mat3);"
+        "f64mat4 matrixCompMult(f64mat4, f64mat4);"
+        "f64mat2x3 matrixCompMult(f64mat2x3, f64mat2x3);"
+        "f64mat2x4 matrixCompMult(f64mat2x4, f64mat2x4);"
+        "f64mat3x2 matrixCompMult(f64mat3x2, f64mat3x2);"
+        "f64mat3x4 matrixCompMult(f64mat3x4, f64mat3x4);"
+        "f64mat4x2 matrixCompMult(f64mat4x2, f64mat4x2);"
+        "f64mat4x3 matrixCompMult(f64mat4x3, f64mat4x3);"
+
+        "f64mat2   outerProduct(f64vec2, f64vec2);"
+        "f64mat3   outerProduct(f64vec3, f64vec3);"
+        "f64mat4   outerProduct(f64vec4, f64vec4);"
+        "f64mat2x3 outerProduct(f64vec3, f64vec2);"
+        "f64mat3x2 outerProduct(f64vec2, f64vec3);"
+        "f64mat2x4 outerProduct(f64vec4, f64vec2);"
+        "f64mat4x2 outerProduct(f64vec2, f64vec4);"
+        "f64mat3x4 outerProduct(f64vec4, f64vec3);"
+        "f64mat4x3 outerProduct(f64vec3, f64vec4);"
+
+        "f64mat2   transpose(f64mat2);"
+        "f64mat3   transpose(f64mat3);"
+        "f64mat4   transpose(f64mat4);"
+        "f64mat2x3 transpose(f64mat3x2);"
+        "f64mat3x2 transpose(f64mat2x3);"
+        "f64mat2x4 transpose(f64mat4x2);"
+        "f64mat4x2 transpose(f64mat2x4);"
+        "f64mat3x4 transpose(f64mat4x3);"
+        "f64mat4x3 transpose(f64mat3x4);"
+
+        "float64_t determinant(f64mat2);"
+        "float64_t determinant(f64mat3);"
+        "float64_t determinant(f64mat4);"
+
+        "f64mat2 inverse(f64mat2);"
+        "f64mat3 inverse(f64mat3);"
+        "f64mat4 inverse(f64mat4);"
+
+        "\n");
+    }
+
+    if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
         commonBuiltins.append(
 
             "int64_t abs(int64_t);"
@@ -998,25 +1194,25 @@
             "u64vec3  mix(u64vec3,  u64vec3,  bvec3);"
             "u64vec4  mix(u64vec4,  u64vec4,  bvec4);"
 
-            "int64_t doubleBitsToInt64(double);"
-            "i64vec2 doubleBitsToInt64(dvec2);"
-            "i64vec3 doubleBitsToInt64(dvec3);"
-            "i64vec4 doubleBitsToInt64(dvec4);"
+            "int64_t doubleBitsToInt64(float64_t);"
+            "i64vec2 doubleBitsToInt64(f64vec2);"
+            "i64vec3 doubleBitsToInt64(f64vec3);"
+            "i64vec4 doubleBitsToInt64(f64vec4);"
 
-            "uint64_t doubleBitsToUint64(double);"
-            "u64vec2  doubleBitsToUint64(dvec2);"
-            "u64vec3  doubleBitsToUint64(dvec3);"
-            "u64vec4  doubleBitsToUint64(dvec4);"
+            "uint64_t doubleBitsToUint64(float64_t);"
+            "u64vec2  doubleBitsToUint64(f64vec2);"
+            "u64vec3  doubleBitsToUint64(f64vec3);"
+            "u64vec4  doubleBitsToUint64(f64vec4);"
 
-            "double int64BitsToDouble(int64_t);"
-            "dvec2  int64BitsToDouble(i64vec2);"
-            "dvec3  int64BitsToDouble(i64vec3);"
-            "dvec4  int64BitsToDouble(i64vec4);"
+            "float64_t int64BitsToDouble(int64_t);"
+            "f64vec2  int64BitsToDouble(i64vec2);"
+            "f64vec3  int64BitsToDouble(i64vec3);"
+            "f64vec4  int64BitsToDouble(i64vec4);"
 
-            "double uint64BitsToDouble(uint64_t);"
-            "dvec2  uint64BitsToDouble(u64vec2);"
-            "dvec3  uint64BitsToDouble(u64vec3);"
-            "dvec4  uint64BitsToDouble(u64vec4);"
+            "float64_t uint64BitsToDouble(uint64_t);"
+            "f64vec2  uint64BitsToDouble(u64vec2);"
+            "f64vec3  uint64BitsToDouble(u64vec3);"
+            "f64vec4  uint64BitsToDouble(u64vec4);"
 
             "int64_t  packInt2x32(ivec2);"
             "uint64_t packUint2x32(uvec2);"
@@ -1335,6 +1531,15 @@
                 "dvec4  fma(dvec4,  dvec4,  dvec4 );"
                 "\n");
     }
+
+    if (profile == EEsProfile && version >= 310) {  // ARB_gpu_shader_fp64
+            commonBuiltins.append(
+                "float64_t fma(float64_t, float64_t, float64_t);"
+                "f64vec2  fma(f64vec2,  f64vec2,  f64vec2 );"
+                "f64vec3  fma(f64vec3,  f64vec3,  f64vec3 );"
+                "f64vec4  fma(f64vec4,  f64vec4,  f64vec4 );"
+                "\n");
+    }
 #endif
 
     if ((profile == EEsProfile && version >= 310) ||
@@ -1371,6 +1576,21 @@
 
             "\n");
     }
+
+    if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64
+        commonBuiltins.append(
+            "float64_t frexp(float64_t, out int);"
+            "f64vec2  frexp( f64vec2, out ivec2);"
+            "f64vec3  frexp( f64vec3, out ivec3);"
+            "f64vec4  frexp( f64vec4, out ivec4);"
+
+            "float64_t ldexp(float64_t, int);"
+            "f64vec2  ldexp( f64vec2, ivec2);"
+            "f64vec3  ldexp( f64vec3, ivec3);"
+            "f64vec4  ldexp( f64vec4, ivec4);"
+
+            "\n");
+    }
 #endif
 #endif
 
@@ -1630,6 +1850,36 @@
                 "\n");
         }
     }
+    else if (spvVersion.vulkanRelaxed) {
+        //
+        // Atomic counter functions act as aliases to normal atomic functions.
+        // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint'
+        // and map to equivalent non-counter atomic op
+        //
+        if ((profile != EEsProfile && version >= 300) ||
+            (profile == EEsProfile && version >= 310)) {
+            commonBuiltins.append(
+                "uint atomicCounterIncrement(volatile coherent uint);"
+                "uint atomicCounterDecrement(volatile coherent uint);"
+                "uint atomicCounter(volatile coherent uint);"
+
+                "\n");
+        }
+        if (profile != EEsProfile && version >= 460) {
+            commonBuiltins.append(
+                "uint atomicCounterAdd(volatile coherent uint, uint);"
+                "uint atomicCounterSubtract(volatile coherent uint, uint);"
+                "uint atomicCounterMin(volatile coherent uint, uint);"
+                "uint atomicCounterMax(volatile coherent uint, uint);"
+                "uint atomicCounterAnd(volatile coherent uint, uint);"
+                "uint atomicCounterOr(volatile coherent uint, uint);"
+                "uint atomicCounterXor(volatile coherent uint, uint);"
+                "uint atomicCounterExchange(volatile coherent uint, uint);"
+                "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);"
+
+                "\n");
+        }
+    }
 #endif // !GLSLANG_ANGLE
 
     // Bitfield
@@ -3116,7 +3366,7 @@
 
 #ifndef GLSLANG_ANGLE
     // GL_AMD_gpu_shader_half_float/Explicit types
-    if (profile != EEsProfile && version >= 450) {
+    if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
         commonBuiltins.append(
             "float16_t radians(float16_t);"
             "f16vec2   radians(f16vec2);"
@@ -3464,7 +3714,7 @@
     }
 
     // Explicit types
-    if (profile != EEsProfile && version >= 450) {
+    if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
         commonBuiltins.append(
             "int8_t abs(int8_t);"
             "i8vec2 abs(i8vec2);"
@@ -4124,7 +4374,7 @@
     }
 #ifndef GLSLANG_WEB
     if ((profile != EEsProfile && version >= 420) || esBarrier) {
-        if (spvVersion.vulkan == 0) {
+        if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) {
             commonBuiltins.append("void memoryBarrierAtomicCounter();");
         }
         commonBuiltins.append("void memoryBarrierImage();");
@@ -4848,6 +5098,13 @@
                 "in int gl_VertexIndex;"
                 "in int gl_InstanceIndex;"
                 );
+
+        if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed)
+            stageBuiltins[EShLangVertex].append(
+                "in int gl_VertexID;"         // declare with 'in' qualifier
+                "in int gl_InstanceID;"
+                );
+
         if (version >= 440) {
             stageBuiltins[EShLangVertex].append(
                 "in int gl_BaseVertexARB;"
@@ -4885,7 +5142,7 @@
                 "mediump float gl_PointSize;" // needs qualifier fixed later
                 );
         } else {
-            if (spvVersion.vulkan == 0)
+            if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed)
                 stageBuiltins[EShLangVertex].append(
                     "in highp int gl_VertexID;"      // needs qualifier fixed later
                     "in highp int gl_InstanceID;"    // needs qualifier fixed later
@@ -6538,7 +6795,7 @@
                                             s.append(");\n");
 
                                             // Add to the per-language set of built-ins
-                                            if (bias || lodClamp != 0) {
+                                            if (!grad && (bias || lodClamp != 0)) {
                                                 stageBuiltins[EShLangFragment].append(s);
                                                 stageBuiltins[EShLangCompute].append(s);
                                             } else
@@ -7436,6 +7693,12 @@
             SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
         }
 
+        if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+            // treat these built-ins as aliases of VertexIndex and InstanceIndex
+            BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable);
+            BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable);
+        }
+
         if (profile != EEsProfile) {
             if (version >= 440) {
                 symbolTable.setVariableExtensions("gl_BaseVertexARB",   1, &E_GL_ARB_shader_draw_parameters);
@@ -8912,6 +9175,14 @@
     symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
     symbolTable.relateToOperator("memoryBarrierImage",         EOpMemoryBarrierImage);
 
+    if (spvVersion.vulkanRelaxed) {
+        //
+        // functions signature have been replaced to take uint operations on buffer variables
+        // remap atomic counter functions to atomic operations
+        //
+        symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer);
+    }
+
     symbolTable.relateToOperator("atomicLoad",     EOpAtomicLoad);
     symbolTable.relateToOperator("atomicStore",    EOpAtomicStore);
 
@@ -8919,6 +9190,20 @@
     symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
     symbolTable.relateToOperator("atomicCounter",          EOpAtomicCounter);
 
+    if (spvVersion.vulkanRelaxed) {
+        //
+        // functions signature have been replaced to take uint operations
+        // remap atomic counter functions to atomic operations
+        //
+        // these atomic counter functions do not match signatures of glsl
+        // atomic functions, so they will be remapped to semantically
+        // equivalent functions in the parser
+        //
+        symbolTable.relateToOperator("atomicCounterIncrement", EOpNull);
+        symbolTable.relateToOperator("atomicCounterDecrement", EOpNull);
+        symbolTable.relateToOperator("atomicCounter", EOpNull);
+    }
+
     symbolTable.relateToOperator("clockARB",     EOpReadClockSubgroupKHR);
     symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
 
@@ -8937,6 +9222,23 @@
         symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
     }
 
+    if (spvVersion.vulkanRelaxed) {
+        //
+        // functions signature have been replaced to take 'uint' instead of 'atomic_uint'
+        // remap atomic counter functions to non-counter atomic ops so
+        // functions act as aliases to non-counter atomic ops
+        //
+        symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd);
+        symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract);
+        symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin);
+        symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax);
+        symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd);
+        symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr);
+        symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor);
+        symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange);
+        symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap);
+    }
+
     symbolTable.relateToOperator("fma",               EOpFma);
     symbolTable.relateToOperator("frexp",             EOpFrexp);
     symbolTable.relateToOperator("ldexp",             EOpLdexp);
diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp
index cadf6f3..d1123d4 100644
--- a/glslang/MachineIndependent/Intermediate.cpp
+++ b/glslang/MachineIndependent/Intermediate.cpp
@@ -3776,11 +3776,16 @@
 {
      if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
          getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
-        getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
-        if (getQualifier().precision != EpqNone) {
-            left->propagatePrecision(getQualifier().precision);
-            right->propagatePrecision(getQualifier().precision);
-        }
+       if (op == EOpRightShift || op == EOpLeftShift) {
+         // For shifts get precision from left side only and thus no need to propagate
+         getQualifier().precision = left->getQualifier().precision;
+       } else {
+         getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
+         if (getQualifier().precision != EpqNone) {
+           left->propagatePrecision(getQualifier().precision);
+           right->propagatePrecision(getQualifier().precision);
+         }
+       }
     }
 }
 
diff --git a/glslang/MachineIndependent/ParseContextBase.cpp b/glslang/MachineIndependent/ParseContextBase.cpp
index 3efa27a..02cca40 100644
--- a/glslang/MachineIndependent/ParseContextBase.cpp
+++ b/glslang/MachineIndependent/ParseContextBase.cpp
@@ -601,7 +601,6 @@
         selector.push_back(0);
 }
 
-#ifdef ENABLE_HLSL
 //
 // Make the passed-in variable information become a member of the
 // global uniform block.  If this doesn't exist yet, make it.
@@ -646,7 +645,67 @@
 
     ++firstNewMember;
 }
-#endif
+
+void TParseContextBase::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) {
+    // Make the atomic counter block, if not yet made.
+    const auto &at  = atomicCounterBuffers.find(binding);
+    if (at == atomicCounterBuffers.end()) {
+        atomicCounterBuffers.insert({binding, (TVariable*)nullptr });
+        atomicCounterBlockFirstNewMember.insert({binding, 0});
+    }
+
+    TVariable*& atomicCounterBuffer = atomicCounterBuffers[binding];
+    int& bufferNewMember = atomicCounterBlockFirstNewMember[binding];
+
+    if (atomicCounterBuffer == nullptr) {
+        TQualifier blockQualifier;
+        blockQualifier.clear();
+        blockQualifier.storage = EvqBuffer;
+        
+        char charBuffer[512];
+        if (binding != TQualifier::layoutBindingEnd) {
+            snprintf(charBuffer, 512, "%s_%d", getAtomicCounterBlockName(), binding);
+        } else {
+            snprintf(charBuffer, 512, "%s_0", getAtomicCounterBlockName());
+        }
+        
+        TType blockType(new TTypeList, *NewPoolTString(charBuffer), blockQualifier);
+        setUniformBlockDefaults(blockType);
+        blockType.getQualifier().layoutPacking = ElpStd430;
+        atomicCounterBuffer = new TVariable(NewPoolTString(""), blockType, true);
+        // If we arn't auto mapping bindings then set the block to use the same
+        // binding as what the atomic was set to use
+        if (!intermediate.getAutoMapBindings()) {
+            atomicCounterBuffer->getWritableType().getQualifier().layoutBinding = binding;
+        }
+        bufferNewMember = 0;
+
+        atomicCounterBuffer->getWritableType().getQualifier().layoutSet = atomicCounterBlockSet;
+    }
+
+    // Add the requested member as a member to the global block.
+    TType* type = new TType;
+    type->shallowCopy(memberType);
+    type->setFieldName(memberName);
+    if (typeList)
+        type->setStruct(typeList);
+    TTypeLoc typeLoc = {type, loc};
+    atomicCounterBuffer->getType().getWritableStruct()->push_back(typeLoc);
+
+    // Insert into the symbol table.
+    if (bufferNewMember == 0) {
+        // This is the first request; we need a normal symbol table insert
+        if (symbolTable.insert(*atomicCounterBuffer))
+            trackLinkage(*atomicCounterBuffer);
+        else
+            error(loc, "failed to insert the global constant buffer", "buffer", "");
+    } else {
+        // This is a follow-on request; we need to amend the first insert
+        symbolTable.amend(*atomicCounterBuffer, bufferNewMember);
+    }
+
+    ++bufferNewMember;
+}
 
 void TParseContextBase::finish()
 {
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index cba242a..45c9362 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -225,6 +225,108 @@
         error(getCurrentLoc(), "compilation terminated", "", "");
 }
 
+void TParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
+{
+    bool createBlock = globalUniformBlock == nullptr;
+
+    if (createBlock) {
+        globalUniformBinding = intermediate.getGlobalUniformBinding();
+        globalUniformSet = intermediate.getGlobalUniformSet();
+    }
+
+    // use base class function to create/expand block
+    TParseContextBase::growGlobalUniformBlock(loc, memberType, memberName, typeList);
+
+    if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+        // check for a block storage override
+        TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getGlobalUniformBlockName());
+        TQualifier& qualifier = globalUniformBlock->getWritableType().getQualifier();
+        qualifier.defaultBlock = true;
+
+        if (storageOverride != EbsNone) {
+            if (createBlock) {
+                // Remap block storage
+                qualifier.setBlockStorage(storageOverride);
+
+                // check that the change didn't create errors
+                blockQualifierCheck(loc, qualifier, false);
+            }
+
+            // remap meber storage as well
+            memberType.getQualifier().setBlockStorage(storageOverride);
+        }
+    }
+}
+
+void TParseContext::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
+{
+    bool createBlock = atomicCounterBuffers.find(binding) == atomicCounterBuffers.end();
+
+    if (createBlock) {
+        atomicCounterBlockSet = intermediate.getAtomicCounterBlockSet();
+    }
+
+    // use base class function to create/expand block
+    TParseContextBase::growAtomicCounterBlock(binding, loc, memberType, memberName, typeList);
+    TQualifier& qualifier = atomicCounterBuffers[binding]->getWritableType().getQualifier();
+    qualifier.defaultBlock = true;
+
+    if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+        // check for a Block storage override
+        TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getAtomicCounterBlockName());
+
+        if (storageOverride != EbsNone) {
+            if (createBlock) {
+                // Remap block storage
+
+                qualifier.setBlockStorage(storageOverride);
+
+                // check that the change didn't create errors
+                blockQualifierCheck(loc, qualifier, false);
+            }
+
+            // remap meber storage as well
+            memberType.getQualifier().setBlockStorage(storageOverride);
+        }
+    }
+}
+
+const char* TParseContext::getGlobalUniformBlockName() const
+{
+    const char* name = intermediate.getGlobalUniformBlockName();
+    if (std::string(name) == "")
+        return "gl_DefaultUniformBlock";
+    else
+        return name;
+}
+void TParseContext::finalizeGlobalUniformBlockLayout(TVariable&)
+{
+}
+void TParseContext::setUniformBlockDefaults(TType& block) const
+{
+    block.getQualifier().layoutPacking = ElpStd140;
+    block.getQualifier().layoutMatrix = ElmColumnMajor;
+}
+
+
+const char* TParseContext::getAtomicCounterBlockName() const
+{
+    const char* name = intermediate.getAtomicCounterBlockName();
+    if (std::string(name) == "")
+        return "gl_AtomicCounterBlock";
+    else
+        return name;
+}
+void TParseContext::finalizeAtomicCounterBlockLayout(TVariable&)
+{
+}
+
+void TParseContext::setAtomicCounterBlockDefaults(TType& block) const
+{
+    block.getQualifier().layoutPacking = ElpStd430;
+    block.getQualifier().layoutMatrix = ElmRowMajor;
+}
+
 void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
 {
 #ifndef GLSLANG_WEB
@@ -1135,6 +1237,14 @@
 {
     TIntermTyped* result = nullptr;
 
+    if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) {
+        // allow calls that are invalid in Vulkan Semantics to be invisibily
+        // remapped to equivalent valid functions
+        result = vkRelaxedRemapFunctionCall(loc, function, arguments);
+        if (result)
+            return result;
+    }
+
     if (function->getBuiltInOp() == EOpArrayLength)
         result = handleLengthMethod(loc, function, arguments);
     else if (function->getBuiltInOp() != EOpNull) {
@@ -1727,6 +1837,7 @@
     // Grab the semantics and storage class semantics from the operands, based on opcode
     switch (callNode.getOp()) {
     case EOpAtomicAdd:
+    case EOpAtomicSubtract:
     case EOpAtomicMin:
     case EOpAtomicMax:
     case EOpAtomicAnd:
@@ -1985,7 +2096,13 @@
             profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
             requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
         }
-
+        // As per GL_ARB_sparse_texture2 extension "Offsets" parameter must be constant integral expression
+        // for sparseTextureGatherOffsetsARB just as textureGatherOffsets
+        if (callNode.getOp() == EOpSparseTextureGatherOffsets) {
+            int offsetsArg = arg0->getType().getSampler().shadow ? 3 : 2;
+            if (!(*argp)[offsetsArg]->getAsConstantUnion())
+                error(loc, "argument must be compile-time constant", "offsets", "");
+        }
         break;
     }
 
@@ -2074,6 +2191,16 @@
                               "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
                 }
             }
+
+            if (callNode.getOp() == EOpTextureOffset) {
+                TSampler s = arg0->getType().getSampler();
+                if (s.is2D() && s.isArrayed() && s.isShadow()) {
+                    if (isEsProfile())
+                        error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile");
+                    else if (version <= 420)
+                        error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420");
+                }
+            }
         }
 
         break;
@@ -2176,6 +2303,7 @@
     }
 
     case EOpAtomicAdd:
+    case EOpAtomicSubtract:
     case EOpAtomicMin:
     case EOpAtomicMax:
     case EOpAtomicAnd:
@@ -2756,6 +2884,11 @@
     if (!(symNode && symNode->getQualifier().isWriteOnly())) // base class checks
         if (symNode && symNode->getQualifier().isExplicitInterpolation())
             error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str());
+
+    // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned. 
+    if(node->getQualifier().builtIn == EbvWorkGroupSize &&
+       !(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized()))
+        error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, "");
 }
 
 //
@@ -3383,7 +3516,7 @@
 
     if (type.containsNonOpaque()) {
         // Vulkan doesn't allow transparent uniforms outside of blocks
-        if (spvVersion.vulkan > 0)
+        if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
             vulkanRemoved(loc, "non-opaque uniforms outside a block");
         // OpenGL wants locations on these (unless they are getting automapped)
         if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations())
@@ -5014,14 +5147,22 @@
         return;
     }
     if (id == TQualifier::getLayoutPackingString(ElpPacked)) {
-        if (spvVersion.spv != 0)
-            spvRemoved(loc, "packed");
+        if (spvVersion.spv != 0) {
+            if (spvVersion.vulkanRelaxed)
+                return; // silently ignore qualifier
+            else
+                spvRemoved(loc, "packed");
+        }
         publicType.qualifier.layoutPacking = ElpPacked;
         return;
     }
     if (id == TQualifier::getLayoutPackingString(ElpShared)) {
-        if (spvVersion.spv != 0)
-            spvRemoved(loc, "shared");
+        if (spvVersion.spv != 0) {
+            if (spvVersion.vulkanRelaxed)
+                return; // silently ignore qualifier
+            else
+                spvRemoved(loc, "shared");
+        }
         publicType.qualifier.layoutPacking = ElpShared;
         return;
     }
@@ -5471,14 +5612,7 @@
         if (! IsPow2(value))
             error(loc, "must be a power of 2", "buffer_reference_align", "");
         else
-#ifdef __ANDROID__
-            // Android NDK r15c tageting ABI 15 doesn't have full support for C++11
-            // (no std::exp2/log2). ::exp2 is available from C99 but ::log2 isn't
-            // available up until ABI 18 so we use the mathematical equivalent form
-            publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)(std::log(value) / std::log(2.0));
-#else
-            publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)std::log2(value);
-#endif
+            publicType.qualifier.layoutBufferReferenceAlign = IntLog2(value);
         if (nonLiteral)
             error(loc, "needs a literal integer", "buffer_reference_align", "");
         return;
@@ -5769,6 +5903,8 @@
                     error(loc, "can only specify on a uniform block", "push_constant", "");
                 if (qualifier.isShaderRecord())
                     error(loc, "can only specify on a buffer block", "shaderRecordNV", "");
+                if (qualifier.hasLocation() && type.isAtomic())
+                    error(loc, "cannot specify on atomic counter", "location", "");
             }
             break;
         default:
@@ -5906,16 +6042,12 @@
         if (type.getBasicType() == EbtSampler) {
             int lastBinding = qualifier.layoutBinding;
             if (type.isArray()) {
-                if (spvVersion.vulkan > 0)
-                    lastBinding += 1;
-                else {
+                if (spvVersion.vulkan == 0) {
                     if (type.isSizedArray())
-                        lastBinding += type.getCumulativeArraySize();
+                        lastBinding += (type.getCumulativeArraySize() - 1);
                     else {
-                        lastBinding += 1;
 #ifndef GLSLANG_WEB
-                        if (spvVersion.vulkan == 0)
-                            warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
+                        warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
 #endif
                     }
                 }
@@ -5925,7 +6057,7 @@
                 error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
 #endif
         }
-        if (type.isAtomic()) {
+        if (type.isAtomic() && !spvVersion.vulkanRelaxed) {
             if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
                 error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", "");
                 return;
@@ -6302,8 +6434,11 @@
                                 extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64);
 
     if (isEsProfile())
-        function = (extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) ?
-                    findFunction120(loc, call, builtIn) : findFunctionExact(loc, call, builtIn);
+        function = (explicitTypesEnabled && version >= 310)
+                   ? findFunctionExplicitTypes(loc, call, builtIn)
+                   : ((extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310)
+                      ? findFunction120(loc, call, builtIn)
+                      : findFunctionExact(loc, call, builtIn));
     else if (version < 120)
         function = findFunctionExact(loc, call, builtIn);
     else if (version < 400)
@@ -6595,6 +6730,68 @@
     return bestMatch;
 }
 
+//
+// Adjust function calls that aren't declared in Vulkan to a
+// calls with equivalent effects
+//
+TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments)
+{
+    TIntermTyped* result = nullptr;
+
+#ifndef GLSLANG_WEB
+    if (function->getBuiltInOp() != EOpNull) {
+        return nullptr;
+    }
+
+    if (function->getName() == "atomicCounterIncrement") {
+        // change atomicCounterIncrement into an atomicAdd of 1
+        TString name("atomicAdd");
+        TType uintType(EbtUint);
+
+        TFunction realFunc(&name, function->getType());
+
+        for (int i = 0; i < function->getParamCount(); ++i) {
+            realFunc.addParameter((*function)[i]);
+        }
+
+        TParameter tmpP = { 0, &uintType };
+        realFunc.addParameter(tmpP);
+        arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true));
+
+        result = handleFunctionCall(loc, &realFunc, arguments);
+    } else if (function->getName() == "atomicCounterDecrement") {
+        // change atomicCounterDecrement into an atomicAdd with -1
+        // and subtract 1 from result, to return post-decrement value
+        TString name("atomicAdd");
+        TType uintType(EbtUint);
+
+        TFunction realFunc(&name, function->getType());
+
+        for (int i = 0; i < function->getParamCount(); ++i) {
+            realFunc.addParameter((*function)[i]);
+        }
+
+        TParameter tmpP = { 0, &uintType };
+        realFunc.addParameter(tmpP);
+        arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true));
+
+        result = handleFunctionCall(loc, &realFunc, arguments);
+
+        // post decrement, so that it matches AtomicCounterDecrement semantics
+        if (result) {
+            result = handleBinaryMath(loc, "-", EOpSub, result, intermediate.addConstantUnion(1, loc, true));
+        }
+    } else if (function->getName() == "atomicCounter") {
+        // change atomicCounter into a direct read of the variable
+        if (arguments->getAsTyped()) {
+            result = arguments->getAsTyped();
+        }
+    }
+#endif
+
+    return result;
+}
+
 // When a declaration includes a type, but not a variable name, it can be used
 // to establish defaults.
 void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType)
@@ -6619,6 +6816,91 @@
 #endif
 }
 
+bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&,
+    TArraySizes*, TIntermTyped* initializer, TType& type)
+{
+    if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() ||
+        type.getQualifier().storage != EvqUniform ||
+        !(type.containsNonOpaque()
+#ifndef GLSLANG_WEB
+            || type.getBasicType() == EbtAtomicUint
+#endif
+        )) {
+        return false;
+    }
+
+    if (type.getQualifier().hasLocation()) {
+        warn(loc, "ignoring layout qualifier for uniform", identifier.c_str(), "location");
+        type.getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
+    }
+
+    if (initializer) {
+        warn(loc, "Ignoring initializer for uniform", identifier.c_str(), "");
+        initializer = nullptr;
+    }
+
+    if (type.isArray()) {
+        // do array size checks here
+        arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false);
+
+        if (arrayQualifierError(loc, type.getQualifier()) || arrayError(loc, type)) {
+            error(loc, "array param error", identifier.c_str(), "");
+        }
+    }
+
+    // do some checking on the type as it was declared
+    layoutTypeCheck(loc, type);
+
+    int bufferBinding = TQualifier::layoutBindingEnd;
+    TVariable* updatedBlock = nullptr;
+
+#ifndef GLSLANG_WEB
+    // Convert atomic_uint into members of a buffer block
+    if (type.isAtomic()) {
+        type.setBasicType(EbtUint);
+        type.getQualifier().storage = EvqBuffer;
+
+        type.getQualifier().volatil = true;
+        type.getQualifier().coherent = true;
+
+        // xxTODO: use logic from fixOffset() to apply explicit member offset
+        bufferBinding = type.getQualifier().layoutBinding;
+        type.getQualifier().layoutBinding = TQualifier::layoutBindingEnd;
+        type.getQualifier().explicitOffset = false;
+        growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr);
+        updatedBlock = atomicCounterBuffers[bufferBinding];
+    }
+#endif
+
+    if (!updatedBlock) {
+        growGlobalUniformBlock(loc, type, identifier, nullptr);
+        updatedBlock = globalUniformBlock;
+    }
+
+    //
+    //      don't assign explicit member offsets here
+    //      if any are assigned, need to be updated here and in the merge/link step
+    // fixBlockUniformOffsets(updatedBlock->getWritableType().getQualifier(), *updatedBlock->getWritableType().getWritableStruct());
+
+    // checks on update buffer object
+    layoutObjectCheck(loc, *updatedBlock);
+
+    TSymbol* symbol = symbolTable.find(identifier);
+
+    if (!symbol) {
+        if (updatedBlock == globalUniformBlock)
+            error(loc, "error adding uniform to default uniform block", identifier.c_str(), "");
+        else
+            error(loc, "error adding atomic counter to atomic counter block", identifier.c_str(), "");
+        return false;
+    }
+
+    // merge qualifiers
+    mergeObjectLayoutQualifiers(updatedBlock->getWritableType().getQualifier(), type.getQualifier(), true);
+
+    return true;
+}
+
 //
 // Do everything necessary to handle a variable (non-block) declaration.
 // Either redeclaring a variable, or making a new one, updating the symbol
@@ -6730,6 +7012,14 @@
     if (symbol == nullptr)
         reservedErrorCheck(loc, identifier);
 
+    if (symbol == nullptr && spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+        bool remapped = vkRelaxedRemapUniformVariable(loc, identifier, publicType, arraySizes, initializer, type);
+
+        if (remapped) {
+            return nullptr;
+        }
+    }
+
     inheritGlobalDefaults(type.getQualifier());
 
     // Declare the variable
@@ -7622,6 +7912,8 @@
 void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName,
     TArraySizes* arraySizes)
 {
+    if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed)
+        blockStorageRemap(loc, blockName, currentBlockQualifier);
     blockStageIoCheck(loc, currentBlockQualifier);
     blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr);
     if (arraySizes != nullptr) {
@@ -7911,6 +8203,17 @@
     trackLinkage(variable);
 }
 
+//
+// allow storage type of block to be remapped at compile time
+//
+void TParseContext::blockStorageRemap(const TSourceLoc&, const TString* instanceName, TQualifier& qualifier)
+{
+    TBlockStorageClass type = intermediate.getBlockStorageOverride(instanceName->c_str());
+    if (type != EbsNone) {
+        qualifier.setBlockStorage(type);
+    }
+}
+
 // Do all block-declaration checking regarding the combination of in/out/uniform/buffer
 // with a particular stage.
 void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
@@ -8227,8 +8530,8 @@
 }
 
 //
-// Spread LayoutPacking to block member, if a  block member is a struct, we need spread LayoutPacking to
-// this struct member too. and keep this rule for recursive.
+// Spread LayoutPacking to matrix or aggregate block members. If a block member is a struct or
+// array of struct, spread LayoutPacking recursively to its matrix or aggregate members.
 //
 void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeList* originTypeList,
                                                  TTypeList* tmpTypeList)
@@ -8237,11 +8540,13 @@
     for (unsigned int member = 0; member < originTypeList->size(); ++member) {
         if (qualifier.layoutPacking != ElpNone) {
             if (tmpTypeList == nullptr) {
-                if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+                if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone &&
+                    !(*originTypeList)[member].type->isScalarOrVector()) {
                     (*originTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
                 }
             } else {
-                if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+                if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone &&
+                    !(*tmpTypeList)[member].type->isScalarOrVector()) {
                     (*tmpTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
                 }
             }
diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h
index ad9b8d6..6f00621 100644
--- a/glslang/MachineIndependent/ParseHelper.h
+++ b/glslang/MachineIndependent/ParseHelper.h
@@ -92,7 +92,8 @@
             limits(resources.limits),
             globalUniformBlock(nullptr),
             globalUniformBinding(TQualifier::layoutBindingEnd),
-            globalUniformSet(TQualifier::layoutSetEnd)
+            globalUniformSet(TQualifier::layoutSetEnd),
+            atomicCounterBlockSet(TQualifier::layoutSetEnd)
     {
         if (entryPoint != nullptr)
             sourceEntryPointName = *entryPoint;
@@ -154,10 +155,11 @@
             extensionCallback(line, extension, behavior);
     }
 
-#ifdef ENABLE_HLSL
     // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL)
     virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
-#endif
+
+    // Manage global buffer (used for backing atomic counters in GLSL when using relaxed Vulkan semantics)
+    virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
 
     // Potentially rename shader entry point function
     void renameShaderFunction(TString*& name) const
@@ -230,7 +232,24 @@
     // override this to set the language-specific name
     virtual const char* getGlobalUniformBlockName() const { return ""; }
     virtual void setUniformBlockDefaults(TType&) const { }
-    virtual void finalizeGlobalUniformBlockLayout(TVariable&) { }
+    virtual void finalizeGlobalUniformBlockLayout(TVariable&) {}
+
+    // Manage the atomic counter block (used for atomic_uints with Vulkan-Relaxed)
+    TMap<int, TVariable*> atomicCounterBuffers;
+    unsigned int atomicCounterBlockSet;
+    TMap<int, int> atomicCounterBlockFirstNewMember;
+    // override this to set the language-specific name
+    virtual const char* getAtomicCounterBlockName() const { return ""; }
+    virtual void setAtomicCounterBlockDefaults(TType&) const {}
+    virtual void finalizeAtomicCounterBlockLayout(TVariable&) {}
+    bool isAtomicCounterBlock(const TSymbol& symbol) {
+        const TVariable* var = symbol.getAsVariable();
+        if (!var)
+            return false;
+        const auto& at = atomicCounterBuffers.find(var->getType().getQualifier().layoutBinding);
+        return (at != atomicCounterBuffers.end() && (*at).second->getType() == var->getType());
+    }
+
     virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
                                const char* szExtraInfoFormat, TPrefixType prefix,
                                va_list args);
@@ -293,6 +312,9 @@
     bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override;
     void parserError(const char* s);     // for bison's yyerror
 
+    virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
+    virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
+
     void reservedErrorCheck(const TSourceLoc&, const TString&);
     void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) override;
     bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) override;
@@ -340,6 +362,10 @@
     void checkPrecisionQualifier(const TSourceLoc&, TPrecisionQualifier);
     void memorySemanticsCheck(const TSourceLoc&, const TFunction&, const TIntermOperator& callNode);
 
+    TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
+    // returns true if the variable was remapped to something else
+    bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&);
+
     void assignError(const TSourceLoc&, const char* op, TString left, TString right);
     void unaryOpError(const TSourceLoc&, const char* op, TString operand);
     void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
@@ -417,6 +443,7 @@
     TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
     void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
     void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
+    void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
     void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
     void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
     void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
@@ -461,6 +488,14 @@
     void finish() override;
 #endif
 
+    virtual const char* getGlobalUniformBlockName() const override;
+    virtual void finalizeGlobalUniformBlockLayout(TVariable&) override;
+    virtual void setUniformBlockDefaults(TType& block) const override;
+
+    virtual const char* getAtomicCounterBlockName() const override;
+    virtual void finalizeAtomicCounterBlockLayout(TVariable&) override;
+    virtual void setAtomicCounterBlockDefaults(TType& block) const override;
+
 public:
     //
     // Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access
diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp
index 3f793a7..d02eae6 100644
--- a/glslang/MachineIndependent/ShaderLang.cpp
+++ b/glslang/MachineIndependent/ShaderLang.cpp
@@ -159,7 +159,7 @@
     return index;
 }
 
-const int SpvVersionCount = 3;  // index range in MapSpvVersionToIndex
+const int SpvVersionCount = 4;  // index range in MapSpvVersionToIndex
 
 int MapSpvVersionToIndex(const SpvVersion& spvVersion)
 {
@@ -167,8 +167,12 @@
 
     if (spvVersion.openGl > 0)
         index = 1;
-    else if (spvVersion.vulkan > 0)
-        index = 2;
+    else if (spvVersion.vulkan > 0) {
+        if (!spvVersion.vulkanRelaxed)
+            index = 2;
+        else
+            index = 3;
+    }
 
     assert(index < SpvVersionCount);
 
@@ -723,6 +727,7 @@
                 break;
             case EShClientVulkan:
                 spvVersion.vulkanGlsl = environment->input.dialectVersion;
+                spvVersion.vulkanRelaxed = environment->input.vulkanRulesRelaxed;
                 break;
             case EShClientOpenGL:
                 spvVersion.openGl = environment->input.dialectVersion;
@@ -1762,6 +1767,7 @@
     // clear environment (avoid constructors in them for use in a C interface)
     environment.input.languageFamily = EShSourceNone;
     environment.input.dialect = EShClientNone;
+    environment.input.vulkanRulesRelaxed = false;
     environment.client.client = EShClientNone;
     environment.target.language = EShTargetNone;
     environment.target.hlslFunctionality1 = false;
@@ -1868,6 +1874,15 @@
 void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
 #endif
 
+void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); }
+
+void TShader::setGlobalUniformBlockName(const char* name) { intermediate->setGlobalUniformBlockName(name); }
+void TShader::setGlobalUniformSet(unsigned int set) { intermediate->setGlobalUniformSet(set); }
+void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setGlobalUniformBinding(binding); }
+
+void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); }
+void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); }
+
 #ifdef ENABLE_HLSL
 // See comment above TDefaultHlslIoMapper in iomapper.cpp:
 void TShader::setHlslIoMapping(bool hlslIoMap)          { intermediate->setHlslIoMapping(hlslIoMap); }
@@ -1983,7 +1998,10 @@
             error = true;
     }
 
-    // TODO: Link: cross-stage error checking
+    if (!error) {
+        if (! crossStageCheck(messages))
+            error = true;
+    }
 
     return ! error;
 }
@@ -2060,6 +2078,69 @@
     return intermediate[stage]->getNumErrors() == 0;
 }
 
+//
+// Check that there are no errors in linker objects accross stages
+//
+// Return true if no errors.
+//
+bool TProgram::crossStageCheck(EShMessages) {
+
+    // make temporary intermediates to hold the linkage symbols for each linking interface
+    // while we do the checks
+    // Independent interfaces are:
+    //                  all uniform variables and blocks
+    //                  all buffer blocks
+    //                  all in/out on a stage boundary
+
+    TVector<TIntermediate*> activeStages;
+    for (int s = 0; s < EShLangCount; ++s) {
+        if (intermediate[s])
+            activeStages.push_back(intermediate[s]);
+    }
+
+    // no extra linking if there is only one stage
+    if (! (activeStages.size() > 1))
+        return true;
+
+    // setup temporary tree to hold unfirom objects from different stages
+    TIntermediate* firstIntermediate = activeStages.front();
+    TIntermediate uniforms(EShLangCount,
+                           firstIntermediate->getVersion(),
+                           firstIntermediate->getProfile());
+    uniforms.setSpv(firstIntermediate->getSpv());
+
+    TIntermAggregate uniformObjects(EOpLinkerObjects);
+    TIntermAggregate root(EOpSequence);
+    root.getSequence().push_back(&uniformObjects);
+    uniforms.setTreeRoot(&root);
+
+    bool error = false;
+
+    // merge uniforms from all stages into a single intermediate
+    for (unsigned int i = 0; i < activeStages.size(); ++i) {
+        uniforms.mergeUniformObjects(*infoSink, *activeStages[i]);
+    }
+    error |= uniforms.getNumErrors() != 0;
+
+    // copy final definition of global block back into each stage
+    for (unsigned int i = 0; i < activeStages.size(); ++i) {
+        // We only want to merge into already existing global uniform blocks.
+        // A stage that doesn't already know about the global doesn't care about it's content.
+        // Otherwise we end up pointing to the same object between different stages
+        // and that will break binding/set remappings
+        bool mergeExistingOnly = true;
+        activeStages[i]->mergeGlobalUniformBlocks(*infoSink, uniforms, mergeExistingOnly);
+    }
+
+    // compare cross stage symbols for each stage boundary
+    for (unsigned int i = 1; i < activeStages.size(); ++i) {
+        activeStages[i - 1]->checkStageIO(*infoSink, *activeStages[i]);
+        error |= (activeStages[i - 1]->getNumErrors() != 0);
+    }
+
+    return !error;
+}
+
 const char* TProgram::getInfoLog()
 {
     return infoSink->info.c_str();
diff --git a/glslang/MachineIndependent/SymbolTable.h b/glslang/MachineIndependent/SymbolTable.h
index 54c3ca5..152dc47 100644
--- a/glslang/MachineIndependent/SymbolTable.h
+++ b/glslang/MachineIndependent/SymbolTable.h
@@ -698,7 +698,7 @@
     void amendSymbolIdLevel(TSymbol& symbol)
     {
         // clamp level to avoid overflow
-        uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
+        uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
         uint64_t symbolId = symbol.getUniqueId();
         symbolId &= uniqueIdMask;
         symbolId |= (level << LevelFlagBitOffset);
@@ -889,7 +889,7 @@
     // Add current level in the high-bits of unique id
     void updateUniqueIdLevelFlag() {
         // clamp level to avoid overflow
-        uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
+        uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
         uniqueId &= uniqueIdMask;
         uniqueId |= (level << LevelFlagBitOffset);
     }
diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp
index 488c98c..94fe1ab 100644
--- a/glslang/MachineIndependent/Versions.cpp
+++ b/glslang/MachineIndependent/Versions.cpp
@@ -170,7 +170,7 @@
     for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
         // Add only extensions which require > spv1.0 to save space in map
         if (exts[ii].minSpvVersion > EShTargetSpv_1_0) {
-            extensionMinSpv[E_GL_EXT_ray_tracing] = exts[ii].minSpvVersion;
+            extensionMinSpv[exts[ii].extensionName] = exts[ii].minSpvVersion;
         }
     }
 
@@ -875,7 +875,7 @@
     checkExtensionStage(getCurrentLoc(), extension);
 
     // check if extension has additional requirements
-    extensionRequires(getCurrentLoc(), extension ,behaviorString);
+    extensionRequires(getCurrentLoc(), extension, behaviorString);
 
     // update the requested extension
     updateExtensionBehavior(extension, behavior);
@@ -1273,7 +1273,7 @@
 // Call for any operation removed because Vulkan SPIR-V is being generated.
 void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
 {
-    if (spvVersion.vulkan > 0)
+    if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
         error(loc, "not allowed when using GLSL for Vulkan", op, "");
 }
 
diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h
index f377973..25feb0b 100644
--- a/glslang/MachineIndependent/Versions.h
+++ b/glslang/MachineIndependent/Versions.h
@@ -87,11 +87,12 @@
 // The union of all requested rule sets will be applied.
 //
 struct SpvVersion {
-    SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {}
+    SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0), vulkanRelaxed(false) {}
     unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header
     int vulkanGlsl;   // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX"
     int vulkan;       // the version of Vulkan, for which SPIR-V execution environment rules to use
     int openGl;       // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX"
+    bool vulkanRelaxed; // relax changes to GLSL for Vulkan, allowing some GL-specific to be compiled to Vulkan SPIR-V target
 };
 
 //
diff --git a/glslang/MachineIndependent/gl_types.h b/glslang/MachineIndependent/gl_types.h
index b9372d4..d6c9393 100644
--- a/glslang/MachineIndependent/gl_types.h
+++ b/glslang/MachineIndependent/gl_types.h
@@ -49,9 +49,9 @@
 #define GL_INT64_VEC4_ARB                 0x8FEB
 
 #define GL_UNSIGNED_INT64_ARB             0x140F
-#define GL_UNSIGNED_INT64_VEC2_ARB        0x8FE5
-#define GL_UNSIGNED_INT64_VEC3_ARB        0x8FE6
-#define GL_UNSIGNED_INT64_VEC4_ARB        0x8FE7
+#define GL_UNSIGNED_INT64_VEC2_ARB        0x8FF5
+#define GL_UNSIGNED_INT64_VEC3_ARB        0x8FF6
+#define GL_UNSIGNED_INT64_VEC4_ARB        0x8FF7
 #define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1
 #define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2
 #define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3
diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp
index 5ce3e47..c718f94 100644
--- a/glslang/MachineIndependent/intermOut.cpp
+++ b/glslang/MachineIndependent/intermOut.cpp
@@ -886,6 +886,7 @@
     case EOpTime:                       out.debug << "time";                  break;
 
     case EOpAtomicAdd:                  out.debug << "AtomicAdd";             break;
+    case EOpAtomicSubtract:             out.debug << "AtomicSubtract";        break;
     case EOpAtomicMin:                  out.debug << "AtomicMin";             break;
     case EOpAtomicMax:                  out.debug << "AtomicMax";             break;
     case EOpAtomicAnd:                  out.debug << "AtomicAnd";             break;
diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp
index c42e74f..7e12864 100644
--- a/glslang/MachineIndependent/iomapper.cpp
+++ b/glslang/MachineIndependent/iomapper.cpp
@@ -210,8 +210,8 @@
         ent.newIndex = -1;
         const bool isValid = resolver.validateBinding(stage, ent);
         if (isValid) {
-            resolver.resolveBinding(ent.stage, ent);
             resolver.resolveSet(ent.stage, ent);
+            resolver.resolveBinding(ent.stage, ent);
             resolver.resolveUniformLocation(ent.stage, ent);
 
             if (ent.newBinding != -1) {
@@ -317,15 +317,13 @@
 };
 
 // The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings
+// xxTODO: maybe this logic should be moved into the resolver's "validateInOut" and "validateUniform"
 
 struct TSymbolValidater
 {
     TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount],
                      TVarLiveMap* uniform[EShLangCount], bool& hadError, EProfile profile, int version)
-        : preStage(EShLangCount)
-        , currentStage(EShLangCount)
-        , nextStage(EShLangCount)
-        , resolver(r)
+        : resolver(r)
         , infoSink(i)
         , hadError(hadError)
         , profile(profile)
@@ -438,17 +436,23 @@
         TIntermSymbol* base = ent1.symbol;
         const TType& type = ent1.symbol->getType();
         const TString& name = entKey.first;
-        EShLanguage stage = ent1.stage;
         TString mangleName1, mangleName2;
-        if (currentStage != stage) {
-            preStage = currentStage;
-            currentStage = stage;
-            nextStage = EShLangCount;
-            for (int i = currentStage + 1; i < EShLangCount; i++) {
-                if (inVarMaps[i] != nullptr) {
-                    nextStage = static_cast<EShLanguage>(i);
-                    break;
-                }
+        EShLanguage stage = ent1.stage;
+        EShLanguage preStage, currentStage, nextStage;
+
+        preStage = EShLangCount;
+        for (int i = stage - 1; i >= 0; i--) {
+            if (inVarMaps[i] != nullptr) {
+                preStage = static_cast<EShLanguage>(i);
+                break;
+            }
+        }
+        currentStage = stage;
+        nextStage = EShLangCount;
+        for (int i = stage + 1; i < EShLangCount; i++) {
+            if (inVarMaps[i] != nullptr) {
+                nextStage = static_cast<EShLanguage>(i);
+                break;
             }
         }
 
@@ -459,6 +463,9 @@
             type.appendMangledName(mangleName1);
         }
 
+
+        // basic checking that symbols match
+        // more extensive checking in the link stage
         if (base->getQualifier().storage == EvqVaryingIn) {
             // validate stage in;
             if (preStage == EShLangCount)
@@ -484,8 +491,7 @@
                     if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) {
                         TType subType(ent2->second.symbol->getType(), 0);
                         subType.appendMangledName(mangleName2);
-                    }
-                    else {
+                    } else {
                         ent2->second.symbol->getType().appendMangledName(mangleName2);
                     }
 
@@ -536,8 +542,7 @@
                     if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) {
                         TType subType(ent2->second.symbol->getType(), 0);
                         subType.appendMangledName(mangleName2);
-                    }
-                    else {
+                    } else {
                         ent2->second.symbol->getType().appendMangledName(mangleName2);
                     }
                     if (mangleName1 == mangleName2)
@@ -550,7 +555,7 @@
                 }
                 return;
             }
-        } else if (base->getQualifier().isUniformOrBuffer() && ! base->getQualifier().isPushConstant()) {
+        } else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) {
             // validate uniform type;
             for (int i = 0; i < EShLangCount; i++) {
                 if (i != currentStage && outVarMaps[i] != nullptr) {
@@ -558,6 +563,7 @@
                     if (ent2 != uniformVarMap[i]->end()) {
                         ent2->second.symbol->getType().appendMangledName(mangleName2);
                         if (mangleName1 != mangleName2) {
+                            ent2->second.symbol->getType().sameElementType(type);
                             TString err = "Invalid Uniform variable type : " + entKey.first;
                             infoSink.info.message(EPrefixInternalError, err.c_str());
                             hadError = true;
@@ -608,8 +614,7 @@
     }
 
     TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount];
-    // Use for mark pre stage, to get more interface symbol information.
-    EShLanguage preStage, currentStage, nextStage;
+
     // Use for mark current shader stage for resolver
     TIoMapResolver& resolver;
     TInfoSink& infoSink;
@@ -749,14 +754,18 @@
     , nextOutputLocation(0)
 {
     memset(stageMask, false, sizeof(bool) * (EShLangCount + 1));
+    memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount));
+    stageIntermediates[intermediate.getStage()] = &intermediate;
 }
 
-int TDefaultIoResolverBase::getBaseBinding(TResourceType res, unsigned int set) const {
-    return selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
+int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const {
+    return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set))
+                                     : selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
 }
 
-const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding() const {
-    return intermediate.getResourceSetBinding();
+const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const {
+    return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding()
+                                     : intermediate.getResourceSetBinding();
 }
 
 bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
@@ -797,14 +806,14 @@
     return reserveSlot(set, base, size);
 }
 
-int TDefaultIoResolverBase::resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+int TDefaultIoResolverBase::resolveSet(EShLanguage stage, TVarEntryInfo& ent) {
     const TType& type = ent.symbol->getType();
     if (type.getQualifier().hasSet()) {
         return ent.newSet = type.getQualifier().layoutSet;
     }
     // If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN)
-    if (getResourceSetBinding().size() == 1) {
-        return ent.newSet = atoi(getResourceSetBinding()[0].c_str());
+    if (getResourceSetBinding(stage).size() == 1) {
+        return ent.newSet = atoi(getResourceSetBinding(stage)[0].c_str());
     }
     return ent.newSet = 0;
 }
@@ -925,7 +934,7 @@
         preStage = currentStage;
         currentStage = stage;
     }
-    // kick out of not doing this
+    // kick out if not doing this
     if (! doAutoLocationMapping()) {
         return ent.newLocation = -1;
     }
@@ -1073,7 +1082,7 @@
     return ent.newLocation = location;
 }
 
-int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent) {
     const TType& type = ent.symbol->getType();
     const TString& name = ent.symbol->getAccessName();
     // On OpenGL arrays of opaque types take a separate binding for each element
@@ -1086,30 +1095,32 @@
     // There is no 'set' qualifier in OpenGL shading language, each resource has its own
     // binding name space, so remap the 'set' to resource type which make each resource
     // binding is valid from 0 to MAX_XXRESOURCE_BINDINGS
-    int set = resource;
+    int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet;
+    int resourceKey = set;
     if (resource < EResCount) {
         if (type.getQualifier().hasBinding()) {
-            ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
-            return ent.newBinding;
-        } else if (ent.live && doAutoBindingMapping()) {
+            int newBinding = reserveSlot(resourceKey, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
+            return ent.newBinding = newBinding;
+
+        } else {
             // The resource in current stage is not declared with binding, but it is possible declared
             // with explicit binding in other stages, find the resourceSlotMap firstly to check whether
             // the resource has binding, don't need to allocate if it already has a binding
             bool hasBinding = false;
-            if (! resourceSlotMap[resource].empty()) {
-                TVarSlotMap::iterator iter = resourceSlotMap[resource].find(name);
-                if (iter != resourceSlotMap[resource].end()) {
+            ent.newBinding = -1; // leave as -1 if it isn't set below
+
+            if (! resourceSlotMap[resourceKey].empty()) {
+                TVarSlotMap::iterator iter = resourceSlotMap[resourceKey].find(name);
+                if (iter != resourceSlotMap[resourceKey].end()) {
                     hasBinding = true;
                     ent.newBinding = iter->second;
                 }
             }
-            if (! hasBinding) {
-                TVarSlotMap varSlotMap;
+            if (!hasBinding && (ent.live && doAutoBindingMapping())) {
                 // find free slot, the caller did make sure it passes all vars with binding
                 // first and now all are passed that do not have a binding and needs one
-                int binding = getFreeSlot(resource, getBaseBinding(resource, set), numBindings);
-                varSlotMap[name] = binding;
-                resourceSlotMap[resource] = varSlotMap;
+                int binding = getFreeSlot(resourceKey, getBaseBinding(stage, resource, set), numBindings);
+                resourceSlotMap[resourceKey][name] = binding;
                 ent.newBinding = binding;
             }
             return ent.newBinding;
@@ -1211,16 +1222,20 @@
 void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
     const TType& type = ent.symbol->getType();
     const TString& name = ent.symbol->getAccessName();
-    int resource = getResourceType(type);
+    TResourceType resource = getResourceType(type);
+    int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent);
+    int resourceKey = set;
+
     if (type.getQualifier().hasBinding()) {
-        TVarSlotMap& varSlotMap = resourceSlotMap[resource];
+        TVarSlotMap& varSlotMap = resourceSlotMap[resourceKey];
         TVarSlotMap::iterator iter = varSlotMap.find(name);
-        int binding = type.getQualifier().layoutBinding;
+        int binding = type.getQualifier().layoutBinding + getBaseBinding(ent.stage, resource, set);
+
         if (iter == varSlotMap.end()) {
             // Reserve the slots for the ubo, ssbo and opaques who has explicit binding
-            int numBindings = type.isSizedArray() ? type.getCumulativeArraySize() : 1;
+            int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
             varSlotMap[name] = binding;
-            reserveSlot(resource, binding, numBindings);
+            reserveSlot(resourceKey, binding, numBindings);
         } else {
             // Allocate binding by name for OpenGL driver, so the resource in different
             // stages should be declared with the same binding
@@ -1269,7 +1284,7 @@
         return EResCount;
     }
 
-    int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
+    int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
         const TType& type = ent.symbol->getType();
         const int set = getLayoutSet(type);
         // On OpenGL arrays of opaque types take a seperate binding for each element
@@ -1278,11 +1293,11 @@
         if (resource < EResCount) {
             if (type.getQualifier().hasBinding()) {
                 return ent.newBinding = reserveSlot(
-                           set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
+                           set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
             } else if (ent.live && doAutoBindingMapping()) {
                 // find free slot, the caller did make sure it passes all vars with binding
                 // first and now all are passed that do not have a binding and needs one
-                return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set), numBindings);
+                return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set), numBindings);
             }
         }
         return ent.newBinding = -1;
@@ -1354,17 +1369,17 @@
         return EResCount;
     }
 
-    int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
+    int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
         const TType& type = ent.symbol->getType();
         const int set = getLayoutSet(type);
         TResourceType resource = getResourceType(type);
         if (resource < EResCount) {
             if (type.getQualifier().hasBinding()) {
-                return ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding);
+                return ent.newBinding = reserveSlot(set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding);
             } else if (ent.live && doAutoBindingMapping()) {
                 // find free slot, the caller did make sure it passes all vars with binding
                 // first and now all are passed that do not have a binding and needs one
-                return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set));
+                return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set));
             }
         }
         return ent.newBinding = -1;
@@ -1403,10 +1418,10 @@
         else
             resolver = &defaultResolver;
     }
-    resolver->addStage(stage);
 #else
     resolver = &defaultResolver;
 #endif
+    resolver->addStage(stage, intermediate);
 
     TVarLiveMap inVarMap, outVarMap, uniformVarMap;
     TVarLiveVector inVector, outVector, uniformVector;
@@ -1502,10 +1517,21 @@
     }
     // if no resolver is provided, use the default resolver with the given shifts and auto map settings
     TDefaultGlslIoResolver defaultResolver(intermediate);
+#ifdef ENABLE_HLSL
+    TDefaultHlslIoResolver defaultHlslResolver(intermediate);
+    if (resolver == nullptr) {
+        // TODO: use a passed in IO mapper for this
+        if (intermediate.usingHlslIoMapping())
+            resolver = &defaultHlslResolver;
+        else
+            resolver = &defaultResolver;
+    }
+#else
     if (resolver == nullptr) {
         resolver = &defaultResolver;
     }
-    resolver->addStage(stage);
+#endif
+    resolver->addStage(stage, intermediate);
     inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap();
     TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage],
                                          *uniformVarMap[stage]);
@@ -1547,15 +1573,51 @@
         TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError);
         TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps,
                                          outVarMaps, uniformVarMap, hadError, profile, version);
+
+        TVarLiveVector inVectors[EShLangCount];
+        TVarLiveVector outVectors[EShLangCount];
         TVarLiveVector uniformVector;
+
         resolver->beginResolve(EShLangCount);
         for (int stage = EShLangVertex; stage < EShLangCount; stage++) {
             if (inVarMaps[stage] != nullptr) {
                 inOutResolve.setStage(EShLanguage(stage));
-                for (auto& var : *(inVarMaps[stage])) { symbolValidater(var); }
-                for (auto& var : *(inVarMaps[stage])) { inOutResolve(var); }
-                for (auto& var : *(outVarMaps[stage])) { symbolValidater(var); }
-                for (auto& var : *(outVarMaps[stage])) { inOutResolve(var); }
+
+                // copy vars into a sorted list
+                std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(),
+                        [&inVectors, stage](TVarLivePair p) { inVectors[stage].push_back(p); });
+                std::sort(inVectors[stage].begin(), inVectors[stage].end(),
+                        [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+                            return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+                });
+
+                std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(),
+                        [&outVectors, stage](TVarLivePair p) { outVectors[stage].push_back(p); });
+                std::sort(outVectors[stage].begin(), outVectors[stage].end(),
+                        [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+                            return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+                });
+
+                for (auto& var : inVectors[stage]) { symbolValidater(var); }
+                for (auto& var : inVectors[stage]) { inOutResolve(var); }
+                for (auto& var : outVectors[stage]) { symbolValidater(var); }
+                for (auto& var : outVectors[stage]) { inOutResolve(var); }
+
+                // copy results back into maps
+                std::for_each(inVectors[stage].begin(), inVectors[stage].end(),
+                    [this, stage](TVarLivePair p) {
+                        auto at = inVarMaps[stage]->find(p.first);
+                        if (at != inVarMaps[stage]->end())
+                            at->second = p.second;
+                });
+
+                std::for_each(outVectors[stage].begin(), outVectors[stage].end(),
+                    [this, stage](TVarLivePair p) {
+                        auto at = outVarMaps[stage]->find(p.first);
+                        if (at != outVarMaps[stage]->end())
+                            at->second = p.second;
+                });
+
             }
             if (uniformVarMap[stage] != nullptr) {
                 uniformResolve.setStage(EShLanguage(stage));
@@ -1563,7 +1625,7 @@
             }
         }
         std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
-            return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+            return TVarEntryInfo::TOrderByPriorityAndLive()(p1.second, p2.second);
         });
         for (auto& var : uniformVector) { symbolValidater(var); }
         for (auto& var : uniformVector) { uniformResolve(var); }
diff --git a/glslang/MachineIndependent/iomapper.h b/glslang/MachineIndependent/iomapper.h
index 1dce8ff..07357c2 100644
--- a/glslang/MachineIndependent/iomapper.h
+++ b/glslang/MachineIndependent/iomapper.h
@@ -87,6 +87,35 @@
             return lPoints > rPoints;
         }
     };
+
+    struct TOrderByPriorityAndLive {
+        // ordering:
+        // 1) do live variables first
+        // 2) has both binding and set
+        // 3) has binding but no set
+        // 4) has no binding but set
+        // 5) has no binding and no set
+        inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) {
+
+            const TQualifier& lq = l.symbol->getQualifier();
+            const TQualifier& rq = r.symbol->getQualifier();
+
+            // simple rules:
+            // has binding gives 2 points
+            // has set gives 1 point
+            // who has the most points is more important.
+            int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0);
+            int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0);
+
+            if (l.live != r.live)
+                return l.live > r.live;
+
+            if (lPoints != rPoints)
+                return lPoints > rPoints;
+
+            return l.id < r.id;
+        }
+    };
 };
 
 // Base class for shared TIoMapResolver services, used by several derivations.
@@ -107,8 +136,8 @@
     void endCollect(EShLanguage) override {}
     void reserverResourceSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
     void reserverStorageSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
-    int getBaseBinding(TResourceType res, unsigned int set) const;
-    const std::vector<std::string>& getResourceSetBinding() const;
+    int getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const;
+    const std::vector<std::string>& getResourceSetBinding(EShLanguage stage) const;
     virtual TResourceType getResourceType(const glslang::TType& type) = 0;
     bool doAutoBindingMapping() const;
     bool doAutoLocationMapping() const;
@@ -122,9 +151,11 @@
     int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override;
     int resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
     int resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
-    void addStage(EShLanguage stage) override {
-        if (stage < EShLangCount)
+    void addStage(EShLanguage stage, TIntermediate& stageIntermediate) override {
+        if (stage < EShLangCount) {
             stageMask[stage] = true;
+            stageIntermediates[stage] = &stageIntermediate;
+        }
     }
     uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
 
@@ -139,6 +170,8 @@
     int nextInputLocation;
     int nextOutputLocation;
     bool stageMask[EShLangCount + 1];
+    const TIntermediate* stageIntermediates[EShLangCount];
+
     // Return descriptor set specific base if there is one, and the generic base otherwise.
     int selectBaseBinding(int base, int descriptorSetBase) const {
         return descriptorSetBase != -1 ? descriptorSetBase : base;
diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp
index 3f3a312..42b416d 100644
--- a/glslang/MachineIndependent/linkValidate.cpp
+++ b/glslang/MachineIndependent/linkValidate.cpp
@@ -90,6 +90,56 @@
 #endif
 }
 
+//
+// check that link objects between stages
+//
+void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit) {
+    if (unit.treeRoot == nullptr || treeRoot == nullptr)
+        return;
+
+    // Get the linker-object lists
+    TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
+    TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+    // filter unitLinkerObjects to only contain uniforms
+    auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+        [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform &&
+                                      node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; });
+    unitLinkerObjects.resize(end - unitLinkerObjects.begin());
+
+    // merge uniforms and do error checking
+    bool mergeExistingOnly = false;
+    mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly);
+    mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
+}
+
+//
+// do error checking on the shader boundary in / out vars 
+//
+void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
+    if (unit.treeRoot == nullptr || treeRoot == nullptr)
+        return;
+
+    // Get copies of the linker-object lists
+    TIntermSequence linkerObjects = findLinkerObjects()->getSequence();
+    TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+    // filter linkerObjects to only contain out variables
+    auto end = std::remove_if(linkerObjects.begin(), linkerObjects.end(),
+        [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingOut; });
+    linkerObjects.resize(end - linkerObjects.begin());
+
+    // filter unitLinkerObjects to only contain in variables
+    auto unitEnd = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+        [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingIn; });
+    unitLinkerObjects.resize(unitEnd - unitLinkerObjects.begin());
+
+    // do matching and error checking
+    mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
+
+    // TODO: final check; make sure that any statically used `in` have matching `out` written to
+}
+
 void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
 {
     if (unit.getNumEntryPoints() > 0) {
@@ -137,6 +187,7 @@
     MERGE_MAX(spvVersion.vulkanGlsl);
     MERGE_MAX(spvVersion.vulkan);
     MERGE_MAX(spvVersion.openGl);
+    MERGE_TRUE(spvVersion.vulkanRelaxed);
 
     numErrors += unit.getNumErrors();
     // Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant
@@ -312,7 +363,9 @@
     remapIds(idMaps, idShift + 1, unit);
 
     mergeBodies(infoSink, globals, unitGlobals);
-    mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
+    bool mergeExistingOnly = false;
+    mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly);
+    mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
     ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
 }
 
@@ -456,11 +509,193 @@
     globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1);
 }
 
+static inline bool isSameInterface(TIntermSymbol* symbol, EShLanguage stage, TIntermSymbol* unitSymbol, EShLanguage unitStage) {
+    return // 1) same stage and same shader interface
+        (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) ||
+        // 2) accross stages and both are uniform or buffer
+        (symbol->getQualifier().storage == EvqUniform  && unitSymbol->getQualifier().storage == EvqUniform) ||
+        (symbol->getQualifier().storage == EvqBuffer   && unitSymbol->getQualifier().storage == EvqBuffer) ||
+        // 3) in/out matched across stage boundary
+        (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut  && unitSymbol->getQualifier().storage == EvqVaryingIn) ||
+        (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut);
+}
+
+//
+// Global Unfiform block stores any default uniforms (i.e. uniforms without a block)
+// If two linked stages declare the same member, they are meant to be the same uniform
+// and need to be in the same block
+// merge the members of different stages to allow them to be linked properly
+// as a single block
+//
+void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly)
+{
+    TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
+    TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+    // build lists of default blocks from the intermediates
+    TIntermSequence defaultBlocks;
+    TIntermSequence unitDefaultBlocks;
+
+    auto filter = [](TIntermSequence& list, TIntermNode* node) {
+        if (node->getAsSymbolNode()->getQualifier().defaultBlock) {
+            list.push_back(node);
+        }
+    };
+
+    std::for_each(linkerObjects.begin(), linkerObjects.end(),
+        [&defaultBlocks, &filter](TIntermNode* node) {
+            filter(defaultBlocks, node);
+        });
+    std::for_each(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+        [&unitDefaultBlocks, &filter](TIntermNode* node) {
+            filter(unitDefaultBlocks, node);
+    });
+
+    auto itUnitBlock = unitDefaultBlocks.begin();
+    for (; itUnitBlock != unitDefaultBlocks.end(); itUnitBlock++) {
+
+        bool add = !mergeExistingOnly;
+        auto itBlock = defaultBlocks.begin();
+
+        for (; itBlock != defaultBlocks.end(); itBlock++) {
+            TIntermSymbol* block = (*itBlock)->getAsSymbolNode();
+            TIntermSymbol* unitBlock = (*itUnitBlock)->getAsSymbolNode();
+
+            assert(block && unitBlock);
+
+            // if the two default blocks match, then merge their definitions
+            if (block->getType().getTypeName() == unitBlock->getType().getTypeName() &&
+                block->getQualifier().storage == unitBlock->getQualifier().storage) {
+                add = false;
+                mergeBlockDefinitions(infoSink, block, unitBlock, &unit);
+            }
+        }
+        if (add) {
+            // push back on original list; won't change the size of the list we're iterating over
+            linkerObjects.push_back(*itUnitBlock);
+        }
+    }
+}
+
+void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) {
+    if (block->getType() == unitBlock->getType()) {
+        return;
+    }
+
+    if (block->getType().getTypeName() != unitBlock->getType().getTypeName() ||
+        block->getType().getBasicType() != unitBlock->getType().getBasicType() ||
+        block->getQualifier().storage != unitBlock->getQualifier().storage ||
+        block->getQualifier().layoutSet != unitBlock->getQualifier().layoutSet) {
+        // different block names likely means different blocks
+        return;
+    }
+
+    // merge the struct
+    // order of declarations doesn't matter and they matched based on member name
+    TTypeList* memberList = block->getType().getWritableStruct();
+    TTypeList* unitMemberList = unitBlock->getType().getWritableStruct();
+
+    // keep track of which members have changed position
+    // so we don't have to search the array again
+    std::map<unsigned int, unsigned int> memberIndexUpdates;
+
+    size_t memberListStartSize = memberList->size();
+    for (unsigned int i = 0; i < unitMemberList->size(); ++i) {
+        bool merge = true;
+        for (unsigned int j = 0; j < memberListStartSize; ++j) {
+            if ((*memberList)[j].type->getFieldName() == (*unitMemberList)[i].type->getFieldName()) {
+                merge = false;
+                const TType* memberType = (*memberList)[j].type;
+                const TType* unitMemberType = (*unitMemberList)[i].type;
+
+                // compare types
+                // don't need as many checks as when merging symbols, since
+                // initializers and most qualifiers are stripped when the member is moved into the block
+                if ((*memberType) != (*unitMemberType)) {
+                    error(infoSink, "Types must match:");
+                    infoSink.info << "    " << memberType->getFieldName() << ": ";
+                    infoSink.info << "\"" << memberType->getCompleteString() << "\" versus ";
+                    infoSink.info << "\"" << unitMemberType->getCompleteString() << "\"\n";
+                }
+
+                memberIndexUpdates[i] = j;
+            }
+        }
+        if (merge) {
+            memberList->push_back((*unitMemberList)[i]);
+            memberIndexUpdates[i] = (unsigned int)memberList->size() - 1;
+        }
+    }
+
+    TType unitType;
+    unitType.shallowCopy(unitBlock->getType());
+
+    // update symbol node in unit tree,
+    // and other nodes that may reference it
+    class TMergeBlockTraverser : public TIntermTraverser {
+    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)
+        {
+            glslang::TType& symType = symbol->getWritableType();
+
+            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
+
+                // 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 bool visitBinary(TVisit, glslang::TIntermBinary* node)
+        {
+            if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) {
+                // this is a dereference to a member of the block since the
+                // member list changed, need to update this to point to the
+                // right index
+                assert(node->getRight()->getAsConstantUnion());
+
+                glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion();
+                unsigned int memberIdx = constNode->getConstArray()[0].getUConst();
+                unsigned int newIdx = memberIndexUpdates.at(memberIdx);
+                TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc());
+
+                node->setRight(newConstNode);
+                delete constNode;
+
+                return true;
+            }
+            return true;
+        }
+    } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates);
+
+    // update the tree to use the new type
+    unit->getTreeRoot()->traverse(&finalLinkTraverser);
+
+    // update the member list
+    (*unitMemberList) = (*memberList);
+}
+
 //
 // Merge the linker objects from unitLinkerObjects into linkerObjects.
 // Duplication is expected and filtered out, but contradictions are an error.
 //
-void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects)
+void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage unitStage)
 {
     // Error check and merge the linker objects (duplicates should not be created)
     std::size_t initialNumLinkerObjects = linkerObjects.size();
@@ -475,7 +710,7 @@
             // If they are both blocks in the same shader interface,
             // match by the block-name, not the identifier name.
             if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) {
-                if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) {
+                if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
                     isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName();
                 }
             }
@@ -495,18 +730,54 @@
                 if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding())
                     symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding;
 
+                // Similarly for location
+                if (!symbol->getQualifier().hasLocation() && unitSymbol->getQualifier().hasLocation()) {
+                    symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
+                }
+
                 // Update implicit array sizes
                 mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
 
                 // Check for consistent types/qualification/initializers etc.
-                mergeErrorCheck(infoSink, *symbol, *unitSymbol, false);
+                mergeErrorCheck(infoSink, *symbol, *unitSymbol, unitStage);
             }
             // If different symbols, verify they arn't push_constant since there can only be one per stage
-            else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant())
+            else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
                 error(infoSink, "Only one push_constant block is allowed per stage");
         }
-        if (merge)
+        if (merge) {
             linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
+
+            // for anonymous blocks, check that their members don't conflict with other names
+            if (unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getBasicType() == EbtBlock &&
+                IsAnonymous(unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getName())) {
+                for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) {
+                    TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
+                    TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
+                    assert(symbol && unitSymbol);
+
+                    auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
+                        for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
+                            if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
+                                error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
+                                infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
+                            }
+                        }
+                    };
+
+                    if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
+                        checkName(symbol->getName());
+
+                        // check members of other anonymous blocks
+                        if (symbol->getBasicType() == EbtBlock && IsAnonymous(symbol->getName())) {
+                            for (unsigned int i = 0; i < symbol->getType().getStruct()->size(); ++i) {
+                                checkName((*symbol->getType().getStruct())[i].type->getFieldName());
+                            }
+                        }
+                    }
+                }
+            }
+        }
     }
 }
 
@@ -538,26 +809,75 @@
 //
 // This function only does one of intra- or cross-stage matching per call.
 //
-void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
+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 writeTypeComparison = false;
 
     // Types have to match
-    if (symbol.getType() != unitSymbol.getType()) {
+    {
         // but, we make an exception if one is an implicit array and the other is sized
-        if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
-                symbol.getType().sameElementType(unitSymbol.getType()) &&
-                (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) {
-            error(infoSink, "Types must match:");
+        // or if the array sizes differ because of the extra array dimension on some in/out boundaries
+        bool arraysMatch = false;
+        if (isIoResizeArray(symbol.getType(), getStage()) || isIoResizeArray(unitSymbol.getType(), unitStage)) {
+            // if the arrays have an extra dimension because of the stage.
+            // compare dimensions while ignoring the outer dimension
+            unsigned int firstDim = isIoResizeArray(symbol.getType(), getStage()) ? 1 : 0;
+            unsigned int numDim = symbol.getArraySizes()
+                ? symbol.getArraySizes()->getNumDims() : 0;
+            unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0;
+            unsigned int unitNumDim = unitSymbol.getArraySizes()
+                ? unitSymbol.getArraySizes()->getNumDims() : 0;
+            arraysMatch = (numDim - firstDim) == (unitNumDim - unitFirstDim);
+            // check that array sizes match as well
+            for (unsigned int i = 0; i < (numDim - firstDim) && arraysMatch; i++) {
+                if (symbol.getArraySizes()->getDimSize(firstDim + i) !=
+                    unitSymbol.getArraySizes()->getDimSize(unitFirstDim + i)) {
+                    arraysMatch = false;
+                    break;
+                }
+            }
+        }
+        else {
+            arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
+                (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
+                (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
+        }
+
+        if (!symbol.getType().sameElementType(unitSymbol.getType()) ||
+            !symbol.getType().sameTypeParameters(unitSymbol.getType()) ||
+            !arraysMatch ) {
             writeTypeComparison = true;
+            error(infoSink, "Types must match:");
         }
     }
 
-    // Qualifiers have to (almost) match
+    // Interface block  member-wise layout qualifiers have to match
+    if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
+        symbol.getType().getStruct() && unitSymbol.getType().getStruct() &&
+        symbol.getType().sameStructType(unitSymbol.getType())) {
+        for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) {
+            const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier();
+            const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].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 isInOut = crossStage &&
+                   ((symbol.getQualifier().storage == EvqVaryingIn && unitSymbol.getQualifier().storage == EvqVaryingOut) ||
+                   (symbol.getQualifier().storage == EvqVaryingOut && unitSymbol.getQualifier().storage == EvqVaryingIn));
+
+    // Qualifiers have to (almost) match
     // Storage...
-    if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
+    if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
         error(infoSink, "Storage qualifiers must match:");
         writeTypeComparison = true;
     }
@@ -579,7 +899,7 @@
     }
 
     // Precision...
-    if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
+    if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
         error(infoSink, "Precision qualifiers must match:");
         writeTypeComparison = true;
     }
@@ -597,12 +917,16 @@
     }
 
     // Auxiliary and interpolation...
-    if (symbol.getQualifier().centroid  != unitSymbol.getQualifier().centroid ||
+    // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.  
+    //  These mismatches are allowed between any pair of stages ...
+    //  those provided in the fragment shader supersede those provided in previous stages."
+    if (!crossStage &&
+        (symbol.getQualifier().centroid  != unitSymbol.getQualifier().centroid ||
         symbol.getQualifier().smooth    != unitSymbol.getQualifier().smooth ||
         symbol.getQualifier().flat      != unitSymbol.getQualifier().flat ||
         symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
         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:");
         writeTypeComparison = true;
     }
@@ -1830,4 +2154,17 @@
     return size;
 }
 
+#ifndef GLSLANG_WEB
+bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
+    return type.isArray() &&
+            ((language == EShLangGeometry    && type.getQualifier().storage == EvqVaryingIn) ||
+            (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut &&
+                ! type.getQualifier().patch) ||
+            (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
+                type.getQualifier().pervertexNV) ||
+            (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
+                !type.getQualifier().perTaskNV));
+}
+#endif // not GLSLANG_WEB
+
 } // end namespace glslang
diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h
index 1db3d1c..c9a1d81 100644
--- a/glslang/MachineIndependent/localintermediate.h
+++ b/glslang/MachineIndependent/localintermediate.h
@@ -293,7 +293,12 @@
         useStorageBuffer(false),
         nanMinMaxClamp(false),
         depthReplacing(false),
-        uniqueId(0)
+        uniqueId(0),
+        globalUniformBlockName(""),
+        atomicCounterBlockName(""),
+        globalUniformBlockSet(TQualifier::layoutSetEnd),
+        globalUniformBlockBinding(TQualifier::layoutBindingEnd),
+        atomicCounterBlockSet(TQualifier::layoutSetEnd)
 #ifndef GLSLANG_WEB
         ,
         implicitThisName("@this"), implicitCounterName("@count"),
@@ -537,6 +542,19 @@
     void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
     TIntermAggregate* findLinkerObjects() const;
 
+    void setGlobalUniformBlockName(const char* name) { globalUniformBlockName = std::string(name); }
+    const char* getGlobalUniformBlockName() const { return globalUniformBlockName.c_str(); }
+    void setGlobalUniformSet(unsigned int set) { globalUniformBlockSet = set; }
+    unsigned int getGlobalUniformSet() const { return globalUniformBlockSet; }
+    void setGlobalUniformBinding(unsigned int binding) { globalUniformBlockBinding = binding; }
+    unsigned int getGlobalUniformBinding() const { return globalUniformBlockBinding; }
+
+    void setAtomicCounterBlockName(const char* name) { atomicCounterBlockName = std::string(name); }
+    const char* getAtomicCounterBlockName() const { return atomicCounterBlockName.c_str(); }
+    void setAtomicCounterBlockSet(unsigned int set) { atomicCounterBlockSet = set; }
+    unsigned int getAtomicCounterBlockSet() const { return atomicCounterBlockSet; }
+
+
     void setUseStorageBuffer() { useStorageBuffer = true; }
     bool usingStorageBuffer() const { return useStorageBuffer; }
     void setDepthReplacing() { depthReplacing = true; }
@@ -550,6 +568,11 @@
         return true;
     }
     unsigned int getLocalSize(int dim) const { return localSize[dim]; }
+    bool isLocalSizeSet() const
+    {
+        // Return true if any component has been set (i.e. any component is not default).
+        return localSizeNotDefault[0] || localSizeNotDefault[1] || localSizeNotDefault[2];
+    }
     bool setLocalSizeSpecId(int dim, int id)
     {
         if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
@@ -558,6 +581,13 @@
         return true;
     }
     int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
+    bool isLocalSizeSpecialized() const
+    {
+        // Return true if any component has been specialized.
+        return localSizeSpecId[0] != TQualifier::layoutNotSet ||
+               localSizeSpecId[1] != TQualifier::layoutNotSet ||
+               localSizeSpecId[2] != TQualifier::layoutNotSet;
+    }
 #ifdef GLSLANG_WEB
     void output(TInfoSink&, bool tree) { }
 
@@ -836,6 +866,20 @@
     bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
 #endif // GLSLANG_WEB
 
+    void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
+    {
+        std::string name(nameStr);
+        blockBackingOverrides[name] = backing;
+    }
+    TBlockStorageClass getBlockStorageOverride(const char* nameStr) const
+    {
+        std::string name = nameStr;
+        auto pos = blockBackingOverrides.find(name);
+        if (pos == blockBackingOverrides.end())
+            return EbsNone;
+        else
+            return pos->second;
+    }
 #ifdef ENABLE_HLSL
     void setHlslFunctionality1() { hlslFunctionality1 = true; }
     bool getHlslFunctionality1() const { return hlslFunctionality1; }
@@ -871,6 +915,10 @@
     void merge(TInfoSink&, TIntermediate&);
     void finalCheck(TInfoSink&, bool keepUncalled);
 
+    void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly);
+    void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit);
+    void checkStageIO(TInfoSink&, TIntermediate&);
+
     bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const;
     TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
 
@@ -894,6 +942,8 @@
     static int getOffset(const TType& type, int index);
     static int getBlockSize(const TType& blockType);
     static int computeBufferReferenceTypeSize(const TType&);
+    static bool isIoResizeArray(const TType& type, EShLanguage language);
+
     bool promote(TIntermOperator*);
     void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; }
     bool getNanMinMaxClamp() const { return nanMinMaxClamp; }
@@ -951,9 +1001,10 @@
     void seedIdMap(TIdMaps& idMaps, long long& IdShift);
     void remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate&);
     void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
-    void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
+    void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage);
+    void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot);
     void mergeImplicitArraySizes(TType&, const TType&);
-    void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
+    void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, EShLanguage);
     void checkCallGraphCycles(TInfoSink&);
     void checkCallGraphBodies(TInfoSink&, bool keepUncalled);
     void inOutLocationCheck(TInfoSink&);
@@ -1003,6 +1054,13 @@
     bool localSizeNotDefault[3];
     int localSizeSpecId[3];
     unsigned long long uniqueId;
+
+    std::string globalUniformBlockName;
+    std::string atomicCounterBlockName;
+    unsigned int globalUniformBlockSet;
+    unsigned int globalUniformBlockBinding;
+    unsigned int atomicCounterBlockSet;
+
 #ifndef GLSLANG_WEB
 public:
     const char* const implicitThisName;
@@ -1063,6 +1121,7 @@
     int uniformLocationBase;
     TNumericFeatures numericFeatures;
 #endif
+    std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides;
 
     std::unordered_set<int> usedConstantId; // specialization constant ids used
     std::vector<TOffsetRange> usedAtomics;  // sets of bindings used by atomic counters
diff --git a/glslang/MachineIndependent/reflection.cpp b/glslang/MachineIndependent/reflection.cpp
index 9870a40..9ea48c4 100644
--- a/glslang/MachineIndependent/reflection.cpp
+++ b/glslang/MachineIndependent/reflection.cpp
@@ -907,8 +907,8 @@
             case EbtFloat16:    return GL_FLOAT16_VEC2_NV             + offset;
             case EbtInt:        return GL_INT_VEC2                    + offset;
             case EbtUint:       return GL_UNSIGNED_INT_VEC2           + offset;
-            case EbtInt64:      return GL_INT64_ARB                   + offset;
-            case EbtUint64:     return GL_UNSIGNED_INT64_ARB          + offset;
+            case EbtInt64:      return GL_INT64_VEC2_ARB              + offset;
+            case EbtUint64:     return GL_UNSIGNED_INT64_VEC2_ARB     + offset;
             case EbtBool:       return GL_BOOL_VEC2                   + offset;
             case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER + offset;
             default:            return 0;
diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h
index e147b0d..ff5c20c 100644
--- a/glslang/Public/ShaderLang.h
+++ b/glslang/Public/ShaderLang.h
@@ -187,6 +187,7 @@
     EShLanguage stage;        // redundant information with other input, this one overrides when not EShSourceNone
     EShClient dialect;
     int dialectVersion;       // version of client's language definition, not the client (when not EShClientNone)
+    bool vulkanRulesRelaxed;
 };
 
 struct TClient {
@@ -427,6 +428,14 @@
     EResCount
 };
 
+enum TBlockStorageClass
+{
+    EbsUniform = 0,
+    EbsStorageBuffer,
+    EbsPushConstant,
+    EbsNone,    // not a uniform or buffer variable
+    EbsCount,
+};
 
 // Make one TShader per shader that you will link into a program. Then
 //  - provide the shader through setStrings() or setStringsWithLengths()
@@ -483,6 +492,14 @@
     GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat);
     GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp);
     GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
+    GLSLANG_EXPORT void addBlockStorageOverride(const char* nameStr, glslang::TBlockStorageClass backing);
+
+    GLSLANG_EXPORT void setGlobalUniformBlockName(const char* name);
+    GLSLANG_EXPORT void setAtomicCounterBlockName(const char* name);
+    GLSLANG_EXPORT void setGlobalUniformSet(unsigned int set);
+    GLSLANG_EXPORT void setGlobalUniformBinding(unsigned int binding);
+    GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set);
+    GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding);
 
     // For setting up the environment (cleared to nothingness in the constructor).
     // These must be called so that parsing is done for the right source language and
@@ -491,7 +508,7 @@
     //
     // setEnvInput:    The input source language and stage. If generating code for a
     //                 specific client, the input client semantics to use and the
-    //                 version of the that client's input semantics to use, otherwise
+    //                 version of that client's input semantics to use, otherwise
     //                 use EShClientNone and version of 0, e.g. for validation mode.
     //                 Note 'version' does not describe the target environment,
     //                 just the version of the source dialect to compile under.
@@ -539,6 +556,9 @@
     bool getEnvTargetHlslFunctionality1() const { return false; }
 #endif
 
+    void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; }
+    bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; }
+
     // Interface to #include handlers.
     //
     // To support #include, a client of Glslang does the following:
@@ -806,7 +826,7 @@
     // Called by TSlotCollector to resolve resource locations or bindings
     virtual void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0;
     // Called by mapIO.addStage to set shader stage mask to mark a stage be added to this pipeline
-    virtual void addStage(EShLanguage stage) = 0;
+    virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
 };
 
 #endif // !GLSLANG_WEB && !GLSLANG_ANGLE
@@ -928,6 +948,7 @@
 
 protected:
     GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
+    GLSLANG_EXPORT bool crossStageCheck(EShMessages);
 
     TPoolAllocator* pool;
     std::list<TShader*> stages[EShLangCount];
diff --git a/gtests/AST.FromFile.cpp b/gtests/AST.FromFile.cpp
index dc7fea3..77f0aaf 100644
--- a/gtests/AST.FromFile.cpp
+++ b/gtests/AST.FromFile.cpp
@@ -280,6 +280,8 @@
         "glsl.es320.subgroupVote.comp",
         "terminate.frag",
         "terminate.vert",
+        "negativeWorkGroupSize.comp",
+        "textureoffset_sampler2darrayshadow.vert",
     })),
     FileNameAsCustomTestSuffix
 );
diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt
index 0617ff8..befe240 100644
--- a/gtests/CMakeLists.txt
+++ b/gtests/CMakeLists.txt
@@ -47,13 +47,16 @@
             # Test related source files
             ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/Common.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/HexFloat.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp)
+            ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/VkRelaxed.FromFile.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/GlslMapIO.FromFile.cpp)
 
         if(ENABLE_SPVREMAPPER)
             set(TEST_SOURCES ${TEST_SOURCES}
diff --git a/gtests/Common.cpp b/gtests/Common.cpp
new file mode 100644
index 0000000..0b70a83
--- /dev/null
+++ b/gtests/Common.cpp
@@ -0,0 +1,165 @@
+// Copyright (c) 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <cstdint>
+
+#include <gmock/gmock.h>
+#include "glslang/Include/Common.h"
+
+namespace {
+
+TEST(IsPow2, Int_Negative) {
+  EXPECT_EQ(false, glslang::IsPow2(-5));
+  EXPECT_EQ(false, glslang::IsPow2(-1));
+  EXPECT_EQ(false, glslang::IsPow2(INT_MIN));
+  EXPECT_EQ(false, glslang::IsPow2(int64_t(-10)));
+}
+
+TEST(IsPow2, Zero) {
+  EXPECT_EQ(false, glslang::IsPow2(0));
+  EXPECT_EQ(false, glslang::IsPow2(0u));
+  EXPECT_EQ(false, glslang::IsPow2(0));
+  EXPECT_EQ(false, glslang::IsPow2(uint64_t(0)));
+  EXPECT_EQ(false, glslang::IsPow2(int64_t(0)));
+}
+
+TEST(IsPow2, Int_Positive_PowersOf2) {
+  EXPECT_EQ(true, glslang::IsPow2(1));
+  EXPECT_EQ(true, glslang::IsPow2(2));
+  EXPECT_EQ(true, glslang::IsPow2(4));
+  EXPECT_EQ(true, glslang::IsPow2(8));
+  EXPECT_EQ(true, glslang::IsPow2(16));
+  EXPECT_EQ(true, glslang::IsPow2(32768));
+  EXPECT_EQ(true, glslang::IsPow2(65536));
+  EXPECT_EQ(true, glslang::IsPow2(2147483648));
+}
+
+TEST(IsPow2, Int_Positive_NonPowersOf2) {
+  EXPECT_EQ(false, glslang::IsPow2(3));
+  EXPECT_EQ(false, glslang::IsPow2(5));
+  EXPECT_EQ(false, glslang::IsPow2(2147483647));
+}
+
+TEST(IsPow2, Uint_Positive_PowersOf2) {
+  EXPECT_EQ(true, glslang::IsPow2(1u));
+  EXPECT_EQ(true, glslang::IsPow2(2u));
+  EXPECT_EQ(true, glslang::IsPow2(4u));
+  EXPECT_EQ(true, glslang::IsPow2(8u));
+  EXPECT_EQ(true, glslang::IsPow2(16u));
+  EXPECT_EQ(true, glslang::IsPow2(32768u));
+  EXPECT_EQ(true, glslang::IsPow2(65536u));
+  EXPECT_EQ(true, glslang::IsPow2(2147483648u));
+}
+
+TEST(IsPow2, Uint_Positive_NonPowersOf2) {
+  EXPECT_EQ(false, glslang::IsPow2(3u));
+  EXPECT_EQ(false, glslang::IsPow2(5u));
+  EXPECT_EQ(false, glslang::IsPow2(2147483647u));
+}
+
+TEST(IntLog2, Int) {
+  EXPECT_EQ(0, glslang::IntLog2(1));
+  EXPECT_EQ(1, glslang::IntLog2(2));
+  EXPECT_EQ(2, glslang::IntLog2(4));
+  EXPECT_EQ(3, glslang::IntLog2(8));
+  EXPECT_EQ(4, glslang::IntLog2(16));
+  EXPECT_EQ(5, glslang::IntLog2(32));
+  EXPECT_EQ(6, glslang::IntLog2(64));
+  EXPECT_EQ(7, glslang::IntLog2(128));
+  EXPECT_EQ(8, glslang::IntLog2(256));
+  EXPECT_EQ(9, glslang::IntLog2(512));
+  EXPECT_EQ(10, glslang::IntLog2(1024));
+  EXPECT_EQ(11, glslang::IntLog2(2048));
+  EXPECT_EQ(12, glslang::IntLog2(0x1000));
+  EXPECT_EQ(13, glslang::IntLog2(0x2000));
+  EXPECT_EQ(14, glslang::IntLog2(0x4000));
+  EXPECT_EQ(15, glslang::IntLog2(0x8000));
+  EXPECT_EQ(16, glslang::IntLog2(0x10000));
+  EXPECT_EQ(17, glslang::IntLog2(0x20000));
+  EXPECT_EQ(18, glslang::IntLog2(0x40000));
+  EXPECT_EQ(19, glslang::IntLog2(0x80000));
+  EXPECT_EQ(20, glslang::IntLog2(0x100000));
+  EXPECT_EQ(21, glslang::IntLog2(0x200000));
+  EXPECT_EQ(22, glslang::IntLog2(0x400000));
+  EXPECT_EQ(23, glslang::IntLog2(0x800000));
+  EXPECT_EQ(24, glslang::IntLog2(0x1000000));
+  EXPECT_EQ(25, glslang::IntLog2(0x2000000));
+  EXPECT_EQ(26, glslang::IntLog2(0x4000000));
+  EXPECT_EQ(27, glslang::IntLog2(0x8000000));
+  EXPECT_EQ(28, glslang::IntLog2(0x10000000));
+  EXPECT_EQ(29, glslang::IntLog2(0x20000000));
+  EXPECT_EQ(30, glslang::IntLog2(0x40000000));
+}
+
+TEST(IntLog2, Uint) {
+  EXPECT_EQ(0, glslang::IntLog2(1u));
+  EXPECT_EQ(1, glslang::IntLog2(2u));
+  EXPECT_EQ(2, glslang::IntLog2(4u));
+  EXPECT_EQ(3, glslang::IntLog2(8u));
+  EXPECT_EQ(4, glslang::IntLog2(16u));
+  EXPECT_EQ(5, glslang::IntLog2(32u));
+  EXPECT_EQ(6, glslang::IntLog2(64u));
+  EXPECT_EQ(7, glslang::IntLog2(128u));
+  EXPECT_EQ(8, glslang::IntLog2(256u));
+  EXPECT_EQ(9, glslang::IntLog2(512u));
+  EXPECT_EQ(10, glslang::IntLog2(1024u));
+  EXPECT_EQ(11, glslang::IntLog2(2048u));
+  EXPECT_EQ(12, glslang::IntLog2(0x1000u));
+  EXPECT_EQ(13, glslang::IntLog2(0x2000u));
+  EXPECT_EQ(14, glslang::IntLog2(0x4000u));
+  EXPECT_EQ(15, glslang::IntLog2(0x8000u));
+  EXPECT_EQ(16, glslang::IntLog2(0x10000u));
+  EXPECT_EQ(17, glslang::IntLog2(0x20000u));
+  EXPECT_EQ(18, glslang::IntLog2(0x40000u));
+  EXPECT_EQ(19, glslang::IntLog2(0x80000u));
+  EXPECT_EQ(20, glslang::IntLog2(0x100000u));
+  EXPECT_EQ(21, glslang::IntLog2(0x200000u));
+  EXPECT_EQ(22, glslang::IntLog2(0x400000u));
+  EXPECT_EQ(23, glslang::IntLog2(0x800000u));
+  EXPECT_EQ(24, glslang::IntLog2(0x1000000u));
+  EXPECT_EQ(25, glslang::IntLog2(0x2000000u));
+  EXPECT_EQ(26, glslang::IntLog2(0x4000000u));
+  EXPECT_EQ(27, glslang::IntLog2(0x8000000u));
+  EXPECT_EQ(28, glslang::IntLog2(0x10000000u));
+  EXPECT_EQ(29, glslang::IntLog2(0x20000000u));
+  EXPECT_EQ(30, glslang::IntLog2(0x40000000u));
+  EXPECT_EQ(31, glslang::IntLog2(0x80000000u));
+}
+
+TEST(IntLog2, Int64) {
+  EXPECT_EQ(0, glslang::IntLog2(int64_t(1)));
+  EXPECT_EQ(1, glslang::IntLog2(int64_t(2)));
+  EXPECT_EQ(2, glslang::IntLog2(int64_t(4)));
+  EXPECT_EQ(3, glslang::IntLog2(int64_t(8)));
+  EXPECT_EQ(30, glslang::IntLog2(int64_t(0x40000000u)));
+  EXPECT_EQ(31, glslang::IntLog2(int64_t(0x80000000u)));
+  EXPECT_EQ(32, glslang::IntLog2(int64_t(0x10000) * int64_t(0x10000)));
+  EXPECT_EQ(48, glslang::IntLog2(int64_t(0x10000) * int64_t(0x10000) * int64_t(0x10000)));
+  EXPECT_EQ(62, glslang::IntLog2(int64_t(0x10000) * int64_t(0x10000) * int64_t(0x10000) * int64_t(0x4000)));
+}
+
+TEST(IntLog2, Uint64) {
+  EXPECT_EQ(0, glslang::IntLog2(uint64_t(1)));
+  EXPECT_EQ(1, glslang::IntLog2(uint64_t(2)));
+  EXPECT_EQ(2, glslang::IntLog2(uint64_t(4)));
+  EXPECT_EQ(3, glslang::IntLog2(uint64_t(8)));
+  EXPECT_EQ(30, glslang::IntLog2(uint64_t(0x40000000u)));
+  EXPECT_EQ(31, glslang::IntLog2(uint64_t(0x80000000u)));
+  EXPECT_EQ(32, glslang::IntLog2(uint64_t(0x10000) * uint64_t(0x10000)));
+  EXPECT_EQ(48, glslang::IntLog2(uint64_t(0x10000) * uint64_t(0x10000) * uint64_t(0x10000)));
+  EXPECT_EQ(62, glslang::IntLog2(uint64_t(0x10000) * uint64_t(0x10000) * uint64_t(0x10000) * uint64_t(0x4000)));
+  EXPECT_EQ(63, glslang::IntLog2(uint64_t(0x10000) * uint64_t(0x10000) * uint64_t(0x10000) * uint64_t(0x8000)));
+}
+
+}  // anonymous namespace
diff --git a/gtests/GlslMapIO.FromFile.cpp b/gtests/GlslMapIO.FromFile.cpp
new file mode 100644
index 0000000..574e905
--- /dev/null
+++ b/gtests/GlslMapIO.FromFile.cpp
@@ -0,0 +1,306 @@
+//
+// Copyright (C) 2016-2017 Google, Inc.
+// Copyright (C) 2020 The Khronos Group Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+#include <algorithm>
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+#include "glslang/MachineIndependent/iomapper.h"
+#include "glslang/MachineIndependent/reflection.h"
+
+#ifndef GLSLANG_WEB
+namespace glslangtest {
+namespace {
+
+struct IoMapData {
+    std::vector<std::string> fileNames;
+    Semantics semantics;
+};
+
+using GlslMapIOTest = GlslangTest <::testing::TestWithParam<IoMapData>>;
+
+template<class T>
+std::string interfaceName(T symbol) {
+    return symbol.getType()->getBasicType() == glslang::EbtBlock ? std::string(symbol.getType()->getTypeName().c_str()) : symbol.name;
+}
+
+bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
+    bool success = true;
+
+    // Verify IO Mapping by generating reflection for each stage individually
+    // and comparing layout qualifiers on the results
+
+
+    int reflectionOptions = EShReflectionDefault;
+    //reflectionOptions |= EShReflectionStrictArraySuffix;
+    //reflectionOptions |= EShReflectionBasicArraySuffix;
+    reflectionOptions |= EShReflectionIntermediateIO;
+    reflectionOptions |= EShReflectionSeparateBuffers;
+    reflectionOptions |= EShReflectionAllBlockVariables;
+    //reflectionOptions |= EShReflectionUnwrapIOBlocks;
+
+    success &= program.buildReflection(reflectionOptions);
+
+    // check that the reflection output from the individual stages all makes sense..
+    std::vector<glslang::TReflection> stageReflections;
+    for (int s = 0; s < EShLangCount; ++s) {
+        if (program.getIntermediate((EShLanguage)s)) {
+            stageReflections.emplace_back((EShReflectionOptions)reflectionOptions, (EShLanguage)s, (EShLanguage)s);
+            success &= stageReflections.back().addStage((EShLanguage)s, *program.getIntermediate((EShLanguage)s));
+        }
+    }
+
+    // check that input/output locations match between stages
+    auto it = stageReflections.begin();
+    auto nextIt = it + 1;
+    for (; nextIt != stageReflections.end(); it++, nextIt++) {
+        int numOut = it->getNumPipeOutputs();
+        std::map<std::string, const glslang::TObjectReflection*> pipeOut;
+
+        for (int i = 0; i < numOut; i++) {
+            const glslang::TObjectReflection& out = it->getPipeOutput(i);
+            std::string name = interfaceName(out);
+            pipeOut[name] = &out;
+        }
+
+        int numIn = nextIt->getNumPipeInputs();
+        for (int i = 0; i < numIn; i++) {
+            auto in = nextIt->getPipeInput(i);
+            std::string name = interfaceName(in);
+            auto out = pipeOut.find(name);
+
+            if (out != pipeOut.end()) {
+                auto inQualifier = in.getType()->getQualifier();
+                auto outQualifier = out->second->getType()->getQualifier();
+                success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
+            }
+            else {
+                success &= false;
+            }
+        }
+    }
+
+    // compare uniforms in each stage to the program
+    {
+        int totalUniforms = program.getNumUniformVariables();
+        std::map<std::string, const glslang::TObjectReflection*> programUniforms;
+        for (int i = 0; i < totalUniforms; i++) {
+            const glslang::TObjectReflection& uniform = program.getUniform(i);
+            std::string name = interfaceName(uniform);
+            programUniforms[name] = &uniform;
+        }
+        it = stageReflections.begin();
+        for (; it != stageReflections.end(); it++) {
+            int numUniform = it->getNumUniforms();
+            std::map<std::string, glslang::TObjectReflection> uniforms;
+
+            for (int i = 0; i < numUniform; i++) {
+                glslang::TObjectReflection uniform = it->getUniform(i);
+                std::string name = interfaceName(uniform);
+                auto programUniform = programUniforms.find(name);
+
+                if (programUniform != programUniforms.end()) {
+                    auto stageQualifier = uniform.getType()->getQualifier();
+                    auto programQualifier = programUniform->second->getType()->getQualifier();
+
+                    success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
+                    success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
+                    success &= stageQualifier.layoutSet == programQualifier.layoutSet;
+                }
+                else {
+                    success &= false;
+                }
+            }
+        }
+    }
+
+    // compare uniform blocks in each stage to the program table
+    {
+        int totalUniforms = program.getNumUniformBlocks();
+        std::map<std::string, const glslang::TObjectReflection*> programUniforms;
+        for (int i = 0; i < totalUniforms; i++) {
+            const glslang::TObjectReflection& uniform = program.getUniformBlock(i);
+            std::string name = interfaceName(uniform);
+            programUniforms[name] = &uniform;
+        }
+        it = stageReflections.begin();
+        for (; it != stageReflections.end(); it++) {
+            int numUniform = it->getNumUniformBlocks();
+            std::map<std::string, glslang::TObjectReflection> uniforms;
+
+            for (int i = 0; i < numUniform; i++) {
+                glslang::TObjectReflection uniform = it->getUniformBlock(i);
+                std::string name = interfaceName(uniform);
+                auto programUniform = programUniforms.find(name);
+
+                if (programUniform != programUniforms.end()) {
+                    auto stageQualifier = uniform.getType()->getQualifier();
+                    auto programQualifier = programUniform->second->getType()->getQualifier();
+
+                    success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
+                    success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
+                    success &= stageQualifier.layoutSet == programQualifier.layoutSet;
+                }
+                else {
+                    success &= false;
+                }
+            }
+        }
+    }
+
+    if (!success) {
+        linkingError += "Mismatched cross-stage IO\n";
+    }
+
+    return success;
+}
+
+TEST_P(GlslMapIOTest, FromFile)
+{
+    const auto& fileNames = GetParam().fileNames;
+    Semantics semantics = GetParam().semantics;
+    const size_t fileCount = fileNames.size();
+    const EShMessages controls = DeriveOptions(Source::GLSL, semantics, Target::BothASTAndSpv);
+    GlslangResult result;
+
+    // Compile each input shader file.
+    bool success = true;
+    std::vector<std::unique_ptr<glslang::TShader>> shaders;
+    for (size_t i = 0; i < fileCount; ++i) {
+        std::string contents;
+        tryLoadFile(GlobalTestSettings.testRoot + "/" + fileNames[i],
+            "input", &contents);
+        shaders.emplace_back(
+            new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
+        auto* shader = shaders.back().get();
+        
+        shader->setAutoMapLocations(true);
+        shader->setAutoMapBindings(true);
+        
+        if (controls & EShMsgSpvRules) {
+            if (controls & EShMsgVulkanRules) {
+                shader->setEnvInput((controls & EShMsgReadHlsl) ? glslang::EShSourceHlsl
+                                                               : glslang::EShSourceGlsl,
+                                    shader->getStage(), glslang::EShClientVulkan, 100);
+                shader->setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_1);
+                shader->setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_0);
+            } else {
+                shader->setEnvInput((controls & EShMsgReadHlsl) ? glslang::EShSourceHlsl
+                                                               : glslang::EShSourceGlsl,
+                                    shader->getStage(), glslang::EShClientOpenGL, 100);
+                shader->setEnvClient(glslang::EShClientOpenGL, glslang::EShTargetOpenGL_450);
+                shader->setEnvTarget(glslang::EshTargetSpv, glslang::EShTargetSpv_1_0);
+            }
+        }
+
+        success &= compile(shader, contents, "", controls);
+        
+        result.shaderResults.push_back(
+            { fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog() });
+    }
+
+    // Link all of them.
+    glslang::TProgram program;
+    for (const auto& shader : shaders) program.addShader(shader.get());
+    success &= program.link(controls);
+    result.linkingOutput = program.getInfoLog();
+    result.linkingError = program.getInfoDebugLog();
+
+    unsigned int stage = 0;
+    glslang::TIntermediate* firstIntermediate = nullptr;
+    while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; }
+    firstIntermediate = program.getIntermediate((EShLanguage)stage);
+
+    glslang::TDefaultGlslIoResolver resolver(*firstIntermediate);
+    glslang::TGlslIoMapper ioMapper;
+
+    if (success) {
+        success &= program.mapIO(&resolver, &ioMapper);
+        result.linkingOutput = program.getInfoLog();
+        result.linkingError = program.getInfoDebugLog();
+    }
+
+    success &= verifyIOMapping(result.linkingError, program);
+    result.validationResult = success;
+
+    if (success && (controls & EShMsgSpvRules)) {
+        for (int stage = 0; stage < EShLangCount; ++stage) {
+            if (program.getIntermediate((EShLanguage)stage)) {
+                spv::SpvBuildLogger logger;
+                std::vector<uint32_t> spirv_binary;
+                options().disableOptimizer = false;
+                glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage),
+                    spirv_binary, &logger, &options());
+
+                std::ostringstream disassembly_stream;
+                spv::Parameterize();
+                spv::Disassemble(disassembly_stream, spirv_binary);
+                result.spirvWarningsErrors += logger.getAllMessages();
+                result.spirv += disassembly_stream.str();
+                result.validationResult &= !options().validate || logger.getAllMessages().empty();
+            }
+        }
+    }
+
+    std::ostringstream stream;
+    outputResultToStream(&stream, result, controls);
+
+    // Check with expected results.
+    const std::string expectedOutputFname =
+        GlobalTestSettings.testRoot + "/baseResults/" + fileNames.front() + ".out";
+    std::string expectedOutput;
+    tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+
+    checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname,
+        result.spirvWarningsErrors);
+}
+
+// clang-format off
+INSTANTIATE_TEST_SUITE_P(
+    Glsl, GlslMapIOTest,
+    ::testing::ValuesIn(std::vector<IoMapData>({
+        {{"iomap.crossStage.vert", "iomap.crossStage.frag" }, Semantics::OpenGL},
+        {{"iomap.crossStage.2.vert", "iomap.crossStage.2.geom", "iomap.crossStage.2.frag" }, Semantics::OpenGL},
+        // vulkan semantics
+        {{"iomap.crossStage.vk.vert", "iomap.crossStage.vk.geom", "iomap.crossStage.vk.frag" }, Semantics::Vulkan},
+    }))
+);
+// clang-format on
+
+}  // anonymous namespace
+}  // namespace glslangtest
+#endif 
\ No newline at end of file
diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp
index de071b9..33deef5 100644
--- a/gtests/Hlsl.FromFile.cpp
+++ b/gtests/Hlsl.FromFile.cpp
@@ -245,7 +245,6 @@
         {"hlsl.isfinite.frag", "main"},
         {"hlsl.intrinsics.barriers.comp", "ComputeShaderFunction"},
         {"hlsl.intrinsics.comp", "ComputeShaderFunction"},
-        {"hlsl.intrinsics.evalfns.frag", "main"},
         {"hlsl.intrinsics.d3dcolortoubyte4.frag", "main"},
         {"hlsl.intrinsics.double.frag", "PixelShaderFunction"},
         {"hlsl.intrinsics.f1632.frag", "main"},
@@ -471,6 +470,7 @@
         {"hlsl.flattenOpaqueInitMix.vert", "main"},
         {"hlsl.flattenSubset.frag", "main"},
         {"hlsl.flattenSubset2.frag", "main"},
+        {"hlsl.intrinsics.evalfns.frag", "main"},
         {"hlsl.partialFlattenLocal.vert", "main"},
         {"hlsl.partialFlattenMixed.vert", "main"}
     }),
diff --git a/gtests/Link.FromFile.Vk.cpp b/gtests/Link.FromFile.Vk.cpp
index 2909a9c..4db71c2 100644
--- a/gtests/Link.FromFile.Vk.cpp
+++ b/gtests/Link.FromFile.Vk.cpp
@@ -114,16 +114,17 @@
     ::testing::ValuesIn(std::vector<std::vector<std::string>>({
         {"link1.vk.frag", "link2.vk.frag"},
         {"spv.unit1.frag", "spv.unit2.frag", "spv.unit3.frag"},
-		{"link.vk.matchingPC.0.0.frag", "link.vk.matchingPC.0.1.frag",
-			"link.vk.matchingPC.0.2.frag"},
-		{"link.vk.differentPC.0.0.frag", "link.vk.differentPC.0.1.frag",
-			"link.vk.differentPC.0.2.frag"},
-		{"link.vk.differentPC.1.0.frag", "link.vk.differentPC.1.1.frag",
-			"link.vk.differentPC.1.2.frag"},
+        {"link.vk.matchingPC.0.0.frag", "link.vk.matchingPC.0.1.frag",
+            "link.vk.matchingPC.0.2.frag"},
+           {"link.vk.differentPC.0.0.frag", "link.vk.differentPC.0.1.frag",
+            "link.vk.differentPC.0.2.frag"},
+        {"link.vk.differentPC.1.0.frag", "link.vk.differentPC.1.1.frag",
+            "link.vk.differentPC.1.2.frag"},
         {"link.vk.pcNamingValid.0.0.vert", "link.vk.pcNamingValid.0.1.vert"},
         {"link.vk.pcNamingInvalid.0.0.vert", "link.vk.pcNamingInvalid.0.1.vert"},
         {"link.vk.multiBlocksValid.0.0.vert", "link.vk.multiBlocksValid.0.1.vert"},
         {"link.vk.multiBlocksValid.1.0.geom", "link.vk.multiBlocksValid.1.1.geom"},
+        {"link.vk.inconsistentGLPerVertex.0.vert", "link.vk.inconsistentGLPerVertex.0.geom"},
     }))
 );
 // clang-format on
diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp
index 2ee292e..5456fb8 100644
--- a/gtests/Spv.FromFile.cpp
+++ b/gtests/Spv.FromFile.cpp
@@ -328,6 +328,7 @@
         "spv.demoteDisabled.frag",
         "spv.deepRvalue.frag",
         "spv.depthOut.frag",
+        "spv.depthUnchanged.frag",
         "spv.discard-dce.frag",
         "spv.doWhileLoop.frag",
         "spv.earlyReturnDiscard.frag",
@@ -713,6 +714,7 @@
     "spv.multiviewPerViewAttributes.vert",
     "spv.multiviewPerViewAttributes.tesc",
     "spv.atomicInt64.comp",
+    "spv.atomicStoreInt64.comp",
     "spv.shadingRate.frag",
     "spv.RayGenShader.rgen",
     "spv.RayGenShaderArray.rgen",
diff --git a/gtests/VkRelaxed.FromFile.cpp b/gtests/VkRelaxed.FromFile.cpp
new file mode 100644
index 0000000..777134d
--- /dev/null
+++ b/gtests/VkRelaxed.FromFile.cpp
@@ -0,0 +1,305 @@
+//
+// Copyright (C) 2016-2017 Google, Inc.
+// Copyright (C) 2020 The Khronos Group Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+#include <algorithm>
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+#include "glslang/MachineIndependent/iomapper.h"
+#include "glslang/MachineIndependent/reflection.h"
+
+#ifndef GLSLANG_WEB
+namespace glslangtest {
+namespace {
+
+struct vkRelaxedData {
+    std::vector<std::string> fileNames;
+    std::vector<std::vector<std::string>> resourceSetBindings;
+};
+
+using VulkanRelaxedTest = GlslangTest <::testing::TestWithParam<vkRelaxedData>>;
+
+template<class T>
+std::string interfaceName(T symbol) {
+    return symbol.getType()->getBasicType() == glslang::EbtBlock ? std::string(symbol.getType()->getTypeName().c_str()) : symbol.name;
+}
+
+bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
+    bool success = true;
+
+    // Verify IO Mapping by generating reflection for each stage individually
+    // and comparing layout qualifiers on the results
+
+
+    int reflectionOptions = EShReflectionDefault;
+    //reflectionOptions |= EShReflectionStrictArraySuffix;
+    //reflectionOptions |= EShReflectionBasicArraySuffix;
+    reflectionOptions |= EShReflectionIntermediateIO;
+    reflectionOptions |= EShReflectionSeparateBuffers;
+    reflectionOptions |= EShReflectionAllBlockVariables;
+    //reflectionOptions |= EShReflectionUnwrapIOBlocks;
+
+    success &= program.buildReflection(reflectionOptions);
+
+    // check that the reflection output from the individual stages all makes sense..
+    std::vector<glslang::TReflection> stageReflections;
+    for (int s = 0; s < EShLangCount; ++s) {
+        if (program.getIntermediate((EShLanguage)s)) {
+            stageReflections.emplace_back((EShReflectionOptions)reflectionOptions, (EShLanguage)s, (EShLanguage)s);
+            success &= stageReflections.back().addStage((EShLanguage)s, *program.getIntermediate((EShLanguage)s));
+        }
+    }
+
+    // check that input/output locations match between stages
+    auto it = stageReflections.begin();
+    auto nextIt = it + 1;
+    for (; nextIt != stageReflections.end(); it++, nextIt++) {
+        int numOut = it->getNumPipeOutputs();
+        std::map<std::string, const glslang::TObjectReflection*> pipeOut;
+
+        for (int i = 0; i < numOut; i++) {
+            const glslang::TObjectReflection& out = it->getPipeOutput(i);
+            std::string name = interfaceName(out);
+            pipeOut[name] = &out;
+        }
+
+        int numIn = nextIt->getNumPipeInputs();
+        for (int i = 0; i < numIn; i++) {
+            auto in = nextIt->getPipeInput(i);
+            std::string name = interfaceName(in);
+            auto out = pipeOut.find(name);
+
+            if (out != pipeOut.end()) {
+                auto inQualifier = in.getType()->getQualifier();
+                auto outQualifier = out->second->getType()->getQualifier();
+                success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
+            }
+            else {
+                success &= false;
+            }
+        }
+    }
+
+    // compare uniforms in each stage to the program
+    {
+        int totalUniforms = program.getNumUniformVariables();
+        std::map<std::string, const glslang::TObjectReflection*> programUniforms;
+        for (int i = 0; i < totalUniforms; i++) {
+            const glslang::TObjectReflection& uniform = program.getUniform(i);
+            std::string name = interfaceName(uniform);
+            programUniforms[name] = &uniform;
+        }
+        it = stageReflections.begin();
+        for (; it != stageReflections.end(); it++) {
+            int numUniform = it->getNumUniforms();
+            std::map<std::string, glslang::TObjectReflection> uniforms;
+
+            for (int i = 0; i < numUniform; i++) {
+                glslang::TObjectReflection uniform = it->getUniform(i);
+                std::string name = interfaceName(uniform);
+                auto programUniform = programUniforms.find(name);
+
+                if (programUniform != programUniforms.end()) {
+                    auto stageQualifier = uniform.getType()->getQualifier();
+                    auto programQualifier = programUniform->second->getType()->getQualifier();
+
+                    success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
+                    success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
+                    success &= stageQualifier.layoutSet == programQualifier.layoutSet;
+                }
+                else {
+                    success &= false;
+                }
+            }
+        }
+    }
+
+    // compare uniform blocks in each stage to the program table
+    {
+        int totalUniforms = program.getNumUniformBlocks();
+        std::map<std::string, const glslang::TObjectReflection*> programUniforms;
+        for (int i = 0; i < totalUniforms; i++) {
+            const glslang::TObjectReflection& uniform = program.getUniformBlock(i);
+            std::string name = interfaceName(uniform);
+            programUniforms[name] = &uniform;
+        }
+        it = stageReflections.begin();
+        for (; it != stageReflections.end(); it++) {
+            int numUniform = it->getNumUniformBlocks();
+            std::map<std::string, glslang::TObjectReflection> uniforms;
+
+            for (int i = 0; i < numUniform; i++) {
+                glslang::TObjectReflection uniform = it->getUniformBlock(i);
+                std::string name = interfaceName(uniform);
+                auto programUniform = programUniforms.find(name);
+
+                if (programUniform != programUniforms.end()) {
+                    auto stageQualifier = uniform.getType()->getQualifier();
+                    auto programQualifier = programUniform->second->getType()->getQualifier();
+
+                    success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
+                    success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
+                    success &= stageQualifier.layoutSet == programQualifier.layoutSet;
+                }
+                else {
+                    success &= false;
+                }
+            }
+        }
+    }
+
+    if (!success) {
+        linkingError += "Mismatched cross-stage IO\n";
+    }
+
+    return success;
+}
+
+TEST_P(VulkanRelaxedTest, FromFile)
+{
+    const auto& fileNames = GetParam().fileNames;
+    const auto& resourceSetBindings = GetParam().resourceSetBindings;
+    Semantics semantics = Semantics::Vulkan;
+    const size_t fileCount = fileNames.size();
+    const EShMessages controls = DeriveOptions(Source::GLSL, semantics, Target::BothASTAndSpv);
+    GlslangResult result;
+
+    // Compile each input shader file.
+    bool success = true;
+    std::vector<std::unique_ptr<glslang::TShader>> shaders;
+    for (size_t i = 0; i < fileCount; ++i) {
+        std::string contents;
+        tryLoadFile(GlobalTestSettings.testRoot + "/" + fileNames[i],
+            "input", &contents);
+        shaders.emplace_back(
+            new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
+        auto* shader = shaders.back().get();
+        
+        shader->setAutoMapLocations(true);
+        shader->setAutoMapBindings(true);
+
+        shader->setEnvInput(glslang::EShSourceGlsl, shader->getStage(), glslang::EShClientVulkan, 100);
+        shader->setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_1);
+        shader->setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_0);
+
+        // Use vulkan relaxed option
+        shader->setEnvInputVulkanRulesRelaxed();
+
+        success &= compile(shader, contents, "", controls);
+        
+        result.shaderResults.push_back(
+            { fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog() });
+    }
+
+    // Link all of them.
+    glslang::TProgram program;
+    for (const auto& shader : shaders) program.addShader(shader.get());
+    success &= program.link(controls);
+    result.linkingOutput = program.getInfoLog();
+    result.linkingError = program.getInfoDebugLog();
+
+    if (!resourceSetBindings.empty()) {
+        assert(resourceSetBindings.size() == fileNames.size());
+        for (size_t i = 0; i < shaders.size(); i++)
+            shaders[i]->setResourceSetBinding(resourceSetBindings[i]);
+    }
+
+    unsigned int stage = 0;
+    glslang::TIntermediate* firstIntermediate = nullptr;
+    while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; }
+    firstIntermediate = program.getIntermediate((EShLanguage)stage);
+
+    glslang::TDefaultGlslIoResolver resolver(*firstIntermediate);
+    glslang::TGlslIoMapper ioMapper;
+
+    if (success) {
+        success &= program.mapIO(&resolver, &ioMapper);
+        result.linkingOutput = program.getInfoLog();
+        result.linkingError = program.getInfoDebugLog();
+    }
+
+    success &= verifyIOMapping(result.linkingError, program);
+    result.validationResult = success;
+
+    if (success && (controls & EShMsgSpvRules)) {
+        for (int stage = 0; stage < EShLangCount; ++stage) {
+            if (program.getIntermediate((EShLanguage)stage)) {
+                spv::SpvBuildLogger logger;
+                std::vector<uint32_t> spirv_binary;
+                options().disableOptimizer = false;
+                glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage),
+                    spirv_binary, &logger, &options());
+
+                std::ostringstream disassembly_stream;
+                spv::Parameterize();
+                spv::Disassemble(disassembly_stream, spirv_binary);
+                result.spirvWarningsErrors += logger.getAllMessages();
+                result.spirv += disassembly_stream.str();
+                result.validationResult &= !options().validate || logger.getAllMessages().empty();
+            }
+        }
+    }
+
+    std::ostringstream stream;
+    outputResultToStream(&stream, result, controls);
+
+    // Check with expected results.
+    const std::string expectedOutputFname =
+        GlobalTestSettings.testRoot + "/baseResults/" + fileNames.front() + ".out";
+    std::string expectedOutput;
+    tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+
+    checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname,
+        result.spirvWarningsErrors);
+}
+
+// clang-format off
+INSTANTIATE_TEST_SUITE_P(
+    Glsl, VulkanRelaxedTest,
+    ::testing::ValuesIn(std::vector<vkRelaxedData>({
+        {{"vk.relaxed.frag"}},
+        {{"vk.relaxed.link1.frag", "vk.relaxed.link2.frag"}},
+        {{"vk.relaxed.stagelink.vert", "vk.relaxed.stagelink.frag"}},
+        {{"vk.relaxed.errorcheck.vert", "vk.relaxed.errorcheck.frag"}},
+        {{"vk.relaxed.changeSet.vert", "vk.relaxed.changeSet.frag" }, { {"0"}, {"1"} } },
+    }))
+);
+// clang-format on
+
+}  // anonymous namespace
+}  // namespace glslangtest
+#endif 
diff --git a/known_good.json b/known_good.json
index 4442f89..e69a3ae 100644
--- a/known_good.json
+++ b/known_good.json
@@ -5,14 +5,14 @@
       "site" : "github",
       "subrepo" : "KhronosGroup/SPIRV-Tools",
       "subdir" : "External/spirv-tools",
-      "commit" : "c79edd260c2b503f0eca57310057b4a100999cc5"
+      "commit" : "48007a5c7f7cc671b391bebd46e87fd6edc6c24b"
     },
     {
       "name" : "spirv-tools/external/spirv-headers",
       "site" : "github",
       "subrepo" : "KhronosGroup/SPIRV-Headers",
       "subdir" : "External/spirv-tools/external/spirv-headers",
-      "commit" : "75b30a659c8a4979104986652c54cc421fc51129"
+      "commit" : "f88a1f98fa7a44ccfcf33d810c72b200e7d9a78a"
     }
   ]
 }