Merge remote-tracking branch 'aosp/master-ndk' into r16-shaderc

Change-Id: I23276486913ea38e64c45e4b5d35e95645ebd7e4
diff --git a/SPIRV/GLSL.ext.AMD.h b/SPIRV/GLSL.ext.AMD.h
index b5b8dd6..5121ed9 100644
--- a/SPIRV/GLSL.ext.AMD.h
+++ b/SPIRV/GLSL.ext.AMD.h
@@ -33,7 +33,7 @@
 enum Op;
 
 static const int GLSLextAMDVersion = 100;
-static const int GLSLextAMDRevision = 4;
+static const int GLSLextAMDRevision = 5;
 
 // SPV_AMD_shader_ballot
 static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot";
@@ -101,4 +101,9 @@
 // SPV_AMD_gpu_shader_int16
 static const char* const E_SPV_AMD_gpu_shader_int16 = "SPV_AMD_gpu_shader_int16";
 
+// SPV_AMD_shader_image_load_store_lod
+static const char* const E_SPV_AMD_shader_image_load_store_lod = "SPV_AMD_shader_image_load_store_lod";
+
+static const Capability CapabilityImageReadWriteLodAMD = static_cast<Capability>(5015);
+
 #endif  // #ifndef GLSLextAMD_H
diff --git a/SPIRV/GLSL.ext.KHR.h b/SPIRV/GLSL.ext.KHR.h
index 6e02529..2eb10ae 100644
--- a/SPIRV/GLSL.ext.KHR.h
+++ b/SPIRV/GLSL.ext.KHR.h
@@ -42,5 +42,7 @@
 static const char* const E_SPV_KHR_16bit_storage                = "SPV_KHR_16bit_storage";
 static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class";
 static const char* const E_SPV_KHR_post_depth_coverage          = "SPV_KHR_post_depth_coverage";
+static const char* const E_SPV_EXT_shader_stencil_export        = "SPV_EXT_shader_stencil_export";
+static const char* const E_SPV_EXT_shader_viewport_index_layer  = "SPV_EXT_shader_viewport_index_layer";
 
 #endif  // #ifndef GLSLextKHR_H
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 36b2707..b6c9705 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -455,15 +455,13 @@
     case glslang::EbvViewportIndex:
         if (!memberDeclaration) {
             builder.addCapability(spv::CapabilityMultiViewport);
-#ifdef NV_EXTENSIONS
             if (glslangIntermediate->getStage() == EShLangVertex ||
                 glslangIntermediate->getStage() == EShLangTessControl ||
                 glslangIntermediate->getStage() == EShLangTessEvaluation) {
 
-                builder.addExtension(spv::E_SPV_NV_viewport_array2);
-                builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV);
+                builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+                builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
             }
-#endif
         }
         return spv::BuiltInViewportIndex;
 
@@ -482,15 +480,13 @@
     case glslang::EbvLayer:
         if (!memberDeclaration) {
             builder.addCapability(spv::CapabilityGeometry);
-#ifdef NV_EXTENSIONS
             if (glslangIntermediate->getStage() == EShLangVertex ||
                 glslangIntermediate->getStage() == EShLangTessControl ||
                 glslangIntermediate->getStage() == EShLangTessEvaluation) {
 
-                builder.addExtension(spv::E_SPV_NV_viewport_array2);
-                builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV);
+                builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+                builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
             }
-#endif
         }
 
         return spv::BuiltInLayer;
@@ -522,8 +518,9 @@
         return spv::BuiltInPrimitiveId;
 
     case glslang::EbvFragStencilRef:
-        logger->missingFunctionality("shader stencil export");
-        return spv::BuiltInMax;
+        builder.addExtension(spv::E_SPV_EXT_shader_stencil_export);
+        builder.addCapability(spv::CapabilityStencilExportEXT);
+        return spv::BuiltInFragStencilRefEXT;
 
     case glslang::EbvInvocationId:         return spv::BuiltInInvocationId;
     case glslang::EbvTessLevelInner:       return spv::BuiltInTessLevelInner;
@@ -880,11 +877,30 @@
     spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
 
     builder.clearAccessChain();
-    builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion());
+    builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()),
+                      glslangIntermediate->getVersion());
+
     if (options.generateDebugInfo) {
-        builder.setSourceFile(glslangIntermediate->getSourceFile());
-        builder.setSourceText(glslangIntermediate->getSourceText());
         builder.setEmitOpLines();
+        builder.setSourceFile(glslangIntermediate->getSourceFile());
+
+        // Set the source shader's text. If for SPV version 1.0, include
+        // a preamble in comments stating the OpModuleProcessed instructions.
+        // Otherwise, emit those as actual instructions.
+        std::string text;
+        const std::vector<std::string>& processes = glslangIntermediate->getProcesses();
+        for (int p = 0; p < (int)processes.size(); ++p) {
+            if (glslangIntermediate->getSpv().spv < 0x00010100) {
+                text.append("// OpModuleProcessed ");
+                text.append(processes[p]);
+                text.append("\n");
+            } else
+                builder.addModuleProcessed(processes[p]);
+        }
+        if (glslangIntermediate->getSpv().spv < 0x00010100 && (int)processes.size() > 0)
+            text.append("#line 1\n");
+        text.append(glslangIntermediate->getSourceText());
+        builder.setSourceText(text);
     }
     stdBuiltins = builder.import("GLSL.std.450");
     builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
@@ -1452,7 +1468,11 @@
         builder.setAccessChainRValue(result);
 
         return false;
+#ifdef AMD_EXTENSIONS
+    } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) {
+#else
     } else if (node->getOp() == glslang::EOpImageStore) {
+#endif
         // "imageStore" is a special case, which has no result
         return false;
     }
@@ -1745,6 +1765,20 @@
         atomic = true;
         break;
 
+    case glslang::EOpAtomicCounterAdd:
+    case glslang::EOpAtomicCounterSubtract:
+    case glslang::EOpAtomicCounterMin:
+    case glslang::EOpAtomicCounterMax:
+    case glslang::EOpAtomicCounterAnd:
+    case glslang::EOpAtomicCounterOr:
+    case glslang::EOpAtomicCounterXor:
+    case glslang::EOpAtomicCounterExchange:
+    case glslang::EOpAtomicCounterCompSwap:
+        builder.addExtension("SPV_KHR_shader_atomic_counter_ops");
+        builder.addCapability(spv::CapabilityAtomicStorageOps);
+        atomic = true;
+        break;
+
     default:
         break;
     }
@@ -1815,6 +1849,15 @@
         case glslang::EOpAtomicXor:
         case glslang::EOpAtomicExchange:
         case glslang::EOpAtomicCompSwap:
+        case glslang::EOpAtomicCounterAdd:
+        case glslang::EOpAtomicCounterSubtract:
+        case glslang::EOpAtomicCounterMin:
+        case glslang::EOpAtomicCounterMax:
+        case glslang::EOpAtomicCounterAnd:
+        case glslang::EOpAtomicCounterOr:
+        case glslang::EOpAtomicCounterXor:
+        case glslang::EOpAtomicCounterExchange:
+        case glslang::EOpAtomicCounterCompSwap:
             if (arg == 0)
                 lvalue = true;
             break;
@@ -2442,6 +2485,10 @@
     if (member.getFieldName() == "gl_ViewportMaskPerViewNV" &&
         extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
         return true;
+    if ((member.getFieldName() == "gl_ViewportIndex" || member.getFieldName() == "gl_Layer") &&
+        extensions.find(glslang::E_GL_ARB_shader_viewport_layer_array) == extensions.end() &&
+        extensions.find("GL_NV_viewport_array2") == extensions.end())
+        return true;
 
     return false;
 };
@@ -3109,6 +3156,10 @@
             if (i == 4)
                 lvalue = true;
             break;
+        case glslang::EOpSparseImageLoadLod:
+            if (i == 3)
+                lvalue = true;
+            break;
 #endif
         default:
             break;
@@ -3211,26 +3262,55 @@
         }
 
         operands.push_back(*(opIt++));
+#ifdef AMD_EXTENSIONS
+        if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) {
+#else
         if (node->getOp() == glslang::EOpImageLoad) {
+#endif
             if (sampler.ms) {
                 operands.push_back(spv::ImageOperandsSampleMask);
                 operands.push_back(*opIt);
+#ifdef AMD_EXTENSIONS
+            } else if (cracked.lod) {
+                builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
+                builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
+
+                operands.push_back(spv::ImageOperandsLodMask);
+                operands.push_back(*opIt);
+#endif
             }
             if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
                 builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
             return builder.createOp(spv::OpImageRead, resultType(), operands);
+#ifdef AMD_EXTENSIONS
+        } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) {
+#else
         } else if (node->getOp() == glslang::EOpImageStore) {
+#endif
             if (sampler.ms) {
                 operands.push_back(*(opIt + 1));
                 operands.push_back(spv::ImageOperandsSampleMask);
                 operands.push_back(*opIt);
+#ifdef AMD_EXTENSIONS
+            } else if (cracked.lod) {
+                builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
+                builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
+
+                operands.push_back(*(opIt + 1));
+                operands.push_back(spv::ImageOperandsLodMask);
+                operands.push_back(*opIt);
+#endif
             } else
                 operands.push_back(*opIt);
             builder.createNoResultOp(spv::OpImageWrite, operands);
             if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
                 builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat);
             return spv::NoResult;
+#ifdef AMD_EXTENSIONS
+        } else if (node->getOp() == glslang::EOpSparseImageLoad || node->getOp() == glslang::EOpSparseImageLoadLod) {
+#else
         } else if (node->getOp() == glslang::EOpSparseImageLoad) {
+#endif
             builder.addCapability(spv::CapabilitySparseResidency);
             if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
                 builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
@@ -3238,6 +3318,14 @@
             if (sampler.ms) {
                 operands.push_back(spv::ImageOperandsSampleMask);
                 operands.push_back(*opIt++);
+#ifdef AMD_EXTENSIONS
+            } else if (cracked.lod) {
+                builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod);
+                builder.addCapability(spv::CapabilityImageReadWriteLodAMD);
+
+                operands.push_back(spv::ImageOperandsLodMask);
+                operands.push_back(*opIt++);
+#endif
             }
 
             // Create the return type that was a special structure
@@ -4619,34 +4707,45 @@
     switch (op) {
     case glslang::EOpAtomicAdd:
     case glslang::EOpImageAtomicAdd:
+    case glslang::EOpAtomicCounterAdd:
         opCode = spv::OpAtomicIAdd;
         break;
+    case glslang::EOpAtomicCounterSubtract:
+        opCode = spv::OpAtomicISub;
+        break;
     case glslang::EOpAtomicMin:
     case glslang::EOpImageAtomicMin:
+    case glslang::EOpAtomicCounterMin:
         opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin;
         break;
     case glslang::EOpAtomicMax:
     case glslang::EOpImageAtomicMax:
+    case glslang::EOpAtomicCounterMax:
         opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax;
         break;
     case glslang::EOpAtomicAnd:
     case glslang::EOpImageAtomicAnd:
+    case glslang::EOpAtomicCounterAnd:
         opCode = spv::OpAtomicAnd;
         break;
     case glslang::EOpAtomicOr:
     case glslang::EOpImageAtomicOr:
+    case glslang::EOpAtomicCounterOr:
         opCode = spv::OpAtomicOr;
         break;
     case glslang::EOpAtomicXor:
     case glslang::EOpImageAtomicXor:
+    case glslang::EOpAtomicCounterXor:
         opCode = spv::OpAtomicXor;
         break;
     case glslang::EOpAtomicExchange:
     case glslang::EOpImageAtomicExchange:
+    case glslang::EOpAtomicCounterExchange:
         opCode = spv::OpAtomicExchange;
         break;
     case glslang::EOpAtomicCompSwap:
     case glslang::EOpImageAtomicCompSwap:
+    case glslang::EOpAtomicCounterCompSwap:
         opCode = spv::OpAtomicCompareExchange;
         break;
     case glslang::EOpAtomicCounterIncrement:
@@ -5391,14 +5490,12 @@
     }
     else if (builtIn == spv::BuiltInLayer) {
         // SPV_NV_viewport_array2 extension
-        if (symbol->getQualifier().layoutViewportRelative)
-        {
+        if (symbol->getQualifier().layoutViewportRelative) {
             addDecoration(id, (spv::Decoration)spv::DecorationViewportRelativeNV);
             builder.addCapability(spv::CapabilityShaderViewportMaskNV);
             builder.addExtension(spv::E_SPV_NV_viewport_array2);
         }
-        if(symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048)
-        {
+        if (symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048) {
             addDecoration(id, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, symbol->getQualifier().layoutSecondaryViewportRelativeOffset);
             builder.addCapability(spv::CapabilityShaderStereoViewNV);
             builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index d472eb5..289d59a 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -402,6 +402,8 @@
 
 Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format)
 {
+    assert(sampled == 1 || sampled == 2);
+
     // try to find it
     Instruction* type;
     for (int t = 0; t < (int)groupedTypes[OpTypeImage].size(); ++t) {
@@ -433,27 +435,27 @@
     // deal with capabilities
     switch (dim) {
     case DimBuffer:
-        if (sampled)
+        if (sampled == 1)
             addCapability(CapabilitySampledBuffer);
         else
             addCapability(CapabilityImageBuffer);
         break;
     case Dim1D:
-        if (sampled)
+        if (sampled == 1)
             addCapability(CapabilitySampled1D);
         else
             addCapability(CapabilityImage1D);
         break;
     case DimCube:
         if (arrayed) {
-            if (sampled)
+            if (sampled == 1)
                 addCapability(CapabilitySampledCubeArray);
             else
                 addCapability(CapabilityImageCubeArray);
         }
         break;
     case DimRect:
-        if (sampled)
+        if (sampled == 1)
             addCapability(CapabilitySampledRect);
         else
             addCapability(CapabilityImageRect);
@@ -466,10 +468,11 @@
     }
 
     if (ms) {
-        if (arrayed)
-            addCapability(CapabilityImageMSArray);
-        if (! sampled)
+        if (sampled == 2) {
             addCapability(CapabilityStorageImageMultisample);
+            if (arrayed)
+                addCapability(CapabilityImageMSArray);
+        }
     }
 
     return type->getResultId();
@@ -2427,6 +2430,7 @@
 
     // Debug instructions
     dumpInstructions(out, strings);
+    dumpModuleProcesses(out);
     dumpSourceInstructions(out);
     for (int e = 0; e < (int)sourceExtensions.size(); ++e) {
         Instruction sourceExtInst(0, 0, OpSourceExtension);
@@ -2634,4 +2638,15 @@
     }
 }
 
+void Builder::dumpModuleProcesses(std::vector<unsigned int>& out) const
+{
+    for (int i = 0; i < (int)moduleProcesses.size(); ++i) {
+        // TODO: switch this out for the 1.1 headers
+        const spv::Op OpModuleProcessed = (spv::Op)330;
+        Instruction moduleProcessed(OpModuleProcessed);
+        moduleProcessed.addStringOperand(moduleProcesses[i]);
+        moduleProcessed.dump(out);
+    }
+}
+
 }; // end spv namespace
diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h
index 3a94919..59b1da2 100755
--- a/SPIRV/SpvBuilder.h
+++ b/SPIRV/SpvBuilder.h
@@ -79,6 +79,7 @@
     }
     void setSourceText(const std::string& text) { sourceText = text; }
     void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); }
+    void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
     void setEmitOpLines() { emitOpLines = true; }
     void addExtension(const char* ext) { extensions.insert(ext); }
     Id import(const char*);
@@ -582,6 +583,7 @@
     void createSelectionMerge(Block* mergeBlock, unsigned int control);
     void dumpSourceInstructions(std::vector<unsigned int>&) const;
     void dumpInstructions(std::vector<unsigned int>&, const std::vector<std::unique_ptr<Instruction> >&) const;
+    void dumpModuleProcesses(std::vector<unsigned int>&) const;
 
     SourceLanguage source;
     int sourceVersion;
@@ -591,6 +593,7 @@
     bool emitOpLines;
     std::set<std::string> extensions;
     std::vector<const char*> sourceExtensions;
+    std::vector<const char*> moduleProcesses;
     AddressingModel addressModel;
     MemoryModel memoryModel;
     std::set<spv::Capability> capabilities;
diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp
index fb0cc36..2fe5d9c 100755
--- a/SPIRV/doc.cpp
+++ b/SPIRV/doc.cpp
@@ -331,6 +331,7 @@
     case 4424: return "BaseVertex";
     case 4425: return "BaseInstance";
     case 4426: return "DrawIndex";
+    case 5014: return "FragStencilRefEXT";
 
 #ifdef AMD_EXTENSIONS
     case 4992: return "BaryCoordNoPerspAMD";
@@ -842,10 +843,15 @@
     case 4437: return "DeviceGroup";
     case 4439: return "MultiView";
 
+    case 5013: return "StencilExportEXT";
+
 #ifdef AMD_EXTENSIONS
     case 5009: return "ImageGatherBiasLodAMD";
+    case 5015: return "ImageReadWriteLodAMD";
 #endif
 
+    case 4445: return "AtomicStorageOps";
+
     case 4447: return "SampleMaskPostDepthCoverage";
 #ifdef NV_EXTENSIONS
     case 5251: return "GeometryShaderPassthroughNV";
diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h
index 31b9f9e..905b21a 100644
--- a/SPIRV/hex_float.h
+++ b/SPIRV/hex_float.h
@@ -23,7 +23,7 @@
 #include <limits>
 #include <sstream>
 
-#if defined(_MSC_VER) && _MSC_VER < 1700
+#if defined(_MSC_VER) && _MSC_VER < 1800
 namespace std {
 bool isnan(double f)
 {
diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp
index 338f6a1..8bddf7e 100755
--- a/SPIRV/spirv.hpp
+++ b/SPIRV/spirv.hpp
@@ -47,11 +47,11 @@
 typedef unsigned int Id;
 
 #define SPV_VERSION 0x10000
-#define SPV_REVISION 11
+#define SPV_REVISION 12
 
 static const unsigned int MagicNumber = 0x07230203;
 static const unsigned int Version = 0x00010000;
-static const unsigned int Revision = 11;
+static const unsigned int Revision = 12;
 static const unsigned int OpCodeMask = 0xffff;
 static const unsigned int WordCountShift = 16;
 
@@ -444,6 +444,7 @@
     BuiltInBaryCoordSmoothCentroidAMD = 4996,
     BuiltInBaryCoordSmoothSampleAMD = 4997,
     BuiltInBaryCoordPullModelAMD = 4998,
+    BuiltInFragStencilRefEXT = 5014,
     BuiltInViewportMaskNV = 5253,
     BuiltInSecondaryPositionNV = 5257,
     BuiltInSecondaryViewportMaskNV = 5258,
@@ -640,8 +641,10 @@
     CapabilityAtomicStorageOps = 4445,
     CapabilitySampleMaskPostDepthCoverage = 4447,
     CapabilityImageGatherBiasLodAMD = 5009,
+    CapabilityStencilExportEXT = 5013,
     CapabilitySampleMaskOverrideCoverageNV = 5249,
     CapabilityGeometryShaderPassthroughNV = 5251,
+    CapabilityShaderViewportIndexLayerEXT = 5254,
     CapabilityShaderViewportIndexLayerNV = 5254,
     CapabilityShaderViewportMaskNV = 5255,
     CapabilityShaderStereoViewNV = 5259,
diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h
index 087a53f..6880595 100755
--- a/SPIRV/spvIR.h
+++ b/SPIRV/spvIR.h
@@ -65,6 +65,14 @@
 const Id NoType = 0;
 
 const Decoration NoPrecision = DecorationMax;
+
+#ifdef __GNUC__
+#   define POTENTIALLY_UNUSED __attribute__((unused))
+#else
+#   define POTENTIALLY_UNUSED
+#endif
+
+POTENTIALLY_UNUSED
 const MemorySemanticsMask MemorySemanticsAllMemory =
                 (MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask |
                                       MemorySemanticsUniformMemoryMask |
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 3301df4..53a33b8 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -152,6 +152,7 @@
 int VulkanClientVersion = 100;           // would map to, say, Vulkan 1.0
 int OpenGLClientVersion = 450;           // doesn't influence anything yet, but maps to OpenGL 4.50
 unsigned int TargetVersion = 0x00001000; // maps to, say, SPIR-V 1.0
+std::vector<std::string> Processes;      // what should be recorded by OpModuleProcessed, or equivalent
 
 std::array<unsigned int, EShLangCount> baseSamplerBinding;
 std::array<unsigned int, EShLangCount> baseTextureBinding;
@@ -175,6 +176,9 @@
         text.append("#define ");
         fixLine(def);
 
+        Processes.push_back("D");
+        Processes.back().append(def);
+
         // The first "=" needs to turn into a space
         const size_t equal = def.find_first_of("=");
         if (equal != def.npos)
@@ -189,6 +193,10 @@
     {
         text.append("#undef ");
         fixLine(undef);
+
+        Processes.push_back("U");
+        Processes.back().append(undef);
+
         text.append(undef);
         text.append("\n");
     }
@@ -421,6 +429,8 @@
                     } else if (lowerword == "no-storage-format" || // synonyms
                                lowerword == "nsf") {
                         Options |= EOptionNoStorageFormat;
+                    } else if (lowerword == "relaxed-errors") {
+                        Options |= EOptionRelaxedErrors;
                     } else if (lowerword == "resource-set-bindings" ||  // synonyms
                                lowerword == "resource-set-binding"  ||
                                lowerword == "rsb") {
@@ -459,6 +469,8 @@
                         sourceEntryPointName = argv[1];
                         bumpArg();
                         break;
+                    } else if (lowerword == "suppress-warnings") {
+                        Options |= EOptionSuppressWarnings;
                     } else if (lowerword == "target-env") {
                         if (argc > 1) {
                             if (strcmp(argv[1], "vulkan1.0") == 0) {
@@ -737,6 +749,7 @@
             shader->setSourceEntryPoint(sourceEntryPointName);
         if (UserPreamble.isSet())
             shader->setPreamble(UserPreamble.get());
+        shader->addProcesses(Processes);
 
         shader->setShiftSamplerBinding(baseSamplerBinding[compUnit.stage]);
         shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]);
@@ -1162,11 +1175,11 @@
            "  -m          memory leak mode\n"
            "  -o  <file>  save binary to <file>, requires a binary option (e.g., -V)\n"
            "  -q          dump reflection query database\n"
-           "  -r          relaxed semantic error-checking mode\n"
+           "  -r          synonym for --relaxed-errors\n"
            "  -s          silent mode\n"
            "  -t          multi-threaded mode\n"
            "  -v          print version strings\n"
-           "  -w          suppress warnings (except as required by #extension : warn)\n"
+           "  -w          synonym for --suppress-warnings\n"
            "  -x          save binary output as text-based 32-bit hexadecimal numbers\n"
            "  --auto-map-bindings                  automatically bind uniform variables\n"
            "                                       without explicit bindings.\n"
@@ -1185,6 +1198,7 @@
            "  --ku                                 synonym for --keep-uncalled\n"
            "  --no-storage-format                  use Unknown image format\n"
            "  --nsf                                synonym for --no-storage-format\n"
+           "  --relaxed-errors                     relaxed GLSL semantic error-checking mode\n"
            "  --resource-set-binding [stage] name set binding\n"
            "              Set descriptor set and binding for individual resources\n"
            "  --resource-set-binding [stage] set\n"
@@ -1206,11 +1220,13 @@
            "  --source-entrypoint name             the given shader source function is\n"
            "                                       renamed to be the entry point given in -e\n"
            "  --sep                                synonym for --source-entrypoint\n"
-           "  --target-env {vulkan1.0|opengl}      set the execution environment the generated\n"
-           "                                       code will execute in (as opposed to language\n"
-           "                                       semantics selected by --client)\n"
-           "                                       default is 'vulkan1.0' under '--client vulkan'\n"
-           "                                       default is 'opengl' under '--client opengl'\n"
+           "  --suppress-warnings                  suppress GLSL warnings\n"
+           "                                       (except as required by #extension : warn)\n"
+           "  --target-env {vulkan1.0|opengl}      set the execution environment code will\n"
+           "                                       execute in (as opposed to language\n"
+           "                                       semantics selected by --client) defaults:\n"
+           "                                        'vulkan1.0' under '--client vulkan<ver>'\n"
+           "                                        'opengl' under '--client opengl<ver>'\n"
            "  --variable-name <name>               Creates a C header file that contains a\n"
            "                                       uint32_t array named <name>\n"
            "                                       initialized with the shader binary code.\n"
diff --git a/Test/450.vert b/Test/450.vert
index 0834d16..51e9b10 100644
--- a/Test/450.vert
+++ b/Test/450.vert
@@ -22,7 +22,27 @@
 struct SS { float f; S s; };

 out SS outSS;

 

+layout(binding = 0) uniform atomic_uint aui;

+uint ui;

+

 void foo()

 {

     SS::f;

+    atomicCounterAdd(aui, ui);           // ERROR, need 4.6

+    atomicCounterSubtract(aui, ui);      // ERROR, need 4.6

+    atomicCounterMin(aui, ui);           // ERROR, need 4.6

+    atomicCounterMax(aui, ui);           // ERROR, need 4.6

+    atomicCounterAnd(aui, ui);           // ERROR, need 4.6

+    atomicCounterOr(aui, ui);            // ERROR, need 4.6

+    atomicCounterXor(aui, ui);           // ERROR, need 4.6

+    atomicCounterExchange(aui, ui);      // ERROR, need 4.6

+    atomicCounterCompSwap(aui, ui, ui);  // ERROR, need 4.6

+

+    int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID; // ERROR, need 4.6

+

+    bool b1;

+    anyInvocation(b1);        // ERROR, need 4.6

+    allInvocations(b1);       // ERROR, need 4.6

+    allInvocationsEqual(b1);  // ERROR, need 4.6

 }

+; // ERROR: no extraneous semicolons

diff --git a/Test/460.frag b/Test/460.frag
new file mode 100644
index 0000000..43a7c3b
--- /dev/null
+++ b/Test/460.frag
@@ -0,0 +1,17 @@
+#version 460 core

+

+struct S {

+    float f;

+    vec4 v;

+};

+

+in S s;

+

+void main()

+{

+    interpolateAtCentroid(s.v);

+    bool b1;

+    b1 = anyInvocation(b1);

+    b1 = allInvocations(b1);

+    b1 = allInvocationsEqual(b1);

+}

diff --git a/Test/460.vert b/Test/460.vert
new file mode 100644
index 0000000..fd87d8b
--- /dev/null
+++ b/Test/460.vert
@@ -0,0 +1,15 @@
+#version 460 core

+

+int i;

+; // extraneous semicolon okay

+float f;;;

+

+void main()

+{

+    bool b1;

+    b1 = anyInvocation(b1);

+    b1 = allInvocations(b1);

+    b1 = allInvocationsEqual(b1);

+}

+;

+;

diff --git a/Test/baseResults/450.vert.out b/Test/baseResults/450.vert.out
index d2a05a9..64143de 100644
--- a/Test/baseResults/450.vert.out
+++ b/Test/baseResults/450.vert.out
@@ -1,8 +1,25 @@
 450.vert
 ERROR: 0:12: 'out' : cannot be bool 
 ERROR: 0:13: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
-ERROR: 0:27: '::' : not supported 
-ERROR: 3 compilation errors.  No code generated.
+ERROR: 0:30: '::' : not supported 
+ERROR: 0:31: 'atomicCounterAdd' : no matching overloaded function found 
+ERROR: 0:32: 'atomicCounterSubtract' : no matching overloaded function found 
+ERROR: 0:33: 'atomicCounterMin' : no matching overloaded function found 
+ERROR: 0:34: 'atomicCounterMax' : no matching overloaded function found 
+ERROR: 0:35: 'atomicCounterAnd' : no matching overloaded function found 
+ERROR: 0:36: 'atomicCounterOr' : no matching overloaded function found 
+ERROR: 0:37: 'atomicCounterXor' : no matching overloaded function found 
+ERROR: 0:38: 'atomicCounterExchange' : no matching overloaded function found 
+ERROR: 0:39: 'atomicCounterCompSwap' : no matching overloaded function found 
+ERROR: 0:41: 'gl_BaseVertex' : undeclared identifier 
+ERROR: 0:41: 'gl_BaseInstance' : undeclared identifier 
+ERROR: 0:41: 'gl_DrawID' : undeclared identifier 
+ERROR: 0:41: '=' :  cannot convert from ' temp float' to ' temp int'
+ERROR: 0:44: 'anyInvocation' : no matching overloaded function found 
+ERROR: 0:45: 'allInvocations' : no matching overloaded function found 
+ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found 
+ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions 
+ERROR: 20 compilation errors.  No code generated.
 
 
 Shader version: 450
@@ -20,8 +37,33 @@
 0:9            2 (const int)
 0:9        Constant:
 0:9          4.500000
-0:25  Function Definition: foo( ( global void)
-0:25    Function Parameters: 
+0:28  Function Definition: foo( ( global void)
+0:28    Function Parameters: 
+0:?     Sequence
+0:31      Constant:
+0:31        0.000000
+0:32      Constant:
+0:32        0.000000
+0:33      Constant:
+0:33        0.000000
+0:34      Constant:
+0:34        0.000000
+0:35      Constant:
+0:35        0.000000
+0:36      Constant:
+0:36        0.000000
+0:37      Constant:
+0:37        0.000000
+0:38      Constant:
+0:38        0.000000
+0:39      Constant:
+0:39        0.000000
+0:44      Constant:
+0:44        0.000000
+0:45      Constant:
+0:45        0.000000
+0:46      Constant:
+0:46        0.000000
 0:?   Linker Objects
 0:?     'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
 0:?     'outb' ( smooth out bool)
@@ -33,6 +75,8 @@
 0:?     'outsa' ( smooth out 4-element array of structure{ global float f})
 0:?     'outSA' ( smooth out structure{ global 4-element array of float f})
 0:?     'outSS' ( smooth out structure{ global float f,  global structure{ global float f} s})
+0:?     'aui' (layout( binding=0 offset=0) uniform atomic_uint)
+0:?     'ui' ( global uint)
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
@@ -66,6 +110,8 @@
 0:?     'outsa' ( smooth out 4-element array of structure{ global float f})
 0:?     'outSA' ( smooth out structure{ global 4-element array of float f})
 0:?     'outSS' ( smooth out structure{ global float f,  global structure{ global float f} s})
+0:?     'aui' (layout( binding=0 offset=0) uniform atomic_uint)
+0:?     'ui' ( global uint)
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
diff --git a/Test/baseResults/460.frag.out b/Test/baseResults/460.frag.out
new file mode 100755
index 0000000..883d949
--- /dev/null
+++ b/Test/baseResults/460.frag.out
@@ -0,0 +1,55 @@
+460.frag
+Shader version: 460
+0:? Sequence
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      interpolateAtCentroid ( global 4-component vector of float)
+0:12        v: direct index for structure ( global 4-component vector of float)
+0:12          's' ( smooth in structure{ global float f,  global 4-component vector of float v})
+0:12          Constant:
+0:12            1 (const int)
+0:14      move second child to first child ( temp bool)
+0:14        'b1' ( temp bool)
+0:14        anyInvocation ( global bool)
+0:14          'b1' ( temp bool)
+0:15      move second child to first child ( temp bool)
+0:15        'b1' ( temp bool)
+0:15        allInvocations ( global bool)
+0:15          'b1' ( temp bool)
+0:16      move second child to first child ( temp bool)
+0:16        'b1' ( temp bool)
+0:16        allInvocationsEqual ( global bool)
+0:16          'b1' ( temp bool)
+0:?   Linker Objects
+0:?     's' ( smooth in structure{ global float f,  global 4-component vector of float v})
+
+
+Linked fragment stage:
+
+
+Shader version: 460
+0:? Sequence
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      interpolateAtCentroid ( global 4-component vector of float)
+0:12        v: direct index for structure ( global 4-component vector of float)
+0:12          's' ( smooth in structure{ global float f,  global 4-component vector of float v})
+0:12          Constant:
+0:12            1 (const int)
+0:14      move second child to first child ( temp bool)
+0:14        'b1' ( temp bool)
+0:14        anyInvocation ( global bool)
+0:14          'b1' ( temp bool)
+0:15      move second child to first child ( temp bool)
+0:15        'b1' ( temp bool)
+0:15        allInvocations ( global bool)
+0:15          'b1' ( temp bool)
+0:16      move second child to first child ( temp bool)
+0:16        'b1' ( temp bool)
+0:16        allInvocationsEqual ( global bool)
+0:16          'b1' ( temp bool)
+0:?   Linker Objects
+0:?     's' ( smooth in structure{ global float f,  global 4-component vector of float v})
+
diff --git a/Test/baseResults/460.vert.out b/Test/baseResults/460.vert.out
new file mode 100755
index 0000000..8fa659b
--- /dev/null
+++ b/Test/baseResults/460.vert.out
@@ -0,0 +1,51 @@
+460.vert
+Shader version: 460
+0:? Sequence
+0:7  Function Definition: main( ( global void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp bool)
+0:10        'b1' ( temp bool)
+0:10        anyInvocation ( global bool)
+0:10          'b1' ( temp bool)
+0:11      move second child to first child ( temp bool)
+0:11        'b1' ( temp bool)
+0:11        allInvocations ( global bool)
+0:11          'b1' ( temp bool)
+0:12      move second child to first child ( temp bool)
+0:12        'b1' ( temp bool)
+0:12        allInvocationsEqual ( global bool)
+0:12          'b1' ( temp bool)
+0:?   Linker Objects
+0:?     'i' ( global int)
+0:?     'f' ( global float)
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 460
+0:? Sequence
+0:7  Function Definition: main( ( global void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:10      move second child to first child ( temp bool)
+0:10        'b1' ( temp bool)
+0:10        anyInvocation ( global bool)
+0:10          'b1' ( temp bool)
+0:11      move second child to first child ( temp bool)
+0:11        'b1' ( temp bool)
+0:11        allInvocations ( global bool)
+0:11          'b1' ( temp bool)
+0:12      move second child to first child ( temp bool)
+0:12        'b1' ( temp bool)
+0:12        allInvocationsEqual ( global bool)
+0:12          'b1' ( temp bool)
+0:?   Linker Objects
+0:?     'i' ( global int)
+0:?     'f' ( global float)
+0:?     'gl_VertexID' ( gl_VertexId int VertexId)
+0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
+
diff --git a/Test/baseResults/glspv.frag.out b/Test/baseResults/glspv.frag.out
index 36afc83..5622d01 100755
--- a/Test/baseResults/glspv.frag.out
+++ b/Test/baseResults/glspv.frag.out
@@ -1,10 +1,9 @@
 glspv.frag
 ERROR: 0:4: '#error' : GL_SPIRV is set ( correct , not an error )  
 ERROR: 0:6: '#error' : GL_SPIR is 100  
-ERROR: 0:14: 'f' : non-opaque uniform variables need a layout(location=L) 
 ERROR: 0:19: 'input_attachment_index' : only allowed when using GLSL for Vulkan 
 ERROR: 0:19: '' :  syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
-ERROR: 5 compilation errors.  No code generated.
+ERROR: 4 compilation errors.  No code generated.
 
 
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.aliasOpaque.frag.out b/Test/baseResults/hlsl.aliasOpaque.frag.out
index 370dcb1..222322e 100755
--- a/Test/baseResults/hlsl.aliasOpaque.frag.out
+++ b/Test/baseResults/hlsl.aliasOpaque.frag.out
@@ -4,17 +4,17 @@
 0:? Sequence
 0:12  Function Definition: osCall(struct-OS-p1-f1-t211; ( temp 4-component vector of float)
 0:12    Function Parameters: 
-0:?       'ss' ( in sampler)
-0:?       'a' ( in float)
-0:?       'tex' ( in texture2D)
+0:?       's.ss' ( in sampler)
+0:?       's.a' ( in float)
+0:?       's.tex' ( in texture2D)
 0:?     Sequence
 0:13      Branch: Return with expression
 0:13        vector-scale ( temp 4-component vector of float)
-0:?           'a' ( in float)
+0:?           's.a' ( in float)
 0:13          texture ( temp 4-component vector of float)
 0:13            Construct combined texture-sampler ( temp sampler2D)
-0:?               'tex' ( in texture2D)
-0:?               'ss' ( in sampler)
+0:?               's.tex' ( in texture2D)
+0:?               's.ss' ( in sampler)
 0:?             Constant:
 0:?               0.200000
 0:?               0.300000
@@ -25,13 +25,13 @@
 0:20      'gss' ( uniform sampler)
 0:21      'gtex' ( uniform texture2D)
 0:22      move second child to first child ( temp float)
-0:?         'a' ( temp float)
+0:?         'os.a' ( temp float)
 0:22        Constant:
 0:22          3.000000
 0:28      Branch: Return with expression
 0:28        Function Call: osCall(struct-OS-p1-f1-t211; ( temp 4-component vector of float)
 0:?           'gss' ( uniform sampler)
-0:?           'a' ( temp float)
+0:?           'os.a' ( temp float)
 0:?           'gtex' ( uniform texture2D)
 0:17  Function Definition: main( ( temp void)
 0:17    Function Parameters: 
@@ -54,17 +54,17 @@
 0:? Sequence
 0:12  Function Definition: osCall(struct-OS-p1-f1-t211; ( temp 4-component vector of float)
 0:12    Function Parameters: 
-0:?       'ss' ( in sampler)
-0:?       'a' ( in float)
-0:?       'tex' ( in texture2D)
+0:?       's.ss' ( in sampler)
+0:?       's.a' ( in float)
+0:?       's.tex' ( in texture2D)
 0:?     Sequence
 0:13      Branch: Return with expression
 0:13        vector-scale ( temp 4-component vector of float)
-0:?           'a' ( in float)
+0:?           's.a' ( in float)
 0:13          texture ( temp 4-component vector of float)
 0:13            Construct combined texture-sampler ( temp sampler2D)
-0:?               'tex' ( in texture2D)
-0:?               'ss' ( in sampler)
+0:?               's.tex' ( in texture2D)
+0:?               's.ss' ( in sampler)
 0:?             Constant:
 0:?               0.200000
 0:?               0.300000
@@ -75,13 +75,13 @@
 0:20      'gss' ( uniform sampler)
 0:21      'gtex' ( uniform texture2D)
 0:22      move second child to first child ( temp float)
-0:?         'a' ( temp float)
+0:?         'os.a' ( temp float)
 0:22        Constant:
 0:22          3.000000
 0:28      Branch: Return with expression
 0:28        Function Call: osCall(struct-OS-p1-f1-t211; ( temp 4-component vector of float)
 0:?           'gss' ( uniform sampler)
-0:?           'a' ( temp float)
+0:?           'os.a' ( temp float)
 0:?           'gtex' ( uniform texture2D)
 0:17  Function Definition: main( ( temp void)
 0:17    Function Parameters: 
@@ -107,14 +107,14 @@
                               Source HLSL 500
                               Name 4  "main"
                               Name 17  "osCall(struct-OS-p1-f1-t211;"
-                              Name 14  "ss"
-                              Name 15  "a"
-                              Name 16  "tex"
+                              Name 14  "s.ss"
+                              Name 15  "s.a"
+                              Name 16  "s.tex"
                               Name 20  "@main("
                               Name 35  "gss2"
                               Name 36  "gss"
                               Name 37  "gtex"
-                              Name 38  "a"
+                              Name 38  "os.a"
                               Name 40  "param"
                               Name 46  "@entryPointOutput"
                               Decorate 35(gss2) DescriptorSet 0
@@ -150,13 +150,13 @@
                               Return
                               FunctionEnd
 17(osCall(struct-OS-p1-f1-t211;):   12(fvec4) Function None 13
-          14(ss):      7(ptr) FunctionParameter
-           15(a):      9(ptr) FunctionParameter
-         16(tex):     11(ptr) FunctionParameter
+        14(s.ss):      7(ptr) FunctionParameter
+         15(s.a):      9(ptr) FunctionParameter
+       16(s.tex):     11(ptr) FunctionParameter
               18:             Label
-              22:    8(float) Load 15(a)
-              23:          10 Load 16(tex)
-              24:           6 Load 14(ss)
+              22:    8(float) Load 15(s.a)
+              23:          10 Load 16(s.tex)
+              24:           6 Load 14(s.ss)
               26:          25 SampledImage 23 24
               31:   12(fvec4) ImageSampleImplicitLod 26 30
               32:   12(fvec4) VectorTimesScalar 31 22
@@ -164,10 +164,10 @@
                               FunctionEnd
       20(@main():   12(fvec4) Function None 19
               21:             Label
-           38(a):      9(ptr) Variable Function
+        38(os.a):      9(ptr) Variable Function
        40(param):      9(ptr) Variable Function
-                              Store 38(a) 39
-              41:    8(float) Load 38(a)
+                              Store 38(os.a) 39
+              41:    8(float) Load 38(os.a)
                               Store 40(param) 41
               42:   12(fvec4) FunctionCall 17(osCall(struct-OS-p1-f1-t211;) 36(gss) 40(param) 37(gtex)
                               ReturnValue 42
diff --git a/Test/baseResults/hlsl.array.flatten.frag.out b/Test/baseResults/hlsl.array.flatten.frag.out
index 7385cea..0129ede 100644
--- a/Test/baseResults/hlsl.array.flatten.frag.out
+++ b/Test/baseResults/hlsl.array.flatten.frag.out
@@ -147,7 +147,7 @@
 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:31      Sequence
 0:31        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
 0:31          color: direct index for structure ( temp 4-component vector of float)
 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:31            Constant:
@@ -167,7 +167,7 @@
 0:?     'g_samp_explicit[2]' (layout( binding=7) uniform sampler)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit,  uniform 4-element array of float g_floats})
 0:?     'not_flattened_a' ( global 5-element array of int)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -321,7 +321,7 @@
 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:31      Sequence
 0:31        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
 0:31          color: direct index for structure ( temp 4-component vector of float)
 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:31            Constant:
@@ -341,7 +341,7 @@
 0:?     'g_samp_explicit[2]' (layout( binding=7) uniform sampler)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit,  uniform 4-element array of float g_floats})
 0:?     'not_flattened_a' ( global 5-element array of int)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -382,7 +382,7 @@
                               Name 112  "aggShadow"
                               Name 123  "ps_output"
                               Name 124  "param"
-                              Name 128  "color"
+                              Name 128  "ps_output.color"
                               Name 131  "g_tex_explicit[0]"
                               Name 132  "g_tex_explicit[1]"
                               Name 133  "g_tex_explicit[2]"
@@ -407,7 +407,7 @@
                               MemberDecorate 89($Global) 2 Offset 384
                               Decorate 89($Global) Block
                               Decorate 91 DescriptorSet 0
-                              Decorate 128(color) Location 0
+                              Decorate 128(ps_output.color) Location 0
                               Decorate 131(g_tex_explicit[0]) DescriptorSet 0
                               Decorate 131(g_tex_explicit[0]) Binding 1
                               Decorate 132(g_tex_explicit[1]) DescriptorSet 0
@@ -478,7 +478,7 @@
   112(aggShadow):     18(ptr) Variable UniformConstant
              121:             TypePointer Function 7(fvec4)
              127:             TypePointer Output 7(fvec4)
-      128(color):    127(ptr) Variable Output
+128(ps_output.color):    127(ptr) Variable Output
 131(g_tex_explicit[0]):     41(ptr) Variable UniformConstant
 132(g_tex_explicit[1]):     41(ptr) Variable UniformConstant
 133(g_tex_explicit[2]):     41(ptr) Variable UniformConstant
@@ -495,7 +495,7 @@
                               Store 123(ps_output) 126
              129:    121(ptr) AccessChain 123(ps_output) 62
              130:    7(fvec4) Load 129
-                              Store 128(color) 130
+                              Store 128(ps_output.color) 130
                               Return
                               FunctionEnd
      9(TestFn1():    7(fvec4) Function None 8
diff --git a/Test/baseResults/hlsl.array.multidim.frag.out b/Test/baseResults/hlsl.array.multidim.frag.out
index 72fa2ec..c62fd7d 100644
--- a/Test/baseResults/hlsl.array.multidim.frag.out
+++ b/Test/baseResults/hlsl.array.multidim.frag.out
@@ -55,14 +55,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 5-element array of 4-element array of 3-element array of float float_array})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -124,14 +124,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 5-element array of 4-element array of 3-element array of float float_array})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -153,14 +153,14 @@
                               Name 29  ""
                               Name 40  "float4_array_2"
                               Name 46  "psout"
-                              Name 54  "Color"
+                              Name 54  "@entryPointOutput.Color"
                               Decorate 22 ArrayStride 16
                               Decorate 24 ArrayStride 48
                               Decorate 26 ArrayStride 192
                               MemberDecorate 27($Global) 0 Offset 0
                               Decorate 27($Global) Block
                               Decorate 29 DescriptorSet 0
-                              Decorate 54(Color) Location 0
+                              Decorate 54(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -193,12 +193,12 @@
               41:             TypePointer Function 14
               45:             TypePointer Function 8(PS_OUTPUT)
               53:             TypePointer Output 7(fvec4)
-       54(Color):     53(ptr) Variable Output
+54(@entryPointOutput.Color):     53(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               55:8(PS_OUTPUT) FunctionCall 10(@main()
               56:    7(fvec4) CompositeExtract 55 0
-                              Store 54(Color) 56
+                              Store 54(@entryPointOutput.Color) 56
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.basic.geom.out b/Test/baseResults/hlsl.basic.geom.out
index 64239c5..220180c 100644
--- a/Test/baseResults/hlsl.basic.geom.out
+++ b/Test/baseResults/hlsl.basic.geom.out
@@ -42,14 +42,34 @@
 0:20            Constant:
 0:20              0 (const int)
 0:22      Sequence
-0:22        move second child to first child ( temp structure{ temp float myfloat,  temp int something})
-0:22          'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
-0:22          'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22        Sequence
+0:22          move second child to first child ( temp float)
+0:?             'OutputStream.myfloat' (layout( location=0) out float)
+0:22            myfloat: direct index for structure ( temp float)
+0:22              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22              Constant:
+0:22                0 (const int)
+0:22          move second child to first child ( temp int)
+0:?             'OutputStream.something' (layout( location=1) out int)
+0:22            something: direct index for structure ( temp int)
+0:22              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22              Constant:
+0:22                1 (const int)
 0:22        EmitVertex ( temp void)
 0:23      Sequence
-0:23        move second child to first child ( temp structure{ temp float myfloat,  temp int something})
-0:23          'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
-0:23          'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23        Sequence
+0:23          move second child to first child ( temp float)
+0:?             'OutputStream.myfloat' (layout( location=0) out float)
+0:23            myfloat: direct index for structure ( temp float)
+0:23              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23              Constant:
+0:23                0 (const int)
+0:23          move second child to first child ( temp int)
+0:?             'OutputStream.something' (layout( location=1) out int)
+0:23            something: direct index for structure ( temp int)
+0:23              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23              Constant:
+0:23                1 (const int)
 0:23        EmitVertex ( temp void)
 0:24      EndPrimitive ( temp void)
 0:16  Function Definition: main( ( temp void)
@@ -68,7 +88,8 @@
 0:?   Linker Objects
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
 0:?     'test' (layout( location=1) in 3-element array of uint)
-0:?     'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
+0:?     'OutputStream.myfloat' (layout( location=0) out float)
+0:?     'OutputStream.something' (layout( location=1) out int)
 
 
 Linked geometry stage:
@@ -117,14 +138,34 @@
 0:20            Constant:
 0:20              0 (const int)
 0:22      Sequence
-0:22        move second child to first child ( temp structure{ temp float myfloat,  temp int something})
-0:22          'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
-0:22          'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22        Sequence
+0:22          move second child to first child ( temp float)
+0:?             'OutputStream.myfloat' (layout( location=0) out float)
+0:22            myfloat: direct index for structure ( temp float)
+0:22              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22              Constant:
+0:22                0 (const int)
+0:22          move second child to first child ( temp int)
+0:?             'OutputStream.something' (layout( location=1) out int)
+0:22            something: direct index for structure ( temp int)
+0:22              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:22              Constant:
+0:22                1 (const int)
 0:22        EmitVertex ( temp void)
 0:23      Sequence
-0:23        move second child to first child ( temp structure{ temp float myfloat,  temp int something})
-0:23          'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
-0:23          'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23        Sequence
+0:23          move second child to first child ( temp float)
+0:?             'OutputStream.myfloat' (layout( location=0) out float)
+0:23            myfloat: direct index for structure ( temp float)
+0:23              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23              Constant:
+0:23                0 (const int)
+0:23          move second child to first child ( temp int)
+0:?             'OutputStream.something' (layout( location=1) out int)
+0:23            something: direct index for structure ( temp int)
+0:23              'Vert' ( temp structure{ temp float myfloat,  temp int something})
+0:23              Constant:
+0:23                1 (const int)
 0:23        EmitVertex ( temp void)
 0:24      EndPrimitive ( temp void)
 0:16  Function Definition: main( ( temp void)
@@ -143,16 +184,17 @@
 0:?   Linker Objects
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
 0:?     'test' (layout( location=1) in 3-element array of uint)
-0:?     'OutputStream' (layout( location=0) out structure{ temp float myfloat,  temp int something})
+0:?     'OutputStream.myfloat' (layout( location=0) out float)
+0:?     'OutputStream.something' (layout( location=1) out int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 60
+// Id's are bound by 68
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 42 47 50
+                              EntryPoint Geometry 4  "main" 42 46 55 58
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputLineStrip
@@ -167,18 +209,20 @@
                               Name 16  "test"
                               Name 17  "OutputStream"
                               Name 20  "Vert"
-                              Name 42  "OutputStream"
-                              Name 45  "VertexID"
-                              Name 47  "VertexID"
-                              Name 49  "test"
-                              Name 50  "test"
-                              Name 52  "OutputStream"
-                              Name 53  "param"
-                              Name 55  "param"
-                              Name 57  "param"
-                              Decorate 42(OutputStream) Location 0
-                              Decorate 47(VertexID) Location 0
-                              Decorate 50(test) Location 1
+                              Name 42  "OutputStream.myfloat"
+                              Name 46  "OutputStream.something"
+                              Name 53  "VertexID"
+                              Name 55  "VertexID"
+                              Name 57  "test"
+                              Name 58  "test"
+                              Name 60  "OutputStream"
+                              Name 61  "param"
+                              Name 63  "param"
+                              Name 65  "param"
+                              Decorate 42(OutputStream.myfloat) Location 0
+                              Decorate 46(OutputStream.something) Location 1
+                              Decorate 55(VertexID) Location 0
+                              Decorate 58(test) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -196,30 +240,32 @@
               29:     11(int) Constant 2
               34:             TypePointer Function 10(float)
               39:             TypePointer Function 11(int)
-              41:             TypePointer Output 12(PSInput)
-42(OutputStream):     41(ptr) Variable Output
-              46:             TypePointer Input 8
-    47(VertexID):     46(ptr) Variable Input
-        50(test):     46(ptr) Variable Input
+              41:             TypePointer Output 10(float)
+42(OutputStream.myfloat):     41(ptr) Variable Output
+              45:             TypePointer Output 11(int)
+46(OutputStream.something):     45(ptr) Variable Output
+              54:             TypePointer Input 8
+    55(VertexID):     54(ptr) Variable Input
+        58(test):     54(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-    45(VertexID):      9(ptr) Variable Function
-        49(test):      9(ptr) Variable Function
-52(OutputStream):     13(ptr) Variable Function
-       53(param):      9(ptr) Variable Function
-       55(param):      9(ptr) Variable Function
-       57(param):     13(ptr) Variable Function
-              48:           8 Load 47(VertexID)
-                              Store 45(VertexID) 48
-              51:           8 Load 50(test)
-                              Store 49(test) 51
-              54:           8 Load 45(VertexID)
-                              Store 53(param) 54
-              56:           8 Load 49(test)
-                              Store 55(param) 56
-              58:           2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 53(param) 55(param) 57(param)
-              59: 12(PSInput) Load 57(param)
-                              Store 52(OutputStream) 59
+    53(VertexID):      9(ptr) Variable Function
+        57(test):      9(ptr) Variable Function
+60(OutputStream):     13(ptr) Variable Function
+       61(param):      9(ptr) Variable Function
+       63(param):      9(ptr) Variable Function
+       65(param):     13(ptr) Variable Function
+              56:           8 Load 55(VertexID)
+                              Store 53(VertexID) 56
+              59:           8 Load 58(test)
+                              Store 57(test) 59
+              62:           8 Load 53(VertexID)
+                              Store 61(param) 62
+              64:           8 Load 57(test)
+                              Store 63(param) 64
+              66:           2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 61(param) 63(param) 65(param)
+              67: 12(PSInput) Load 65(param)
+                              Store 60(OutputStream) 67
                               Return
                               FunctionEnd
 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;):           2 Function None 14
@@ -244,11 +290,19 @@
               38:     11(int) Bitcast 37
               40:     39(ptr) AccessChain 20(Vert) 25
                               Store 40 38
-              43: 12(PSInput) Load 20(Vert)
-                              Store 42(OutputStream) 43
+              43:     34(ptr) AccessChain 20(Vert) 21
+              44:   10(float) Load 43
+                              Store 42(OutputStream.myfloat) 44
+              47:     39(ptr) AccessChain 20(Vert) 25
+              48:     11(int) Load 47
+                              Store 46(OutputStream.something) 48
                               EmitVertex
-              44: 12(PSInput) Load 20(Vert)
-                              Store 42(OutputStream) 44
+              49:     34(ptr) AccessChain 20(Vert) 21
+              50:   10(float) Load 49
+                              Store 42(OutputStream.myfloat) 50
+              51:     39(ptr) AccessChain 20(Vert) 25
+              52:     11(int) Load 51
+                              Store 46(OutputStream.something) 52
                               EmitVertex
                               EndPrimitive
                               Return
diff --git a/Test/baseResults/hlsl.calculatelod.dx10.frag.out b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
index 535905c..217edf0 100644
--- a/Test/baseResults/hlsl.calculatelod.dx10.frag.out
+++ b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
@@ -149,13 +149,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -172,8 +172,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -329,13 +329,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -352,8 +352,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -394,8 +394,8 @@
                               Name 115  "g_tTexcdu4a"
                               Name 127  "psout"
                               Name 137  "flattenTemp"
-                              Name 140  "Color"
-                              Name 144  "Depth"
+                              Name 140  "@entryPointOutput.Color"
+                              Name 144  "@entryPointOutput.Depth"
                               Name 147  "g_tTex1df4"
                               Decorate 16(g_tTex1df4a) DescriptorSet 0
                               Decorate 16(g_tTex1df4a) Binding 1
@@ -409,8 +409,8 @@
                               Decorate 92(g_tTexcdf4a) DescriptorSet 0
                               Decorate 104(g_tTexcdi4a) DescriptorSet 0
                               Decorate 115(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 140(Color) Location 0
-                              Decorate 144(Depth) BuiltIn FragDepth
+                              Decorate 140(@entryPointOutput.Color) Location 0
+                              Decorate 144(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 147(g_tTex1df4) DescriptorSet 0
                               Decorate 147(g_tTex1df4) Binding 0
                2:             TypeVoid
@@ -485,9 +485,9 @@
              130:             TypePointer Function 7(fvec4)
              132:     27(int) Constant 1
              139:             TypePointer Output 7(fvec4)
-      140(Color):    139(ptr) Variable Output
+140(@entryPointOutput.Color):    139(ptr) Variable Output
              143:             TypePointer Output 6(float)
-      144(Depth):    143(ptr) Variable Output
+144(@entryPointOutput.Depth):    143(ptr) Variable Output
  147(g_tTex1df4):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -496,10 +496,10 @@
                               Store 137(flattenTemp) 138
              141:    130(ptr) AccessChain 137(flattenTemp) 28
              142:    7(fvec4) Load 141
-                              Store 140(Color) 142
+                              Store 140(@entryPointOutput.Color) 142
              145:     12(ptr) AccessChain 137(flattenTemp) 132
              146:    6(float) Load 145
-                              Store 144(Depth) 146
+                              Store 144(@entryPointOutput.Depth) 146
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
index f19f5d0..f85d9b5 100644
--- a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
+++ b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
@@ -161,13 +161,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -184,8 +184,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -341,13 +341,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -364,7 +364,7 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.clipdistance-1.frag.out b/Test/baseResults/hlsl.clipdistance-1.frag.out
new file mode 100644
index 0000000..b3cdb61
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-1.frag.out
@@ -0,0 +1,190 @@
+hlsl.clipdistance-1.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;f1;f1; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in float)
+0:4      'cull' ( in float)
+0:?     Sequence
+0:5      Branch: Return with expression
+0:5        add ( temp 4-component vector of float)
+0:5          add ( temp 4-component vector of float)
+0:5            'pos' ( in 4-component vector of float)
+0:5            'clip' ( in float)
+0:5          'cull' ( in float)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:?           'clip' ( temp float)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 1-element array of float ClipDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:?           'cull' ( temp float)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 1-element array of float CullDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;f1;f1; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp float)
+0:?           'cull' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 1-element array of float ClipDistance)
+0:?     'cull' ( in 1-element array of float CullDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;f1;f1; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in float)
+0:4      'cull' ( in float)
+0:?     Sequence
+0:5      Branch: Return with expression
+0:5        add ( temp 4-component vector of float)
+0:5          add ( temp 4-component vector of float)
+0:5            'pos' ( in 4-component vector of float)
+0:5            'clip' ( in float)
+0:5          'cull' ( in float)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:?           'clip' ( temp float)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 1-element array of float ClipDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:?           'cull' ( temp float)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 1-element array of float CullDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;f1;f1; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp float)
+0:?           'cull' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 1-element array of float ClipDistance)
+0:?     'cull' ( in 1-element array of float CullDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 53
+
+                              Capability Shader
+                              Capability ClipDistance
+                              Capability CullDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 27 34 41 45
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 14  "@main(vf4;f1;f1;"
+                              Name 11  "pos"
+                              Name 12  "clip"
+                              Name 13  "cull"
+                              Name 25  "pos"
+                              Name 27  "pos"
+                              Name 29  "clip"
+                              Name 34  "clip"
+                              Name 40  "cull"
+                              Name 41  "cull"
+                              Name 45  "@entryPointOutput"
+                              Name 46  "param"
+                              Name 48  "param"
+                              Name 50  "param"
+                              Decorate 27(pos) BuiltIn FragCoord
+                              Decorate 34(clip) BuiltIn ClipDistance
+                              Decorate 41(cull) BuiltIn CullDistance
+                              Decorate 45(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypePointer Function 6(float)
+              10:             TypeFunction 7(fvec4) 8(ptr) 9(ptr) 9(ptr)
+              26:             TypePointer Input 7(fvec4)
+         27(pos):     26(ptr) Variable Input
+              30:             TypeInt 32 0
+              31:     30(int) Constant 1
+              32:             TypeArray 6(float) 31
+              33:             TypePointer Input 32
+        34(clip):     33(ptr) Variable Input
+              35:             TypeInt 32 1
+              36:     35(int) Constant 0
+              37:             TypePointer Input 6(float)
+        41(cull):     33(ptr) Variable Input
+              44:             TypePointer Output 7(fvec4)
+45(@entryPointOutput):     44(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+         25(pos):      8(ptr) Variable Function
+        29(clip):      9(ptr) Variable Function
+        40(cull):      9(ptr) Variable Function
+       46(param):      8(ptr) Variable Function
+       48(param):      9(ptr) Variable Function
+       50(param):      9(ptr) Variable Function
+              28:    7(fvec4) Load 27(pos)
+                              Store 25(pos) 28
+              38:     37(ptr) AccessChain 34(clip) 36
+              39:    6(float) Load 38
+                              Store 29(clip) 39
+              42:     37(ptr) AccessChain 41(cull) 36
+              43:    6(float) Load 42
+                              Store 40(cull) 43
+              47:    7(fvec4) Load 25(pos)
+                              Store 46(param) 47
+              49:    6(float) Load 29(clip)
+                              Store 48(param) 49
+              51:    6(float) Load 40(cull)
+                              Store 50(param) 51
+              52:    7(fvec4) FunctionCall 14(@main(vf4;f1;f1;) 46(param) 48(param) 50(param)
+                              Store 45(@entryPointOutput) 52
+                              Return
+                              FunctionEnd
+14(@main(vf4;f1;f1;):    7(fvec4) Function None 10
+         11(pos):      8(ptr) FunctionParameter
+        12(clip):      9(ptr) FunctionParameter
+        13(cull):      9(ptr) FunctionParameter
+              15:             Label
+              16:    7(fvec4) Load 11(pos)
+              17:    6(float) Load 12(clip)
+              18:    7(fvec4) CompositeConstruct 17 17 17 17
+              19:    7(fvec4) FAdd 16 18
+              20:    6(float) Load 13(cull)
+              21:    7(fvec4) CompositeConstruct 20 20 20 20
+              22:    7(fvec4) FAdd 19 21
+                              ReturnValue 22
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-1.geom.out b/Test/baseResults/hlsl.clipdistance-1.geom.out
new file mode 100644
index 0000000..bde7822
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-1.geom.out
@@ -0,0 +1,737 @@
+hlsl.clipdistance-1.geom
+Shader version: 500
+invocations = -1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:11  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3]; ( temp void)
+0:11    Function Parameters: 
+0:11      'pos' ( in 3-element array of 4-component vector of float)
+0:11      'VertexID' ( in 3-element array of uint)
+0:11      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:11      'clip' ( in 3-element array of 4-component vector of float)
+0:?     Sequence
+0:14      move second child to first child ( temp 4-component vector of float)
+0:14        pos: direct index for structure ( temp 4-component vector of float)
+0:14          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:14          Constant:
+0:14            0 (const int)
+0:14        direct index ( temp 4-component vector of float)
+0:14          'pos' ( in 3-element array of 4-component vector of float)
+0:14          Constant:
+0:14            0 (const int)
+0:15      move second child to first child ( temp 2-component vector of float)
+0:15        clip: direct index for structure ( temp 2-component vector of float)
+0:15          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:15          Constant:
+0:15            1 (const int)
+0:15        vector swizzle ( temp 2-component vector of float)
+0:15          direct index ( temp 4-component vector of float)
+0:15            'clip' ( in 3-element array of 4-component vector of float)
+0:15            Constant:
+0:15              0 (const int)
+0:15          Sequence
+0:15            Constant:
+0:15              0 (const int)
+0:15            Constant:
+0:15              1 (const int)
+0:17      Sequence
+0:17        Sequence
+0:17          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:17            pos: direct index for structure ( temp 4-component vector of float)
+0:17              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17              Constant:
+0:17                0 (const int)
+0:?           Sequence
+0:17            move second child to first child ( temp float)
+0:17              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 2-element array of float ClipDistance)
+0:17                Constant:
+0:17                  0 (const int)
+0:17              direct index ( temp float)
+0:17                clip: direct index for structure ( temp 2-component vector of float)
+0:17                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17                  Constant:
+0:17                    1 (const int)
+0:17                Constant:
+0:17                  0 (const int)
+0:17            move second child to first child ( temp float)
+0:17              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 2-element array of float ClipDistance)
+0:17                Constant:
+0:17                  1 (const int)
+0:17              direct index ( temp float)
+0:17                clip: direct index for structure ( temp 2-component vector of float)
+0:17                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17                  Constant:
+0:17                    1 (const int)
+0:17                Constant:
+0:17                  1 (const int)
+0:17        EmitVertex ( temp void)
+0:11  Function Definition: main( ( temp void)
+0:11    Function Parameters: 
+0:?     Sequence
+0:11      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:11      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:?         'clip' ( temp 3-element array of 4-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip' ( out 2-element array of float ClipDistance)
+
+
+Linked geometry stage:
+
+
+Shader version: 500
+invocations = 1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:11  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3]; ( temp void)
+0:11    Function Parameters: 
+0:11      'pos' ( in 3-element array of 4-component vector of float)
+0:11      'VertexID' ( in 3-element array of uint)
+0:11      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:11      'clip' ( in 3-element array of 4-component vector of float)
+0:?     Sequence
+0:14      move second child to first child ( temp 4-component vector of float)
+0:14        pos: direct index for structure ( temp 4-component vector of float)
+0:14          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:14          Constant:
+0:14            0 (const int)
+0:14        direct index ( temp 4-component vector of float)
+0:14          'pos' ( in 3-element array of 4-component vector of float)
+0:14          Constant:
+0:14            0 (const int)
+0:15      move second child to first child ( temp 2-component vector of float)
+0:15        clip: direct index for structure ( temp 2-component vector of float)
+0:15          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:15          Constant:
+0:15            1 (const int)
+0:15        vector swizzle ( temp 2-component vector of float)
+0:15          direct index ( temp 4-component vector of float)
+0:15            'clip' ( in 3-element array of 4-component vector of float)
+0:15            Constant:
+0:15              0 (const int)
+0:15          Sequence
+0:15            Constant:
+0:15              0 (const int)
+0:15            Constant:
+0:15              1 (const int)
+0:17      Sequence
+0:17        Sequence
+0:17          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:17            pos: direct index for structure ( temp 4-component vector of float)
+0:17              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17              Constant:
+0:17                0 (const int)
+0:?           Sequence
+0:17            move second child to first child ( temp float)
+0:17              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 2-element array of float ClipDistance)
+0:17                Constant:
+0:17                  0 (const int)
+0:17              direct index ( temp float)
+0:17                clip: direct index for structure ( temp 2-component vector of float)
+0:17                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17                  Constant:
+0:17                    1 (const int)
+0:17                Constant:
+0:17                  0 (const int)
+0:17            move second child to first child ( temp float)
+0:17              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 2-element array of float ClipDistance)
+0:17                Constant:
+0:17                  1 (const int)
+0:17              direct index ( temp float)
+0:17                clip: direct index for structure ( temp 2-component vector of float)
+0:17                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:17                  Constant:
+0:17                    1 (const int)
+0:17                Constant:
+0:17                  1 (const int)
+0:17        EmitVertex ( temp void)
+0:11  Function Definition: main( ( temp void)
+0:11    Function Parameters: 
+0:?     Sequence
+0:11      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:11      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip})
+0:?         'clip' ( temp 3-element array of 4-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip' ( out 2-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 118
+
+                              Capability Geometry
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 38 44 57 61 68
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputLineStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 15  "S"
+                              MemberName 15(S) 0  "pos"
+                              MemberName 15(S) 1  "clip"
+                              Name 22  "@main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3];"
+                              Name 18  "pos"
+                              Name 19  "VertexID"
+                              Name 20  "OutputStream"
+                              Name 21  "clip"
+                              Name 24  "s"
+                              Name 38  "OutputStream.pos"
+                              Name 44  "OutputStream.clip"
+                              Name 55  "pos"
+                              Name 57  "pos"
+                              Name 59  "VertexID"
+                              Name 61  "VertexID"
+                              Name 63  "clip"
+                              Name 68  "clip"
+                              Name 108  "OutputStream"
+                              Name 109  "param"
+                              Name 111  "param"
+                              Name 113  "param"
+                              Name 114  "param"
+                              Decorate 38(OutputStream.pos) BuiltIn Position
+                              Decorate 44(OutputStream.clip) BuiltIn ClipDistance
+                              Decorate 57(pos) BuiltIn Position
+                              Decorate 61(VertexID) Location 0
+                              Decorate 68(clip) BuiltIn ClipDistance
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 3
+              10:             TypeArray 7(fvec4) 9
+              11:             TypePointer Function 10
+              12:             TypeArray 8(int) 9
+              13:             TypePointer Function 12
+              14:             TypeVector 6(float) 2
+           15(S):             TypeStruct 7(fvec4) 14(fvec2)
+              16:             TypePointer Function 15(S)
+              17:             TypeFunction 2 11(ptr) 13(ptr) 16(ptr) 11(ptr)
+              25:             TypeInt 32 1
+              26:     25(int) Constant 0
+              27:             TypePointer Function 7(fvec4)
+              31:     25(int) Constant 1
+              35:             TypePointer Function 14(fvec2)
+              37:             TypePointer Output 7(fvec4)
+38(OutputStream.pos):     37(ptr) Variable Output
+              41:      8(int) Constant 2
+              42:             TypeArray 6(float) 41
+              43:             TypePointer Output 42
+44(OutputStream.clip):     43(ptr) Variable Output
+              45:      8(int) Constant 0
+              46:             TypePointer Function 6(float)
+              49:             TypePointer Output 6(float)
+              51:      8(int) Constant 1
+              56:             TypePointer Input 10
+         57(pos):     56(ptr) Variable Input
+              60:             TypePointer Input 12
+    61(VertexID):     60(ptr) Variable Input
+              64:      8(int) Constant 4
+              65:             TypeArray 6(float) 64
+              66:             TypeArray 65 9
+              67:             TypePointer Input 66
+        68(clip):     67(ptr) Variable Input
+              69:             TypePointer Input 6(float)
+              76:     25(int) Constant 2
+              80:     25(int) Constant 3
+         4(main):           2 Function None 3
+               5:             Label
+         55(pos):     11(ptr) Variable Function
+    59(VertexID):     13(ptr) Variable Function
+        63(clip):     11(ptr) Variable Function
+108(OutputStream):     16(ptr) Variable Function
+      109(param):     11(ptr) Variable Function
+      111(param):     13(ptr) Variable Function
+      113(param):     16(ptr) Variable Function
+      114(param):     11(ptr) Variable Function
+              58:          10 Load 57(pos)
+                              Store 55(pos) 58
+              62:          12 Load 61(VertexID)
+                              Store 59(VertexID) 62
+              70:     69(ptr) AccessChain 68(clip) 26 26
+              71:    6(float) Load 70
+              72:     46(ptr) AccessChain 63(clip) 26 45
+                              Store 72 71
+              73:     69(ptr) AccessChain 68(clip) 26 31
+              74:    6(float) Load 73
+              75:     46(ptr) AccessChain 63(clip) 26 51
+                              Store 75 74
+              77:     69(ptr) AccessChain 68(clip) 26 76
+              78:    6(float) Load 77
+              79:     46(ptr) AccessChain 63(clip) 26 41
+                              Store 79 78
+              81:     69(ptr) AccessChain 68(clip) 26 80
+              82:    6(float) Load 81
+              83:     46(ptr) AccessChain 63(clip) 26 9
+                              Store 83 82
+              84:     69(ptr) AccessChain 68(clip) 31 26
+              85:    6(float) Load 84
+              86:     46(ptr) AccessChain 63(clip) 31 45
+                              Store 86 85
+              87:     69(ptr) AccessChain 68(clip) 31 31
+              88:    6(float) Load 87
+              89:     46(ptr) AccessChain 63(clip) 31 51
+                              Store 89 88
+              90:     69(ptr) AccessChain 68(clip) 31 76
+              91:    6(float) Load 90
+              92:     46(ptr) AccessChain 63(clip) 31 41
+                              Store 92 91
+              93:     69(ptr) AccessChain 68(clip) 31 80
+              94:    6(float) Load 93
+              95:     46(ptr) AccessChain 63(clip) 31 9
+                              Store 95 94
+              96:     69(ptr) AccessChain 68(clip) 76 26
+              97:    6(float) Load 96
+              98:     46(ptr) AccessChain 63(clip) 76 45
+                              Store 98 97
+              99:     69(ptr) AccessChain 68(clip) 76 31
+             100:    6(float) Load 99
+             101:     46(ptr) AccessChain 63(clip) 76 51
+                              Store 101 100
+             102:     69(ptr) AccessChain 68(clip) 76 76
+             103:    6(float) Load 102
+             104:     46(ptr) AccessChain 63(clip) 76 41
+                              Store 104 103
+             105:     69(ptr) AccessChain 68(clip) 76 80
+             106:    6(float) Load 105
+             107:     46(ptr) AccessChain 63(clip) 76 9
+                              Store 107 106
+             110:          10 Load 55(pos)
+                              Store 109(param) 110
+             112:          12 Load 59(VertexID)
+                              Store 111(param) 112
+             115:          10 Load 63(clip)
+                              Store 114(param) 115
+             116:           2 FunctionCall 22(@main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3];) 109(param) 111(param) 113(param) 114(param)
+             117:       15(S) Load 113(param)
+                              Store 108(OutputStream) 117
+                              Return
+                              FunctionEnd
+22(@main(vf4[3];u1[3];struct-S-vf4-vf21;vf4[3];):           2 Function None 17
+         18(pos):     11(ptr) FunctionParameter
+    19(VertexID):     13(ptr) FunctionParameter
+20(OutputStream):     16(ptr) FunctionParameter
+        21(clip):     11(ptr) FunctionParameter
+              23:             Label
+           24(s):     16(ptr) Variable Function
+              28:     27(ptr) AccessChain 18(pos) 26
+              29:    7(fvec4) Load 28
+              30:     27(ptr) AccessChain 24(s) 26
+                              Store 30 29
+              32:     27(ptr) AccessChain 21(clip) 26
+              33:    7(fvec4) Load 32
+              34:   14(fvec2) VectorShuffle 33 33 0 1
+              36:     35(ptr) AccessChain 24(s) 31
+                              Store 36 34
+              39:     27(ptr) AccessChain 24(s) 26
+              40:    7(fvec4) Load 39
+                              Store 38(OutputStream.pos) 40
+              47:     46(ptr) AccessChain 24(s) 31 45
+              48:    6(float) Load 47
+              50:     49(ptr) AccessChain 44(OutputStream.clip) 26
+                              Store 50 48
+              52:     46(ptr) AccessChain 24(s) 31 51
+              53:    6(float) Load 52
+              54:     49(ptr) AccessChain 44(OutputStream.clip) 31
+                              Store 54 53
+                              EmitVertex
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-1.vert.out b/Test/baseResults/hlsl.clipdistance-1.vert.out
index 5a254ec..b11c1cf 100644
--- a/Test/baseResults/hlsl.clipdistance-1.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-1.vert.out
@@ -34,14 +34,14 @@
 0:?         'pos' ( temp 4-component vector of float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 1-element array of float ClipDistance)
 0:4            Constant:
 0:4              0 (const int)
 0:?           'clip' ( temp float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 1-element array of float CullDistance)
 0:4            Constant:
 0:4              0 (const int)
@@ -90,14 +90,14 @@
 0:?         'pos' ( temp 4-component vector of float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 1-element array of float ClipDistance)
 0:4            Constant:
 0:4              0 (const int)
 0:?           'clip' ( temp float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 1-element array of float CullDistance)
 0:4            Constant:
 0:4              0 (const int)
diff --git a/Test/baseResults/hlsl.clipdistance-2.frag.out b/Test/baseResults/hlsl.clipdistance-2.frag.out
new file mode 100644
index 0000000..f39295e
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-2.frag.out
@@ -0,0 +1,419 @@
+hlsl.clipdistance-2.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;vf2[2];vf2[2]; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in 2-element array of 2-component vector of float)
+0:4      'cull' ( in 2-element array of 2-component vector of float)
+0:?     Sequence
+0:6      Branch: Return with expression
+0:6        add ( temp 4-component vector of float)
+0:6          add ( temp 4-component vector of float)
+0:6            'pos' ( in 4-component vector of float)
+0:6            direct index ( temp float)
+0:6              direct index ( temp 2-component vector of float)
+0:6                'clip' ( in 2-element array of 2-component vector of float)
+0:6                Constant:
+0:6                  0 (const int)
+0:6              Constant:
+0:6                0 (const int)
+0:6          direct index ( temp float)
+0:6            direct index ( temp 2-component vector of float)
+0:6              'cull' ( in 2-element array of 2-component vector of float)
+0:6              Constant:
+0:6                0 (const int)
+0:6            Constant:
+0:6              0 (const int)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              1 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              2 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              3 (const int)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              1 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              2 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              3 (const int)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;vf2[2];vf2[2]; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp 2-element array of 2-component vector of float)
+0:?           'cull' ( temp 2-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 4-element array of float ClipDistance)
+0:?     'cull' ( in 4-element array of float CullDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;vf2[2];vf2[2]; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in 2-element array of 2-component vector of float)
+0:4      'cull' ( in 2-element array of 2-component vector of float)
+0:?     Sequence
+0:6      Branch: Return with expression
+0:6        add ( temp 4-component vector of float)
+0:6          add ( temp 4-component vector of float)
+0:6            'pos' ( in 4-component vector of float)
+0:6            direct index ( temp float)
+0:6              direct index ( temp 2-component vector of float)
+0:6                'clip' ( in 2-element array of 2-component vector of float)
+0:6                Constant:
+0:6                  0 (const int)
+0:6              Constant:
+0:6                0 (const int)
+0:6          direct index ( temp float)
+0:6            direct index ( temp 2-component vector of float)
+0:6              'cull' ( in 2-element array of 2-component vector of float)
+0:6              Constant:
+0:6                0 (const int)
+0:6            Constant:
+0:6              0 (const int)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              1 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              2 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'clip' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float ClipDistance)
+0:?             'clip' ( in 4-element array of float ClipDistance)
+0:4            Constant:
+0:4              3 (const int)
+0:?       Sequence
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              0 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                0 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              1 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              0 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              2 (const int)
+0:4        move second child to first child ( temp float)
+0:4          direct index ( temp float)
+0:4            direct index ( temp 2-component vector of float)
+0:?               'cull' ( temp 2-element array of 2-component vector of float)
+0:4              Constant:
+0:4                1 (const int)
+0:4            Constant:
+0:4              1 (const int)
+0:4          direct index ( in float CullDistance)
+0:?             'cull' ( in 4-element array of float CullDistance)
+0:4            Constant:
+0:4              3 (const int)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;vf2[2];vf2[2]; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp 2-element array of 2-component vector of float)
+0:?           'cull' ( temp 2-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 4-element array of float ClipDistance)
+0:?     'cull' ( in 4-element array of float CullDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 84
+
+                              Capability Shader
+                              Capability ClipDistance
+                              Capability CullDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 37 43 62 76
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 18  "@main(vf4;vf2[2];vf2[2];"
+                              Name 15  "pos"
+                              Name 16  "clip"
+                              Name 17  "cull"
+                              Name 35  "pos"
+                              Name 37  "pos"
+                              Name 39  "clip"
+                              Name 43  "clip"
+                              Name 61  "cull"
+                              Name 62  "cull"
+                              Name 76  "@entryPointOutput"
+                              Name 77  "param"
+                              Name 79  "param"
+                              Name 81  "param"
+                              Decorate 37(pos) BuiltIn FragCoord
+                              Decorate 43(clip) BuiltIn ClipDistance
+                              Decorate 62(cull) BuiltIn CullDistance
+                              Decorate 76(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeVector 6(float) 2
+              10:             TypeInt 32 0
+              11:     10(int) Constant 2
+              12:             TypeArray 9(fvec2) 11
+              13:             TypePointer Function 12
+              14:             TypeFunction 7(fvec4) 8(ptr) 13(ptr) 13(ptr)
+              21:             TypeInt 32 1
+              22:     21(int) Constant 0
+              23:     10(int) Constant 0
+              24:             TypePointer Function 6(float)
+              36:             TypePointer Input 7(fvec4)
+         37(pos):     36(ptr) Variable Input
+              40:     10(int) Constant 4
+              41:             TypeArray 6(float) 40
+              42:             TypePointer Input 41
+        43(clip):     42(ptr) Variable Input
+              44:             TypePointer Input 6(float)
+              48:     21(int) Constant 1
+              51:     10(int) Constant 1
+              53:     21(int) Constant 2
+              57:     21(int) Constant 3
+        62(cull):     42(ptr) Variable Input
+              75:             TypePointer Output 7(fvec4)
+76(@entryPointOutput):     75(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+         35(pos):      8(ptr) Variable Function
+        39(clip):     13(ptr) Variable Function
+        61(cull):     13(ptr) Variable Function
+       77(param):      8(ptr) Variable Function
+       79(param):     13(ptr) Variable Function
+       81(param):     13(ptr) Variable Function
+              38:    7(fvec4) Load 37(pos)
+                              Store 35(pos) 38
+              45:     44(ptr) AccessChain 43(clip) 22
+              46:    6(float) Load 45
+              47:     24(ptr) AccessChain 39(clip) 22 23
+                              Store 47 46
+              49:     44(ptr) AccessChain 43(clip) 48
+              50:    6(float) Load 49
+              52:     24(ptr) AccessChain 39(clip) 22 51
+                              Store 52 50
+              54:     44(ptr) AccessChain 43(clip) 53
+              55:    6(float) Load 54
+              56:     24(ptr) AccessChain 39(clip) 48 23
+                              Store 56 55
+              58:     44(ptr) AccessChain 43(clip) 57
+              59:    6(float) Load 58
+              60:     24(ptr) AccessChain 39(clip) 48 51
+                              Store 60 59
+              63:     44(ptr) AccessChain 62(cull) 22
+              64:    6(float) Load 63
+              65:     24(ptr) AccessChain 61(cull) 22 23
+                              Store 65 64
+              66:     44(ptr) AccessChain 62(cull) 48
+              67:    6(float) Load 66
+              68:     24(ptr) AccessChain 61(cull) 22 51
+                              Store 68 67
+              69:     44(ptr) AccessChain 62(cull) 53
+              70:    6(float) Load 69
+              71:     24(ptr) AccessChain 61(cull) 48 23
+                              Store 71 70
+              72:     44(ptr) AccessChain 62(cull) 57
+              73:    6(float) Load 72
+              74:     24(ptr) AccessChain 61(cull) 48 51
+                              Store 74 73
+              78:    7(fvec4) Load 35(pos)
+                              Store 77(param) 78
+              80:          12 Load 39(clip)
+                              Store 79(param) 80
+              82:          12 Load 61(cull)
+                              Store 81(param) 82
+              83:    7(fvec4) FunctionCall 18(@main(vf4;vf2[2];vf2[2];) 77(param) 79(param) 81(param)
+                              Store 76(@entryPointOutput) 83
+                              Return
+                              FunctionEnd
+18(@main(vf4;vf2[2];vf2[2];):    7(fvec4) Function None 14
+         15(pos):      8(ptr) FunctionParameter
+        16(clip):     13(ptr) FunctionParameter
+        17(cull):     13(ptr) FunctionParameter
+              19:             Label
+              20:    7(fvec4) Load 15(pos)
+              25:     24(ptr) AccessChain 16(clip) 22 23
+              26:    6(float) Load 25
+              27:    7(fvec4) CompositeConstruct 26 26 26 26
+              28:    7(fvec4) FAdd 20 27
+              29:     24(ptr) AccessChain 17(cull) 22 23
+              30:    6(float) Load 29
+              31:    7(fvec4) CompositeConstruct 30 30 30 30
+              32:    7(fvec4) FAdd 28 31
+                              ReturnValue 32
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-2.geom.out b/Test/baseResults/hlsl.clipdistance-2.geom.out
new file mode 100644
index 0000000..158cb2c
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-2.geom.out
@@ -0,0 +1,924 @@
+hlsl.clipdistance-2.geom
+Shader version: 500
+invocations = -1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:11  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2]; ( temp void)
+0:11    Function Parameters: 
+0:11      'pos' ( in 3-element array of 4-component vector of float)
+0:11      'VertexID' ( in 3-element array of uint)
+0:11      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:11      'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:?     Sequence
+0:14      move second child to first child ( temp 4-component vector of float)
+0:14        pos: direct index for structure ( temp 4-component vector of float)
+0:14          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:14          Constant:
+0:14            0 (const int)
+0:14        direct index ( temp 4-component vector of float)
+0:14          'pos' ( in 3-element array of 4-component vector of float)
+0:14          Constant:
+0:14            0 (const int)
+0:15      move second child to first child ( temp 2-component vector of float)
+0:15        direct index ( temp 2-component vector of float)
+0:15          clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:15            's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:15            Constant:
+0:15              1 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:15        direct index ( temp 2-component vector of float)
+0:15          direct index ( temp 2-element array of 2-component vector of float)
+0:15            'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:15            Constant:
+0:15              0 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:16      move second child to first child ( temp 2-component vector of float)
+0:16        direct index ( temp 2-component vector of float)
+0:16          clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:16            's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:16            Constant:
+0:16              1 (const int)
+0:16          Constant:
+0:16            1 (const int)
+0:16        direct index ( temp 2-component vector of float)
+0:16          direct index ( temp 2-element array of 2-component vector of float)
+0:16            'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:16            Constant:
+0:16              0 (const int)
+0:16          Constant:
+0:16            1 (const int)
+0:18      Sequence
+0:18        Sequence
+0:18          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:18            pos: direct index for structure ( temp 4-component vector of float)
+0:18              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18              Constant:
+0:18                0 (const int)
+0:?           Sequence
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  0 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    0 (const int)
+0:18                Constant:
+0:18                  0 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  1 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    0 (const int)
+0:18                Constant:
+0:18                  1 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  2 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    1 (const int)
+0:18                Constant:
+0:18                  0 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  3 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    1 (const int)
+0:18                Constant:
+0:18                  1 (const int)
+0:18        EmitVertex ( temp void)
+0:11  Function Definition: main( ( temp void)
+0:11    Function Parameters: 
+0:?     Sequence
+0:11      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:11      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:?         'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip' ( out 4-element array of float ClipDistance)
+
+
+Linked geometry stage:
+
+
+Shader version: 500
+invocations = 1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:11  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2]; ( temp void)
+0:11    Function Parameters: 
+0:11      'pos' ( in 3-element array of 4-component vector of float)
+0:11      'VertexID' ( in 3-element array of uint)
+0:11      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:11      'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:?     Sequence
+0:14      move second child to first child ( temp 4-component vector of float)
+0:14        pos: direct index for structure ( temp 4-component vector of float)
+0:14          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:14          Constant:
+0:14            0 (const int)
+0:14        direct index ( temp 4-component vector of float)
+0:14          'pos' ( in 3-element array of 4-component vector of float)
+0:14          Constant:
+0:14            0 (const int)
+0:15      move second child to first child ( temp 2-component vector of float)
+0:15        direct index ( temp 2-component vector of float)
+0:15          clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:15            's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:15            Constant:
+0:15              1 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:15        direct index ( temp 2-component vector of float)
+0:15          direct index ( temp 2-element array of 2-component vector of float)
+0:15            'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:15            Constant:
+0:15              0 (const int)
+0:15          Constant:
+0:15            0 (const int)
+0:16      move second child to first child ( temp 2-component vector of float)
+0:16        direct index ( temp 2-component vector of float)
+0:16          clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:16            's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:16            Constant:
+0:16              1 (const int)
+0:16          Constant:
+0:16            1 (const int)
+0:16        direct index ( temp 2-component vector of float)
+0:16          direct index ( temp 2-element array of 2-component vector of float)
+0:16            'clip' ( in 3-element array of 2-element array of 2-component vector of float)
+0:16            Constant:
+0:16              0 (const int)
+0:16          Constant:
+0:16            1 (const int)
+0:18      Sequence
+0:18        Sequence
+0:18          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:18            pos: direct index for structure ( temp 4-component vector of float)
+0:18              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18              Constant:
+0:18                0 (const int)
+0:?           Sequence
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  0 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    0 (const int)
+0:18                Constant:
+0:18                  0 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  1 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    0 (const int)
+0:18                Constant:
+0:18                  1 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  2 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    1 (const int)
+0:18                Constant:
+0:18                  0 (const int)
+0:18            move second child to first child ( temp float)
+0:18              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip' ( out 4-element array of float ClipDistance)
+0:18                Constant:
+0:18                  3 (const int)
+0:18              direct index ( temp float)
+0:18                direct index ( temp 2-component vector of float)
+0:18                  clip: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:18                    's' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:18                    Constant:
+0:18                      1 (const int)
+0:18                  Constant:
+0:18                    1 (const int)
+0:18                Constant:
+0:18                  1 (const int)
+0:18        EmitVertex ( temp void)
+0:11  Function Definition: main( ( temp void)
+0:11    Function Parameters: 
+0:?     Sequence
+0:11      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:11      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  0 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  1 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                0 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              0 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              2 (const int)
+0:11        move second child to first child ( temp float)
+0:11          direct index ( temp float)
+0:11            direct index ( temp 2-component vector of float)
+0:11              direct index ( temp 2-element array of 2-component vector of float)
+0:?                 'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:11                Constant:
+0:11                  2 (const int)
+0:11              Constant:
+0:11                1 (const int)
+0:11            Constant:
+0:11              1 (const int)
+0:11          direct index ( in float ClipDistance)
+0:11            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:11              Constant:
+0:11                2 (const int)
+0:11            Constant:
+0:11              3 (const int)
+0:11      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-element array of 2-component vector of float clip})
+0:?         'clip' ( temp 3-element array of 2-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip' ( out 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 128
+
+                              Capability Geometry
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 44 50 71 75 80
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputLineStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 17  "S"
+                              MemberName 17(S) 0  "pos"
+                              MemberName 17(S) 1  "clip"
+                              Name 26  "@main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2];"
+                              Name 22  "pos"
+                              Name 23  "VertexID"
+                              Name 24  "OutputStream"
+                              Name 25  "clip"
+                              Name 28  "s"
+                              Name 44  "OutputStream.pos"
+                              Name 50  "OutputStream.clip"
+                              Name 69  "pos"
+                              Name 71  "pos"
+                              Name 73  "VertexID"
+                              Name 75  "VertexID"
+                              Name 77  "clip"
+                              Name 80  "clip"
+                              Name 118  "OutputStream"
+                              Name 119  "param"
+                              Name 121  "param"
+                              Name 123  "param"
+                              Name 124  "param"
+                              Decorate 44(OutputStream.pos) BuiltIn Position
+                              Decorate 50(OutputStream.clip) BuiltIn ClipDistance
+                              Decorate 71(pos) BuiltIn Position
+                              Decorate 75(VertexID) Location 0
+                              Decorate 80(clip) BuiltIn ClipDistance
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 3
+              10:             TypeArray 7(fvec4) 9
+              11:             TypePointer Function 10
+              12:             TypeArray 8(int) 9
+              13:             TypePointer Function 12
+              14:             TypeVector 6(float) 2
+              15:      8(int) Constant 2
+              16:             TypeArray 14(fvec2) 15
+           17(S):             TypeStruct 7(fvec4) 16
+              18:             TypePointer Function 17(S)
+              19:             TypeArray 16 9
+              20:             TypePointer Function 19
+              21:             TypeFunction 2 11(ptr) 13(ptr) 18(ptr) 20(ptr)
+              29:             TypeInt 32 1
+              30:     29(int) Constant 0
+              31:             TypePointer Function 7(fvec4)
+              35:     29(int) Constant 1
+              36:             TypePointer Function 14(fvec2)
+              43:             TypePointer Output 7(fvec4)
+44(OutputStream.pos):     43(ptr) Variable Output
+              47:      8(int) Constant 4
+              48:             TypeArray 6(float) 47
+              49:             TypePointer Output 48
+50(OutputStream.clip):     49(ptr) Variable Output
+              51:      8(int) Constant 0
+              52:             TypePointer Function 6(float)
+              55:             TypePointer Output 6(float)
+              57:      8(int) Constant 1
+              61:     29(int) Constant 2
+              65:     29(int) Constant 3
+              70:             TypePointer Input 10
+         71(pos):     70(ptr) Variable Input
+              74:             TypePointer Input 12
+    75(VertexID):     74(ptr) Variable Input
+              78:             TypeArray 48 9
+              79:             TypePointer Input 78
+        80(clip):     79(ptr) Variable Input
+              81:             TypePointer Input 6(float)
+         4(main):           2 Function None 3
+               5:             Label
+         69(pos):     11(ptr) Variable Function
+    73(VertexID):     13(ptr) Variable Function
+        77(clip):     20(ptr) Variable Function
+118(OutputStream):     18(ptr) Variable Function
+      119(param):     11(ptr) Variable Function
+      121(param):     13(ptr) Variable Function
+      123(param):     18(ptr) Variable Function
+      124(param):     20(ptr) Variable Function
+              72:          10 Load 71(pos)
+                              Store 69(pos) 72
+              76:          12 Load 75(VertexID)
+                              Store 73(VertexID) 76
+              82:     81(ptr) AccessChain 80(clip) 30 30
+              83:    6(float) Load 82
+              84:     52(ptr) AccessChain 77(clip) 30 30 51
+                              Store 84 83
+              85:     81(ptr) AccessChain 80(clip) 30 35
+              86:    6(float) Load 85
+              87:     52(ptr) AccessChain 77(clip) 30 30 57
+                              Store 87 86
+              88:     81(ptr) AccessChain 80(clip) 30 61
+              89:    6(float) Load 88
+              90:     52(ptr) AccessChain 77(clip) 30 35 51
+                              Store 90 89
+              91:     81(ptr) AccessChain 80(clip) 30 65
+              92:    6(float) Load 91
+              93:     52(ptr) AccessChain 77(clip) 30 35 57
+                              Store 93 92
+              94:     81(ptr) AccessChain 80(clip) 35 30
+              95:    6(float) Load 94
+              96:     52(ptr) AccessChain 77(clip) 35 30 51
+                              Store 96 95
+              97:     81(ptr) AccessChain 80(clip) 35 35
+              98:    6(float) Load 97
+              99:     52(ptr) AccessChain 77(clip) 35 30 57
+                              Store 99 98
+             100:     81(ptr) AccessChain 80(clip) 35 61
+             101:    6(float) Load 100
+             102:     52(ptr) AccessChain 77(clip) 35 35 51
+                              Store 102 101
+             103:     81(ptr) AccessChain 80(clip) 35 65
+             104:    6(float) Load 103
+             105:     52(ptr) AccessChain 77(clip) 35 35 57
+                              Store 105 104
+             106:     81(ptr) AccessChain 80(clip) 61 30
+             107:    6(float) Load 106
+             108:     52(ptr) AccessChain 77(clip) 61 30 51
+                              Store 108 107
+             109:     81(ptr) AccessChain 80(clip) 61 35
+             110:    6(float) Load 109
+             111:     52(ptr) AccessChain 77(clip) 61 30 57
+                              Store 111 110
+             112:     81(ptr) AccessChain 80(clip) 61 61
+             113:    6(float) Load 112
+             114:     52(ptr) AccessChain 77(clip) 61 35 51
+                              Store 114 113
+             115:     81(ptr) AccessChain 80(clip) 61 65
+             116:    6(float) Load 115
+             117:     52(ptr) AccessChain 77(clip) 61 35 57
+                              Store 117 116
+             120:          10 Load 69(pos)
+                              Store 119(param) 120
+             122:          12 Load 73(VertexID)
+                              Store 121(param) 122
+             125:          19 Load 77(clip)
+                              Store 124(param) 125
+             126:           2 FunctionCall 26(@main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2];) 119(param) 121(param) 123(param) 124(param)
+             127:       17(S) Load 123(param)
+                              Store 118(OutputStream) 127
+                              Return
+                              FunctionEnd
+26(@main(vf4[3];u1[3];struct-S-vf4-vf2[2]1;vf2[3][2];):           2 Function None 21
+         22(pos):     11(ptr) FunctionParameter
+    23(VertexID):     13(ptr) FunctionParameter
+24(OutputStream):     18(ptr) FunctionParameter
+        25(clip):     20(ptr) FunctionParameter
+              27:             Label
+           28(s):     18(ptr) Variable Function
+              32:     31(ptr) AccessChain 22(pos) 30
+              33:    7(fvec4) Load 32
+              34:     31(ptr) AccessChain 28(s) 30
+                              Store 34 33
+              37:     36(ptr) AccessChain 25(clip) 30 30
+              38:   14(fvec2) Load 37
+              39:     36(ptr) AccessChain 28(s) 35 30
+                              Store 39 38
+              40:     36(ptr) AccessChain 25(clip) 30 35
+              41:   14(fvec2) Load 40
+              42:     36(ptr) AccessChain 28(s) 35 35
+                              Store 42 41
+              45:     31(ptr) AccessChain 28(s) 30
+              46:    7(fvec4) Load 45
+                              Store 44(OutputStream.pos) 46
+              53:     52(ptr) AccessChain 28(s) 35 30 51
+              54:    6(float) Load 53
+              56:     55(ptr) AccessChain 50(OutputStream.clip) 30
+                              Store 56 54
+              58:     52(ptr) AccessChain 28(s) 35 30 57
+              59:    6(float) Load 58
+              60:     55(ptr) AccessChain 50(OutputStream.clip) 35
+                              Store 60 59
+              62:     52(ptr) AccessChain 28(s) 35 35 51
+              63:    6(float) Load 62
+              64:     55(ptr) AccessChain 50(OutputStream.clip) 61
+                              Store 64 63
+              66:     52(ptr) AccessChain 28(s) 35 35 57
+              67:    6(float) Load 66
+              68:     55(ptr) AccessChain 50(OutputStream.clip) 65
+                              Store 68 67
+                              EmitVertex
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-2.vert.out b/Test/baseResults/hlsl.clipdistance-2.vert.out
index cb6d887..bdab064 100644
--- a/Test/baseResults/hlsl.clipdistance-2.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-2.vert.out
@@ -106,7 +106,7 @@
 0:?         'pos' ( temp 4-component vector of float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              0 (const int)
@@ -118,7 +118,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              1 (const int)
@@ -130,7 +130,7 @@
 0:4            Constant:
 0:4              1 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              2 (const int)
@@ -142,7 +142,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              3 (const int)
@@ -155,7 +155,7 @@
 0:4              1 (const int)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              0 (const int)
@@ -167,7 +167,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              1 (const int)
@@ -179,7 +179,7 @@
 0:4            Constant:
 0:4              1 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              2 (const int)
@@ -191,7 +191,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              3 (const int)
@@ -318,7 +318,7 @@
 0:?         'pos' ( temp 4-component vector of float)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              0 (const int)
@@ -330,7 +330,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              1 (const int)
@@ -342,7 +342,7 @@
 0:4            Constant:
 0:4              1 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              2 (const int)
@@ -354,7 +354,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float ClipDistance)
 0:?             'clip' ( out 4-element array of float ClipDistance)
 0:4            Constant:
 0:4              3 (const int)
@@ -367,7 +367,7 @@
 0:4              1 (const int)
 0:?       Sequence
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              0 (const int)
@@ -379,7 +379,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              1 (const int)
@@ -391,7 +391,7 @@
 0:4            Constant:
 0:4              1 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              2 (const int)
@@ -403,7 +403,7 @@
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:4          direct index ( temp float)
+0:4          direct index ( out float CullDistance)
 0:?             'cull' ( out 4-element array of float CullDistance)
 0:4            Constant:
 0:4              3 (const int)
diff --git a/Test/baseResults/hlsl.clipdistance-3.frag.out b/Test/baseResults/hlsl.clipdistance-3.frag.out
new file mode 100644
index 0000000..8515cd7
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-3.frag.out
@@ -0,0 +1,190 @@
+hlsl.clipdistance-3.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;f1[2];f1[2]; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in 2-element array of float)
+0:4      'cull' ( in 2-element array of float)
+0:?     Sequence
+0:5      Branch: Return with expression
+0:5        add ( temp 4-component vector of float)
+0:5          add ( temp 4-component vector of float)
+0:5            'pos' ( in 4-component vector of float)
+0:5            direct index ( temp float)
+0:5              'clip' ( in 2-element array of float)
+0:5              Constant:
+0:5                0 (const int)
+0:5          direct index ( temp float)
+0:5            'cull' ( in 2-element array of float)
+0:5            Constant:
+0:5              0 (const int)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp 2-element array of float)
+0:?           'clip' ( temp 2-element array of float)
+0:?           'clip' ( in 2-element array of float ClipDistance)
+0:?       Sequence
+0:4        move second child to first child ( temp 2-element array of float)
+0:?           'cull' ( temp 2-element array of float)
+0:?           'cull' ( in 2-element array of float CullDistance)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;f1[2];f1[2]; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp 2-element array of float)
+0:?           'cull' ( temp 2-element array of float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 2-element array of float ClipDistance)
+0:?     'cull' ( in 2-element array of float CullDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: @main(vf4;f1[2];f1[2]; ( temp 4-component vector of float)
+0:4    Function Parameters: 
+0:4      'pos' ( in 4-component vector of float)
+0:4      'clip' ( in 2-element array of float)
+0:4      'cull' ( in 2-element array of float)
+0:?     Sequence
+0:5      Branch: Return with expression
+0:5        add ( temp 4-component vector of float)
+0:5          add ( temp 4-component vector of float)
+0:5            'pos' ( in 4-component vector of float)
+0:5            direct index ( temp float)
+0:5              'clip' ( in 2-element array of float)
+0:5              Constant:
+0:5                0 (const int)
+0:5          direct index ( temp float)
+0:5            'cull' ( in 2-element array of float)
+0:5            Constant:
+0:5              0 (const int)
+0:4  Function Definition: main( ( temp void)
+0:4    Function Parameters: 
+0:?     Sequence
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         'pos' ( temp 4-component vector of float)
+0:?         'pos' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:4        move second child to first child ( temp 2-element array of float)
+0:?           'clip' ( temp 2-element array of float)
+0:?           'clip' ( in 2-element array of float ClipDistance)
+0:?       Sequence
+0:4        move second child to first child ( temp 2-element array of float)
+0:?           'cull' ( temp 2-element array of float)
+0:?           'cull' ( in 2-element array of float CullDistance)
+0:4      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:4        Function Call: @main(vf4;f1[2];f1[2]; ( temp 4-component vector of float)
+0:?           'pos' ( temp 4-component vector of float)
+0:?           'clip' ( temp 2-element array of float)
+0:?           'cull' ( temp 2-element array of float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'pos' ( in 4-component vector of float FragCoord)
+0:?     'clip' ( in 2-element array of float ClipDistance)
+0:?     'cull' ( in 2-element array of float CullDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 53
+
+                              Capability Shader
+                              Capability ClipDistance
+                              Capability CullDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 35 39 42 45
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 17  "@main(vf4;f1[2];f1[2];"
+                              Name 14  "pos"
+                              Name 15  "clip"
+                              Name 16  "cull"
+                              Name 33  "pos"
+                              Name 35  "pos"
+                              Name 37  "clip"
+                              Name 39  "clip"
+                              Name 41  "cull"
+                              Name 42  "cull"
+                              Name 45  "@entryPointOutput"
+                              Name 46  "param"
+                              Name 48  "param"
+                              Name 50  "param"
+                              Decorate 35(pos) BuiltIn FragCoord
+                              Decorate 39(clip) BuiltIn ClipDistance
+                              Decorate 42(cull) BuiltIn CullDistance
+                              Decorate 45(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeInt 32 0
+              10:      9(int) Constant 2
+              11:             TypeArray 6(float) 10
+              12:             TypePointer Function 11
+              13:             TypeFunction 7(fvec4) 8(ptr) 12(ptr) 12(ptr)
+              20:             TypeInt 32 1
+              21:     20(int) Constant 0
+              22:             TypePointer Function 6(float)
+              34:             TypePointer Input 7(fvec4)
+         35(pos):     34(ptr) Variable Input
+              38:             TypePointer Input 11
+        39(clip):     38(ptr) Variable Input
+        42(cull):     38(ptr) Variable Input
+              44:             TypePointer Output 7(fvec4)
+45(@entryPointOutput):     44(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+         33(pos):      8(ptr) Variable Function
+        37(clip):     12(ptr) Variable Function
+        41(cull):     12(ptr) Variable Function
+       46(param):      8(ptr) Variable Function
+       48(param):     12(ptr) Variable Function
+       50(param):     12(ptr) Variable Function
+              36:    7(fvec4) Load 35(pos)
+                              Store 33(pos) 36
+              40:          11 Load 39(clip)
+                              Store 37(clip) 40
+              43:          11 Load 42(cull)
+                              Store 41(cull) 43
+              47:    7(fvec4) Load 33(pos)
+                              Store 46(param) 47
+              49:          11 Load 37(clip)
+                              Store 48(param) 49
+              51:          11 Load 41(cull)
+                              Store 50(param) 51
+              52:    7(fvec4) FunctionCall 17(@main(vf4;f1[2];f1[2];) 46(param) 48(param) 50(param)
+                              Store 45(@entryPointOutput) 52
+                              Return
+                              FunctionEnd
+17(@main(vf4;f1[2];f1[2];):    7(fvec4) Function None 13
+         14(pos):      8(ptr) FunctionParameter
+        15(clip):     12(ptr) FunctionParameter
+        16(cull):     12(ptr) FunctionParameter
+              18:             Label
+              19:    7(fvec4) Load 14(pos)
+              23:     22(ptr) AccessChain 15(clip) 21
+              24:    6(float) Load 23
+              25:    7(fvec4) CompositeConstruct 24 24 24 24
+              26:    7(fvec4) FAdd 19 25
+              27:     22(ptr) AccessChain 16(cull) 21
+              28:    6(float) Load 27
+              29:    7(fvec4) CompositeConstruct 28 28 28 28
+              30:    7(fvec4) FAdd 26 29
+                              ReturnValue 30
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-3.geom.out b/Test/baseResults/hlsl.clipdistance-3.geom.out
new file mode 100644
index 0000000..d48c73a
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-3.geom.out
@@ -0,0 +1,830 @@
+hlsl.clipdistance-3.geom
+Shader version: 500
+invocations = -1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:12  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3]; ( temp void)
+0:12    Function Parameters: 
+0:12      'pos' ( in 3-element array of 4-component vector of float)
+0:12      'VertexID' ( in 3-element array of uint)
+0:12      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:12      'clip' ( in 3-element array of 4-component vector of float)
+0:?     Sequence
+0:15      move second child to first child ( temp 4-component vector of float)
+0:15        pos: direct index for structure ( temp 4-component vector of float)
+0:15          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:15          Constant:
+0:15            0 (const int)
+0:15        direct index ( temp 4-component vector of float)
+0:15          'pos' ( in 3-element array of 4-component vector of float)
+0:15          Constant:
+0:15            0 (const int)
+0:16      move second child to first child ( temp 2-component vector of float)
+0:16        clip0: direct index for structure ( temp 2-component vector of float)
+0:16          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:16          Constant:
+0:16            1 (const int)
+0:16        vector swizzle ( temp 2-component vector of float)
+0:16          direct index ( temp 4-component vector of float)
+0:16            'clip' ( in 3-element array of 4-component vector of float)
+0:16            Constant:
+0:16              0 (const int)
+0:16          Sequence
+0:16            Constant:
+0:16              0 (const int)
+0:16            Constant:
+0:16              1 (const int)
+0:17      move second child to first child ( temp 2-component vector of float)
+0:17        clip1: direct index for structure ( temp 2-component vector of float)
+0:17          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:17          Constant:
+0:17            2 (const int)
+0:17        vector swizzle ( temp 2-component vector of float)
+0:17          direct index ( temp 4-component vector of float)
+0:17            'clip' ( in 3-element array of 4-component vector of float)
+0:17            Constant:
+0:17              0 (const int)
+0:17          Sequence
+0:17            Constant:
+0:17              2 (const int)
+0:17            Constant:
+0:17              3 (const int)
+0:19      Sequence
+0:19        Sequence
+0:19          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:19            pos: direct index for structure ( temp 4-component vector of float)
+0:19              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19              Constant:
+0:19                0 (const int)
+0:?           Sequence
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  0 (const int)
+0:19              direct index ( temp float)
+0:19                clip0: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    1 (const int)
+0:19                Constant:
+0:19                  0 (const int)
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  1 (const int)
+0:19              direct index ( temp float)
+0:19                clip0: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    1 (const int)
+0:19                Constant:
+0:19                  1 (const int)
+0:?           Sequence
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  2 (const int)
+0:19              direct index ( temp float)
+0:19                clip1: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    2 (const int)
+0:19                Constant:
+0:19                  0 (const int)
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  3 (const int)
+0:19              direct index ( temp float)
+0:19                clip1: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    2 (const int)
+0:19                Constant:
+0:19                  1 (const int)
+0:19        EmitVertex ( temp void)
+0:12  Function Definition: main( ( temp void)
+0:12    Function Parameters: 
+0:?     Sequence
+0:12      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:12      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:?         'clip' ( temp 3-element array of 4-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+
+
+Linked geometry stage:
+
+
+Shader version: 500
+invocations = 1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:12  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3]; ( temp void)
+0:12    Function Parameters: 
+0:12      'pos' ( in 3-element array of 4-component vector of float)
+0:12      'VertexID' ( in 3-element array of uint)
+0:12      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:12      'clip' ( in 3-element array of 4-component vector of float)
+0:?     Sequence
+0:15      move second child to first child ( temp 4-component vector of float)
+0:15        pos: direct index for structure ( temp 4-component vector of float)
+0:15          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:15          Constant:
+0:15            0 (const int)
+0:15        direct index ( temp 4-component vector of float)
+0:15          'pos' ( in 3-element array of 4-component vector of float)
+0:15          Constant:
+0:15            0 (const int)
+0:16      move second child to first child ( temp 2-component vector of float)
+0:16        clip0: direct index for structure ( temp 2-component vector of float)
+0:16          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:16          Constant:
+0:16            1 (const int)
+0:16        vector swizzle ( temp 2-component vector of float)
+0:16          direct index ( temp 4-component vector of float)
+0:16            'clip' ( in 3-element array of 4-component vector of float)
+0:16            Constant:
+0:16              0 (const int)
+0:16          Sequence
+0:16            Constant:
+0:16              0 (const int)
+0:16            Constant:
+0:16              1 (const int)
+0:17      move second child to first child ( temp 2-component vector of float)
+0:17        clip1: direct index for structure ( temp 2-component vector of float)
+0:17          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:17          Constant:
+0:17            2 (const int)
+0:17        vector swizzle ( temp 2-component vector of float)
+0:17          direct index ( temp 4-component vector of float)
+0:17            'clip' ( in 3-element array of 4-component vector of float)
+0:17            Constant:
+0:17              0 (const int)
+0:17          Sequence
+0:17            Constant:
+0:17              2 (const int)
+0:17            Constant:
+0:17              3 (const int)
+0:19      Sequence
+0:19        Sequence
+0:19          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:19            pos: direct index for structure ( temp 4-component vector of float)
+0:19              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19              Constant:
+0:19                0 (const int)
+0:?           Sequence
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  0 (const int)
+0:19              direct index ( temp float)
+0:19                clip0: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    1 (const int)
+0:19                Constant:
+0:19                  0 (const int)
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  1 (const int)
+0:19              direct index ( temp float)
+0:19                clip0: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    1 (const int)
+0:19                Constant:
+0:19                  1 (const int)
+0:?           Sequence
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  2 (const int)
+0:19              direct index ( temp float)
+0:19                clip1: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    2 (const int)
+0:19                Constant:
+0:19                  0 (const int)
+0:19            move second child to first child ( temp float)
+0:19              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:19                Constant:
+0:19                  3 (const int)
+0:19              direct index ( temp float)
+0:19                clip1: direct index for structure ( temp 2-component vector of float)
+0:19                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:19                  Constant:
+0:19                    2 (const int)
+0:19                Constant:
+0:19                  1 (const int)
+0:19        EmitVertex ( temp void)
+0:12  Function Definition: main( ( temp void)
+0:12    Function Parameters: 
+0:?     Sequence
+0:12      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:12      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                0 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                1 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              0 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              1 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              2 (const int)
+0:12        move second child to first child ( temp float)
+0:12          direct index ( temp float)
+0:12            direct index ( temp 4-component vector of float)
+0:?               'clip' ( temp 3-element array of 4-component vector of float)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12          direct index ( in float ClipDistance)
+0:12            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:12              Constant:
+0:12                2 (const int)
+0:12            Constant:
+0:12              3 (const int)
+0:12      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:?         'clip' ( temp 3-element array of 4-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 127
+
+                              Capability Geometry
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 43 49 69 73 78
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputLineStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 15  "S"
+                              MemberName 15(S) 0  "pos"
+                              MemberName 15(S) 1  "clip0"
+                              MemberName 15(S) 2  "clip1"
+                              Name 22  "@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3];"
+                              Name 18  "pos"
+                              Name 19  "VertexID"
+                              Name 20  "OutputStream"
+                              Name 21  "clip"
+                              Name 24  "s"
+                              Name 43  "OutputStream.pos"
+                              Name 49  "OutputStream.clip1"
+                              Name 67  "pos"
+                              Name 69  "pos"
+                              Name 71  "VertexID"
+                              Name 73  "VertexID"
+                              Name 75  "clip"
+                              Name 78  "clip"
+                              Name 117  "OutputStream"
+                              Name 118  "param"
+                              Name 120  "param"
+                              Name 122  "param"
+                              Name 123  "param"
+                              Decorate 43(OutputStream.pos) BuiltIn Position
+                              Decorate 49(OutputStream.clip1) BuiltIn ClipDistance
+                              Decorate 69(pos) BuiltIn Position
+                              Decorate 73(VertexID) Location 0
+                              Decorate 78(clip) BuiltIn ClipDistance
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 3
+              10:             TypeArray 7(fvec4) 9
+              11:             TypePointer Function 10
+              12:             TypeArray 8(int) 9
+              13:             TypePointer Function 12
+              14:             TypeVector 6(float) 2
+           15(S):             TypeStruct 7(fvec4) 14(fvec2) 14(fvec2)
+              16:             TypePointer Function 15(S)
+              17:             TypeFunction 2 11(ptr) 13(ptr) 16(ptr) 11(ptr)
+              25:             TypeInt 32 1
+              26:     25(int) Constant 0
+              27:             TypePointer Function 7(fvec4)
+              31:     25(int) Constant 1
+              35:             TypePointer Function 14(fvec2)
+              37:     25(int) Constant 2
+              42:             TypePointer Output 7(fvec4)
+43(OutputStream.pos):     42(ptr) Variable Output
+              46:      8(int) Constant 4
+              47:             TypeArray 6(float) 46
+              48:             TypePointer Output 47
+49(OutputStream.clip1):     48(ptr) Variable Output
+              50:      8(int) Constant 0
+              51:             TypePointer Function 6(float)
+              54:             TypePointer Output 6(float)
+              56:      8(int) Constant 1
+              63:     25(int) Constant 3
+              68:             TypePointer Input 10
+         69(pos):     68(ptr) Variable Input
+              72:             TypePointer Input 12
+    73(VertexID):     72(ptr) Variable Input
+              76:             TypeArray 47 9
+              77:             TypePointer Input 76
+        78(clip):     77(ptr) Variable Input
+              79:             TypePointer Input 6(float)
+              88:      8(int) Constant 2
+         4(main):           2 Function None 3
+               5:             Label
+         67(pos):     11(ptr) Variable Function
+    71(VertexID):     13(ptr) Variable Function
+        75(clip):     11(ptr) Variable Function
+117(OutputStream):     16(ptr) Variable Function
+      118(param):     11(ptr) Variable Function
+      120(param):     13(ptr) Variable Function
+      122(param):     16(ptr) Variable Function
+      123(param):     11(ptr) Variable Function
+              70:          10 Load 69(pos)
+                              Store 67(pos) 70
+              74:          12 Load 73(VertexID)
+                              Store 71(VertexID) 74
+              80:     79(ptr) AccessChain 78(clip) 26 26
+              81:    6(float) Load 80
+              82:     51(ptr) AccessChain 75(clip) 26 50
+                              Store 82 81
+              83:     79(ptr) AccessChain 78(clip) 26 31
+              84:    6(float) Load 83
+              85:     51(ptr) AccessChain 75(clip) 26 56
+                              Store 85 84
+              86:     79(ptr) AccessChain 78(clip) 26 37
+              87:    6(float) Load 86
+              89:     51(ptr) AccessChain 75(clip) 26 88
+                              Store 89 87
+              90:     79(ptr) AccessChain 78(clip) 26 63
+              91:    6(float) Load 90
+              92:     51(ptr) AccessChain 75(clip) 26 9
+                              Store 92 91
+              93:     79(ptr) AccessChain 78(clip) 31 26
+              94:    6(float) Load 93
+              95:     51(ptr) AccessChain 75(clip) 31 50
+                              Store 95 94
+              96:     79(ptr) AccessChain 78(clip) 31 31
+              97:    6(float) Load 96
+              98:     51(ptr) AccessChain 75(clip) 31 56
+                              Store 98 97
+              99:     79(ptr) AccessChain 78(clip) 31 37
+             100:    6(float) Load 99
+             101:     51(ptr) AccessChain 75(clip) 31 88
+                              Store 101 100
+             102:     79(ptr) AccessChain 78(clip) 31 63
+             103:    6(float) Load 102
+             104:     51(ptr) AccessChain 75(clip) 31 9
+                              Store 104 103
+             105:     79(ptr) AccessChain 78(clip) 37 26
+             106:    6(float) Load 105
+             107:     51(ptr) AccessChain 75(clip) 37 50
+                              Store 107 106
+             108:     79(ptr) AccessChain 78(clip) 37 31
+             109:    6(float) Load 108
+             110:     51(ptr) AccessChain 75(clip) 37 56
+                              Store 110 109
+             111:     79(ptr) AccessChain 78(clip) 37 37
+             112:    6(float) Load 111
+             113:     51(ptr) AccessChain 75(clip) 37 88
+                              Store 113 112
+             114:     79(ptr) AccessChain 78(clip) 37 63
+             115:    6(float) Load 114
+             116:     51(ptr) AccessChain 75(clip) 37 9
+                              Store 116 115
+             119:          10 Load 67(pos)
+                              Store 118(param) 119
+             121:          12 Load 71(VertexID)
+                              Store 120(param) 121
+             124:          10 Load 75(clip)
+                              Store 123(param) 124
+             125:           2 FunctionCall 22(@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3];) 118(param) 120(param) 122(param) 123(param)
+             126:       15(S) Load 122(param)
+                              Store 117(OutputStream) 126
+                              Return
+                              FunctionEnd
+22(@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf4[3];):           2 Function None 17
+         18(pos):     11(ptr) FunctionParameter
+    19(VertexID):     13(ptr) FunctionParameter
+20(OutputStream):     16(ptr) FunctionParameter
+        21(clip):     11(ptr) FunctionParameter
+              23:             Label
+           24(s):     16(ptr) Variable Function
+              28:     27(ptr) AccessChain 18(pos) 26
+              29:    7(fvec4) Load 28
+              30:     27(ptr) AccessChain 24(s) 26
+                              Store 30 29
+              32:     27(ptr) AccessChain 21(clip) 26
+              33:    7(fvec4) Load 32
+              34:   14(fvec2) VectorShuffle 33 33 0 1
+              36:     35(ptr) AccessChain 24(s) 31
+                              Store 36 34
+              38:     27(ptr) AccessChain 21(clip) 26
+              39:    7(fvec4) Load 38
+              40:   14(fvec2) VectorShuffle 39 39 2 3
+              41:     35(ptr) AccessChain 24(s) 37
+                              Store 41 40
+              44:     27(ptr) AccessChain 24(s) 26
+              45:    7(fvec4) Load 44
+                              Store 43(OutputStream.pos) 45
+              52:     51(ptr) AccessChain 24(s) 31 50
+              53:    6(float) Load 52
+              55:     54(ptr) AccessChain 49(OutputStream.clip1) 26
+                              Store 55 53
+              57:     51(ptr) AccessChain 24(s) 31 56
+              58:    6(float) Load 57
+              59:     54(ptr) AccessChain 49(OutputStream.clip1) 31
+                              Store 59 58
+              60:     51(ptr) AccessChain 24(s) 37 50
+              61:    6(float) Load 60
+              62:     54(ptr) AccessChain 49(OutputStream.clip1) 37
+                              Store 62 61
+              64:     51(ptr) AccessChain 24(s) 37 56
+              65:    6(float) Load 64
+              66:     54(ptr) AccessChain 49(OutputStream.clip1) 63
+                              Store 66 65
+                              EmitVertex
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-4.frag.out b/Test/baseResults/hlsl.clipdistance-4.frag.out
new file mode 100644
index 0000000..b5fa6c5
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-4.frag.out
@@ -0,0 +1,262 @@
+hlsl.clipdistance-4.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: @main(struct-VS_OUTPUT-vf4-vf41; ( temp 4-component vector of float)
+0:7    Function Parameters: 
+0:7      'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:?     Sequence
+0:8      Branch: Return with expression
+0:8        add ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:8            Constant:
+0:8              0 (const int)
+0:8          ClipRect: direct index for structure ( temp 4-component vector of float)
+0:8            'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:8            Constant:
+0:8              1 (const int)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                0 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                1 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                2 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                2 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                3 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                3 (const int)
+0:7      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:7        Function Call: @main(struct-VS_OUTPUT-vf4-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: @main(struct-VS_OUTPUT-vf4-vf41; ( temp 4-component vector of float)
+0:7    Function Parameters: 
+0:7      'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:?     Sequence
+0:8      Branch: Return with expression
+0:8        add ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:8            'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:8            Constant:
+0:8              0 (const int)
+0:8          ClipRect: direct index for structure ( temp 4-component vector of float)
+0:8            'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:8            Constant:
+0:8              1 (const int)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                0 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                1 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                2 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                2 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              ClipRect: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                3 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                3 (const int)
+0:7      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:7        Function Call: @main(struct-VS_OUTPUT-vf4-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 57
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 24 32 54
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 8  "VS_OUTPUT"
+                              MemberName 8(VS_OUTPUT) 0  "Position"
+                              MemberName 8(VS_OUTPUT) 1  "ClipRect"
+                              Name 11  "@main(struct-VS_OUTPUT-vf4-vf41;"
+                              Name 10  "v"
+                              Name 22  "v"
+                              Name 24  "v.Position"
+                              Name 32  "v.ClipRect"
+                              Name 54  "@entryPointOutput"
+                              Decorate 24(v.Position) BuiltIn FragCoord
+                              Decorate 32(v.ClipRect) BuiltIn ClipDistance
+                              Decorate 54(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+    8(VS_OUTPUT):             TypeStruct 7(fvec4) 7(fvec4)
+               9:             TypeFunction 7(fvec4) 8(VS_OUTPUT)
+              13:             TypeInt 32 1
+              14:     13(int) Constant 0
+              16:     13(int) Constant 1
+              21:             TypePointer Function 8(VS_OUTPUT)
+              23:             TypePointer Input 7(fvec4)
+  24(v.Position):     23(ptr) Variable Input
+              26:             TypePointer Function 7(fvec4)
+              28:             TypeInt 32 0
+              29:     28(int) Constant 4
+              30:             TypeArray 6(float) 29
+              31:             TypePointer Input 30
+  32(v.ClipRect):     31(ptr) Variable Input
+              33:             TypePointer Input 6(float)
+              36:     28(int) Constant 0
+              37:             TypePointer Function 6(float)
+              41:     28(int) Constant 1
+              43:     13(int) Constant 2
+              46:     28(int) Constant 2
+              48:     13(int) Constant 3
+              51:     28(int) Constant 3
+              53:             TypePointer Output 7(fvec4)
+54(@entryPointOutput):     53(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           22(v):     21(ptr) Variable Function
+              25:    7(fvec4) Load 24(v.Position)
+              27:     26(ptr) AccessChain 22(v) 14
+                              Store 27 25
+              34:     33(ptr) AccessChain 32(v.ClipRect) 14
+              35:    6(float) Load 34
+              38:     37(ptr) AccessChain 22(v) 16 36
+                              Store 38 35
+              39:     33(ptr) AccessChain 32(v.ClipRect) 16
+              40:    6(float) Load 39
+              42:     37(ptr) AccessChain 22(v) 16 41
+                              Store 42 40
+              44:     33(ptr) AccessChain 32(v.ClipRect) 43
+              45:    6(float) Load 44
+              47:     37(ptr) AccessChain 22(v) 16 46
+                              Store 47 45
+              49:     33(ptr) AccessChain 32(v.ClipRect) 48
+              50:    6(float) Load 49
+              52:     37(ptr) AccessChain 22(v) 16 51
+                              Store 52 50
+              55:8(VS_OUTPUT) Load 22(v)
+              56:    7(fvec4) FunctionCall 11(@main(struct-VS_OUTPUT-vf4-vf41;) 55
+                              Store 54(@entryPointOutput) 56
+                              Return
+                              FunctionEnd
+11(@main(struct-VS_OUTPUT-vf4-vf41;):    7(fvec4) Function None 9
+           10(v):8(VS_OUTPUT) FunctionParameter
+              12:             Label
+              15:    7(fvec4) CompositeExtract 10(v) 0
+              17:    7(fvec4) CompositeExtract 10(v) 1
+              18:    7(fvec4) FAdd 15 17
+                              ReturnValue 18
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-4.geom.out b/Test/baseResults/hlsl.clipdistance-4.geom.out
new file mode 100644
index 0000000..82d0c0a
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-4.geom.out
@@ -0,0 +1,819 @@
+hlsl.clipdistance-4.geom
+Shader version: 500
+invocations = -1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:13  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3]; ( temp void)
+0:13    Function Parameters: 
+0:13      'pos' ( in 3-element array of 4-component vector of float)
+0:13      'VertexID' ( in 3-element array of uint)
+0:13      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:13      'clip0' ( in 3-element array of 2-component vector of float)
+0:13      'clip1' ( in 3-element array of 2-component vector of float)
+0:?     Sequence
+0:16      move second child to first child ( temp 4-component vector of float)
+0:16        pos: direct index for structure ( temp 4-component vector of float)
+0:16          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:16          Constant:
+0:16            0 (const int)
+0:16        direct index ( temp 4-component vector of float)
+0:16          'pos' ( in 3-element array of 4-component vector of float)
+0:16          Constant:
+0:16            0 (const int)
+0:17      move second child to first child ( temp 2-component vector of float)
+0:17        clip0: direct index for structure ( temp 2-component vector of float)
+0:17          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:17          Constant:
+0:17            1 (const int)
+0:17        direct index ( temp 2-component vector of float)
+0:17          'clip0' ( in 3-element array of 2-component vector of float)
+0:17          Constant:
+0:17            0 (const int)
+0:18      move second child to first child ( temp 2-component vector of float)
+0:18        clip1: direct index for structure ( temp 2-component vector of float)
+0:18          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:18          Constant:
+0:18            2 (const int)
+0:18        direct index ( temp 2-component vector of float)
+0:18          'clip1' ( in 3-element array of 2-component vector of float)
+0:18          Constant:
+0:18            0 (const int)
+0:20      Sequence
+0:20        Sequence
+0:20          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:20            pos: direct index for structure ( temp 4-component vector of float)
+0:20              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20              Constant:
+0:20                0 (const int)
+0:?           Sequence
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  0 (const int)
+0:20              direct index ( temp float)
+0:20                clip0: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    1 (const int)
+0:20                Constant:
+0:20                  0 (const int)
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  1 (const int)
+0:20              direct index ( temp float)
+0:20                clip0: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    1 (const int)
+0:20                Constant:
+0:20                  1 (const int)
+0:?           Sequence
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  2 (const int)
+0:20              direct index ( temp float)
+0:20                clip1: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    2 (const int)
+0:20                Constant:
+0:20                  0 (const int)
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  3 (const int)
+0:20              direct index ( temp float)
+0:20                clip1: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    2 (const int)
+0:20                Constant:
+0:20                  1 (const int)
+0:20        EmitVertex ( temp void)
+0:13  Function Definition: main( ( temp void)
+0:13    Function Parameters: 
+0:?     Sequence
+0:13      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:13      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:?       Sequence
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:?         'clip0' ( temp 3-element array of 2-component vector of float)
+0:?         'clip1' ( temp 3-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+
+
+Linked geometry stage:
+
+
+Shader version: 500
+invocations = 1
+max_vertices = 3
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:13  Function Definition: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3]; ( temp void)
+0:13    Function Parameters: 
+0:13      'pos' ( in 3-element array of 4-component vector of float)
+0:13      'VertexID' ( in 3-element array of uint)
+0:13      'OutputStream' ( out structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:13      'clip0' ( in 3-element array of 2-component vector of float)
+0:13      'clip1' ( in 3-element array of 2-component vector of float)
+0:?     Sequence
+0:16      move second child to first child ( temp 4-component vector of float)
+0:16        pos: direct index for structure ( temp 4-component vector of float)
+0:16          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:16          Constant:
+0:16            0 (const int)
+0:16        direct index ( temp 4-component vector of float)
+0:16          'pos' ( in 3-element array of 4-component vector of float)
+0:16          Constant:
+0:16            0 (const int)
+0:17      move second child to first child ( temp 2-component vector of float)
+0:17        clip0: direct index for structure ( temp 2-component vector of float)
+0:17          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:17          Constant:
+0:17            1 (const int)
+0:17        direct index ( temp 2-component vector of float)
+0:17          'clip0' ( in 3-element array of 2-component vector of float)
+0:17          Constant:
+0:17            0 (const int)
+0:18      move second child to first child ( temp 2-component vector of float)
+0:18        clip1: direct index for structure ( temp 2-component vector of float)
+0:18          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:18          Constant:
+0:18            2 (const int)
+0:18        direct index ( temp 2-component vector of float)
+0:18          'clip1' ( in 3-element array of 2-component vector of float)
+0:18          Constant:
+0:18            0 (const int)
+0:20      Sequence
+0:20        Sequence
+0:20          move second child to first child ( temp 4-component vector of float)
+0:?             'OutputStream.pos' ( out 4-component vector of float Position)
+0:20            pos: direct index for structure ( temp 4-component vector of float)
+0:20              's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20              Constant:
+0:20                0 (const int)
+0:?           Sequence
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  0 (const int)
+0:20              direct index ( temp float)
+0:20                clip0: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    1 (const int)
+0:20                Constant:
+0:20                  0 (const int)
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  1 (const int)
+0:20              direct index ( temp float)
+0:20                clip0: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    1 (const int)
+0:20                Constant:
+0:20                  1 (const int)
+0:?           Sequence
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  2 (const int)
+0:20              direct index ( temp float)
+0:20                clip1: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    2 (const int)
+0:20                Constant:
+0:20                  0 (const int)
+0:20            move second child to first child ( temp float)
+0:20              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+0:20                Constant:
+0:20                  3 (const int)
+0:20              direct index ( temp float)
+0:20                clip1: direct index for structure ( temp 2-component vector of float)
+0:20                  's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:20                  Constant:
+0:20                    2 (const int)
+0:20                Constant:
+0:20                  1 (const int)
+0:20        EmitVertex ( temp void)
+0:13  Function Definition: main( ( temp void)
+0:13    Function Parameters: 
+0:?     Sequence
+0:13      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'pos' ( in 3-element array of 4-component vector of float Position)
+0:13      move second child to first child ( temp 3-element array of uint)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'VertexID' (layout( location=0) in 3-element array of uint)
+0:?       Sequence
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip0' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:?       Sequence
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                0 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                1 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              0 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              2 (const int)
+0:13        move second child to first child ( temp float)
+0:13          direct index ( temp float)
+0:13            direct index ( temp 2-component vector of float)
+0:?               'clip1' ( temp 3-element array of 2-component vector of float)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              1 (const int)
+0:13          direct index ( in float ClipDistance)
+0:13            direct index ( in 4-element array of float ClipDistance)
+0:?               'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:13              Constant:
+0:13                2 (const int)
+0:13            Constant:
+0:13              3 (const int)
+0:13      Function Call: @main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3]; ( temp void)
+0:?         'pos' ( temp 3-element array of 4-component vector of float)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float clip0,  temp 2-component vector of float clip1})
+0:?         'clip0' ( temp 3-element array of 2-component vector of float)
+0:?         'clip1' ( temp 3-element array of 2-component vector of float)
+0:?   Linker Objects
+0:?     'pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'VertexID' (layout( location=0) in 3-element array of uint)
+0:?     'OutputStream.pos' ( out 4-component vector of float Position)
+0:?     'clip0' ( in 3-element array of 4-element array of float ClipDistance)
+0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 130
+
+                              Capability Geometry
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 44 50 70 74 79
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputLineStrip
+                              ExecutionMode 4 OutputVertices 3
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 15  "S"
+                              MemberName 15(S) 0  "pos"
+                              MemberName 15(S) 1  "clip0"
+                              MemberName 15(S) 2  "clip1"
+                              Name 25  "@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3];"
+                              Name 20  "pos"
+                              Name 21  "VertexID"
+                              Name 22  "OutputStream"
+                              Name 23  "clip0"
+                              Name 24  "clip1"
+                              Name 27  "s"
+                              Name 44  "OutputStream.pos"
+                              Name 50  "OutputStream.clip1"
+                              Name 68  "pos"
+                              Name 70  "pos"
+                              Name 72  "VertexID"
+                              Name 74  "VertexID"
+                              Name 76  "clip0"
+                              Name 79  "clip0"
+                              Name 99  "clip1"
+                              Name 118  "OutputStream"
+                              Name 119  "param"
+                              Name 121  "param"
+                              Name 123  "param"
+                              Name 124  "param"
+                              Name 126  "param"
+                              Decorate 44(OutputStream.pos) BuiltIn Position
+                              Decorate 50(OutputStream.clip1) BuiltIn ClipDistance
+                              Decorate 70(pos) BuiltIn Position
+                              Decorate 74(VertexID) Location 0
+                              Decorate 79(clip0) BuiltIn ClipDistance
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 3
+              10:             TypeArray 7(fvec4) 9
+              11:             TypePointer Function 10
+              12:             TypeArray 8(int) 9
+              13:             TypePointer Function 12
+              14:             TypeVector 6(float) 2
+           15(S):             TypeStruct 7(fvec4) 14(fvec2) 14(fvec2)
+              16:             TypePointer Function 15(S)
+              17:             TypeArray 14(fvec2) 9
+              18:             TypePointer Function 17
+              19:             TypeFunction 2 11(ptr) 13(ptr) 16(ptr) 18(ptr) 18(ptr)
+              28:             TypeInt 32 1
+              29:     28(int) Constant 0
+              30:             TypePointer Function 7(fvec4)
+              34:     28(int) Constant 1
+              35:             TypePointer Function 14(fvec2)
+              39:     28(int) Constant 2
+              43:             TypePointer Output 7(fvec4)
+44(OutputStream.pos):     43(ptr) Variable Output
+              47:      8(int) Constant 4
+              48:             TypeArray 6(float) 47
+              49:             TypePointer Output 48
+50(OutputStream.clip1):     49(ptr) Variable Output
+              51:      8(int) Constant 0
+              52:             TypePointer Function 6(float)
+              55:             TypePointer Output 6(float)
+              57:      8(int) Constant 1
+              64:     28(int) Constant 3
+              69:             TypePointer Input 10
+         70(pos):     69(ptr) Variable Input
+              73:             TypePointer Input 12
+    74(VertexID):     73(ptr) Variable Input
+              77:             TypeArray 48 9
+              78:             TypePointer Input 77
+       79(clip0):     78(ptr) Variable Input
+              80:             TypePointer Input 6(float)
+         4(main):           2 Function None 3
+               5:             Label
+         68(pos):     11(ptr) Variable Function
+    72(VertexID):     13(ptr) Variable Function
+       76(clip0):     18(ptr) Variable Function
+       99(clip1):     18(ptr) Variable Function
+118(OutputStream):     16(ptr) Variable Function
+      119(param):     11(ptr) Variable Function
+      121(param):     13(ptr) Variable Function
+      123(param):     16(ptr) Variable Function
+      124(param):     18(ptr) Variable Function
+      126(param):     18(ptr) Variable Function
+              71:          10 Load 70(pos)
+                              Store 68(pos) 71
+              75:          12 Load 74(VertexID)
+                              Store 72(VertexID) 75
+              81:     80(ptr) AccessChain 79(clip0) 29 29
+              82:    6(float) Load 81
+              83:     52(ptr) AccessChain 76(clip0) 29 51
+                              Store 83 82
+              84:     80(ptr) AccessChain 79(clip0) 29 34
+              85:    6(float) Load 84
+              86:     52(ptr) AccessChain 76(clip0) 29 57
+                              Store 86 85
+              87:     80(ptr) AccessChain 79(clip0) 29 39
+              88:    6(float) Load 87
+              89:     52(ptr) AccessChain 76(clip0) 34 51
+                              Store 89 88
+              90:     80(ptr) AccessChain 79(clip0) 29 64
+              91:    6(float) Load 90
+              92:     52(ptr) AccessChain 76(clip0) 34 57
+                              Store 92 91
+              93:     80(ptr) AccessChain 79(clip0) 34 29
+              94:    6(float) Load 93
+              95:     52(ptr) AccessChain 76(clip0) 39 51
+                              Store 95 94
+              96:     80(ptr) AccessChain 79(clip0) 34 34
+              97:    6(float) Load 96
+              98:     52(ptr) AccessChain 76(clip0) 39 57
+                              Store 98 97
+             100:     80(ptr) AccessChain 79(clip0) 29 39
+             101:    6(float) Load 100
+             102:     52(ptr) AccessChain 99(clip1) 29 51
+                              Store 102 101
+             103:     80(ptr) AccessChain 79(clip0) 29 64
+             104:    6(float) Load 103
+             105:     52(ptr) AccessChain 99(clip1) 29 57
+                              Store 105 104
+             106:     80(ptr) AccessChain 79(clip0) 34 39
+             107:    6(float) Load 106
+             108:     52(ptr) AccessChain 99(clip1) 34 51
+                              Store 108 107
+             109:     80(ptr) AccessChain 79(clip0) 34 64
+             110:    6(float) Load 109
+             111:     52(ptr) AccessChain 99(clip1) 34 57
+                              Store 111 110
+             112:     80(ptr) AccessChain 79(clip0) 39 39
+             113:    6(float) Load 112
+             114:     52(ptr) AccessChain 99(clip1) 39 51
+                              Store 114 113
+             115:     80(ptr) AccessChain 79(clip0) 39 64
+             116:    6(float) Load 115
+             117:     52(ptr) AccessChain 99(clip1) 39 57
+                              Store 117 116
+             120:          10 Load 68(pos)
+                              Store 119(param) 120
+             122:          12 Load 72(VertexID)
+                              Store 121(param) 122
+             125:          17 Load 76(clip0)
+                              Store 124(param) 125
+             127:          17 Load 99(clip1)
+                              Store 126(param) 127
+             128:           2 FunctionCall 25(@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3];) 119(param) 121(param) 123(param) 124(param) 126(param)
+             129:       15(S) Load 123(param)
+                              Store 118(OutputStream) 129
+                              Return
+                              FunctionEnd
+25(@main(vf4[3];u1[3];struct-S-vf4-vf2-vf21;vf2[3];vf2[3];):           2 Function None 19
+         20(pos):     11(ptr) FunctionParameter
+    21(VertexID):     13(ptr) FunctionParameter
+22(OutputStream):     16(ptr) FunctionParameter
+       23(clip0):     18(ptr) FunctionParameter
+       24(clip1):     18(ptr) FunctionParameter
+              26:             Label
+           27(s):     16(ptr) Variable Function
+              31:     30(ptr) AccessChain 20(pos) 29
+              32:    7(fvec4) Load 31
+              33:     30(ptr) AccessChain 27(s) 29
+                              Store 33 32
+              36:     35(ptr) AccessChain 23(clip0) 29
+              37:   14(fvec2) Load 36
+              38:     35(ptr) AccessChain 27(s) 34
+                              Store 38 37
+              40:     35(ptr) AccessChain 24(clip1) 29
+              41:   14(fvec2) Load 40
+              42:     35(ptr) AccessChain 27(s) 39
+                              Store 42 41
+              45:     30(ptr) AccessChain 27(s) 29
+              46:    7(fvec4) Load 45
+                              Store 44(OutputStream.pos) 46
+              53:     52(ptr) AccessChain 27(s) 34 51
+              54:    6(float) Load 53
+              56:     55(ptr) AccessChain 50(OutputStream.clip1) 29
+                              Store 56 54
+              58:     52(ptr) AccessChain 27(s) 34 57
+              59:    6(float) Load 58
+              60:     55(ptr) AccessChain 50(OutputStream.clip1) 34
+                              Store 60 59
+              61:     52(ptr) AccessChain 27(s) 39 51
+              62:    6(float) Load 61
+              63:     55(ptr) AccessChain 50(OutputStream.clip1) 39
+                              Store 63 62
+              65:     52(ptr) AccessChain 27(s) 39 57
+              66:    6(float) Load 65
+              67:     55(ptr) AccessChain 50(OutputStream.clip1) 64
+                              Store 67 66
+                              EmitVertex
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-4.vert.out b/Test/baseResults/hlsl.clipdistance-4.vert.out
index acb1100..ac99334 100644
--- a/Test/baseResults/hlsl.clipdistance-4.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-4.vert.out
@@ -66,22 +66,22 @@
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11            Constant:
 0:11              0 (const int)
-0:?           'Position' (layout( location=0) in 4-component vector of float)
+0:?           'v.Position' (layout( location=0) in 4-component vector of float)
 0:11      Sequence
 0:11        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11          Function Call: @main(struct-VS_INPUT-vf41; ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:11          Position: direct index for structure ( temp 4-component vector of float)
 0:11            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11            Constant:
 0:11              0 (const int)
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                0 (const int)
 0:11            direct index ( temp float)
@@ -92,8 +92,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                1 (const int)
 0:11            direct index ( temp float)
@@ -104,8 +104,8 @@
 0:11              Constant:
 0:11                1 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                2 (const int)
 0:11            direct index ( temp float)
@@ -116,8 +116,8 @@
 0:11              Constant:
 0:11                2 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                3 (const int)
 0:11            direct index ( temp float)
@@ -128,9 +128,9 @@
 0:11              Constant:
 0:11                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Position' (layout( location=0) in 4-component vector of float)
-0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     'v.Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -203,22 +203,22 @@
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11            Constant:
 0:11              0 (const int)
-0:?           'Position' (layout( location=0) in 4-component vector of float)
+0:?           'v.Position' (layout( location=0) in 4-component vector of float)
 0:11      Sequence
 0:11        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11          Function Call: @main(struct-VS_INPUT-vf41; ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:11          Position: direct index for structure ( temp 4-component vector of float)
 0:11            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float ClipRect})
 0:11            Constant:
 0:11              0 (const int)
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                0 (const int)
 0:11            direct index ( temp float)
@@ -229,8 +229,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                1 (const int)
 0:11            direct index ( temp float)
@@ -241,8 +241,8 @@
 0:11              Constant:
 0:11                1 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                2 (const int)
 0:11            direct index ( temp float)
@@ -253,8 +253,8 @@
 0:11              Constant:
 0:11                2 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                3 (const int)
 0:11            direct index ( temp float)
@@ -265,19 +265,19 @@
 0:11              Constant:
 0:11                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Position' (layout( location=0) in 4-component vector of float)
-0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     'v.Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 75
+// Id's are bound by 72
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 43 50 56 74
+                              EntryPoint Vertex 4  "main" 43 50 56
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_INPUT"
@@ -289,16 +289,13 @@
                               Name 11  "v"
                               Name 15  "Output"
                               Name 41  "v"
-                              Name 43  "Position"
+                              Name 43  "v.Position"
                               Name 46  "flattenTemp"
-                              Name 50  "@entryPointOutput_Position"
-                              Name 56  "@entryPointOutput_ClipRect"
-                              Name 72  "VS_OUTPUT"
-                              Name 74  "@entryPointOutput"
-                              Decorate 43(Position) Location 0
-                              Decorate 50(@entryPointOutput_Position) BuiltIn Position
-                              Decorate 56(@entryPointOutput_ClipRect) BuiltIn ClipDistance
-                              Decorate 74(@entryPointOutput) Location 0
+                              Name 50  "@entryPointOutput.Position"
+                              Name 56  "@entryPointOutput.ClipRect"
+                              Decorate 43(v.Position) Location 0
+                              Decorate 50(@entryPointOutput.Position) BuiltIn Position
+                              Decorate 56(@entryPointOutput.ClipRect) BuiltIn ClipDistance
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -325,24 +322,21 @@
               35:     24(int) Constant 3
               40:             TypePointer Function 8(VS_INPUT)
               42:             TypePointer Input 7(fvec4)
-    43(Position):     42(ptr) Variable Input
+  43(v.Position):     42(ptr) Variable Input
               49:             TypePointer Output 7(fvec4)
-50(@entryPointOutput_Position):     49(ptr) Variable Output
+50(@entryPointOutput.Position):     49(ptr) Variable Output
               53:     24(int) Constant 4
               54:             TypeArray 6(float) 53
               55:             TypePointer Output 54
-56(@entryPointOutput_ClipRect):     55(ptr) Variable Output
+56(@entryPointOutput.ClipRect):     55(ptr) Variable Output
               59:             TypePointer Output 6(float)
               64:     16(int) Constant 2
               68:     16(int) Constant 3
-   72(VS_OUTPUT):             TypeStruct
-              73:             TypePointer Output 72(VS_OUTPUT)
-74(@entryPointOutput):     73(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            41(v):     40(ptr) Variable Function
  46(flattenTemp):     14(ptr) Variable Function
-              44:    7(fvec4) Load 43(Position)
+              44:    7(fvec4) Load 43(v.Position)
               45:     20(ptr) AccessChain 41(v) 17
                               Store 45 44
               47: 8(VS_INPUT) Load 41(v)
@@ -350,22 +344,22 @@
                               Store 46(flattenTemp) 48
               51:     20(ptr) AccessChain 46(flattenTemp) 17
               52:    7(fvec4) Load 51
-                              Store 50(@entryPointOutput_Position) 52
+                              Store 50(@entryPointOutput.Position) 52
               57:     26(ptr) AccessChain 46(flattenTemp) 22 25
               58:    6(float) Load 57
-              60:     59(ptr) AccessChain 56(@entryPointOutput_ClipRect) 17
+              60:     59(ptr) AccessChain 56(@entryPointOutput.ClipRect) 17
                               Store 60 58
               61:     26(ptr) AccessChain 46(flattenTemp) 22 29
               62:    6(float) Load 61
-              63:     59(ptr) AccessChain 56(@entryPointOutput_ClipRect) 22
+              63:     59(ptr) AccessChain 56(@entryPointOutput.ClipRect) 22
                               Store 63 62
               65:     26(ptr) AccessChain 46(flattenTemp) 22 32
               66:    6(float) Load 65
-              67:     59(ptr) AccessChain 56(@entryPointOutput_ClipRect) 64
+              67:     59(ptr) AccessChain 56(@entryPointOutput.ClipRect) 64
                               Store 67 66
               69:     26(ptr) AccessChain 46(flattenTemp) 22 35
               70:    6(float) Load 69
-              71:     59(ptr) AccessChain 56(@entryPointOutput_ClipRect) 68
+              71:     59(ptr) AccessChain 56(@entryPointOutput.ClipRect) 68
                               Store 71 70
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-5.frag.out b/Test/baseResults/hlsl.clipdistance-5.frag.out
new file mode 100644
index 0000000..7c1bac5
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-5.frag.out
@@ -0,0 +1,325 @@
+hlsl.clipdistance-5.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: @main(struct-VS_OUTPUT-vf4-vf2[2]1; ( temp 4-component vector of float)
+0:7    Function Parameters: 
+0:7      'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:?     Sequence
+0:8      Branch: Return with expression
+0:8        add ( temp 4-component vector of float)
+0:8          add ( temp 4-component vector of float)
+0:8            Position: direct index for structure ( temp 4-component vector of float)
+0:8              'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              direct index ( temp 2-component vector of float)
+0:8                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:8                  'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8                  Constant:
+0:8                    1 (const int)
+0:8                Constant:
+0:8                  0 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          direct index ( temp float)
+0:8            direct index ( temp 2-component vector of float)
+0:8              ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:8                'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            Constant:
+0:8              0 (const int)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  0 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                0 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  0 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                1 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                2 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                3 (const int)
+0:7      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:7        Function Call: @main(struct-VS_OUTPUT-vf4-vf2[2]1; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: @main(struct-VS_OUTPUT-vf4-vf2[2]1; ( temp 4-component vector of float)
+0:7    Function Parameters: 
+0:7      'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:?     Sequence
+0:8      Branch: Return with expression
+0:8        add ( temp 4-component vector of float)
+0:8          add ( temp 4-component vector of float)
+0:8            Position: direct index for structure ( temp 4-component vector of float)
+0:8              'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( temp float)
+0:8              direct index ( temp 2-component vector of float)
+0:8                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:8                  'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8                  Constant:
+0:8                    1 (const int)
+0:8                Constant:
+0:8                  0 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8          direct index ( temp float)
+0:8            direct index ( temp 2-component vector of float)
+0:8              ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:8                'v' ( const (read only) structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            Constant:
+0:8              0 (const int)
+0:7  Function Definition: main( ( temp void)
+0:7    Function Parameters: 
+0:?     Sequence
+0:7      Sequence
+0:7        move second child to first child ( temp 4-component vector of float)
+0:7          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  0 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                0 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  0 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                1 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                0 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                2 (const int)
+0:7          move second child to first child ( temp float)
+0:7            direct index ( temp float)
+0:7              direct index ( temp 2-component vector of float)
+0:7                ClipRect: direct index for structure ( temp 2-element array of 2-component vector of float)
+0:?                   'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:7                  Constant:
+0:7                    1 (const int)
+0:7                Constant:
+0:7                  1 (const int)
+0:7              Constant:
+0:7                1 (const int)
+0:7            direct index ( in float ClipDistance)
+0:?               'v.ClipRect' ( in 4-element array of float ClipDistance)
+0:7              Constant:
+0:7                3 (const int)
+0:7      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:7        Function Call: @main(struct-VS_OUTPUT-vf4-vf2[2]1; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 62
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 33 40 59
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 12  "VS_OUTPUT"
+                              MemberName 12(VS_OUTPUT) 0  "Position"
+                              MemberName 12(VS_OUTPUT) 1  "ClipRect"
+                              Name 15  "@main(struct-VS_OUTPUT-vf4-vf2[2]1;"
+                              Name 14  "v"
+                              Name 31  "v"
+                              Name 33  "v.Position"
+                              Name 40  "v.ClipRect"
+                              Name 59  "@entryPointOutput"
+                              Decorate 33(v.Position) BuiltIn FragCoord
+                              Decorate 40(v.ClipRect) BuiltIn ClipDistance
+                              Decorate 59(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeVector 6(float) 2
+               9:             TypeInt 32 0
+              10:      9(int) Constant 2
+              11:             TypeArray 8(fvec2) 10
+   12(VS_OUTPUT):             TypeStruct 7(fvec4) 11
+              13:             TypeFunction 7(fvec4) 12(VS_OUTPUT)
+              17:             TypeInt 32 1
+              18:     17(int) Constant 0
+              20:     17(int) Constant 1
+              21:      9(int) Constant 0
+              30:             TypePointer Function 12(VS_OUTPUT)
+              32:             TypePointer Input 7(fvec4)
+  33(v.Position):     32(ptr) Variable Input
+              35:             TypePointer Function 7(fvec4)
+              37:      9(int) Constant 4
+              38:             TypeArray 6(float) 37
+              39:             TypePointer Input 38
+  40(v.ClipRect):     39(ptr) Variable Input
+              41:             TypePointer Input 6(float)
+              44:             TypePointer Function 6(float)
+              48:      9(int) Constant 1
+              50:     17(int) Constant 2
+              54:     17(int) Constant 3
+              58:             TypePointer Output 7(fvec4)
+59(@entryPointOutput):     58(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           31(v):     30(ptr) Variable Function
+              34:    7(fvec4) Load 33(v.Position)
+              36:     35(ptr) AccessChain 31(v) 18
+                              Store 36 34
+              42:     41(ptr) AccessChain 40(v.ClipRect) 18
+              43:    6(float) Load 42
+              45:     44(ptr) AccessChain 31(v) 20 18 21
+                              Store 45 43
+              46:     41(ptr) AccessChain 40(v.ClipRect) 20
+              47:    6(float) Load 46
+              49:     44(ptr) AccessChain 31(v) 20 18 48
+                              Store 49 47
+              51:     41(ptr) AccessChain 40(v.ClipRect) 50
+              52:    6(float) Load 51
+              53:     44(ptr) AccessChain 31(v) 20 20 21
+                              Store 53 52
+              55:     41(ptr) AccessChain 40(v.ClipRect) 54
+              56:    6(float) Load 55
+              57:     44(ptr) AccessChain 31(v) 20 20 48
+                              Store 57 56
+              60:12(VS_OUTPUT) Load 31(v)
+              61:    7(fvec4) FunctionCall 15(@main(struct-VS_OUTPUT-vf4-vf2[2]1;) 60
+                              Store 59(@entryPointOutput) 61
+                              Return
+                              FunctionEnd
+15(@main(struct-VS_OUTPUT-vf4-vf2[2]1;):    7(fvec4) Function None 13
+           14(v):12(VS_OUTPUT) FunctionParameter
+              16:             Label
+              19:    7(fvec4) CompositeExtract 14(v) 0
+              22:    6(float) CompositeExtract 14(v) 1 0 0
+              23:    7(fvec4) CompositeConstruct 22 22 22 22
+              24:    7(fvec4) FAdd 19 23
+              25:    6(float) CompositeExtract 14(v) 1 1 0
+              26:    7(fvec4) CompositeConstruct 25 25 25 25
+              27:    7(fvec4) FAdd 24 26
+                              ReturnValue 27
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-5.vert.out b/Test/baseResults/hlsl.clipdistance-5.vert.out
index 643a678..7a50973 100644
--- a/Test/baseResults/hlsl.clipdistance-5.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-5.vert.out
@@ -78,22 +78,22 @@
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11            Constant:
 0:11              0 (const int)
-0:?           'Position' (layout( location=0) in 4-component vector of float)
+0:?           'v.Position' (layout( location=0) in 4-component vector of float)
 0:11      Sequence
 0:11        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11          Function Call: @main(struct-VS_INPUT-vf41; ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:11          Position: direct index for structure ( temp 4-component vector of float)
 0:11            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11            Constant:
 0:11              0 (const int)
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                0 (const int)
 0:11            direct index ( temp float)
@@ -107,8 +107,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                1 (const int)
 0:11            direct index ( temp float)
@@ -122,8 +122,8 @@
 0:11              Constant:
 0:11                1 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                2 (const int)
 0:11            direct index ( temp float)
@@ -137,8 +137,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                3 (const int)
 0:11            direct index ( temp float)
@@ -152,9 +152,9 @@
 0:11              Constant:
 0:11                1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Position' (layout( location=0) in 4-component vector of float)
-0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     'v.Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -239,22 +239,22 @@
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11            Constant:
 0:11              0 (const int)
-0:?           'Position' (layout( location=0) in 4-component vector of float)
+0:?           'v.Position' (layout( location=0) in 4-component vector of float)
 0:11      Sequence
 0:11        move second child to first child ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11          Function Call: @main(struct-VS_INPUT-vf41; ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:?             'v' ( temp structure{ temp 4-component vector of float Position})
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:11          Position: direct index for structure ( temp 4-component vector of float)
 0:11            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 2-element array of 2-component vector of float ClipRect})
 0:11            Constant:
 0:11              0 (const int)
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                0 (const int)
 0:11            direct index ( temp float)
@@ -268,8 +268,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                1 (const int)
 0:11            direct index ( temp float)
@@ -283,8 +283,8 @@
 0:11              Constant:
 0:11                1 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                2 (const int)
 0:11            direct index ( temp float)
@@ -298,8 +298,8 @@
 0:11              Constant:
 0:11                0 (const int)
 0:11          move second child to first child ( temp float)
-0:11            direct index ( temp float)
-0:?               '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:11            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 0:11              Constant:
 0:11                3 (const int)
 0:11            direct index ( temp float)
@@ -313,19 +313,19 @@
 0:11              Constant:
 0:11                1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Position' (layout( location=0) in 4-component vector of float)
-0:?     '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     'v.Position' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 76
+// Id's are bound by 73
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 44 51 57 75
+                              EntryPoint Vertex 4  "main" 44 51 57
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_INPUT"
@@ -337,16 +337,13 @@
                               Name 15  "v"
                               Name 19  "Output"
                               Name 42  "v"
-                              Name 44  "Position"
+                              Name 44  "v.Position"
                               Name 47  "flattenTemp"
-                              Name 51  "@entryPointOutput_Position"
-                              Name 57  "@entryPointOutput_ClipRect"
-                              Name 73  "VS_OUTPUT"
-                              Name 75  "@entryPointOutput"
-                              Decorate 44(Position) Location 0
-                              Decorate 51(@entryPointOutput_Position) BuiltIn Position
-                              Decorate 57(@entryPointOutput_ClipRect) BuiltIn ClipDistance
-                              Decorate 75(@entryPointOutput) Location 0
+                              Name 51  "@entryPointOutput.Position"
+                              Name 57  "@entryPointOutput.ClipRect"
+                              Decorate 44(v.Position) Location 0
+                              Decorate 51(@entryPointOutput.Position) BuiltIn Position
+                              Decorate 57(@entryPointOutput.ClipRect) BuiltIn ClipDistance
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -374,24 +371,21 @@
               36:    6(float) Constant 1082130432
               41:             TypePointer Function 8(VS_INPUT)
               43:             TypePointer Input 7(fvec4)
-    44(Position):     43(ptr) Variable Input
+  44(v.Position):     43(ptr) Variable Input
               50:             TypePointer Output 7(fvec4)
-51(@entryPointOutput_Position):     50(ptr) Variable Output
+51(@entryPointOutput.Position):     50(ptr) Variable Output
               54:     10(int) Constant 4
               55:             TypeArray 6(float) 54
               56:             TypePointer Output 55
-57(@entryPointOutput_ClipRect):     56(ptr) Variable Output
+57(@entryPointOutput.ClipRect):     56(ptr) Variable Output
               60:             TypePointer Output 6(float)
               65:     20(int) Constant 2
               69:     20(int) Constant 3
-   73(VS_OUTPUT):             TypeStruct
-              74:             TypePointer Output 73(VS_OUTPUT)
-75(@entryPointOutput):     74(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            42(v):     41(ptr) Variable Function
  47(flattenTemp):     18(ptr) Variable Function
-              45:    7(fvec4) Load 44(Position)
+              45:    7(fvec4) Load 44(v.Position)
               46:     24(ptr) AccessChain 42(v) 21
                               Store 46 45
               48: 8(VS_INPUT) Load 42(v)
@@ -399,22 +393,22 @@
                               Store 47(flattenTemp) 49
               52:     24(ptr) AccessChain 47(flattenTemp) 21
               53:    7(fvec4) Load 52
-                              Store 51(@entryPointOutput_Position) 53
+                              Store 51(@entryPointOutput.Position) 53
               58:     29(ptr) AccessChain 47(flattenTemp) 26 21 28
               59:    6(float) Load 58
-              61:     60(ptr) AccessChain 57(@entryPointOutput_ClipRect) 21
+              61:     60(ptr) AccessChain 57(@entryPointOutput.ClipRect) 21
                               Store 61 59
               62:     29(ptr) AccessChain 47(flattenTemp) 26 21 32
               63:    6(float) Load 62
-              64:     60(ptr) AccessChain 57(@entryPointOutput_ClipRect) 26
+              64:     60(ptr) AccessChain 57(@entryPointOutput.ClipRect) 26
                               Store 64 63
               66:     29(ptr) AccessChain 47(flattenTemp) 26 26 28
               67:    6(float) Load 66
-              68:     60(ptr) AccessChain 57(@entryPointOutput_ClipRect) 65
+              68:     60(ptr) AccessChain 57(@entryPointOutput.ClipRect) 65
                               Store 68 67
               70:     29(ptr) AccessChain 47(flattenTemp) 26 26 32
               71:    6(float) Load 70
-              72:     60(ptr) AccessChain 57(@entryPointOutput_ClipRect) 69
+              72:     60(ptr) AccessChain 57(@entryPointOutput.ClipRect) 69
                               Store 72 71
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-6.frag.out b/Test/baseResults/hlsl.clipdistance-6.frag.out
new file mode 100644
index 0000000..c249b0e
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-6.frag.out
@@ -0,0 +1,399 @@
+hlsl.clipdistance-6.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf4-vf41; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            clip0: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                1 (const int)
+0:9          clip1: direct index for structure ( temp 4-component vector of float)
+0:9            'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9            Constant:
+0:9              2 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf4-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 8-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf4-vf41; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            clip0: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                1 (const int)
+0:9          clip1: direct index for structure ( temp 4-component vector of float)
+0:9            'v' ( in structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9            Constant:
+0:9              2 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf4-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 8-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 79
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 31 38 75
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 8  "VS_OUTPUT"
+                              MemberName 8(VS_OUTPUT) 0  "Position"
+                              MemberName 8(VS_OUTPUT) 1  "clip0"
+                              MemberName 8(VS_OUTPUT) 2  "clip1"
+                              Name 12  "@main(struct-VS_OUTPUT-vf4-vf4-vf41;"
+                              Name 11  "v"
+                              Name 29  "v"
+                              Name 31  "v.Position"
+                              Name 38  "v.clip1"
+                              Name 75  "@entryPointOutput"
+                              Name 76  "param"
+                              Decorate 31(v.Position) BuiltIn FragCoord
+                              Decorate 38(v.clip1) BuiltIn ClipDistance
+                              Decorate 75(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+    8(VS_OUTPUT):             TypeStruct 7(fvec4) 7(fvec4) 7(fvec4)
+               9:             TypePointer Function 8(VS_OUTPUT)
+              10:             TypeFunction 7(fvec4) 9(ptr)
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:             TypePointer Function 7(fvec4)
+              19:     14(int) Constant 1
+              23:     14(int) Constant 2
+              30:             TypePointer Input 7(fvec4)
+  31(v.Position):     30(ptr) Variable Input
+              34:             TypeInt 32 0
+              35:     34(int) Constant 8
+              36:             TypeArray 6(float) 35
+              37:             TypePointer Input 36
+     38(v.clip1):     37(ptr) Variable Input
+              39:             TypePointer Input 6(float)
+              42:     34(int) Constant 0
+              43:             TypePointer Function 6(float)
+              47:     34(int) Constant 1
+              51:     34(int) Constant 2
+              53:     14(int) Constant 3
+              56:     34(int) Constant 3
+              58:     14(int) Constant 4
+              62:     14(int) Constant 5
+              66:     14(int) Constant 6
+              70:     14(int) Constant 7
+              74:             TypePointer Output 7(fvec4)
+75(@entryPointOutput):     74(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           29(v):      9(ptr) Variable Function
+       76(param):      9(ptr) Variable Function
+              32:    7(fvec4) Load 31(v.Position)
+              33:     16(ptr) AccessChain 29(v) 15
+                              Store 33 32
+              40:     39(ptr) AccessChain 38(v.clip1) 15
+              41:    6(float) Load 40
+              44:     43(ptr) AccessChain 29(v) 19 42
+                              Store 44 41
+              45:     39(ptr) AccessChain 38(v.clip1) 19
+              46:    6(float) Load 45
+              48:     43(ptr) AccessChain 29(v) 19 47
+                              Store 48 46
+              49:     39(ptr) AccessChain 38(v.clip1) 23
+              50:    6(float) Load 49
+              52:     43(ptr) AccessChain 29(v) 19 51
+                              Store 52 50
+              54:     39(ptr) AccessChain 38(v.clip1) 53
+              55:    6(float) Load 54
+              57:     43(ptr) AccessChain 29(v) 19 56
+                              Store 57 55
+              59:     39(ptr) AccessChain 38(v.clip1) 58
+              60:    6(float) Load 59
+              61:     43(ptr) AccessChain 29(v) 23 42
+                              Store 61 60
+              63:     39(ptr) AccessChain 38(v.clip1) 62
+              64:    6(float) Load 63
+              65:     43(ptr) AccessChain 29(v) 23 47
+                              Store 65 64
+              67:     39(ptr) AccessChain 38(v.clip1) 66
+              68:    6(float) Load 67
+              69:     43(ptr) AccessChain 29(v) 23 51
+                              Store 69 68
+              71:     39(ptr) AccessChain 38(v.clip1) 70
+              72:    6(float) Load 71
+              73:     43(ptr) AccessChain 29(v) 23 56
+                              Store 73 72
+              77:8(VS_OUTPUT) Load 29(v)
+                              Store 76(param) 77
+              78:    7(fvec4) FunctionCall 12(@main(struct-VS_OUTPUT-vf4-vf4-vf41;) 76(param)
+                              Store 75(@entryPointOutput) 78
+                              Return
+                              FunctionEnd
+12(@main(struct-VS_OUTPUT-vf4-vf4-vf41;):    7(fvec4) Function None 10
+           11(v):      9(ptr) FunctionParameter
+              13:             Label
+              17:     16(ptr) AccessChain 11(v) 15
+              18:    7(fvec4) Load 17
+              20:     16(ptr) AccessChain 11(v) 19
+              21:    7(fvec4) Load 20
+              22:    7(fvec4) FAdd 18 21
+              24:     16(ptr) AccessChain 11(v) 23
+              25:    7(fvec4) Load 24
+              26:    7(fvec4) FAdd 22 25
+                              ReturnValue 26
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-6.vert.out b/Test/baseResults/hlsl.clipdistance-6.vert.out
index efce796..6449482 100644
--- a/Test/baseResults/hlsl.clipdistance-6.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-6.vert.out
@@ -104,15 +104,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -123,8 +123,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -135,8 +135,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -147,8 +147,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                3 (const int)
 0:8            direct index ( temp float)
@@ -160,8 +160,8 @@
 0:8                3 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                4 (const int)
 0:8            direct index ( temp float)
@@ -172,8 +172,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                5 (const int)
 0:8            direct index ( temp float)
@@ -184,8 +184,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                6 (const int)
 0:8            direct index ( temp float)
@@ -196,8 +196,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                7 (const int)
 0:8            direct index ( temp float)
@@ -208,8 +208,8 @@
 0:8              Constant:
 0:8                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -320,15 +320,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 4-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -339,8 +339,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -351,8 +351,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -363,8 +363,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                3 (const int)
 0:8            direct index ( temp float)
@@ -376,8 +376,8 @@
 0:8                3 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                4 (const int)
 0:8            direct index ( temp float)
@@ -388,8 +388,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                5 (const int)
 0:8            direct index ( temp float)
@@ -400,8 +400,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                6 (const int)
 0:8            direct index ( temp float)
@@ -412,8 +412,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                7 (const int)
 0:8            direct index ( temp float)
@@ -424,18 +424,18 @@
 0:8              Constant:
 0:8                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 89
+// Id's are bound by 86
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 49 55 88
+                              EntryPoint Vertex 4  "main" 49 55
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -445,13 +445,10 @@
                               Name 10  "@main("
                               Name 13  "Output"
                               Name 46  "flattenTemp"
-                              Name 49  "@entryPointOutput_Position"
-                              Name 55  "@entryPointOutput_clip1"
-                              Name 86  "VS_OUTPUT"
-                              Name 88  "@entryPointOutput"
-                              Decorate 49(@entryPointOutput_Position) BuiltIn Position
-                              Decorate 55(@entryPointOutput_clip1) BuiltIn ClipDistance
-                              Decorate 88(@entryPointOutput) Location 0
+                              Name 49  "@entryPointOutput.Position"
+                              Name 55  "@entryPointOutput.clip1"
+                              Decorate 49(@entryPointOutput.Position) BuiltIn Position
+                              Decorate 55(@entryPointOutput.clip1) BuiltIn ClipDistance
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -480,20 +477,17 @@
               39:    6(float) Constant 1086324736
               41:    6(float) Constant 1088421888
               48:             TypePointer Output 7(fvec4)
-49(@entryPointOutput_Position):     48(ptr) Variable Output
+49(@entryPointOutput.Position):     48(ptr) Variable Output
               52:     21(int) Constant 8
               53:             TypeArray 6(float) 52
               54:             TypePointer Output 53
-55(@entryPointOutput_clip1):     54(ptr) Variable Output
+55(@entryPointOutput.clip1):     54(ptr) Variable Output
               58:             TypePointer Output 6(float)
               66:     14(int) Constant 3
               70:     14(int) Constant 4
               74:     14(int) Constant 5
               78:     14(int) Constant 6
               82:     14(int) Constant 7
-   86(VS_OUTPUT):             TypeStruct
-              87:             TypePointer Output 86(VS_OUTPUT)
-88(@entryPointOutput):     87(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
  46(flattenTemp):     12(ptr) Variable Function
@@ -501,38 +495,38 @@
                               Store 46(flattenTemp) 47
               50:     18(ptr) AccessChain 46(flattenTemp) 15
               51:    7(fvec4) Load 50
-                              Store 49(@entryPointOutput_Position) 51
+                              Store 49(@entryPointOutput.Position) 51
               56:     23(ptr) AccessChain 46(flattenTemp) 20 22
               57:    6(float) Load 56
-              59:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 15
+              59:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 15
                               Store 59 57
               60:     23(ptr) AccessChain 46(flattenTemp) 20 26
               61:    6(float) Load 60
-              62:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 20
+              62:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 20
                               Store 62 61
               63:     23(ptr) AccessChain 46(flattenTemp) 20 29
               64:    6(float) Load 63
-              65:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 34
+              65:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 34
                               Store 65 64
               67:     23(ptr) AccessChain 46(flattenTemp) 20 32
               68:    6(float) Load 67
-              69:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 66
+              69:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 66
                               Store 69 68
               71:     23(ptr) AccessChain 46(flattenTemp) 34 22
               72:    6(float) Load 71
-              73:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 70
+              73:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 70
                               Store 73 72
               75:     23(ptr) AccessChain 46(flattenTemp) 34 26
               76:    6(float) Load 75
-              77:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 74
+              77:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 74
                               Store 77 76
               79:     23(ptr) AccessChain 46(flattenTemp) 34 29
               80:    6(float) Load 79
-              81:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 78
+              81:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 78
                               Store 81 80
               83:     23(ptr) AccessChain 46(flattenTemp) 34 32
               84:    6(float) Load 83
-              85:     58(ptr) AccessChain 55(@entryPointOutput_clip1) 82
+              85:     58(ptr) AccessChain 55(@entryPointOutput.clip1) 82
                               Store 85 84
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-7.frag.out b/Test/baseResults/hlsl.clipdistance-7.frag.out
new file mode 100644
index 0000000..e6e5c00
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-7.frag.out
@@ -0,0 +1,385 @@
+hlsl.clipdistance-7.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf3-vf41; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            direct index ( temp float)
+0:9              clip0: direct index for structure ( temp 3-component vector of float)
+0:9                'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9                Constant:
+0:9                  1 (const int)
+0:9              Constant:
+0:9                0 (const int)
+0:9          direct index ( temp float)
+0:9            clip1: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                2 (const int)
+0:9            Constant:
+0:9              0 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf3-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 8-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf3-vf41; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            direct index ( temp float)
+0:9              clip0: direct index for structure ( temp 3-component vector of float)
+0:9                'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9                Constant:
+0:9                  1 (const int)
+0:9              Constant:
+0:9                0 (const int)
+0:9          direct index ( temp float)
+0:9            clip1: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:9              Constant:
+0:9                2 (const int)
+0:9            Constant:
+0:9              0 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                4 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                5 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                6 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip1: direct index for structure ( temp 4-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:8                Constant:
+0:8                  2 (const int)
+0:8              Constant:
+0:8                3 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 8-element array of float ClipDistance)
+0:8              Constant:
+0:8                7 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf3-vf41; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 8-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 78
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 37 43 74
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "VS_OUTPUT"
+                              MemberName 9(VS_OUTPUT) 0  "Position"
+                              MemberName 9(VS_OUTPUT) 1  "clip0"
+                              MemberName 9(VS_OUTPUT) 2  "clip1"
+                              Name 13  "@main(struct-VS_OUTPUT-vf4-vf3-vf41;"
+                              Name 12  "v"
+                              Name 35  "v"
+                              Name 37  "v.Position"
+                              Name 43  "v.clip1"
+                              Name 74  "@entryPointOutput"
+                              Name 75  "param"
+                              Decorate 37(v.Position) BuiltIn FragCoord
+                              Decorate 43(v.clip1) BuiltIn ClipDistance
+                              Decorate 74(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeVector 6(float) 3
+    9(VS_OUTPUT):             TypeStruct 7(fvec4) 8(fvec3) 7(fvec4)
+              10:             TypePointer Function 9(VS_OUTPUT)
+              11:             TypeFunction 7(fvec4) 10(ptr)
+              15:             TypeInt 32 1
+              16:     15(int) Constant 0
+              17:             TypePointer Function 7(fvec4)
+              20:     15(int) Constant 1
+              21:             TypeInt 32 0
+              22:     21(int) Constant 0
+              23:             TypePointer Function 6(float)
+              28:     15(int) Constant 2
+              36:             TypePointer Input 7(fvec4)
+  37(v.Position):     36(ptr) Variable Input
+              40:     21(int) Constant 8
+              41:             TypeArray 6(float) 40
+              42:             TypePointer Input 41
+     43(v.clip1):     42(ptr) Variable Input
+              44:             TypePointer Input 6(float)
+              50:     21(int) Constant 1
+              54:     21(int) Constant 2
+              56:     15(int) Constant 4
+              60:     15(int) Constant 5
+              64:     15(int) Constant 6
+              68:     15(int) Constant 7
+              71:     21(int) Constant 3
+              73:             TypePointer Output 7(fvec4)
+74(@entryPointOutput):     73(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           35(v):     10(ptr) Variable Function
+       75(param):     10(ptr) Variable Function
+              38:    7(fvec4) Load 37(v.Position)
+              39:     17(ptr) AccessChain 35(v) 16
+                              Store 39 38
+              45:     44(ptr) AccessChain 43(v.clip1) 16
+              46:    6(float) Load 45
+              47:     23(ptr) AccessChain 35(v) 20 22
+                              Store 47 46
+              48:     44(ptr) AccessChain 43(v.clip1) 20
+              49:    6(float) Load 48
+              51:     23(ptr) AccessChain 35(v) 20 50
+                              Store 51 49
+              52:     44(ptr) AccessChain 43(v.clip1) 28
+              53:    6(float) Load 52
+              55:     23(ptr) AccessChain 35(v) 20 54
+                              Store 55 53
+              57:     44(ptr) AccessChain 43(v.clip1) 56
+              58:    6(float) Load 57
+              59:     23(ptr) AccessChain 35(v) 28 22
+                              Store 59 58
+              61:     44(ptr) AccessChain 43(v.clip1) 60
+              62:    6(float) Load 61
+              63:     23(ptr) AccessChain 35(v) 28 50
+                              Store 63 62
+              65:     44(ptr) AccessChain 43(v.clip1) 64
+              66:    6(float) Load 65
+              67:     23(ptr) AccessChain 35(v) 28 54
+                              Store 67 66
+              69:     44(ptr) AccessChain 43(v.clip1) 68
+              70:    6(float) Load 69
+              72:     23(ptr) AccessChain 35(v) 28 71
+                              Store 72 70
+              76:9(VS_OUTPUT) Load 35(v)
+                              Store 75(param) 76
+              77:    7(fvec4) FunctionCall 13(@main(struct-VS_OUTPUT-vf4-vf3-vf41;) 75(param)
+                              Store 74(@entryPointOutput) 77
+                              Return
+                              FunctionEnd
+13(@main(struct-VS_OUTPUT-vf4-vf3-vf41;):    7(fvec4) Function None 11
+           12(v):     10(ptr) FunctionParameter
+              14:             Label
+              18:     17(ptr) AccessChain 12(v) 16
+              19:    7(fvec4) Load 18
+              24:     23(ptr) AccessChain 12(v) 20 22
+              25:    6(float) Load 24
+              26:    7(fvec4) CompositeConstruct 25 25 25 25
+              27:    7(fvec4) FAdd 19 26
+              29:     23(ptr) AccessChain 12(v) 28 22
+              30:    6(float) Load 29
+              31:    7(fvec4) CompositeConstruct 30 30 30 30
+              32:    7(fvec4) FAdd 27 31
+                              ReturnValue 32
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-7.vert.out b/Test/baseResults/hlsl.clipdistance-7.vert.out
index 324320b..5a93c2c 100644
--- a/Test/baseResults/hlsl.clipdistance-7.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-7.vert.out
@@ -94,15 +94,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -113,8 +113,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -125,8 +125,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -138,8 +138,8 @@
 0:8                2 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                4 (const int)
 0:8            direct index ( temp float)
@@ -150,8 +150,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                5 (const int)
 0:8            direct index ( temp float)
@@ -162,8 +162,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                6 (const int)
 0:8            direct index ( temp float)
@@ -174,8 +174,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                7 (const int)
 0:8            direct index ( temp float)
@@ -186,8 +186,8 @@
 0:8              Constant:
 0:8                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -288,15 +288,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp 4-component vector of float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -307,8 +307,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -319,8 +319,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -332,8 +332,8 @@
 0:8                2 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                4 (const int)
 0:8            direct index ( temp float)
@@ -344,8 +344,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                5 (const int)
 0:8            direct index ( temp float)
@@ -356,8 +356,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                6 (const int)
 0:8            direct index ( temp float)
@@ -368,8 +368,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 0:8              Constant:
 0:8                7 (const int)
 0:8            direct index ( temp float)
@@ -380,18 +380,18 @@
 0:8              Constant:
 0:8                3 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 84
+// Id's are bound by 81
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 48 54 83
+                              EntryPoint Vertex 4  "main" 48 54
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_OUTPUT"
@@ -401,13 +401,10 @@
                               Name 11  "@main("
                               Name 14  "Output"
                               Name 45  "flattenTemp"
-                              Name 48  "@entryPointOutput_Position"
-                              Name 54  "@entryPointOutput_clip1"
-                              Name 81  "VS_OUTPUT"
-                              Name 83  "@entryPointOutput"
-                              Decorate 48(@entryPointOutput_Position) BuiltIn Position
-                              Decorate 54(@entryPointOutput_clip1) BuiltIn ClipDistance
-                              Decorate 83(@entryPointOutput) Location 0
+                              Name 48  "@entryPointOutput.Position"
+                              Name 54  "@entryPointOutput.clip1"
+                              Decorate 48(@entryPointOutput.Position) BuiltIn Position
+                              Decorate 54(@entryPointOutput.clip1) BuiltIn ClipDistance
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -436,19 +433,16 @@
               39:    6(float) Constant 1088421888
               40:     22(int) Constant 3
               47:             TypePointer Output 7(fvec4)
-48(@entryPointOutput_Position):     47(ptr) Variable Output
+48(@entryPointOutput.Position):     47(ptr) Variable Output
               51:     22(int) Constant 8
               52:             TypeArray 6(float) 51
               53:             TypePointer Output 52
-54(@entryPointOutput_clip1):     53(ptr) Variable Output
+54(@entryPointOutput.clip1):     53(ptr) Variable Output
               57:             TypePointer Output 6(float)
               65:     15(int) Constant 4
               69:     15(int) Constant 5
               73:     15(int) Constant 6
               77:     15(int) Constant 7
-   81(VS_OUTPUT):             TypeStruct
-              82:             TypePointer Output 81(VS_OUTPUT)
-83(@entryPointOutput):     82(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
  45(flattenTemp):     13(ptr) Variable Function
@@ -456,34 +450,34 @@
                               Store 45(flattenTemp) 46
               49:     19(ptr) AccessChain 45(flattenTemp) 16
               50:    7(fvec4) Load 49
-                              Store 48(@entryPointOutput_Position) 50
+                              Store 48(@entryPointOutput.Position) 50
               55:     24(ptr) AccessChain 45(flattenTemp) 21 23
               56:    6(float) Load 55
-              58:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 16
+              58:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 16
                               Store 58 56
               59:     24(ptr) AccessChain 45(flattenTemp) 21 27
               60:    6(float) Load 59
-              61:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 21
+              61:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 21
                               Store 61 60
               62:     24(ptr) AccessChain 45(flattenTemp) 21 30
               63:    6(float) Load 62
-              64:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 32
+              64:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 32
                               Store 64 63
               66:     24(ptr) AccessChain 45(flattenTemp) 32 23
               67:    6(float) Load 66
-              68:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 65
+              68:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 65
                               Store 68 67
               70:     24(ptr) AccessChain 45(flattenTemp) 32 27
               71:    6(float) Load 70
-              72:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 69
+              72:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 69
                               Store 72 71
               74:     24(ptr) AccessChain 45(flattenTemp) 32 30
               75:    6(float) Load 74
-              76:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 73
+              76:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 73
                               Store 76 75
               78:     24(ptr) AccessChain 45(flattenTemp) 32 40
               79:    6(float) Load 78
-              80:     57(ptr) AccessChain 54(@entryPointOutput_clip1) 77
+              80:     57(ptr) AccessChain 54(@entryPointOutput.clip1) 77
                               Store 80 79
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-8.frag.out b/Test/baseResults/hlsl.clipdistance-8.frag.out
new file mode 100644
index 0000000..6777efa
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-8.frag.out
@@ -0,0 +1,285 @@
+hlsl.clipdistance-8.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf3-f11; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            direct index ( temp float)
+0:9              clip0: direct index for structure ( temp 3-component vector of float)
+0:9                'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9                Constant:
+0:9                  1 (const int)
+0:9              Constant:
+0:9                0 (const int)
+0:9          clip1: direct index for structure ( temp float)
+0:9            'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9            Constant:
+0:9              2 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            clip1: direct index for structure ( temp float)
+0:?               'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf3-f11; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 4-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(struct-VS_OUTPUT-vf4-vf3-f11; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:?     Sequence
+0:9      Branch: Return with expression
+0:9        add ( temp 4-component vector of float)
+0:9          add ( temp 4-component vector of float)
+0:9            Position: direct index for structure ( temp 4-component vector of float)
+0:9              'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9              Constant:
+0:9                0 (const int)
+0:9            direct index ( temp float)
+0:9              clip0: direct index for structure ( temp 3-component vector of float)
+0:9                'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9                Constant:
+0:9                  1 (const int)
+0:9              Constant:
+0:9                0 (const int)
+0:9          clip1: direct index for structure ( temp float)
+0:9            'v' ( in structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:9            Constant:
+0:9              2 (const int)
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      Sequence
+0:8        move second child to first child ( temp 4-component vector of float)
+0:8          Position: direct index for structure ( temp 4-component vector of float)
+0:?             'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8            Constant:
+0:8              0 (const int)
+0:?           'v.Position' ( in 4-component vector of float FragCoord)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                0 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                0 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                1 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                1 (const int)
+0:8          move second child to first child ( temp float)
+0:8            direct index ( temp float)
+0:8              clip0: direct index for structure ( temp 3-component vector of float)
+0:?                 'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8                Constant:
+0:8                  1 (const int)
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                2 (const int)
+0:?         Sequence
+0:8          move second child to first child ( temp float)
+0:8            clip1: direct index for structure ( temp float)
+0:?               'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:8              Constant:
+0:8                2 (const int)
+0:8            direct index ( in float ClipDistance)
+0:?               'v.clip1' ( in 4-element array of float ClipDistance)
+0:8              Constant:
+0:8                3 (const int)
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:8        Function Call: @main(struct-VS_OUTPUT-vf4-vf3-f11; ( temp 4-component vector of float)
+0:?           'v' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'v.Position' ( in 4-component vector of float FragCoord)
+0:?     'v.clip1' ( in 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 65
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 37 43 61
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "VS_OUTPUT"
+                              MemberName 9(VS_OUTPUT) 0  "Position"
+                              MemberName 9(VS_OUTPUT) 1  "clip0"
+                              MemberName 9(VS_OUTPUT) 2  "clip1"
+                              Name 13  "@main(struct-VS_OUTPUT-vf4-vf3-f11;"
+                              Name 12  "v"
+                              Name 35  "v"
+                              Name 37  "v.Position"
+                              Name 43  "v.clip1"
+                              Name 61  "@entryPointOutput"
+                              Name 62  "param"
+                              Decorate 37(v.Position) BuiltIn FragCoord
+                              Decorate 43(v.clip1) BuiltIn ClipDistance
+                              Decorate 61(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeVector 6(float) 3
+    9(VS_OUTPUT):             TypeStruct 7(fvec4) 8(fvec3) 6(float)
+              10:             TypePointer Function 9(VS_OUTPUT)
+              11:             TypeFunction 7(fvec4) 10(ptr)
+              15:             TypeInt 32 1
+              16:     15(int) Constant 0
+              17:             TypePointer Function 7(fvec4)
+              20:     15(int) Constant 1
+              21:             TypeInt 32 0
+              22:     21(int) Constant 0
+              23:             TypePointer Function 6(float)
+              28:     15(int) Constant 2
+              36:             TypePointer Input 7(fvec4)
+  37(v.Position):     36(ptr) Variable Input
+              40:     21(int) Constant 4
+              41:             TypeArray 6(float) 40
+              42:             TypePointer Input 41
+     43(v.clip1):     42(ptr) Variable Input
+              44:             TypePointer Input 6(float)
+              50:     21(int) Constant 1
+              54:     21(int) Constant 2
+              56:     15(int) Constant 3
+              60:             TypePointer Output 7(fvec4)
+61(@entryPointOutput):     60(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           35(v):     10(ptr) Variable Function
+       62(param):     10(ptr) Variable Function
+              38:    7(fvec4) Load 37(v.Position)
+              39:     17(ptr) AccessChain 35(v) 16
+                              Store 39 38
+              45:     44(ptr) AccessChain 43(v.clip1) 16
+              46:    6(float) Load 45
+              47:     23(ptr) AccessChain 35(v) 20 22
+                              Store 47 46
+              48:     44(ptr) AccessChain 43(v.clip1) 20
+              49:    6(float) Load 48
+              51:     23(ptr) AccessChain 35(v) 20 50
+                              Store 51 49
+              52:     44(ptr) AccessChain 43(v.clip1) 28
+              53:    6(float) Load 52
+              55:     23(ptr) AccessChain 35(v) 20 54
+                              Store 55 53
+              57:     44(ptr) AccessChain 43(v.clip1) 56
+              58:    6(float) Load 57
+              59:     23(ptr) AccessChain 35(v) 28
+                              Store 59 58
+              63:9(VS_OUTPUT) Load 35(v)
+                              Store 62(param) 63
+              64:    7(fvec4) FunctionCall 13(@main(struct-VS_OUTPUT-vf4-vf3-f11;) 62(param)
+                              Store 61(@entryPointOutput) 64
+                              Return
+                              FunctionEnd
+13(@main(struct-VS_OUTPUT-vf4-vf3-f11;):    7(fvec4) Function None 11
+           12(v):     10(ptr) FunctionParameter
+              14:             Label
+              18:     17(ptr) AccessChain 12(v) 16
+              19:    7(fvec4) Load 18
+              24:     23(ptr) AccessChain 12(v) 20 22
+              25:    6(float) Load 24
+              26:    7(fvec4) CompositeConstruct 25 25 25 25
+              27:    7(fvec4) FAdd 19 26
+              29:     23(ptr) AccessChain 12(v) 28
+              30:    6(float) Load 29
+              31:    7(fvec4) CompositeConstruct 30 30 30 30
+              32:    7(fvec4) FAdd 27 31
+                              ReturnValue 32
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-8.vert.out b/Test/baseResults/hlsl.clipdistance-8.vert.out
index 94750b1..1705f2b 100644
--- a/Test/baseResults/hlsl.clipdistance-8.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-8.vert.out
@@ -61,15 +61,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -80,8 +80,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -92,8 +92,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -105,8 +105,8 @@
 0:8                2 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                3 (const int)
 0:8            clip1: direct index for structure ( temp float)
@@ -114,8 +114,8 @@
 0:8              Constant:
 0:8                2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 
 
 Linked vertex stage:
@@ -183,15 +183,15 @@
 0:8          'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8          Function Call: @main( ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:8          Position: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 4-component vector of float Position,  temp 3-component vector of float clip0,  temp float clip1})
 0:8            Constant:
 0:8              0 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                0 (const int)
 0:8            direct index ( temp float)
@@ -202,8 +202,8 @@
 0:8              Constant:
 0:8                0 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                1 (const int)
 0:8            direct index ( temp float)
@@ -214,8 +214,8 @@
 0:8              Constant:
 0:8                1 (const int)
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                2 (const int)
 0:8            direct index ( temp float)
@@ -227,8 +227,8 @@
 0:8                2 (const int)
 0:?         Sequence
 0:8          move second child to first child ( temp float)
-0:8            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:8            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 0:8              Constant:
 0:8                3 (const int)
 0:8            clip1: direct index for structure ( temp float)
@@ -236,18 +236,18 @@
 0:8              Constant:
 0:8                2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 65
+// Id's are bound by 62
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 41 47 64
+                              EntryPoint Vertex 4  "main" 41 47
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_OUTPUT"
@@ -257,13 +257,10 @@
                               Name 11  "@main("
                               Name 14  "Output"
                               Name 38  "flattenTemp"
-                              Name 41  "@entryPointOutput_Position"
-                              Name 47  "@entryPointOutput_clip1"
-                              Name 62  "VS_OUTPUT"
-                              Name 64  "@entryPointOutput"
-                              Decorate 41(@entryPointOutput_Position) BuiltIn Position
-                              Decorate 47(@entryPointOutput_clip1) BuiltIn ClipDistance
-                              Decorate 64(@entryPointOutput) Location 0
+                              Name 41  "@entryPointOutput.Position"
+                              Name 47  "@entryPointOutput.clip1"
+                              Decorate 41(@entryPointOutput.Position) BuiltIn Position
+                              Decorate 47(@entryPointOutput.clip1) BuiltIn ClipDistance
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -288,16 +285,13 @@
               32:     15(int) Constant 2
               33:    6(float) Constant 1077936128
               40:             TypePointer Output 7(fvec4)
-41(@entryPointOutput_Position):     40(ptr) Variable Output
+41(@entryPointOutput.Position):     40(ptr) Variable Output
               44:     22(int) Constant 4
               45:             TypeArray 6(float) 44
               46:             TypePointer Output 45
-47(@entryPointOutput_clip1):     46(ptr) Variable Output
+47(@entryPointOutput.clip1):     46(ptr) Variable Output
               50:             TypePointer Output 6(float)
               58:     15(int) Constant 3
-   62(VS_OUTPUT):             TypeStruct
-              63:             TypePointer Output 62(VS_OUTPUT)
-64(@entryPointOutput):     63(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
  38(flattenTemp):     13(ptr) Variable Function
@@ -305,22 +299,22 @@
                               Store 38(flattenTemp) 39
               42:     19(ptr) AccessChain 38(flattenTemp) 16
               43:    7(fvec4) Load 42
-                              Store 41(@entryPointOutput_Position) 43
+                              Store 41(@entryPointOutput.Position) 43
               48:     24(ptr) AccessChain 38(flattenTemp) 21 23
               49:    6(float) Load 48
-              51:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 16
+              51:     50(ptr) AccessChain 47(@entryPointOutput.clip1) 16
                               Store 51 49
               52:     24(ptr) AccessChain 38(flattenTemp) 21 27
               53:    6(float) Load 52
-              54:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 21
+              54:     50(ptr) AccessChain 47(@entryPointOutput.clip1) 21
                               Store 54 53
               55:     24(ptr) AccessChain 38(flattenTemp) 21 30
               56:    6(float) Load 55
-              57:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 32
+              57:     50(ptr) AccessChain 47(@entryPointOutput.clip1) 32
                               Store 57 56
               59:     24(ptr) AccessChain 38(flattenTemp) 32
               60:    6(float) Load 59
-              61:     50(ptr) AccessChain 47(@entryPointOutput_clip1) 58
+              61:     50(ptr) AccessChain 47(@entryPointOutput.clip1) 58
                               Store 61 60
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-9.frag.out b/Test/baseResults/hlsl.clipdistance-9.frag.out
new file mode 100644
index 0000000..b5c0926
--- /dev/null
+++ b/Test/baseResults/hlsl.clipdistance-9.frag.out
@@ -0,0 +1,250 @@
+hlsl.clipdistance-9.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:6  Function Definition: @main(vf4;vf3;f1; ( temp 4-component vector of float)
+0:6    Function Parameters: 
+0:6      'Position' ( in 4-component vector of float)
+0:6      'clip0' ( in 3-component vector of float)
+0:6      'clip1' ( in float)
+0:?     Sequence
+0:7      Branch: Return with expression
+0:7        add ( temp 4-component vector of float)
+0:7          add ( temp 4-component vector of float)
+0:7            'Position' ( in 4-component vector of float)
+0:7            direct index ( temp float)
+0:7              'clip0' ( in 3-component vector of float)
+0:7              Constant:
+0:7                0 (const int)
+0:7          'clip1' ( in float)
+0:6  Function Definition: main( ( temp void)
+0:6    Function Parameters: 
+0:?     Sequence
+0:6      move second child to first child ( temp 4-component vector of float)
+0:?         'Position' ( temp 4-component vector of float)
+0:?         'Position' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              0 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              0 (const int)
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              1 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              1 (const int)
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              2 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              2 (const int)
+0:?       Sequence
+0:6        move second child to first child ( temp float)
+0:?           'clip1' ( temp float)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              3 (const int)
+0:6      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:6        Function Call: @main(vf4;vf3;f1; ( temp 4-component vector of float)
+0:?           'Position' ( temp 4-component vector of float)
+0:?           'clip0' ( temp 3-component vector of float)
+0:?           'clip1' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'Position' ( in 4-component vector of float FragCoord)
+0:?     'clip0' ( in 4-element array of float ClipDistance)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:6  Function Definition: @main(vf4;vf3;f1; ( temp 4-component vector of float)
+0:6    Function Parameters: 
+0:6      'Position' ( in 4-component vector of float)
+0:6      'clip0' ( in 3-component vector of float)
+0:6      'clip1' ( in float)
+0:?     Sequence
+0:7      Branch: Return with expression
+0:7        add ( temp 4-component vector of float)
+0:7          add ( temp 4-component vector of float)
+0:7            'Position' ( in 4-component vector of float)
+0:7            direct index ( temp float)
+0:7              'clip0' ( in 3-component vector of float)
+0:7              Constant:
+0:7                0 (const int)
+0:7          'clip1' ( in float)
+0:6  Function Definition: main( ( temp void)
+0:6    Function Parameters: 
+0:?     Sequence
+0:6      move second child to first child ( temp 4-component vector of float)
+0:?         'Position' ( temp 4-component vector of float)
+0:?         'Position' ( in 4-component vector of float FragCoord)
+0:?       Sequence
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              0 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              0 (const int)
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              1 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              1 (const int)
+0:6        move second child to first child ( temp float)
+0:6          direct index ( temp float)
+0:?             'clip0' ( temp 3-component vector of float)
+0:6            Constant:
+0:6              2 (const int)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              2 (const int)
+0:?       Sequence
+0:6        move second child to first child ( temp float)
+0:?           'clip1' ( temp float)
+0:6          direct index ( in float ClipDistance)
+0:?             'clip0' ( in 4-element array of float ClipDistance)
+0:6            Constant:
+0:6              3 (const int)
+0:6      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:6        Function Call: @main(vf4;vf3;f1; ( temp 4-component vector of float)
+0:?           'Position' ( temp 4-component vector of float)
+0:?           'clip0' ( temp 3-component vector of float)
+0:?           'clip1' ( temp float)
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'Position' ( in 4-component vector of float FragCoord)
+0:?     'clip0' ( in 4-element array of float ClipDistance)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 68
+
+                              Capability Shader
+                              Capability ClipDistance
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 32 38 60
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 16  "@main(vf4;vf3;f1;"
+                              Name 13  "Position"
+                              Name 14  "clip0"
+                              Name 15  "clip1"
+                              Name 30  "Position"
+                              Name 32  "Position"
+                              Name 34  "clip0"
+                              Name 38  "clip0"
+                              Name 55  "clip1"
+                              Name 60  "@entryPointOutput"
+                              Name 61  "param"
+                              Name 63  "param"
+                              Name 65  "param"
+                              Decorate 32(Position) BuiltIn FragCoord
+                              Decorate 38(clip0) BuiltIn ClipDistance
+                              Decorate 60(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeVector 6(float) 3
+              10:             TypePointer Function 9(fvec3)
+              11:             TypePointer Function 6(float)
+              12:             TypeFunction 7(fvec4) 8(ptr) 10(ptr) 11(ptr)
+              19:             TypeInt 32 0
+              20:     19(int) Constant 0
+              31:             TypePointer Input 7(fvec4)
+    32(Position):     31(ptr) Variable Input
+              35:     19(int) Constant 4
+              36:             TypeArray 6(float) 35
+              37:             TypePointer Input 36
+       38(clip0):     37(ptr) Variable Input
+              39:             TypeInt 32 1
+              40:     39(int) Constant 0
+              41:             TypePointer Input 6(float)
+              45:     39(int) Constant 1
+              48:     19(int) Constant 1
+              50:     39(int) Constant 2
+              53:     19(int) Constant 2
+              56:     39(int) Constant 3
+              59:             TypePointer Output 7(fvec4)
+60(@entryPointOutput):     59(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+    30(Position):      8(ptr) Variable Function
+       34(clip0):     10(ptr) Variable Function
+       55(clip1):     11(ptr) Variable Function
+       61(param):      8(ptr) Variable Function
+       63(param):     10(ptr) Variable Function
+       65(param):     11(ptr) Variable Function
+              33:    7(fvec4) Load 32(Position)
+                              Store 30(Position) 33
+              42:     41(ptr) AccessChain 38(clip0) 40
+              43:    6(float) Load 42
+              44:     11(ptr) AccessChain 34(clip0) 20
+                              Store 44 43
+              46:     41(ptr) AccessChain 38(clip0) 45
+              47:    6(float) Load 46
+              49:     11(ptr) AccessChain 34(clip0) 48
+                              Store 49 47
+              51:     41(ptr) AccessChain 38(clip0) 50
+              52:    6(float) Load 51
+              54:     11(ptr) AccessChain 34(clip0) 53
+                              Store 54 52
+              57:     41(ptr) AccessChain 38(clip0) 56
+              58:    6(float) Load 57
+                              Store 55(clip1) 58
+              62:    7(fvec4) Load 30(Position)
+                              Store 61(param) 62
+              64:    9(fvec3) Load 34(clip0)
+                              Store 63(param) 64
+              66:    6(float) Load 55(clip1)
+                              Store 65(param) 66
+              67:    7(fvec4) FunctionCall 16(@main(vf4;vf3;f1;) 61(param) 63(param) 65(param)
+                              Store 60(@entryPointOutput) 67
+                              Return
+                              FunctionEnd
+16(@main(vf4;vf3;f1;):    7(fvec4) Function None 12
+    13(Position):      8(ptr) FunctionParameter
+       14(clip0):     10(ptr) FunctionParameter
+       15(clip1):     11(ptr) FunctionParameter
+              17:             Label
+              18:    7(fvec4) Load 13(Position)
+              21:     11(ptr) AccessChain 14(clip0) 20
+              22:    6(float) Load 21
+              23:    7(fvec4) CompositeConstruct 22 22 22 22
+              24:    7(fvec4) FAdd 18 23
+              25:    6(float) Load 15(clip1)
+              26:    7(fvec4) CompositeConstruct 25 25 25 25
+              27:    7(fvec4) FAdd 24 26
+                              ReturnValue 27
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.clipdistance-9.vert.out b/Test/baseResults/hlsl.clipdistance-9.vert.out
index a3502b7..f984be0 100644
--- a/Test/baseResults/hlsl.clipdistance-9.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-9.vert.out
@@ -48,7 +48,7 @@
 0:?     Sequence
 0:7      Sequence
 0:7        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:7          Position: direct index for structure ( temp 4-component vector of float)
 0:7            Function Call: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
 0:?               'clip0' ( temp 3-component vector of float)
@@ -57,7 +57,7 @@
 0:7              0 (const int)
 0:?       Sequence
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              0 (const int)
@@ -66,7 +66,7 @@
 0:7            Constant:
 0:7              0 (const int)
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              1 (const int)
@@ -75,7 +75,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              2 (const int)
@@ -85,13 +85,13 @@
 0:7              2 (const int)
 0:?       Sequence
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              3 (const int)
 0:?           'clip1' ( temp float)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:?     'clip0' ( out 4-element array of float ClipDistance)
 
 
@@ -147,7 +147,7 @@
 0:?     Sequence
 0:7      Sequence
 0:7        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:7          Position: direct index for structure ( temp 4-component vector of float)
 0:7            Function Call: @main(vf3;f1; ( temp structure{ temp 4-component vector of float Position})
 0:?               'clip0' ( temp 3-component vector of float)
@@ -156,7 +156,7 @@
 0:7              0 (const int)
 0:?       Sequence
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              0 (const int)
@@ -165,7 +165,7 @@
 0:7            Constant:
 0:7              0 (const int)
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              1 (const int)
@@ -174,7 +174,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              2 (const int)
@@ -184,24 +184,24 @@
 0:7              2 (const int)
 0:?       Sequence
 0:7        move second child to first child ( temp float)
-0:7          direct index ( temp float)
+0:7          direct index ( out float ClipDistance)
 0:?             'clip0' ( out 4-element array of float ClipDistance)
 0:7            Constant:
 0:7              3 (const int)
 0:?           'clip1' ( temp float)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Position' ( out 4-component vector of float Position)
 0:?     'clip0' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 70
+// Id's are bound by 67
 
                               Capability Shader
                               Capability ClipDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 39 51 69
+                              EntryPoint Vertex 4  "main" 39 51
                               Source HLSL 500
                               Name 4  "main"
                               Name 11  "VS_OUTPUT"
@@ -210,17 +210,14 @@
                               Name 13  "clip0"
                               Name 14  "clip1"
                               Name 18  "Output"
-                              Name 39  "@entryPointOutput_Position"
+                              Name 39  "@entryPointOutput.Position"
                               Name 40  "clip0"
                               Name 41  "clip1"
                               Name 42  "param"
                               Name 43  "param"
                               Name 51  "clip0"
-                              Name 67  "VS_OUTPUT"
-                              Name 69  "@entryPointOutput"
-                              Decorate 39(@entryPointOutput_Position) BuiltIn Position
+                              Decorate 39(@entryPointOutput.Position) BuiltIn Position
                               Decorate 51(clip0) BuiltIn ClipDistance
-                              Decorate 69(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -244,7 +241,7 @@
               32:     25(int) Constant 2
               34:    6(float) Constant 1077936128
               38:             TypePointer Output 10(fvec4)
-39(@entryPointOutput_Position):     38(ptr) Variable Output
+39(@entryPointOutput.Position):     38(ptr) Variable Output
               48:     25(int) Constant 4
               49:             TypeArray 6(float) 48
               50:             TypePointer Output 49
@@ -253,9 +250,6 @@
               56:     19(int) Constant 1
               60:     19(int) Constant 2
               64:     19(int) Constant 3
-   67(VS_OUTPUT):             TypeStruct
-              68:             TypePointer Output 67(VS_OUTPUT)
-69(@entryPointOutput):     68(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
        40(clip0):      8(ptr) Variable Function
@@ -268,7 +262,7 @@
               46:    6(float) Load 43(param)
                               Store 41(clip1) 46
               47:   10(fvec4) CompositeExtract 44 0
-                              Store 39(@entryPointOutput_Position) 47
+                              Store 39(@entryPointOutput.Position) 47
               52:      9(ptr) AccessChain 40(clip0) 26
               53:    6(float) Load 52
               55:     54(ptr) AccessChain 51(clip0) 20
diff --git a/Test/baseResults/hlsl.comparison.vec.frag.out b/Test/baseResults/hlsl.comparison.vec.frag.out
index dd363c6..2e57170 100644
--- a/Test/baseResults/hlsl.comparison.vec.frag.out
+++ b/Test/baseResults/hlsl.comparison.vec.frag.out
@@ -119,14 +119,14 @@
 0:?     Sequence
 0:30      Sequence
 0:30        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:30          Color: direct index for structure ( temp 4-component vector of float)
 0:30            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:30            Constant:
 0:30              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float uf4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -252,14 +252,14 @@
 0:?     Sequence
 0:30      Sequence
 0:30        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:30          Color: direct index for structure ( temp 4-component vector of float)
 0:30            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:30            Constant:
 0:30              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float uf4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -292,11 +292,11 @@
                               Name 71  "r22"
                               Name 76  "r23"
                               Name 82  "psout"
-                              Name 90  "Color"
+                              Name 90  "@entryPointOutput.Color"
                               Name 93  "$Global"
                               MemberName 93($Global) 0  "uf4"
                               Name 95  ""
-                              Decorate 90(Color) Location 0
+                              Decorate 90(@entryPointOutput.Color) Location 0
                               MemberDecorate 93($Global) 0 Offset 0
                               Decorate 93($Global) Block
                               Decorate 95 DescriptorSet 0
@@ -318,7 +318,7 @@
               83:             TypeInt 32 1
               84:     83(int) Constant 0
               89:             TypePointer Output 7(fvec4)
-       90(Color):     89(ptr) Variable Output
+90(@entryPointOutput.Color):     89(ptr) Variable Output
      93($Global):             TypeStruct 7(fvec4)
               94:             TypePointer Uniform 93($Global)
               95:     94(ptr) Variable Uniform
@@ -326,7 +326,7 @@
                5:             Label
               91:13(PS_OUTPUT) FunctionCall 15(@main()
               92:    7(fvec4) CompositeExtract 91 0
-                              Store 90(Color) 92
+                              Store 90(@entryPointOutput.Color) 92
                               Return
                               FunctionEnd
    11(Bug1(vf4;):           2 Function None 9
diff --git a/Test/baseResults/hlsl.constructexpr.frag.out b/Test/baseResults/hlsl.constructexpr.frag.out
index 90c667a..ecaf95a 100644
--- a/Test/baseResults/hlsl.constructexpr.frag.out
+++ b/Test/baseResults/hlsl.constructexpr.frag.out
@@ -41,13 +41,13 @@
 0:?     Sequence
 0:4      Sequence
 0:4        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:4          color: direct index for structure ( temp 4-component vector of float)
 0:4            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:4            Constant:
 0:4              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -95,13 +95,13 @@
 0:?     Sequence
 0:4      Sequence
 0:4        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:4          color: direct index for structure ( temp 4-component vector of float)
 0:4            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:4            Constant:
 0:4              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -118,8 +118,8 @@
                               MemberName 8(PS_OUTPUT) 0  "color"
                               Name 10  "@main("
                               Name 27  "ps_output"
-                              Name 37  "color"
-                              Decorate 37(color) Location 0
+                              Name 37  "@entryPointOutput.color"
+                              Decorate 37(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -146,12 +146,12 @@
               30:    7(fvec4) ConstantComposite 29 29 29 29
               31:             TypePointer Function 7(fvec4)
               36:             TypePointer Output 7(fvec4)
-       37(color):     36(ptr) Variable Output
+37(@entryPointOutput.color):     36(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               38:8(PS_OUTPUT) FunctionCall 10(@main()
               39:    7(fvec4) CompositeExtract 38 0
-                              Store 37(color) 39
+                              Store 37(@entryPointOutput.color) 39
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.domain.1.tese.out b/Test/baseResults/hlsl.domain.1.tese.out
index e1a414d..e8a1955 100644
--- a/Test/baseResults/hlsl.domain.1.tese.out
+++ b/Test/baseResults/hlsl.domain.1.tese.out
@@ -4,9 +4,10 @@
 vertex spacing = none
 triangle order = none
 0:? Sequence
-0:22  Function Definition: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22  Function Definition: @main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:22    Function Parameters: 
 0:22      'i' ( const (read only) 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22      'f' ( in float)
 0:22      'tesscoord' ( in 3-component vector of float)
 0:22      'pcf_data' ( in structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
 0:?     Sequence
@@ -23,10 +24,12 @@
 0:25                0 (const int)
 0:25            Constant:
 0:25              0 (const int)
-0:25          direct index ( temp float)
-0:25            'tesscoord' ( in 3-component vector of float)
-0:25            Constant:
-0:25              0 (const int)
+0:25          component-wise multiply ( temp float)
+0:25            direct index ( temp float)
+0:25              'tesscoord' ( in 3-component vector of float)
+0:25              Constant:
+0:25                0 (const int)
+0:25            'f' ( in float)
 0:26      move second child to first child ( temp 3-component vector of float)
 0:26        norm: direct index for structure ( temp 3-component vector of float)
 0:26          'o' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
@@ -56,6 +59,9 @@
 0:22      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22      move second child to first child ( temp float)
+0:?         'f' ( temp float)
+0:?         'f' (layout( location=2) patch in float)
 0:22      move second child to first child ( temp 3-component vector of float)
 0:?         'tesscoord' ( temp 3-component vector of float)
 0:?         'tesscoord' ( patch in 3-component vector of float TessCoord)
@@ -69,7 +75,7 @@
 0:22            Constant:
 0:22              0 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              0 (const int)
 0:22        move second child to first child ( temp float)
@@ -81,7 +87,7 @@
 0:22            Constant:
 0:22              1 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp float)
@@ -93,7 +99,7 @@
 0:22            Constant:
 0:22              2 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              2 (const int)
 0:22        move second child to first child ( temp float)
@@ -102,22 +108,37 @@
 0:22            Constant:
 0:22              1 (const int)
 0:22          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:22            Constant:
 0:22              0 (const int)
-0:22      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:22        Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 3-component vector of float)
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:22      Sequence
+0:22        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22          Function Call: @main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'f' ( temp float)
+0:?             'tesscoord' ( temp 3-component vector of float)
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:22        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:22          pos: direct index for structure ( temp 4-component vector of float)
+0:22            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22            Constant:
+0:22              0 (const int)
+0:22        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:22          norm: direct index for structure ( temp 3-component vector of float)
+0:22            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22            Constant:
+0:22              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     'f' (layout( location=2) patch in float)
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 
 Linked tessellation evaluation stage:
@@ -128,9 +149,10 @@
 vertex spacing = none
 triangle order = none
 0:? Sequence
-0:22  Function Definition: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22  Function Definition: @main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:22    Function Parameters: 
 0:22      'i' ( const (read only) 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22      'f' ( in float)
 0:22      'tesscoord' ( in 3-component vector of float)
 0:22      'pcf_data' ( in structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
 0:?     Sequence
@@ -147,10 +169,12 @@
 0:25                0 (const int)
 0:25            Constant:
 0:25              0 (const int)
-0:25          direct index ( temp float)
-0:25            'tesscoord' ( in 3-component vector of float)
-0:25            Constant:
-0:25              0 (const int)
+0:25          component-wise multiply ( temp float)
+0:25            direct index ( temp float)
+0:25              'tesscoord' ( in 3-component vector of float)
+0:25              Constant:
+0:25                0 (const int)
+0:25            'f' ( in float)
 0:26      move second child to first child ( temp 3-component vector of float)
 0:26        norm: direct index for structure ( temp 3-component vector of float)
 0:26          'o' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
@@ -180,6 +204,9 @@
 0:22      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22      move second child to first child ( temp float)
+0:?         'f' ( temp float)
+0:?         'f' (layout( location=2) patch in float)
 0:22      move second child to first child ( temp 3-component vector of float)
 0:?         'tesscoord' ( temp 3-component vector of float)
 0:?         'tesscoord' ( patch in 3-component vector of float TessCoord)
@@ -193,7 +220,7 @@
 0:22            Constant:
 0:22              0 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              0 (const int)
 0:22        move second child to first child ( temp float)
@@ -205,7 +232,7 @@
 0:22            Constant:
 0:22              1 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp float)
@@ -217,7 +244,7 @@
 0:22            Constant:
 0:22              2 (const int)
 0:22          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:22            Constant:
 0:22              2 (const int)
 0:22        move second child to first child ( temp float)
@@ -226,70 +253,90 @@
 0:22            Constant:
 0:22              1 (const int)
 0:22          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:22            Constant:
 0:22              0 (const int)
-0:22      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:22        Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 3-component vector of float)
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:22      Sequence
+0:22        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22          Function Call: @main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'f' ( temp float)
+0:?             'tesscoord' ( temp 3-component vector of float)
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:22        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:22          pos: direct index for structure ( temp 4-component vector of float)
+0:22            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22            Constant:
+0:22              0 (const int)
+0:22        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:22          norm: direct index for structure ( temp 3-component vector of float)
+0:22            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:22            Constant:
+0:22              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     'f' (layout( location=2) patch in float)
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 91
+// Id's are bound by 103
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationEvaluation 4  "main" 51 55 61 76 81 90
+                              EntryPoint TessellationEvaluation 4  "main" 54 58 62 68 82 96 100
                               ExecutionMode 4 Triangles
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "ds_in_t"
                               MemberName 9(ds_in_t) 0  "pos"
                               MemberName 9(ds_in_t) 1  "norm"
-                              Name 15  "pcf_in_t"
-                              MemberName 15(pcf_in_t) 0  "flTessFactor"
-                              MemberName 15(pcf_in_t) 1  "flInsideTessFactor"
-                              Name 17  "gs_in_t"
-                              MemberName 17(gs_in_t) 0  "pos"
-                              MemberName 17(gs_in_t) 1  "norm"
-                              Name 22  "@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;"
-                              Name 19  "i"
-                              Name 20  "tesscoord"
-                              Name 21  "pcf_data"
-                              Name 25  "o"
-                              Name 49  "i"
-                              Name 51  "i"
-                              Name 53  "tesscoord"
-                              Name 55  "tesscoord"
-                              Name 57  "pcf_data"
-                              Name 61  "pcf_data_flTessFactor"
-                              Name 76  "pcf_data_flInsideTessFactor"
-                              Name 81  "@entryPointOutput"
-                              Name 83  "param"
-                              Name 85  "param"
-                              Name 88  "pcf_in_t"
-                              Name 90  "pcf_data"
-                              Decorate 51(i) Location 0
-                              Decorate 55(tesscoord) Patch
-                              Decorate 55(tesscoord) BuiltIn TessCoord
-                              Decorate 61(pcf_data_flTessFactor) Patch
-                              Decorate 61(pcf_data_flTessFactor) BuiltIn TessLevelOuter
-                              Decorate 76(pcf_data_flInsideTessFactor) Patch
-                              Decorate 76(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
-                              Decorate 81(@entryPointOutput) Location 0
-                              Decorate 90(pcf_data) Patch
-                              Decorate 90(pcf_data) Location 2
+                              Name 16  "pcf_in_t"
+                              MemberName 16(pcf_in_t) 0  "flTessFactor"
+                              MemberName 16(pcf_in_t) 1  "flInsideTessFactor"
+                              Name 18  "gs_in_t"
+                              MemberName 18(gs_in_t) 0  "pos"
+                              MemberName 18(gs_in_t) 1  "norm"
+                              Name 24  "@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;"
+                              Name 20  "i"
+                              Name 21  "f"
+                              Name 22  "tesscoord"
+                              Name 23  "pcf_data"
+                              Name 27  "o"
+                              Name 52  "i"
+                              Name 54  "i"
+                              Name 56  "f"
+                              Name 58  "f"
+                              Name 60  "tesscoord"
+                              Name 62  "tesscoord"
+                              Name 64  "pcf_data"
+                              Name 68  "pcf_data.flTessFactor"
+                              Name 82  "pcf_data.flInsideTessFactor"
+                              Name 86  "flattenTemp"
+                              Name 88  "param"
+                              Name 90  "param"
+                              Name 92  "param"
+                              Name 96  "@entryPointOutput.pos"
+                              Name 100  "@entryPointOutput.norm"
+                              Decorate 54(i) Location 0
+                              Decorate 58(f) Patch
+                              Decorate 58(f) Location 2
+                              Decorate 62(tesscoord) Patch
+                              Decorate 62(tesscoord) BuiltIn TessCoord
+                              Decorate 68(pcf_data.flTessFactor) Patch
+                              Decorate 68(pcf_data.flTessFactor) BuiltIn TessLevelOuter
+                              Decorate 82(pcf_data.flInsideTessFactor) Patch
+                              Decorate 82(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
+                              Decorate 96(@entryPointOutput.pos) Location 0
+                              Decorate 100(@entryPointOutput.norm) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -299,96 +346,112 @@
               10:             TypeInt 32 0
               11:     10(int) Constant 3
               12:             TypeArray 9(ds_in_t) 11
-              13:             TypePointer Function 8(fvec3)
-              14:             TypeArray 6(float) 11
-    15(pcf_in_t):             TypeStruct 14 6(float)
-              16:             TypePointer Function 15(pcf_in_t)
-     17(gs_in_t):             TypeStruct 7(fvec4) 8(fvec3)
-              18:             TypeFunction 17(gs_in_t) 12 13(ptr) 16(ptr)
-              24:             TypePointer Function 17(gs_in_t)
-              26:             TypeInt 32 1
-              27:     26(int) Constant 0
-              29:     10(int) Constant 0
-              30:             TypePointer Function 6(float)
-              35:             TypePointer Function 7(fvec4)
-              37:     26(int) Constant 1
-              39:     10(int) Constant 1
-              48:             TypePointer Function 12
-              50:             TypePointer Input 12
-           51(i):     50(ptr) Variable Input
-              54:             TypePointer Input 8(fvec3)
-   55(tesscoord):     54(ptr) Variable Input
-              58:     10(int) Constant 4
-              59:             TypeArray 6(float) 58
-              60:             TypePointer Input 59
-61(pcf_data_flTessFactor):     60(ptr) Variable Input
-              62:             TypePointer Input 6(float)
-              69:     26(int) Constant 2
-              73:     10(int) Constant 2
-              74:             TypeArray 6(float) 73
-              75:             TypePointer Input 74
-76(pcf_data_flInsideTessFactor):     75(ptr) Variable Input
-              80:             TypePointer Output 17(gs_in_t)
-81(@entryPointOutput):     80(ptr) Variable Output
-    88(pcf_in_t):             TypeStruct
-              89:             TypePointer Input 88(pcf_in_t)
-    90(pcf_data):     89(ptr) Variable Input
+              13:             TypePointer Function 6(float)
+              14:             TypePointer Function 8(fvec3)
+              15:             TypeArray 6(float) 11
+    16(pcf_in_t):             TypeStruct 15 6(float)
+              17:             TypePointer Function 16(pcf_in_t)
+     18(gs_in_t):             TypeStruct 7(fvec4) 8(fvec3)
+              19:             TypeFunction 18(gs_in_t) 12 13(ptr) 14(ptr) 17(ptr)
+              26:             TypePointer Function 18(gs_in_t)
+              28:             TypeInt 32 1
+              29:     28(int) Constant 0
+              31:     10(int) Constant 0
+              38:             TypePointer Function 7(fvec4)
+              40:     28(int) Constant 1
+              42:     10(int) Constant 1
+              51:             TypePointer Function 12
+              53:             TypePointer Input 12
+           54(i):     53(ptr) Variable Input
+              57:             TypePointer Input 6(float)
+           58(f):     57(ptr) Variable Input
+              61:             TypePointer Input 8(fvec3)
+   62(tesscoord):     61(ptr) Variable Input
+              65:     10(int) Constant 4
+              66:             TypeArray 6(float) 65
+              67:             TypePointer Input 66
+68(pcf_data.flTessFactor):     67(ptr) Variable Input
+              75:     28(int) Constant 2
+              79:     10(int) Constant 2
+              80:             TypeArray 6(float) 79
+              81:             TypePointer Input 80
+82(pcf_data.flInsideTessFactor):     81(ptr) Variable Input
+              95:             TypePointer Output 7(fvec4)
+96(@entryPointOutput.pos):     95(ptr) Variable Output
+              99:             TypePointer Output 8(fvec3)
+100(@entryPointOutput.norm):     99(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-           49(i):     48(ptr) Variable Function
-   53(tesscoord):     13(ptr) Variable Function
-    57(pcf_data):     16(ptr) Variable Function
-       83(param):     13(ptr) Variable Function
-       85(param):     16(ptr) Variable Function
-              52:          12 Load 51(i)
-                              Store 49(i) 52
-              56:    8(fvec3) Load 55(tesscoord)
-                              Store 53(tesscoord) 56
-              63:     62(ptr) AccessChain 61(pcf_data_flTessFactor) 27
-              64:    6(float) Load 63
-              65:     30(ptr) AccessChain 57(pcf_data) 27 27
-                              Store 65 64
-              66:     62(ptr) AccessChain 61(pcf_data_flTessFactor) 37
-              67:    6(float) Load 66
-              68:     30(ptr) AccessChain 57(pcf_data) 27 37
-                              Store 68 67
-              70:     62(ptr) AccessChain 61(pcf_data_flTessFactor) 69
-              71:    6(float) Load 70
-              72:     30(ptr) AccessChain 57(pcf_data) 27 69
-                              Store 72 71
-              77:     62(ptr) AccessChain 76(pcf_data_flInsideTessFactor) 27
-              78:    6(float) Load 77
-              79:     30(ptr) AccessChain 57(pcf_data) 37
-                              Store 79 78
-              82:          12 Load 49(i)
-              84:    8(fvec3) Load 53(tesscoord)
-                              Store 83(param) 84
-              86:15(pcf_in_t) Load 57(pcf_data)
-                              Store 85(param) 86
-              87: 17(gs_in_t) FunctionCall 22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;) 82 83(param) 85(param)
-                              Store 81(@entryPointOutput) 87
+           52(i):     51(ptr) Variable Function
+           56(f):     13(ptr) Variable Function
+   60(tesscoord):     14(ptr) Variable Function
+    64(pcf_data):     17(ptr) Variable Function
+ 86(flattenTemp):     26(ptr) Variable Function
+       88(param):     13(ptr) Variable Function
+       90(param):     14(ptr) Variable Function
+       92(param):     17(ptr) Variable Function
+              55:          12 Load 54(i)
+                              Store 52(i) 55
+              59:    6(float) Load 58(f)
+                              Store 56(f) 59
+              63:    8(fvec3) Load 62(tesscoord)
+                              Store 60(tesscoord) 63
+              69:     57(ptr) AccessChain 68(pcf_data.flTessFactor) 29
+              70:    6(float) Load 69
+              71:     13(ptr) AccessChain 64(pcf_data) 29 29
+                              Store 71 70
+              72:     57(ptr) AccessChain 68(pcf_data.flTessFactor) 40
+              73:    6(float) Load 72
+              74:     13(ptr) AccessChain 64(pcf_data) 29 40
+                              Store 74 73
+              76:     57(ptr) AccessChain 68(pcf_data.flTessFactor) 75
+              77:    6(float) Load 76
+              78:     13(ptr) AccessChain 64(pcf_data) 29 75
+                              Store 78 77
+              83:     57(ptr) AccessChain 82(pcf_data.flInsideTessFactor) 29
+              84:    6(float) Load 83
+              85:     13(ptr) AccessChain 64(pcf_data) 40
+                              Store 85 84
+              87:          12 Load 52(i)
+              89:    6(float) Load 56(f)
+                              Store 88(param) 89
+              91:    8(fvec3) Load 60(tesscoord)
+                              Store 90(param) 91
+              93:16(pcf_in_t) Load 64(pcf_data)
+                              Store 92(param) 93
+              94: 18(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;) 87 88(param) 90(param) 92(param)
+                              Store 86(flattenTemp) 94
+              97:     38(ptr) AccessChain 86(flattenTemp) 29
+              98:    7(fvec4) Load 97
+                              Store 96(@entryPointOutput.pos) 98
+             101:     14(ptr) AccessChain 86(flattenTemp) 40
+             102:    8(fvec3) Load 101
+                              Store 100(@entryPointOutput.norm) 102
                               Return
                               FunctionEnd
-22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;): 17(gs_in_t) Function None 18
-           19(i):          12 FunctionParameter
-   20(tesscoord):     13(ptr) FunctionParameter
-    21(pcf_data):     16(ptr) FunctionParameter
-              23:             Label
-           25(o):     24(ptr) Variable Function
-              28:    7(fvec4) CompositeExtract 19(i) 0 0
-              31:     30(ptr) AccessChain 20(tesscoord) 29
-              32:    6(float) Load 31
-              33:    7(fvec4) CompositeConstruct 32 32 32 32
-              34:    7(fvec4) FAdd 28 33
-              36:     35(ptr) AccessChain 25(o) 27
-                              Store 36 34
-              38:    8(fvec3) CompositeExtract 19(i) 0 1
-              40:     30(ptr) AccessChain 20(tesscoord) 39
-              41:    6(float) Load 40
-              42:    8(fvec3) CompositeConstruct 41 41 41
-              43:    8(fvec3) FAdd 38 42
-              44:     13(ptr) AccessChain 25(o) 37
-                              Store 44 43
-              45: 17(gs_in_t) Load 25(o)
-                              ReturnValue 45
+24(@main(struct-ds_in_t-vf4-vf31[3];f1;vf3;struct-pcf_in_t-f1[3]-f11;): 18(gs_in_t) Function None 19
+           20(i):          12 FunctionParameter
+           21(f):     13(ptr) FunctionParameter
+   22(tesscoord):     14(ptr) FunctionParameter
+    23(pcf_data):     17(ptr) FunctionParameter
+              25:             Label
+           27(o):     26(ptr) Variable Function
+              30:    7(fvec4) CompositeExtract 20(i) 0 0
+              32:     13(ptr) AccessChain 22(tesscoord) 31
+              33:    6(float) Load 32
+              34:    6(float) Load 21(f)
+              35:    6(float) FMul 33 34
+              36:    7(fvec4) CompositeConstruct 35 35 35 35
+              37:    7(fvec4) FAdd 30 36
+              39:     38(ptr) AccessChain 27(o) 29
+                              Store 39 37
+              41:    8(fvec3) CompositeExtract 20(i) 0 1
+              43:     13(ptr) AccessChain 22(tesscoord) 42
+              44:    6(float) Load 43
+              45:    8(fvec3) CompositeConstruct 44 44 44
+              46:    8(fvec3) FAdd 41 45
+              47:     14(ptr) AccessChain 27(o) 40
+                              Store 47 46
+              48: 18(gs_in_t) Load 27(o)
+                              ReturnValue 48
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.domain.2.tese.out b/Test/baseResults/hlsl.domain.2.tese.out
index 2336dfa..0f42131 100644
--- a/Test/baseResults/hlsl.domain.2.tese.out
+++ b/Test/baseResults/hlsl.domain.2.tese.out
@@ -63,7 +63,7 @@
 0:25            Constant:
 0:25              0 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              0 (const int)
 0:25        move second child to first child ( temp float)
@@ -75,7 +75,7 @@
 0:25            Constant:
 0:25              1 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              1 (const int)
 0:25        move second child to first child ( temp float)
@@ -87,7 +87,7 @@
 0:25            Constant:
 0:25              2 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              2 (const int)
 0:25        move second child to first child ( temp float)
@@ -96,7 +96,7 @@
 0:25            Constant:
 0:25              1 (const int)
 0:25          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:25            Constant:
 0:25              0 (const int)
 0:25        move second child to first child ( temp float)
@@ -104,29 +104,40 @@
 0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
 0:25            Constant:
 0:25              2 (const int)
-0:25          foo: direct index for structure ( temp float)
-0:25            'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:25            Constant:
-0:25              0 (const int)
+0:?           'pcf_data.foo' (layout( location=2) patch in float)
 0:25      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:25      move second child to first child ( temp 3-component vector of float)
 0:?         'tesscoord' ( temp 3-component vector of float)
 0:?         'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:25      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:25        Function Call: @main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
-0:?           'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 3-component vector of float)
+0:25      Sequence
+0:25        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25          Function Call: @main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
+0:?             'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'tesscoord' ( temp 3-component vector of float)
+0:25        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:25          pos: direct index for structure ( temp 4-component vector of float)
+0:25            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25            Constant:
+0:25              0 (const int)
+0:25        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:25          norm: direct index for structure ( temp 3-component vector of float)
+0:25            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25            Constant:
+0:25              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.foo' (layout( location=2) patch in float)
 
 
 Linked tessellation evaluation stage:
@@ -196,7 +207,7 @@
 0:25            Constant:
 0:25              0 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              0 (const int)
 0:25        move second child to first child ( temp float)
@@ -208,7 +219,7 @@
 0:25            Constant:
 0:25              1 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              1 (const int)
 0:25        move second child to first child ( temp float)
@@ -220,7 +231,7 @@
 0:25            Constant:
 0:25              2 (const int)
 0:25          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:25            Constant:
 0:25              2 (const int)
 0:25        move second child to first child ( temp float)
@@ -229,7 +240,7 @@
 0:25            Constant:
 0:25              1 (const int)
 0:25          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:25            Constant:
 0:25              0 (const int)
 0:25        move second child to first child ( temp float)
@@ -237,38 +248,49 @@
 0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
 0:25            Constant:
 0:25              2 (const int)
-0:25          foo: direct index for structure ( temp float)
-0:25            'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:25            Constant:
-0:25              0 (const int)
+0:?           'pcf_data.foo' (layout( location=2) patch in float)
 0:25      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:25      move second child to first child ( temp 3-component vector of float)
 0:?         'tesscoord' ( temp 3-component vector of float)
 0:?         'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:25      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:25        Function Call: @main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
-0:?           'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 3-component vector of float)
+0:25      Sequence
+0:25        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25          Function Call: @main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
+0:?             'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'tesscoord' ( temp 3-component vector of float)
+0:25        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:25          pos: direct index for structure ( temp 4-component vector of float)
+0:25            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25            Constant:
+0:25              0 (const int)
+0:25        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:25          norm: direct index for structure ( temp 3-component vector of float)
+0:25            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:25            Constant:
+0:25              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.foo' (layout( location=2) patch in float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 94
+// Id's are bound by 98
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationEvaluation 4  "main" 52 67 73 80 84 87
+                              EntryPoint TessellationEvaluation 4  "main" 52 67 71 77 81 91 95
                               ExecutionMode 4 Triangles
                               Source HLSL 500
                               Name 4  "main"
@@ -288,29 +310,29 @@
                               Name 21  "tesscoord"
                               Name 25  "o"
                               Name 48  "pcf_data"
-                              Name 52  "pcf_data_flTessFactor"
-                              Name 67  "pcf_data_flInsideTessFactor"
-                              Name 71  "pcf_in_t"
-                              MemberName 71(pcf_in_t) 0  "foo"
-                              Name 73  "pcf_data"
-                              Name 78  "i"
-                              Name 80  "i"
-                              Name 82  "tesscoord"
-                              Name 84  "tesscoord"
-                              Name 87  "@entryPointOutput"
-                              Name 89  "param"
-                              Name 91  "param"
-                              Decorate 52(pcf_data_flTessFactor) Patch
-                              Decorate 52(pcf_data_flTessFactor) BuiltIn TessLevelOuter
-                              Decorate 67(pcf_data_flInsideTessFactor) Patch
-                              Decorate 67(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
-                              MemberDecorate 71(pcf_in_t) 0 Patch
-                              Decorate 73(pcf_data) Patch
-                              Decorate 73(pcf_data) Location 2
-                              Decorate 80(i) Location 0
-                              Decorate 84(tesscoord) Patch
-                              Decorate 84(tesscoord) BuiltIn TessCoord
-                              Decorate 87(@entryPointOutput) Location 0
+                              Name 52  "pcf_data.flTessFactor"
+                              Name 67  "pcf_data.flInsideTessFactor"
+                              Name 71  "pcf_data.foo"
+                              Name 75  "i"
+                              Name 77  "i"
+                              Name 79  "tesscoord"
+                              Name 81  "tesscoord"
+                              Name 83  "flattenTemp"
+                              Name 85  "param"
+                              Name 87  "param"
+                              Name 91  "@entryPointOutput.pos"
+                              Name 95  "@entryPointOutput.norm"
+                              Decorate 52(pcf_data.flTessFactor) Patch
+                              Decorate 52(pcf_data.flTessFactor) BuiltIn TessLevelOuter
+                              Decorate 67(pcf_data.flInsideTessFactor) Patch
+                              Decorate 67(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
+                              Decorate 71(pcf_data.foo) Patch
+                              Decorate 71(pcf_data.foo) Location 2
+                              Decorate 77(i) Location 0
+                              Decorate 81(tesscoord) Patch
+                              Decorate 81(tesscoord) BuiltIn TessCoord
+                              Decorate 91(@entryPointOutput.pos) Location 0
+                              Decorate 95(@entryPointOutput.norm) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -337,61 +359,67 @@
               49:      7(int) Constant 4
               50:             TypeArray 6(float) 49
               51:             TypePointer Input 50
-52(pcf_data_flTessFactor):     51(ptr) Variable Input
+52(pcf_data.flTessFactor):     51(ptr) Variable Input
               53:             TypePointer Input 6(float)
               60:     26(int) Constant 2
               64:      7(int) Constant 2
               65:             TypeArray 6(float) 64
               66:             TypePointer Input 65
-67(pcf_data_flInsideTessFactor):     66(ptr) Variable Input
-    71(pcf_in_t):             TypeStruct 6(float)
-              72:             TypePointer Input 71(pcf_in_t)
-    73(pcf_data):     72(ptr) Variable Input
-              77:             TypePointer Function 15
-              79:             TypePointer Input 15
-           80(i):     79(ptr) Variable Input
-              83:             TypePointer Input 13(fvec3)
-   84(tesscoord):     83(ptr) Variable Input
-              86:             TypePointer Output 17(gs_in_t)
-87(@entryPointOutput):     86(ptr) Variable Output
+67(pcf_data.flInsideTessFactor):     66(ptr) Variable Input
+71(pcf_data.foo):     53(ptr) Variable Input
+              74:             TypePointer Function 15
+              76:             TypePointer Input 15
+           77(i):     76(ptr) Variable Input
+              80:             TypePointer Input 13(fvec3)
+   81(tesscoord):     80(ptr) Variable Input
+              90:             TypePointer Output 12(fvec4)
+91(@entryPointOutput.pos):     90(ptr) Variable Output
+              94:             TypePointer Output 13(fvec3)
+95(@entryPointOutput.norm):     94(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
     48(pcf_data):     11(ptr) Variable Function
-           78(i):     77(ptr) Variable Function
-   82(tesscoord):     16(ptr) Variable Function
-       89(param):     11(ptr) Variable Function
-       91(param):     16(ptr) Variable Function
-              54:     53(ptr) AccessChain 52(pcf_data_flTessFactor) 27
+           75(i):     74(ptr) Variable Function
+   79(tesscoord):     16(ptr) Variable Function
+ 83(flattenTemp):     24(ptr) Variable Function
+       85(param):     11(ptr) Variable Function
+       87(param):     16(ptr) Variable Function
+              54:     53(ptr) AccessChain 52(pcf_data.flTessFactor) 27
               55:    6(float) Load 54
               56:     30(ptr) AccessChain 48(pcf_data) 27 27
                               Store 56 55
-              57:     53(ptr) AccessChain 52(pcf_data_flTessFactor) 37
+              57:     53(ptr) AccessChain 52(pcf_data.flTessFactor) 37
               58:    6(float) Load 57
               59:     30(ptr) AccessChain 48(pcf_data) 27 37
                               Store 59 58
-              61:     53(ptr) AccessChain 52(pcf_data_flTessFactor) 60
+              61:     53(ptr) AccessChain 52(pcf_data.flTessFactor) 60
               62:    6(float) Load 61
               63:     30(ptr) AccessChain 48(pcf_data) 27 60
                               Store 63 62
-              68:     53(ptr) AccessChain 67(pcf_data_flInsideTessFactor) 27
+              68:     53(ptr) AccessChain 67(pcf_data.flInsideTessFactor) 27
               69:    6(float) Load 68
               70:     30(ptr) AccessChain 48(pcf_data) 37
                               Store 70 69
-              74:     53(ptr) AccessChain 73(pcf_data) 27
-              75:    6(float) Load 74
-              76:     30(ptr) AccessChain 48(pcf_data) 60
-                              Store 76 75
-              81:          15 Load 80(i)
-                              Store 78(i) 81
-              85:   13(fvec3) Load 84(tesscoord)
-                              Store 82(tesscoord) 85
-              88:          15 Load 78(i)
-              90:10(pcf_in_t) Load 48(pcf_data)
-                              Store 89(param) 90
-              92:   13(fvec3) Load 82(tesscoord)
-                              Store 91(param) 92
-              93: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 89(param) 88 91(param)
-                              Store 87(@entryPointOutput) 93
+              72:    6(float) Load 71(pcf_data.foo)
+              73:     30(ptr) AccessChain 48(pcf_data) 60
+                              Store 73 72
+              78:          15 Load 77(i)
+                              Store 75(i) 78
+              82:   13(fvec3) Load 81(tesscoord)
+                              Store 79(tesscoord) 82
+              84:          15 Load 75(i)
+              86:10(pcf_in_t) Load 48(pcf_data)
+                              Store 85(param) 86
+              88:   13(fvec3) Load 79(tesscoord)
+                              Store 87(param) 88
+              89: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 85(param) 84 87(param)
+                              Store 83(flattenTemp) 89
+              92:     35(ptr) AccessChain 83(flattenTemp) 27
+              93:   12(fvec4) Load 92
+                              Store 91(@entryPointOutput.pos) 93
+              96:     16(ptr) AccessChain 83(flattenTemp) 37
+              97:   13(fvec3) Load 96
+                              Store 95(@entryPointOutput.norm) 97
                               Return
                               FunctionEnd
 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;): 17(gs_in_t) Function None 18
diff --git a/Test/baseResults/hlsl.domain.3.tese.out b/Test/baseResults/hlsl.domain.3.tese.out
index d473b96..254afe6 100644
--- a/Test/baseResults/hlsl.domain.3.tese.out
+++ b/Test/baseResults/hlsl.domain.3.tese.out
@@ -66,7 +66,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
@@ -78,7 +78,7 @@
 0:24            Constant:
 0:24              1 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              1 (const int)
 0:24        move second child to first child ( temp float)
@@ -90,7 +90,7 @@
 0:24            Constant:
 0:24              2 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              2 (const int)
 0:24        move second child to first child ( temp float)
@@ -99,22 +99,35 @@
 0:24            Constant:
 0:24              1 (const int)
 0:24          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:24            Constant:
 0:24              0 (const int)
-0:24      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:24        Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'i' ( temp 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 2-component vector of float)
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:24      Sequence
+0:24        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24          Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'i' ( temp 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'tesscoord' ( temp 2-component vector of float)
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:24        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:24          pos: direct index for structure ( temp 4-component vector of float)
+0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24            Constant:
+0:24              0 (const int)
+0:24        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:24          norm: direct index for structure ( temp 3-component vector of float)
+0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24            Constant:
+0:24              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 
 Linked tessellation evaluation stage:
@@ -187,7 +200,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
@@ -199,7 +212,7 @@
 0:24            Constant:
 0:24              1 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              1 (const int)
 0:24        move second child to first child ( temp float)
@@ -211,7 +224,7 @@
 0:24            Constant:
 0:24              2 (const int)
 0:24          direct index ( patch in float TessLevelOuter)
-0:?             'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?             'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:24            Constant:
 0:24              2 (const int)
 0:24        move second child to first child ( temp float)
@@ -220,31 +233,44 @@
 0:24            Constant:
 0:24              1 (const int)
 0:24          direct index ( patch in float TessLevelInner)
-0:?             'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?             'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 0:24            Constant:
 0:24              0 (const int)
-0:24      move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?         '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:24        Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'i' ( temp 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
-0:?           'tesscoord' ( temp 2-component vector of float)
-0:?           'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:24      Sequence
+0:24        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24          Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'i' ( temp 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?             'tesscoord' ( temp 2-component vector of float)
+0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor})
+0:24        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:24          pos: direct index for structure ( temp 4-component vector of float)
+0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24            Constant:
+0:24              0 (const int)
+0:24        move second child to first child ( temp 3-component vector of float)
+0:?           '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
+0:24          norm: direct index for structure ( temp 3-component vector of float)
+0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:24            Constant:
+0:24              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.norm' (layout( location=1) out 3-component vector of float)
 0:?     'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
-0:?     'pcf_data' (layout( location=2) patch in structure{})
-0:?     'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
-0:?     'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
+0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
+0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 96
+// Id's are bound by 100
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationEvaluation 4  "main" 54 58 67 81 86 95
+                              EntryPoint TessellationEvaluation 4  "main" 54 58 67 81 93 97
                               ExecutionMode 4 Isolines
                               Source HLSL 500
                               Name 4  "main"
@@ -267,23 +293,22 @@
                               Name 56  "tesscoord"
                               Name 58  "tesscoord"
                               Name 63  "pcf_data"
-                              Name 67  "pcf_data_flTessFactor"
-                              Name 81  "pcf_data_flInsideTessFactor"
-                              Name 86  "@entryPointOutput"
-                              Name 88  "param"
-                              Name 90  "param"
-                              Name 93  "pcf_in_t"
-                              Name 95  "pcf_data"
+                              Name 67  "pcf_data.flTessFactor"
+                              Name 81  "pcf_data.flInsideTessFactor"
+                              Name 85  "flattenTemp"
+                              Name 87  "param"
+                              Name 89  "param"
+                              Name 93  "@entryPointOutput.pos"
+                              Name 97  "@entryPointOutput.norm"
                               Decorate 54(i) Location 0
                               Decorate 58(tesscoord) Patch
                               Decorate 58(tesscoord) BuiltIn TessCoord
-                              Decorate 67(pcf_data_flTessFactor) Patch
-                              Decorate 67(pcf_data_flTessFactor) BuiltIn TessLevelOuter
-                              Decorate 81(pcf_data_flInsideTessFactor) Patch
-                              Decorate 81(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
-                              Decorate 86(@entryPointOutput) Location 0
-                              Decorate 95(pcf_data) Patch
-                              Decorate 95(pcf_data) Location 2
+                              Decorate 67(pcf_data.flTessFactor) Patch
+                              Decorate 67(pcf_data.flTessFactor) BuiltIn TessLevelOuter
+                              Decorate 81(pcf_data.flInsideTessFactor) Patch
+                              Decorate 81(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
+                              Decorate 93(@entryPointOutput.pos) Location 0
+                              Decorate 97(@entryPointOutput.norm) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -318,24 +343,24 @@
               64:     10(int) Constant 4
               65:             TypeArray 6(float) 64
               66:             TypePointer Input 65
-67(pcf_data_flTessFactor):     66(ptr) Variable Input
+67(pcf_data.flTessFactor):     66(ptr) Variable Input
               68:             TypePointer Input 6(float)
               75:     28(int) Constant 2
               79:             TypeArray 6(float) 11
               80:             TypePointer Input 79
-81(pcf_data_flInsideTessFactor):     80(ptr) Variable Input
-              85:             TypePointer Output 19(gs_in_t)
-86(@entryPointOutput):     85(ptr) Variable Output
-    93(pcf_in_t):             TypeStruct
-              94:             TypePointer Input 93(pcf_in_t)
-    95(pcf_data):     94(ptr) Variable Input
+81(pcf_data.flInsideTessFactor):     80(ptr) Variable Input
+              92:             TypePointer Output 7(fvec4)
+93(@entryPointOutput.pos):     92(ptr) Variable Output
+              96:             TypePointer Output 8(fvec3)
+97(@entryPointOutput.norm):     96(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            52(i):     51(ptr) Variable Function
    56(tesscoord):     14(ptr) Variable Function
     63(pcf_data):     18(ptr) Variable Function
-       88(param):     14(ptr) Variable Function
-       90(param):     18(ptr) Variable Function
+ 85(flattenTemp):     26(ptr) Variable Function
+       87(param):     14(ptr) Variable Function
+       89(param):     18(ptr) Variable Function
               55:          12 Load 54(i)
                               Store 52(i) 55
               59:    8(fvec3) Load 58(tesscoord)
@@ -343,29 +368,35 @@
               61:    6(float) CompositeExtract 59 1
               62:   13(fvec2) CompositeConstruct 60 61
                               Store 56(tesscoord) 62
-              69:     68(ptr) AccessChain 67(pcf_data_flTessFactor) 29
+              69:     68(ptr) AccessChain 67(pcf_data.flTessFactor) 29
               70:    6(float) Load 69
               71:     32(ptr) AccessChain 63(pcf_data) 29 29
                               Store 71 70
-              72:     68(ptr) AccessChain 67(pcf_data_flTessFactor) 39
+              72:     68(ptr) AccessChain 67(pcf_data.flTessFactor) 39
               73:    6(float) Load 72
               74:     32(ptr) AccessChain 63(pcf_data) 29 39
                               Store 74 73
-              76:     68(ptr) AccessChain 67(pcf_data_flTessFactor) 75
+              76:     68(ptr) AccessChain 67(pcf_data.flTessFactor) 75
               77:    6(float) Load 76
               78:     32(ptr) AccessChain 63(pcf_data) 29 75
                               Store 78 77
-              82:     68(ptr) AccessChain 81(pcf_data_flInsideTessFactor) 29
+              82:     68(ptr) AccessChain 81(pcf_data.flInsideTessFactor) 29
               83:    6(float) Load 82
               84:     32(ptr) AccessChain 63(pcf_data) 39
                               Store 84 83
-              87:          12 Load 52(i)
-              89:   13(fvec2) Load 56(tesscoord)
-                              Store 88(param) 89
-              91:17(pcf_in_t) Load 63(pcf_data)
-                              Store 90(param) 91
-              92: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 87 88(param) 90(param)
-                              Store 86(@entryPointOutput) 92
+              86:          12 Load 52(i)
+              88:   13(fvec2) Load 56(tesscoord)
+                              Store 87(param) 88
+              90:17(pcf_in_t) Load 63(pcf_data)
+                              Store 89(param) 90
+              91: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 86 87(param) 89(param)
+                              Store 85(flattenTemp) 91
+              94:     37(ptr) AccessChain 85(flattenTemp) 29
+              95:    7(fvec4) Load 94
+                              Store 93(@entryPointOutput.pos) 95
+              98:     46(ptr) AccessChain 85(flattenTemp) 39
+              99:    8(fvec3) Load 98
+                              Store 97(@entryPointOutput.norm) 99
                               Return
                               FunctionEnd
 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;): 19(gs_in_t) Function None 20
diff --git a/Test/baseResults/hlsl.emptystructreturn.frag.out b/Test/baseResults/hlsl.emptystructreturn.frag.out
index 7d11393..5440045 100644
--- a/Test/baseResults/hlsl.emptystructreturn.frag.out
+++ b/Test/baseResults/hlsl.emptystructreturn.frag.out
@@ -11,16 +11,16 @@
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
 0:?     Sequence
-0:10      move second child to first child ( temp structure{})
-0:?         'i' ( temp structure{})
-0:?         'i' (layout( location=0) in structure{})
+0:10      Sequence
+0:10        move second child to first child ( temp structure{})
+0:?           'i' ( temp structure{})
+0:?           'i' ( in structure{})
 0:10      Sequence
 0:10        move second child to first child ( temp structure{})
 0:?           '@entryPointOutput' ( out structure{})
 0:10          Function Call: @main(struct-ps_in1; ( temp structure{})
 0:?             'i' ( temp structure{})
 0:?   Linker Objects
-0:?     'i' (layout( location=0) in structure{})
 
 
 Linked fragment stage:
@@ -38,16 +38,16 @@
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
 0:?     Sequence
-0:10      move second child to first child ( temp structure{})
-0:?         'i' ( temp structure{})
-0:?         'i' (layout( location=0) in structure{})
+0:10      Sequence
+0:10        move second child to first child ( temp structure{})
+0:?           'i' ( temp structure{})
+0:?           'i' ( in structure{})
 0:10      Sequence
 0:10        move second child to first child ( temp structure{})
 0:?           '@entryPointOutput' ( out structure{})
 0:10          Function Call: @main(struct-ps_in1; ( temp structure{})
 0:?             'i' ( temp structure{})
 0:?   Linker Objects
-0:?     'i' (layout( location=0) in structure{})
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -69,7 +69,6 @@
                               Name 20  "i"
                               Name 23  "@entryPointOutput"
                               Name 24  "param"
-                              Decorate 20(i) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
         6(ps_in):             TypeStruct
diff --git a/Test/baseResults/hlsl.emptystructreturn.vert.out b/Test/baseResults/hlsl.emptystructreturn.vert.out
index 64446bd..c8cea5d 100644
--- a/Test/baseResults/hlsl.emptystructreturn.vert.out
+++ b/Test/baseResults/hlsl.emptystructreturn.vert.out
@@ -14,12 +14,12 @@
 0:10        move second child to first child ( temp structure{})
 0:?           'i' ( temp structure{})
 0:?           'i' ( in structure{})
-0:10      move second child to first child ( temp structure{})
-0:?         '@entryPointOutput' (layout( location=0) out structure{})
-0:10        Function Call: @main(struct-vs_in1; ( temp structure{})
-0:?           'i' ( temp structure{})
+0:10      Sequence
+0:10        move second child to first child ( temp structure{})
+0:?           '@entryPointOutput' ( out structure{})
+0:10          Function Call: @main(struct-vs_in1; ( temp structure{})
+0:?             'i' ( temp structure{})
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
 
 
 Linked vertex stage:
@@ -40,12 +40,12 @@
 0:10        move second child to first child ( temp structure{})
 0:?           'i' ( temp structure{})
 0:?           'i' ( in structure{})
-0:10      move second child to first child ( temp structure{})
-0:?         '@entryPointOutput' (layout( location=0) out structure{})
-0:10        Function Call: @main(struct-vs_in1; ( temp structure{})
-0:?           'i' ( temp structure{})
+0:10      Sequence
+0:10        move second child to first child ( temp structure{})
+0:?           '@entryPointOutput' ( out structure{})
+0:10          Function Call: @main(struct-vs_in1; ( temp structure{})
+0:?             'i' ( temp structure{})
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -66,7 +66,6 @@
                               Name 20  "i"
                               Name 23  "@entryPointOutput"
                               Name 24  "param"
-                              Decorate 23(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
         6(vs_in):             TypeStruct
diff --git a/Test/baseResults/hlsl.entry-in.frag.out b/Test/baseResults/hlsl.entry-in.frag.out
index 1c3b3cd..f274793 100755
--- a/Test/baseResults/hlsl.entry-in.frag.out
+++ b/Test/baseResults/hlsl.entry-in.frag.out
@@ -57,33 +57,28 @@
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              0 (const int)
-0:13          v: direct index for structure ( temp 2-component vector of float)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              0 (const int)
+0:?           'i.v' (layout( location=0) in 2-component vector of float)
 0:13        move second child to first child ( temp 4-component vector of float)
 0:13          fragCoord: direct index for structure ( temp 4-component vector of float)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              1 (const int)
-0:?           'i_fragCoord' ( in 4-component vector of float FragCoord)
+0:?           'i.fragCoord' ( in 4-component vector of float FragCoord)
 0:13        move second child to first child ( temp 2-component vector of int)
 0:13          i2: direct index for structure ( temp 2-component vector of int)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              2 (const int)
-0:13          i2: direct index for structure ( flat temp 2-component vector of int)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              1 (const int)
+0:?           'i.i2' (layout( location=1) flat in 2-component vector of int)
 0:13      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:13        Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
 0:?           'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:?     'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:?     'i_fragCoord' ( in 4-component vector of float FragCoord)
+0:?     'i.fragCoord' ( in 4-component vector of float FragCoord)
+0:?     'i.v' (layout( location=0) in 2-component vector of float)
+0:?     'i.i2' (layout( location=1) flat in 2-component vector of int)
 
 
 Linked fragment stage:
@@ -147,42 +142,37 @@
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              0 (const int)
-0:13          v: direct index for structure ( temp 2-component vector of float)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              0 (const int)
+0:?           'i.v' (layout( location=0) in 2-component vector of float)
 0:13        move second child to first child ( temp 4-component vector of float)
 0:13          fragCoord: direct index for structure ( temp 4-component vector of float)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              1 (const int)
-0:?           'i_fragCoord' ( in 4-component vector of float FragCoord)
+0:?           'i.fragCoord' ( in 4-component vector of float FragCoord)
 0:13        move second child to first child ( temp 2-component vector of int)
 0:13          i2: direct index for structure ( temp 2-component vector of int)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              2 (const int)
-0:13          i2: direct index for structure ( flat temp 2-component vector of int)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              1 (const int)
+0:?           'i.i2' (layout( location=1) flat in 2-component vector of int)
 0:13      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:13        Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
 0:?           'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:?     'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:?     'i_fragCoord' ( in 4-component vector of float FragCoord)
+0:?     'i.fragCoord' ( in 4-component vector of float FragCoord)
+0:?     'i.v' (layout( location=0) in 2-component vector of float)
+0:?     'i.i2' (layout( location=1) flat in 2-component vector of int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 77
+// Id's are bound by 74
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "PixelShaderFunction" 56 63 73
+                              EntryPoint Fragment 4  "PixelShaderFunction" 55 60 65 70
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "PixelShaderFunction"
@@ -200,17 +190,16 @@
                               Name 40  "ret2"
                               Name 41  "param"
                               Name 53  "i"
-                              Name 54  "InParam"
-                              MemberName 54(InParam) 0  "v"
-                              MemberName 54(InParam) 1  "i2"
-                              Name 56  "i"
-                              Name 63  "i_fragCoord"
-                              Name 73  "@entryPointOutput"
-                              Name 74  "param"
-                              MemberDecorate 54(InParam) 1 Flat
-                              Decorate 56(i) Location 0
-                              Decorate 63(i_fragCoord) BuiltIn FragCoord
-                              Decorate 73(@entryPointOutput) Location 0
+                              Name 55  "i.v"
+                              Name 60  "i.fragCoord"
+                              Name 65  "i.i2"
+                              Name 70  "@entryPointOutput"
+                              Name 71  "param"
+                              Decorate 55(i.v) Location 0
+                              Decorate 60(i.fragCoord) BuiltIn FragCoord
+                              Decorate 65(i.i2) Flat
+                              Decorate 65(i.i2) Location 1
+                              Decorate 70(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -229,37 +218,34 @@
               27:      9(int) Constant 1
               28:     22(int) Constant 0
               44:             TypePointer Function 8(fvec4)
-     54(InParam):             TypeStruct 7(fvec2) 10(ivec2)
-              55:             TypePointer Input 54(InParam)
-           56(i):     55(ptr) Variable Input
-              57:             TypePointer Input 7(fvec2)
-              60:             TypePointer Function 7(fvec2)
-              62:             TypePointer Input 8(fvec4)
- 63(i_fragCoord):     62(ptr) Variable Input
-              66:      9(int) Constant 2
-              67:             TypePointer Input 10(ivec2)
-              70:             TypePointer Function 10(ivec2)
-              72:             TypePointer Output 8(fvec4)
-73(@entryPointOutput):     72(ptr) Variable Output
+              54:             TypePointer Input 7(fvec2)
+         55(i.v):     54(ptr) Variable Input
+              57:             TypePointer Function 7(fvec2)
+              59:             TypePointer Input 8(fvec4)
+ 60(i.fragCoord):     59(ptr) Variable Input
+              63:      9(int) Constant 2
+              64:             TypePointer Input 10(ivec2)
+        65(i.i2):     64(ptr) Variable Input
+              67:             TypePointer Function 10(ivec2)
+              69:             TypePointer Output 8(fvec4)
+70(@entryPointOutput):     69(ptr) Variable Output
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
            53(i):     12(ptr) Variable Function
-       74(param):     12(ptr) Variable Function
-              58:     57(ptr) AccessChain 56(i) 21
-              59:    7(fvec2) Load 58
-              61:     60(ptr) AccessChain 53(i) 21
-                              Store 61 59
-              64:    8(fvec4) Load 63(i_fragCoord)
-              65:     44(ptr) AccessChain 53(i) 27
-                              Store 65 64
-              68:     67(ptr) AccessChain 56(i) 27
-              69:   10(ivec2) Load 68
-              71:     70(ptr) AccessChain 53(i) 66
-                              Store 71 69
-              75: 11(InParam) Load 53(i)
-                              Store 74(param) 75
-              76:    8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 74(param)
-                              Store 73(@entryPointOutput) 76
+       71(param):     12(ptr) Variable Function
+              56:    7(fvec2) Load 55(i.v)
+              58:     57(ptr) AccessChain 53(i) 21
+                              Store 58 56
+              61:    8(fvec4) Load 60(i.fragCoord)
+              62:     44(ptr) AccessChain 53(i) 27
+                              Store 62 61
+              66:   10(ivec2) Load 65(i.i2)
+              68:     67(ptr) AccessChain 53(i) 63
+                              Store 68 66
+              72: 11(InParam) Load 53(i)
+                              Store 71(param) 72
+              73:    8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 71(param)
+                              Store 70(@entryPointOutput) 73
                               Return
                               FunctionEnd
 15(fun(struct-InParam-vf2-vf4-vi21;):    6(float) Function None 13
diff --git a/Test/baseResults/hlsl.entry-out.frag.out b/Test/baseResults/hlsl.entry-out.frag.out
index 1324112..9ff7d33 100755
--- a/Test/baseResults/hlsl.entry-out.frag.out
+++ b/Test/baseResults/hlsl.entry-out.frag.out
@@ -86,26 +86,26 @@
 0:?         'out1' ( temp 4-component vector of float)
 0:13      Sequence
 0:13        move second child to first child ( temp 2-component vector of float)
-0:?           'v' (layout( location=2) out 2-component vector of float)
+0:?           'out2.v' (layout( location=2) out 2-component vector of float)
 0:13          v: direct index for structure ( temp 2-component vector of float)
 0:?             'out2' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp 2-component vector of int)
-0:?           'i' (layout( location=3) out 2-component vector of int)
+0:?           'out2.i' (layout( location=3) out 2-component vector of int)
 0:13          i: direct index for structure ( temp 2-component vector of int)
 0:?             'out2' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              1 (const int)
 0:13      Sequence
 0:13        move second child to first child ( temp 2-component vector of float)
-0:?           'v' (layout( location=4) out 2-component vector of float)
+0:?           'out3.v' (layout( location=4) out 2-component vector of float)
 0:13          v: direct index for structure ( temp 2-component vector of float)
 0:?             'out3' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp 2-component vector of int)
-0:?           'i' (layout( location=5) out 2-component vector of int)
+0:?           'out3.i' (layout( location=5) out 2-component vector of int)
 0:13          i: direct index for structure ( temp 2-component vector of int)
 0:?             'out3' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
@@ -114,10 +114,10 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     'out1' (layout( location=1) out 4-component vector of float)
-0:?     'v' (layout( location=2) out 2-component vector of float)
-0:?     'i' (layout( location=3) out 2-component vector of int)
-0:?     'v' (layout( location=4) out 2-component vector of float)
-0:?     'i' (layout( location=5) out 2-component vector of int)
+0:?     'out2.v' (layout( location=2) out 2-component vector of float)
+0:?     'out2.i' (layout( location=3) out 2-component vector of int)
+0:?     'out3.v' (layout( location=4) out 2-component vector of float)
+0:?     'out3.i' (layout( location=5) out 2-component vector of int)
 
 
 Linked fragment stage:
@@ -210,26 +210,26 @@
 0:?         'out1' ( temp 4-component vector of float)
 0:13      Sequence
 0:13        move second child to first child ( temp 2-component vector of float)
-0:?           'v' (layout( location=2) out 2-component vector of float)
+0:?           'out2.v' (layout( location=2) out 2-component vector of float)
 0:13          v: direct index for structure ( temp 2-component vector of float)
 0:?             'out2' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp 2-component vector of int)
-0:?           'i' (layout( location=3) out 2-component vector of int)
+0:?           'out2.i' (layout( location=3) out 2-component vector of int)
 0:13          i: direct index for structure ( temp 2-component vector of int)
 0:?             'out2' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              1 (const int)
 0:13      Sequence
 0:13        move second child to first child ( temp 2-component vector of float)
-0:?           'v' (layout( location=4) out 2-component vector of float)
+0:?           'out3.v' (layout( location=4) out 2-component vector of float)
 0:13          v: direct index for structure ( temp 2-component vector of float)
 0:?             'out3' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp 2-component vector of int)
-0:?           'i' (layout( location=5) out 2-component vector of int)
+0:?           'out3.i' (layout( location=5) out 2-component vector of int)
 0:13          i: direct index for structure ( temp 2-component vector of int)
 0:?             'out3' ( temp structure{ temp 2-component vector of float v,  temp 2-component vector of int i})
 0:13            Constant:
@@ -238,10 +238,10 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     'out1' (layout( location=1) out 4-component vector of float)
-0:?     'v' (layout( location=2) out 2-component vector of float)
-0:?     'i' (layout( location=3) out 2-component vector of int)
-0:?     'v' (layout( location=4) out 2-component vector of float)
-0:?     'i' (layout( location=5) out 2-component vector of int)
+0:?     'out2.v' (layout( location=2) out 2-component vector of float)
+0:?     'out2.i' (layout( location=3) out 2-component vector of int)
+0:?     'out3.v' (layout( location=4) out 2-component vector of float)
+0:?     'out3.i' (layout( location=5) out 2-component vector of int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -277,17 +277,17 @@
                               Name 67  "param"
                               Name 68  "param"
                               Name 73  "out1"
-                              Name 76  "v"
-                              Name 80  "i"
-                              Name 83  "v"
-                              Name 86  "i"
+                              Name 76  "out2.v"
+                              Name 80  "out2.i"
+                              Name 83  "out3.v"
+                              Name 86  "out3.i"
                               Decorate 57(input) Location 0
                               Decorate 60(@entryPointOutput) Location 0
                               Decorate 73(out1) Location 1
-                              Decorate 76(v) Location 2
-                              Decorate 80(i) Location 3
-                              Decorate 83(v) Location 4
-                              Decorate 86(i) Location 5
+                              Decorate 76(out2.v) Location 2
+                              Decorate 80(out2.i) Location 3
+                              Decorate 83(out3.v) Location 4
+                              Decorate 86(out3.i) Location 5
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -322,11 +322,11 @@
 60(@entryPointOutput):     59(ptr) Variable Output
         73(out1):     59(ptr) Variable Output
               75:             TypePointer Output 7(fvec2)
-           76(v):     75(ptr) Variable Output
+      76(out2.v):     75(ptr) Variable Output
               79:             TypePointer Output 9(ivec2)
-           80(i):     79(ptr) Variable Output
-           83(v):     75(ptr) Variable Output
-           86(i):     79(ptr) Variable Output
+      80(out2.i):     79(ptr) Variable Output
+      83(out3.v):     75(ptr) Variable Output
+      86(out3.i):     79(ptr) Variable Output
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
        55(input):     17(ptr) Variable Function
@@ -353,16 +353,16 @@
                               Store 73(out1) 74
               77:     28(ptr) AccessChain 62(out2) 25
               78:    7(fvec2) Load 77
-                              Store 76(v) 78
+                              Store 76(out2.v) 78
               81:     33(ptr) AccessChain 62(out2) 30
               82:    9(ivec2) Load 81
-                              Store 80(i) 82
+                              Store 80(out2.i) 82
               84:     28(ptr) AccessChain 63(out3) 25
               85:    7(fvec2) Load 84
-                              Store 83(v) 85
+                              Store 83(out3.v) 85
               87:     33(ptr) AccessChain 63(out3) 30
               88:    9(ivec2) Load 87
-                              Store 86(i) 88
+                              Store 86(out3.i) 88
                               Return
                               FunctionEnd
 14(fun(struct-OutParam-vf2-vi21;):           2 Function None 12
diff --git a/Test/baseResults/hlsl.entry.rename.frag.out b/Test/baseResults/hlsl.entry.rename.frag.out
index c6a4335..a85123d 100644
--- a/Test/baseResults/hlsl.entry.rename.frag.out
+++ b/Test/baseResults/hlsl.entry.rename.frag.out
@@ -24,14 +24,14 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:11          Color: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main_in_spv( ( temp structure{ temp 4-component vector of float Color})
 0:11            Constant:
 0:11              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int also_not_the_entry_point})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -62,14 +62,14 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:11          Color: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main_in_spv( ( temp structure{ temp 4-component vector of float Color})
 0:11            Constant:
 0:11              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int also_not_the_entry_point})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -87,11 +87,11 @@
                               MemberName 10(PS_OUTPUT) 0  "Color"
                               Name 12  "@main_in_spv("
                               Name 15  "psout"
-                              Name 26  "Color"
+                              Name 26  "@entryPointOutput.Color"
                               Name 29  "$Global"
                               MemberName 29($Global) 0  "also_not_the_entry_point"
                               Name 31  ""
-                              Decorate 26(Color) Location 0
+                              Decorate 26(@entryPointOutput.Color) Location 0
                               MemberDecorate 29($Global) 0 Offset 0
                               Decorate 29($Global) Block
                               Decorate 31 DescriptorSet 0
@@ -108,7 +108,7 @@
               19:    9(fvec4) ConstantComposite 18 18 18 18
               20:             TypePointer Function 9(fvec4)
               25:             TypePointer Output 9(fvec4)
-       26(Color):     25(ptr) Variable Output
+26(@entryPointOutput.Color):     25(ptr) Variable Output
      29($Global):             TypeStruct 16(int)
               30:             TypePointer Uniform 29($Global)
               31:     30(ptr) Variable Uniform
@@ -116,7 +116,7 @@
                5:             Label
               27:10(PS_OUTPUT) FunctionCall 12(@main_in_spv()
               28:    9(fvec4) CompositeExtract 27 0
-                              Store 26(Color) 28
+                              Store 26(@entryPointOutput.Color) 28
                               Return
                               FunctionEnd
 6(not_the_entry_point():           2 Function None 3
diff --git a/Test/baseResults/hlsl.flatten.return.frag.out b/Test/baseResults/hlsl.flatten.return.frag.out
index ee2c3f0..fd344c9 100644
--- a/Test/baseResults/hlsl.flatten.return.frag.out
+++ b/Test/baseResults/hlsl.flatten.return.frag.out
@@ -27,34 +27,34 @@
 0:16          'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16          Function Call: @main( ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:16          color: direct index for structure ( temp 4-component vector of float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              0 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member1' (layout( location=1) out float)
+0:?           '@entryPointOutput.other_struct_member1' (layout( location=1) out float)
 0:16          other_struct_member1: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              1 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member2' (layout( location=2) out float)
+0:?           '@entryPointOutput.other_struct_member2' (layout( location=2) out float)
 0:16          other_struct_member2: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              2 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member3' (layout( location=3) out float)
+0:?           '@entryPointOutput.other_struct_member3' (layout( location=3) out float)
 0:16          other_struct_member3: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              3 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
-0:?     'other_struct_member1' (layout( location=1) out float)
-0:?     'other_struct_member2' (layout( location=2) out float)
-0:?     'other_struct_member3' (layout( location=3) out float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.other_struct_member1' (layout( location=1) out float)
+0:?     '@entryPointOutput.other_struct_member2' (layout( location=2) out float)
+0:?     '@entryPointOutput.other_struct_member3' (layout( location=3) out float)
 
 
 Linked fragment stage:
@@ -88,34 +88,34 @@
 0:16          'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16          Function Call: @main( ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:16          color: direct index for structure ( temp 4-component vector of float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              0 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member1' (layout( location=1) out float)
+0:?           '@entryPointOutput.other_struct_member1' (layout( location=1) out float)
 0:16          other_struct_member1: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              1 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member2' (layout( location=2) out float)
+0:?           '@entryPointOutput.other_struct_member2' (layout( location=2) out float)
 0:16          other_struct_member2: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              2 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'other_struct_member3' (layout( location=3) out float)
+0:?           '@entryPointOutput.other_struct_member3' (layout( location=3) out float)
 0:16          other_struct_member3: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float color,  temp float other_struct_member1,  temp float other_struct_member2,  temp float other_struct_member3})
 0:16            Constant:
 0:16              3 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
-0:?     'other_struct_member1' (layout( location=1) out float)
-0:?     'other_struct_member2' (layout( location=2) out float)
-0:?     'other_struct_member3' (layout( location=3) out float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.other_struct_member1' (layout( location=1) out float)
+0:?     '@entryPointOutput.other_struct_member2' (layout( location=2) out float)
+0:?     '@entryPointOutput.other_struct_member3' (layout( location=3) out float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -136,14 +136,14 @@
                               Name 10  "Func1("
                               Name 12  "@main("
                               Name 26  "flattenTemp"
-                              Name 29  "color"
-                              Name 36  "other_struct_member1"
-                              Name 41  "other_struct_member2"
-                              Name 45  "other_struct_member3"
-                              Decorate 29(color) Location 0
-                              Decorate 36(other_struct_member1) Location 1
-                              Decorate 41(other_struct_member2) Location 2
-                              Decorate 45(other_struct_member3) Location 3
+                              Name 29  "@entryPointOutput.color"
+                              Name 36  "@entryPointOutput.other_struct_member1"
+                              Name 41  "@entryPointOutput.other_struct_member2"
+                              Name 45  "@entryPointOutput.other_struct_member3"
+                              Decorate 29(@entryPointOutput.color) Location 0
+                              Decorate 36(@entryPointOutput.other_struct_member1) Location 1
+                              Decorate 41(@entryPointOutput.other_struct_member2) Location 2
+                              Decorate 45(@entryPointOutput.other_struct_member3) Location 3
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -158,17 +158,17 @@
               19:8(PS_OUTPUT) ConstantComposite 15 16 17 18
               25:             TypePointer Function 8(PS_OUTPUT)
               28:             TypePointer Output 7(fvec4)
-       29(color):     28(ptr) Variable Output
+29(@entryPointOutput.color):     28(ptr) Variable Output
               30:             TypeInt 32 1
               31:     30(int) Constant 0
               32:             TypePointer Function 7(fvec4)
               35:             TypePointer Output 6(float)
-36(other_struct_member1):     35(ptr) Variable Output
+36(@entryPointOutput.other_struct_member1):     35(ptr) Variable Output
               37:     30(int) Constant 1
               38:             TypePointer Function 6(float)
-41(other_struct_member2):     35(ptr) Variable Output
+41(@entryPointOutput.other_struct_member2):     35(ptr) Variable Output
               42:     30(int) Constant 2
-45(other_struct_member3):     35(ptr) Variable Output
+45(@entryPointOutput.other_struct_member3):     35(ptr) Variable Output
               46:     30(int) Constant 3
          4(main):           2 Function None 3
                5:             Label
@@ -177,16 +177,16 @@
                               Store 26(flattenTemp) 27
               33:     32(ptr) AccessChain 26(flattenTemp) 31
               34:    7(fvec4) Load 33
-                              Store 29(color) 34
+                              Store 29(@entryPointOutput.color) 34
               39:     38(ptr) AccessChain 26(flattenTemp) 37
               40:    6(float) Load 39
-                              Store 36(other_struct_member1) 40
+                              Store 36(@entryPointOutput.other_struct_member1) 40
               43:     38(ptr) AccessChain 26(flattenTemp) 42
               44:    6(float) Load 43
-                              Store 41(other_struct_member2) 44
+                              Store 41(@entryPointOutput.other_struct_member2) 44
               47:     38(ptr) AccessChain 26(flattenTemp) 46
               48:    6(float) Load 47
-                              Store 45(other_struct_member3) 48
+                              Store 45(@entryPointOutput.other_struct_member3) 48
                               Return
                               FunctionEnd
       10(Func1():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.flattenOpaque.frag.out b/Test/baseResults/hlsl.flattenOpaque.frag.out
index 392ff72..aa72124 100755
--- a/Test/baseResults/hlsl.flattenOpaque.frag.out
+++ b/Test/baseResults/hlsl.flattenOpaque.frag.out
@@ -4,51 +4,51 @@
 0:? Sequence
 0:15  Function Definition: osCall1(struct-os-p11; ( temp 4-component vector of float)
 0:15    Function Parameters: 
-0:?       's2D' ( in sampler)
+0:?       's.s2D' ( in sampler)
 0:?     Sequence
 0:16      Branch: Return with expression
 0:16        texture ( temp 4-component vector of float)
 0:16          Construct combined texture-sampler ( temp sampler2D)
 0:16            'tex' ( uniform texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.s2D' ( in sampler)
 0:?           Constant:
 0:?             0.200000
 0:?             0.300000
 0:20  Function Definition: osCall2(struct-os-p11;vf2; ( temp 4-component vector of float)
 0:20    Function Parameters: 
-0:?       's2D' ( in sampler)
+0:?       's.s2D' ( in sampler)
 0:20      'f2' ( in 2-component vector of float)
 0:?     Sequence
 0:21      Branch: Return with expression
 0:21        texture ( temp 4-component vector of float)
 0:21          Construct combined texture-sampler ( temp sampler2D)
 0:21            'tex' ( uniform texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.s2D' ( in sampler)
 0:21          'f2' ( in 2-component vector of float)
 0:25  Function Definition: os2Call1(struct-os2-p1-t211; ( temp 4-component vector of float)
 0:25    Function Parameters: 
-0:?       's2D' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       's.s2D' ( in sampler)
+0:?       's.tex' ( in texture2D)
 0:?     Sequence
 0:26      Branch: Return with expression
 0:26        texture ( temp 4-component vector of float)
 0:26          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.tex' ( in texture2D)
+0:?             's.s2D' ( in sampler)
 0:?           Constant:
 0:?             0.200000
 0:?             0.300000
 0:30  Function Definition: os2Call2(struct-os2-p1-t211;vf2; ( temp 4-component vector of float)
 0:30    Function Parameters: 
-0:?       's2D' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       's.s2D' ( in sampler)
+0:?       's.tex' ( in texture2D)
 0:30      'f2' ( in 2-component vector of float)
 0:?     Sequence
 0:31      Branch: Return with expression
 0:31        texture ( temp 4-component vector of float)
 0:31          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.tex' ( in texture2D)
+0:?             's.s2D' ( in sampler)
 0:31          'f2' ( in 2-component vector of float)
 0:35  Function Definition: @main( ( temp 4-component vector of float)
 0:35    Function Parameters: 
@@ -58,18 +58,18 @@
 0:37          add ( temp 4-component vector of float)
 0:36            add ( temp 4-component vector of float)
 0:36              Function Call: osCall1(struct-os-p11; ( temp 4-component vector of float)
-0:?                 's2D' ( uniform sampler)
+0:?                 's.s2D' ( uniform sampler)
 0:37              Function Call: osCall2(struct-os-p11;vf2; ( temp 4-component vector of float)
-0:?                 's2D' ( uniform sampler)
+0:?                 's.s2D' ( uniform sampler)
 0:?                 Constant:
 0:?                   0.200000
 0:?                   0.300000
 0:38            Function Call: os2Call1(struct-os2-p1-t211; ( temp 4-component vector of float)
-0:?               's2D' ( uniform sampler)
-0:?               'tex' ( uniform texture2D)
+0:?               's2.s2D' ( uniform sampler)
+0:?               's2.tex' ( uniform texture2D)
 0:39          Function Call: os2Call2(struct-os2-p1-t211;vf2; ( temp 4-component vector of float)
-0:?             's2D' ( uniform sampler)
-0:?             'tex' ( uniform texture2D)
+0:?             's2.s2D' ( uniform sampler)
+0:?             's2.tex' ( uniform texture2D)
 0:?             Constant:
 0:?               0.200000
 0:?               0.300000
@@ -81,6 +81,9 @@
 0:35        Function Call: @main( ( temp 4-component vector of float)
 0:?   Linker Objects
 0:?     'tex' ( uniform texture2D)
+0:?     's.s2D' ( uniform sampler)
+0:?     's2.s2D' ( uniform sampler)
+0:?     's2.tex' ( uniform texture2D)
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 
@@ -92,51 +95,51 @@
 0:? Sequence
 0:15  Function Definition: osCall1(struct-os-p11; ( temp 4-component vector of float)
 0:15    Function Parameters: 
-0:?       's2D' ( in sampler)
+0:?       's.s2D' ( in sampler)
 0:?     Sequence
 0:16      Branch: Return with expression
 0:16        texture ( temp 4-component vector of float)
 0:16          Construct combined texture-sampler ( temp sampler2D)
 0:16            'tex' ( uniform texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.s2D' ( in sampler)
 0:?           Constant:
 0:?             0.200000
 0:?             0.300000
 0:20  Function Definition: osCall2(struct-os-p11;vf2; ( temp 4-component vector of float)
 0:20    Function Parameters: 
-0:?       's2D' ( in sampler)
+0:?       's.s2D' ( in sampler)
 0:20      'f2' ( in 2-component vector of float)
 0:?     Sequence
 0:21      Branch: Return with expression
 0:21        texture ( temp 4-component vector of float)
 0:21          Construct combined texture-sampler ( temp sampler2D)
 0:21            'tex' ( uniform texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.s2D' ( in sampler)
 0:21          'f2' ( in 2-component vector of float)
 0:25  Function Definition: os2Call1(struct-os2-p1-t211; ( temp 4-component vector of float)
 0:25    Function Parameters: 
-0:?       's2D' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       's.s2D' ( in sampler)
+0:?       's.tex' ( in texture2D)
 0:?     Sequence
 0:26      Branch: Return with expression
 0:26        texture ( temp 4-component vector of float)
 0:26          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.tex' ( in texture2D)
+0:?             's.s2D' ( in sampler)
 0:?           Constant:
 0:?             0.200000
 0:?             0.300000
 0:30  Function Definition: os2Call2(struct-os2-p1-t211;vf2; ( temp 4-component vector of float)
 0:30    Function Parameters: 
-0:?       's2D' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       's.s2D' ( in sampler)
+0:?       's.tex' ( in texture2D)
 0:30      'f2' ( in 2-component vector of float)
 0:?     Sequence
 0:31      Branch: Return with expression
 0:31        texture ( temp 4-component vector of float)
 0:31          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             's2D' ( in sampler)
+0:?             's.tex' ( in texture2D)
+0:?             's.s2D' ( in sampler)
 0:31          'f2' ( in 2-component vector of float)
 0:35  Function Definition: @main( ( temp 4-component vector of float)
 0:35    Function Parameters: 
@@ -146,18 +149,18 @@
 0:37          add ( temp 4-component vector of float)
 0:36            add ( temp 4-component vector of float)
 0:36              Function Call: osCall1(struct-os-p11; ( temp 4-component vector of float)
-0:?                 's2D' ( uniform sampler)
+0:?                 's.s2D' ( uniform sampler)
 0:37              Function Call: osCall2(struct-os-p11;vf2; ( temp 4-component vector of float)
-0:?                 's2D' ( uniform sampler)
+0:?                 's.s2D' ( uniform sampler)
 0:?                 Constant:
 0:?                   0.200000
 0:?                   0.300000
 0:38            Function Call: os2Call1(struct-os2-p1-t211; ( temp 4-component vector of float)
-0:?               's2D' ( uniform sampler)
-0:?               'tex' ( uniform texture2D)
+0:?               's2.s2D' ( uniform sampler)
+0:?               's2.tex' ( uniform texture2D)
 0:39          Function Call: os2Call2(struct-os2-p1-t211;vf2; ( temp 4-component vector of float)
-0:?             's2D' ( uniform sampler)
-0:?             'tex' ( uniform texture2D)
+0:?             's2.s2D' ( uniform sampler)
+0:?             's2.tex' ( uniform texture2D)
 0:?             Constant:
 0:?               0.200000
 0:?               0.300000
@@ -169,6 +172,9 @@
 0:35        Function Call: @main( ( temp 4-component vector of float)
 0:?   Linker Objects
 0:?     'tex' ( uniform texture2D)
+0:?     's.s2D' ( uniform sampler)
+0:?     's2.s2D' ( uniform sampler)
+0:?     's2.tex' ( uniform texture2D)
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
@@ -183,29 +189,29 @@
                               Source HLSL 500
                               Name 4  "main"
                               Name 12  "osCall1(struct-os-p11;"
-                              Name 11  "s2D"
+                              Name 11  "s.s2D"
                               Name 19  "osCall2(struct-os-p11;vf2;"
-                              Name 17  "s2D"
+                              Name 17  "s.s2D"
                               Name 18  "f2"
                               Name 26  "os2Call1(struct-os2-p1-t211;"
-                              Name 24  "s2D"
-                              Name 25  "tex"
+                              Name 24  "s.s2D"
+                              Name 25  "s.tex"
                               Name 32  "os2Call2(struct-os2-p1-t211;vf2;"
-                              Name 29  "s2D"
-                              Name 30  "tex"
+                              Name 29  "s.s2D"
+                              Name 30  "s.tex"
                               Name 31  "f2"
                               Name 35  "@main("
                               Name 37  "tex"
-                              Name 68  "s2D"
+                              Name 68  "s.s2D"
                               Name 70  "param"
-                              Name 73  "s2D"
-                              Name 74  "tex"
+                              Name 73  "s2.s2D"
+                              Name 74  "s2.tex"
                               Name 77  "param"
                               Name 83  "@entryPointOutput"
                               Decorate 37(tex) DescriptorSet 0
-                              Decorate 68(s2D) DescriptorSet 0
-                              Decorate 73(s2D) DescriptorSet 0
-                              Decorate 74(tex) DescriptorSet 0
+                              Decorate 68(s.s2D) DescriptorSet 0
+                              Decorate 73(s2.s2D) DescriptorSet 0
+                              Decorate 74(s2.tex) DescriptorSet 0
                               Decorate 83(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -227,9 +233,9 @@
               42:    8(float) Constant 1045220557
               43:    8(float) Constant 1050253722
               44:   14(fvec2) ConstantComposite 42 43
-         68(s2D):      7(ptr) Variable UniformConstant
-         73(s2D):      7(ptr) Variable UniformConstant
-         74(tex):     22(ptr) Variable UniformConstant
+       68(s.s2D):      7(ptr) Variable UniformConstant
+      73(s2.s2D):      7(ptr) Variable UniformConstant
+      74(s2.tex):     22(ptr) Variable UniformConstant
               82:             TypePointer Output 9(fvec4)
 83(@entryPointOutput):     82(ptr) Variable Output
          4(main):           2 Function None 3
@@ -239,42 +245,42 @@
                               Return
                               FunctionEnd
 12(osCall1(struct-os-p11;):    9(fvec4) Function None 10
-         11(s2D):      7(ptr) FunctionParameter
+       11(s.s2D):      7(ptr) FunctionParameter
               13:             Label
               38:          21 Load 37(tex)
-              39:           6 Load 11(s2D)
+              39:           6 Load 11(s.s2D)
               41:          40 SampledImage 38 39
               45:    9(fvec4) ImageSampleImplicitLod 41 44
                               ReturnValue 45
                               FunctionEnd
 19(osCall2(struct-os-p11;vf2;):    9(fvec4) Function None 16
-         17(s2D):      7(ptr) FunctionParameter
+       17(s.s2D):      7(ptr) FunctionParameter
           18(f2):     15(ptr) FunctionParameter
               20:             Label
               48:          21 Load 37(tex)
-              49:           6 Load 17(s2D)
+              49:           6 Load 17(s.s2D)
               50:          40 SampledImage 48 49
               51:   14(fvec2) Load 18(f2)
               52:    9(fvec4) ImageSampleImplicitLod 50 51
                               ReturnValue 52
                               FunctionEnd
 26(os2Call1(struct-os2-p1-t211;):    9(fvec4) Function None 23
-         24(s2D):      7(ptr) FunctionParameter
-         25(tex):     22(ptr) FunctionParameter
+       24(s.s2D):      7(ptr) FunctionParameter
+       25(s.tex):     22(ptr) FunctionParameter
               27:             Label
-              55:          21 Load 25(tex)
-              56:           6 Load 24(s2D)
+              55:          21 Load 25(s.tex)
+              56:           6 Load 24(s.s2D)
               57:          40 SampledImage 55 56
               58:    9(fvec4) ImageSampleImplicitLod 57 44
                               ReturnValue 58
                               FunctionEnd
 32(os2Call2(struct-os2-p1-t211;vf2;):    9(fvec4) Function None 28
-         29(s2D):      7(ptr) FunctionParameter
-         30(tex):     22(ptr) FunctionParameter
+       29(s.s2D):      7(ptr) FunctionParameter
+       30(s.tex):     22(ptr) FunctionParameter
           31(f2):     15(ptr) FunctionParameter
               33:             Label
-              61:          21 Load 30(tex)
-              62:           6 Load 29(s2D)
+              61:          21 Load 30(s.tex)
+              62:           6 Load 29(s.s2D)
               63:          40 SampledImage 61 62
               64:   14(fvec2) Load 31(f2)
               65:    9(fvec4) ImageSampleImplicitLod 63 64
@@ -284,14 +290,14 @@
               36:             Label
        70(param):     15(ptr) Variable Function
        77(param):     15(ptr) Variable Function
-              69:    9(fvec4) FunctionCall 12(osCall1(struct-os-p11;) 68(s2D)
+              69:    9(fvec4) FunctionCall 12(osCall1(struct-os-p11;) 68(s.s2D)
                               Store 70(param) 44
-              71:    9(fvec4) FunctionCall 19(osCall2(struct-os-p11;vf2;) 68(s2D) 70(param)
+              71:    9(fvec4) FunctionCall 19(osCall2(struct-os-p11;vf2;) 68(s.s2D) 70(param)
               72:    9(fvec4) FAdd 69 71
-              75:    9(fvec4) FunctionCall 26(os2Call1(struct-os2-p1-t211;) 73(s2D) 74(tex)
+              75:    9(fvec4) FunctionCall 26(os2Call1(struct-os2-p1-t211;) 73(s2.s2D) 74(s2.tex)
               76:    9(fvec4) FAdd 72 75
                               Store 77(param) 44
-              78:    9(fvec4) FunctionCall 32(os2Call2(struct-os2-p1-t211;vf2;) 73(s2D) 74(tex) 77(param)
+              78:    9(fvec4) FunctionCall 32(os2Call2(struct-os2-p1-t211;vf2;) 73(s2.s2D) 74(s2.tex) 77(param)
               79:    9(fvec4) FAdd 76 78
                               ReturnValue 79
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
index 774260f..4bd3161 100755
--- a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
+++ b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
@@ -1,32 +1,58 @@
 hlsl.flattenOpaqueInit.vert
+WARNING: 0:20: '=' : cannot do member-wise aliasing for opaque members with this initializer 
+
 Shader version: 500
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
 0:5    Function Parameters: 
-0:?       'smpl' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       'tex.smpl' ( in sampler)
+0:?       'tex.tex' ( in texture2D)
 0:?     Sequence
 0:6      Branch: Return with expression
 0:6        texture ( temp 4-component vector of float)
 0:6          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             'smpl' ( in sampler)
+0:?             'tex.tex' ( in texture2D)
+0:?             'tex.smpl' ( in sampler)
 0:?           Constant:
 0:?             0.300000
 0:?             0.400000
-0:10  Function Definition: @main( ( temp 4-component vector of float)
+0:10  Function Definition: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
 0:10    Function Parameters: 
 0:?     Sequence
-0:12      Branch: Return with expression
-0:12        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
+0:12      'g_tInputTexture_sampler' ( uniform sampler)
+0:13      'g_tInputTexture' ( uniform texture2D)
+0:14      Branch: Return with expression
+0:14        't' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:18  Function Definition: @main( ( temp 4-component vector of float)
+0:18    Function Parameters: 
+0:?     Sequence
+0:20      Sequence
+0:20        Sequence
+0:20          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20            Function Call: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20          move second child to first child ( temp sampler)
+0:?             'tex2.smpl' ( temp sampler)
+0:20            smpl: direct index for structure ( temp sampler)
+0:20              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20              Constant:
+0:20                0 (const int)
+0:20          move second child to first child ( temp texture2D)
+0:?             'tex2.tex' ( temp texture2D)
+0:20            tex: direct index for structure ( temp texture2D)
+0:20              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20              Constant:
+0:20                1 (const int)
+0:21      Branch: Return with expression
+0:21        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
 0:?           'g_tInputTexture_sampler' ( uniform sampler)
 0:?           'g_tInputTexture' ( uniform texture2D)
-0:10  Function Definition: main( ( temp void)
-0:10    Function Parameters: 
+0:18  Function Definition: main( ( temp void)
+0:18    Function Parameters: 
 0:?     Sequence
-0:10      move second child to first child ( temp 4-component vector of float)
+0:18      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:10        Function Call: @main( ( temp 4-component vector of float)
+0:18        Function Call: @main( ( temp 4-component vector of float)
 0:?   Linker Objects
 0:?     'g_tInputTexture_sampler' ( uniform sampler)
 0:?     'g_tInputTexture' ( uniform texture2D)
@@ -40,30 +66,54 @@
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
 0:5    Function Parameters: 
-0:?       'smpl' ( in sampler)
-0:?       'tex' ( in texture2D)
+0:?       'tex.smpl' ( in sampler)
+0:?       'tex.tex' ( in texture2D)
 0:?     Sequence
 0:6      Branch: Return with expression
 0:6        texture ( temp 4-component vector of float)
 0:6          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             'smpl' ( in sampler)
+0:?             'tex.tex' ( in texture2D)
+0:?             'tex.smpl' ( in sampler)
 0:?           Constant:
 0:?             0.300000
 0:?             0.400000
-0:10  Function Definition: @main( ( temp 4-component vector of float)
+0:10  Function Definition: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
 0:10    Function Parameters: 
 0:?     Sequence
-0:12      Branch: Return with expression
-0:12        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
+0:12      'g_tInputTexture_sampler' ( uniform sampler)
+0:13      'g_tInputTexture' ( uniform texture2D)
+0:14      Branch: Return with expression
+0:14        't' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:18  Function Definition: @main( ( temp 4-component vector of float)
+0:18    Function Parameters: 
+0:?     Sequence
+0:20      Sequence
+0:20        Sequence
+0:20          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20            Function Call: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20          move second child to first child ( temp sampler)
+0:?             'tex2.smpl' ( temp sampler)
+0:20            smpl: direct index for structure ( temp sampler)
+0:20              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20              Constant:
+0:20                0 (const int)
+0:20          move second child to first child ( temp texture2D)
+0:?             'tex2.tex' ( temp texture2D)
+0:20            tex: direct index for structure ( temp texture2D)
+0:20              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:20              Constant:
+0:20                1 (const int)
+0:21      Branch: Return with expression
+0:21        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
 0:?           'g_tInputTexture_sampler' ( uniform sampler)
 0:?           'g_tInputTexture' ( uniform texture2D)
-0:10  Function Definition: main( ( temp void)
-0:10    Function Parameters: 
+0:18  Function Definition: main( ( temp void)
+0:18    Function Parameters: 
 0:?     Sequence
-0:10      move second child to first child ( temp 4-component vector of float)
+0:18      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:10        Function Call: @main( ( temp 4-component vector of float)
+0:18        Function Call: @main( ( temp 4-component vector of float)
 0:?   Linker Objects
 0:?     'g_tInputTexture_sampler' ( uniform sampler)
 0:?     'g_tInputTexture' ( uniform texture2D)
@@ -71,24 +121,32 @@
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 40
+// Id's are bound by 60
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 38
+                              EntryPoint Vertex 4  "main" 58
                               Source HLSL 500
                               Name 4  "main"
                               Name 15  "lookUp(struct-FxaaTex-p1-t211;"
-                              Name 13  "smpl"
-                              Name 14  "tex"
-                              Name 18  "@main("
-                              Name 32  "g_tInputTexture_sampler"
-                              Name 33  "g_tInputTexture"
-                              Name 38  "@entryPointOutput"
-                              Decorate 32(g_tInputTexture_sampler) DescriptorSet 0
-                              Decorate 33(g_tInputTexture) DescriptorSet 0
-                              Decorate 38(@entryPointOutput) Location 0
+                              Name 13  "tex.smpl"
+                              Name 14  "tex.tex"
+                              Name 17  "FxaaTex"
+                              MemberName 17(FxaaTex) 0  "smpl"
+                              MemberName 17(FxaaTex) 1  "tex"
+                              Name 19  "fillOpaque("
+                              Name 22  "@main("
+                              Name 36  "g_tInputTexture_sampler"
+                              Name 37  "g_tInputTexture"
+                              Name 39  "t"
+                              Name 43  "flattenTemp"
+                              Name 45  "tex2.smpl"
+                              Name 50  "tex2.tex"
+                              Name 58  "@entryPointOutput"
+                              Decorate 36(g_tInputTexture_sampler) DescriptorSet 0
+                              Decorate 37(g_tInputTexture) DescriptorSet 0
+                              Decorate 58(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeSampler
@@ -98,35 +156,58 @@
               10:             TypePointer UniformConstant 9
               11:             TypeVector 8(float) 4
               12:             TypeFunction 11(fvec4) 7(ptr) 10(ptr)
-              17:             TypeFunction 11(fvec4)
-              22:             TypeSampledImage 9
-              24:             TypeVector 8(float) 2
-              25:    8(float) Constant 1050253722
-              26:    8(float) Constant 1053609165
-              27:   24(fvec2) ConstantComposite 25 26
-              28:    8(float) Constant 0
-32(g_tInputTexture_sampler):      7(ptr) Variable UniformConstant
-33(g_tInputTexture):     10(ptr) Variable UniformConstant
-              37:             TypePointer Output 11(fvec4)
-38(@entryPointOutput):     37(ptr) Variable Output
+     17(FxaaTex):             TypeStruct 6 9
+              18:             TypeFunction 17(FxaaTex)
+              21:             TypeFunction 11(fvec4)
+              26:             TypeSampledImage 9
+              28:             TypeVector 8(float) 2
+              29:    8(float) Constant 1050253722
+              30:    8(float) Constant 1053609165
+              31:   28(fvec2) ConstantComposite 29 30
+              32:    8(float) Constant 0
+36(g_tInputTexture_sampler):      7(ptr) Variable UniformConstant
+37(g_tInputTexture):     10(ptr) Variable UniformConstant
+              38:             TypePointer UniformConstant 17(FxaaTex)
+           39(t):     38(ptr) Variable UniformConstant
+ 43(flattenTemp):     38(ptr) Variable UniformConstant
+   45(tex2.smpl):      7(ptr) Variable UniformConstant
+              46:             TypeInt 32 1
+              47:     46(int) Constant 0
+    50(tex2.tex):     10(ptr) Variable UniformConstant
+              51:     46(int) Constant 1
+              57:             TypePointer Output 11(fvec4)
+58(@entryPointOutput):     57(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-              39:   11(fvec4) FunctionCall 18(@main()
-                              Store 38(@entryPointOutput) 39
+              59:   11(fvec4) FunctionCall 22(@main()
+                              Store 58(@entryPointOutput) 59
                               Return
                               FunctionEnd
 15(lookUp(struct-FxaaTex-p1-t211;):   11(fvec4) Function None 12
-        13(smpl):      7(ptr) FunctionParameter
-         14(tex):     10(ptr) FunctionParameter
+    13(tex.smpl):      7(ptr) FunctionParameter
+     14(tex.tex):     10(ptr) FunctionParameter
               16:             Label
-              20:           9 Load 14(tex)
-              21:           6 Load 13(smpl)
-              23:          22 SampledImage 20 21
-              29:   11(fvec4) ImageSampleExplicitLod 23 27 Lod 28
-                              ReturnValue 29
+              24:           9 Load 14(tex.tex)
+              25:           6 Load 13(tex.smpl)
+              27:          26 SampledImage 24 25
+              33:   11(fvec4) ImageSampleExplicitLod 27 31 Lod 32
+                              ReturnValue 33
                               FunctionEnd
-      18(@main():   11(fvec4) Function None 17
-              19:             Label
-              34:   11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 32(g_tInputTexture_sampler) 33(g_tInputTexture)
-                              ReturnValue 34
+ 19(fillOpaque(): 17(FxaaTex) Function None 18
+              20:             Label
+              40: 17(FxaaTex) Load 39(t)
+                              ReturnValue 40
+                              FunctionEnd
+      22(@main():   11(fvec4) Function None 21
+              23:             Label
+              44: 17(FxaaTex) FunctionCall 19(fillOpaque()
+                              Store 43(flattenTemp) 44
+              48:      7(ptr) AccessChain 43(flattenTemp) 47
+              49:           6 Load 48
+                              Store 45(tex2.smpl) 49
+              52:     10(ptr) AccessChain 43(flattenTemp) 51
+              53:           9 Load 52
+                              Store 50(tex2.tex) 53
+              54:   11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 36(g_tInputTexture_sampler) 37(g_tInputTexture)
+                              ReturnValue 54
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
index 3deaddd..1dbc3c3 100755
--- a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
+++ b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
@@ -3,32 +3,32 @@
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
 0:5    Function Parameters: 
-0:?       'smpl' ( in sampler)
-0:?       'tex' ( in texture2D)
-0:?       'f' ( in float)
+0:?       'tex.smpl' ( in sampler)
+0:?       'tex.tex' ( in texture2D)
+0:?       'tex.f' ( in float)
 0:?     Sequence
 0:6      Branch: Return with expression
 0:6        texture ( temp 4-component vector of float)
 0:6          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             'smpl' ( in sampler)
+0:?             'tex.tex' ( in texture2D)
+0:?             'tex.smpl' ( in sampler)
 0:?           Construct vec2 ( temp 2-component vector of float)
-0:?             'f' ( in float)
-0:?             'f' ( in float)
+0:?             'tex.f' ( in float)
+0:?             'tex.f' ( in float)
 0:10  Function Definition: @main( ( temp 4-component vector of float)
 0:10    Function Parameters: 
 0:?     Sequence
 0:11      Sequence
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:?             'f' ( temp float)
+0:?             'tex.f' ( temp float)
 0:11            Constant:
 0:11              0.500000
 0:12      Branch: Return with expression
 0:12        Function Call: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
 0:?           'g_tInputTexture_sampler' ( uniform sampler)
 0:?           'g_tInputTexture' ( uniform texture2D)
-0:?           'f' ( temp float)
+0:?           'tex.f' ( temp float)
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
 0:?     Sequence
@@ -48,32 +48,32 @@
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
 0:5    Function Parameters: 
-0:?       'smpl' ( in sampler)
-0:?       'tex' ( in texture2D)
-0:?       'f' ( in float)
+0:?       'tex.smpl' ( in sampler)
+0:?       'tex.tex' ( in texture2D)
+0:?       'tex.f' ( in float)
 0:?     Sequence
 0:6      Branch: Return with expression
 0:6        texture ( temp 4-component vector of float)
 0:6          Construct combined texture-sampler ( temp sampler2D)
-0:?             'tex' ( in texture2D)
-0:?             'smpl' ( in sampler)
+0:?             'tex.tex' ( in texture2D)
+0:?             'tex.smpl' ( in sampler)
 0:?           Construct vec2 ( temp 2-component vector of float)
-0:?             'f' ( in float)
-0:?             'f' ( in float)
+0:?             'tex.f' ( in float)
+0:?             'tex.f' ( in float)
 0:10  Function Definition: @main( ( temp 4-component vector of float)
 0:10    Function Parameters: 
 0:?     Sequence
 0:11      Sequence
 0:?         Sequence
 0:11          move second child to first child ( temp float)
-0:?             'f' ( temp float)
+0:?             'tex.f' ( temp float)
 0:11            Constant:
 0:11              0.500000
 0:12      Branch: Return with expression
 0:12        Function Call: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
 0:?           'g_tInputTexture_sampler' ( uniform sampler)
 0:?           'g_tInputTexture' ( uniform texture2D)
-0:?           'f' ( temp float)
+0:?           'tex.f' ( temp float)
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
 0:?     Sequence
@@ -96,11 +96,11 @@
                               Source HLSL 500
                               Name 4  "main"
                               Name 17  "lookUp(struct-FxaaTex-p1-t21-f11;"
-                              Name 14  "smpl"
-                              Name 15  "tex"
-                              Name 16  "f"
+                              Name 14  "tex.smpl"
+                              Name 15  "tex.tex"
+                              Name 16  "tex.f"
                               Name 20  "@main("
-                              Name 34  "f"
+                              Name 34  "tex.f"
                               Name 36  "g_tInputTexture_sampler"
                               Name 37  "g_tInputTexture"
                               Name 38  "param"
@@ -134,25 +134,25 @@
                               Return
                               FunctionEnd
 17(lookUp(struct-FxaaTex-p1-t21-f11;):   12(fvec4) Function None 13
-        14(smpl):      7(ptr) FunctionParameter
-         15(tex):     10(ptr) FunctionParameter
-           16(f):     11(ptr) FunctionParameter
+    14(tex.smpl):      7(ptr) FunctionParameter
+     15(tex.tex):     10(ptr) FunctionParameter
+       16(tex.f):     11(ptr) FunctionParameter
               18:             Label
-              22:           9 Load 15(tex)
-              23:           6 Load 14(smpl)
+              22:           9 Load 15(tex.tex)
+              23:           6 Load 14(tex.smpl)
               25:          24 SampledImage 22 23
-              26:    8(float) Load 16(f)
-              27:    8(float) Load 16(f)
+              26:    8(float) Load 16(tex.f)
+              27:    8(float) Load 16(tex.f)
               29:   28(fvec2) CompositeConstruct 26 27
               31:   12(fvec4) ImageSampleExplicitLod 25 29 Lod 30
                               ReturnValue 31
                               FunctionEnd
       20(@main():   12(fvec4) Function None 19
               21:             Label
-           34(f):     11(ptr) Variable Function
+       34(tex.f):     11(ptr) Variable Function
        38(param):     11(ptr) Variable Function
-                              Store 34(f) 35
-              39:    8(float) Load 34(f)
+                              Store 34(tex.f) 35
+              39:    8(float) Load 34(tex.f)
                               Store 38(param) 39
               40:   12(fvec4) FunctionCall 17(lookUp(struct-FxaaTex-p1-t21-f11;) 36(g_tInputTexture_sampler) 37(g_tInputTexture) 38(param)
                               ReturnValue 40
diff --git a/Test/baseResults/hlsl.gather.array.dx10.frag.out b/Test/baseResults/hlsl.gather.array.dx10.frag.out
index 5f9a1ca..1f5164c 100644
--- a/Test/baseResults/hlsl.gather.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.array.dx10.frag.out
@@ -101,13 +101,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -124,8 +124,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -233,13 +233,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -256,8 +256,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -291,8 +291,8 @@
                               Name 84  "g_tTexcdu4a"
                               Name 95  "psout"
                               Name 104  "flattenTemp"
-                              Name 107  "Color"
-                              Name 111  "Depth"
+                              Name 107  "@entryPointOutput.Color"
+                              Name 111  "@entryPointOutput.Depth"
                               Name 116  "g_tTex1df4a"
                               Name 117  "g_tTex1df4"
                               Name 120  "g_tTex1di4a"
@@ -305,8 +305,8 @@
                               Decorate 64(g_tTexcdf4a) DescriptorSet 0
                               Decorate 74(g_tTexcdi4a) DescriptorSet 0
                               Decorate 84(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 107(Color) Location 0
-                              Decorate 111(Depth) BuiltIn FragDepth
+                              Decorate 107(@entryPointOutput.Color) Location 0
+                              Decorate 111(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 116(g_tTex1df4a) DescriptorSet 0
                               Decorate 116(g_tTex1df4a) Binding 1
                               Decorate 117(g_tTex1df4) DescriptorSet 0
@@ -376,9 +376,9 @@
               98:     29(int) Constant 1
               99:             TypePointer Function 6(float)
              106:             TypePointer Output 7(fvec4)
-      107(Color):    106(ptr) Variable Output
+107(@entryPointOutput.Color):    106(ptr) Variable Output
              110:             TypePointer Output 6(float)
-      111(Depth):    110(ptr) Variable Output
+111(@entryPointOutput.Depth):    110(ptr) Variable Output
              114:             TypeImage 6(float) 1D array sampled format:Unknown
              115:             TypePointer UniformConstant 114
 116(g_tTex1df4a):    115(ptr) Variable UniformConstant
@@ -396,10 +396,10 @@
                               Store 104(flattenTemp) 105
              108:     12(ptr) AccessChain 104(flattenTemp) 30
              109:    7(fvec4) Load 108
-                              Store 107(Color) 109
+                              Store 107(@entryPointOutput.Color) 109
              112:     99(ptr) AccessChain 104(flattenTemp) 98
              113:    6(float) Load 112
-                              Store 111(Depth) 113
+                              Store 111(@entryPointOutput.Depth) 113
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.frag.out b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
index c011f56..73bd6e1 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
@@ -95,13 +95,13 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:29          Color: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:29          Depth: direct index for structure ( temp float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
@@ -122,8 +122,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -225,13 +225,13 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:29          Color: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:29          Depth: direct index for structure ( temp float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
@@ -252,8 +252,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -286,8 +286,8 @@
                               Name 84  "g_tTexcdu4"
                               Name 95  "psout"
                               Name 105  "flattenTemp"
-                              Name 108  "Color"
-                              Name 112  "Depth"
+                              Name 108  "@entryPointOutput.Color"
+                              Name 112  "@entryPointOutput.Depth"
                               Name 115  "g_sSamp2d"
                               Name 118  "g_tTex1df4a"
                               Name 119  "g_tTex1df4"
@@ -304,8 +304,8 @@
                               Decorate 63(g_tTexcdf4) DescriptorSet 0
                               Decorate 74(g_tTexcdi4) DescriptorSet 0
                               Decorate 84(g_tTexcdu4) DescriptorSet 0
-                              Decorate 108(Color) Location 0
-                              Decorate 112(Depth) BuiltIn FragDepth
+                              Decorate 108(@entryPointOutput.Color) Location 0
+                              Decorate 112(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 115(g_sSamp2d) DescriptorSet 0
                               Decorate 118(g_tTex1df4a) DescriptorSet 0
                               Decorate 118(g_tTex1df4a) Binding 1
@@ -380,9 +380,9 @@
               99:     28(int) Constant 1
              100:             TypePointer Function 6(float)
              107:             TypePointer Output 7(fvec4)
-      108(Color):    107(ptr) Variable Output
+108(@entryPointOutput.Color):    107(ptr) Variable Output
              111:             TypePointer Output 6(float)
-      112(Depth):    111(ptr) Variable Output
+112(@entryPointOutput.Depth):    111(ptr) Variable Output
   115(g_sSamp2d):     19(ptr) Variable UniformConstant
              116:             TypeImage 6(float) 1D sampled format:Unknown
              117:             TypePointer UniformConstant 116
@@ -410,10 +410,10 @@
                               Store 105(flattenTemp) 106
              109:     12(ptr) AccessChain 105(flattenTemp) 29
              110:    7(fvec4) Load 109
-                              Store 108(Color) 110
+                              Store 108(@entryPointOutput.Color) 110
              113:    100(ptr) AccessChain 105(flattenTemp) 99
              114:    6(float) Load 113
-                              Store 112(Depth) 114
+                              Store 112(@entryPointOutput.Depth) 114
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.vert.out b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
index 46fb13c..51154ca 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
@@ -84,7 +84,7 @@
 0:?     Sequence
 0:28      Sequence
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:28          Pos: direct index for structure ( temp 4-component vector of float)
 0:28            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:28            Constant:
@@ -105,7 +105,7 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -196,7 +196,7 @@
 0:?     Sequence
 0:28      Sequence
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:28          Pos: direct index for structure ( temp 4-component vector of float)
 0:28            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:28            Constant:
@@ -217,17 +217,17 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 129
+// Id's are bound by 126
 
                               Capability Shader
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 103 128
+                              EntryPoint Vertex 4  "main" 103
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -247,7 +247,7 @@
                               Name 81  "txval42"
                               Name 84  "g_tTexcdu4"
                               Name 95  "vsout"
-                              Name 103  "@entryPointOutput_Pos"
+                              Name 103  "@entryPointOutput.Pos"
                               Name 106  "g_sSamp2d"
                               Name 109  "g_tTex1df4a"
                               Name 110  "g_tTex1df4"
@@ -256,8 +256,6 @@
                               Name 119  "g_tTex3df4"
                               Name 122  "g_tTex3di4"
                               Name 125  "g_tTex3du4"
-                              Name 126  "VS_OUTPUT"
-                              Name 128  "@entryPointOutput"
                               Decorate 16(g_tTex2df4) DescriptorSet 0
                               Decorate 20(g_sSamp) DescriptorSet 0
                               Decorate 20(g_sSamp) Binding 0
@@ -266,7 +264,7 @@
                               Decorate 63(g_tTexcdf4) DescriptorSet 0
                               Decorate 74(g_tTexcdi4) DescriptorSet 0
                               Decorate 84(g_tTexcdu4) DescriptorSet 0
-                              Decorate 103(@entryPointOutput_Pos) BuiltIn Position
+                              Decorate 103(@entryPointOutput.Pos) BuiltIn Position
                               Decorate 106(g_sSamp2d) DescriptorSet 0
                               Decorate 109(g_tTex1df4a) DescriptorSet 0
                               Decorate 109(g_tTex1df4a) Binding 1
@@ -277,7 +275,6 @@
                               Decorate 119(g_tTex3df4) DescriptorSet 0
                               Decorate 122(g_tTex3di4) DescriptorSet 0
                               Decorate 125(g_tTex3du4) DescriptorSet 0
-                              Decorate 128(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -340,7 +337,7 @@
               96:    6(float) Constant 0
               97:    7(fvec4) ConstantComposite 96 96 96 96
              102:             TypePointer Output 7(fvec4)
-103(@entryPointOutput_Pos):    102(ptr) Variable Output
+103(@entryPointOutput.Pos):    102(ptr) Variable Output
   106(g_sSamp2d):     19(ptr) Variable UniformConstant
              107:             TypeImage 6(float) 1D sampled format:Unknown
              108:             TypePointer UniformConstant 107
@@ -361,14 +358,11 @@
              123:             TypeImage 45(int) 3D sampled format:Unknown
              124:             TypePointer UniformConstant 123
  125(g_tTex3du4):    124(ptr) Variable UniformConstant
-  126(VS_OUTPUT):             TypeStruct
-             127:             TypePointer Output 126(VS_OUTPUT)
-128(@entryPointOutput):    127(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              104:8(VS_OUTPUT) FunctionCall 10(@main()
              105:    7(fvec4) CompositeExtract 104 0
-                              Store 103(@entryPointOutput_Pos) 105
+                              Store 103(@entryPointOutput.Pos) 105
                               Return
                               FunctionEnd
       10(@main():8(VS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gather.offset.dx10.frag.out b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
index 8ed1c07..1e633e8 100644
--- a/Test/baseResults/hlsl.gather.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
@@ -71,13 +71,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -97,8 +97,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -176,13 +176,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -202,8 +202,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -230,8 +230,8 @@
                               Name 55  "g_tTex2du4"
                               Name 67  "psout"
                               Name 76  "flattenTemp"
-                              Name 79  "Color"
-                              Name 83  "Depth"
+                              Name 79  "@entryPointOutput.Color"
+                              Name 83  "@entryPointOutput.Depth"
                               Name 88  "g_tTex1df4a"
                               Name 89  "g_tTex1df4"
                               Name 92  "g_tTex1di4"
@@ -247,8 +247,8 @@
                               Decorate 20(g_sSamp) Binding 0
                               Decorate 39(g_tTex2di4) DescriptorSet 0
                               Decorate 55(g_tTex2du4) DescriptorSet 0
-                              Decorate 79(Color) Location 0
-                              Decorate 83(Depth) BuiltIn FragDepth
+                              Decorate 79(@entryPointOutput.Color) Location 0
+                              Decorate 83(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 88(g_tTex1df4a) DescriptorSet 0
                               Decorate 88(g_tTex1df4a) Binding 1
                               Decorate 89(g_tTex1df4) DescriptorSet 0
@@ -311,9 +311,9 @@
               69:    7(fvec4) ConstantComposite 68 68 68 68
               71:             TypePointer Function 6(float)
               78:             TypePointer Output 7(fvec4)
-       79(Color):     78(ptr) Variable Output
+79(@entryPointOutput.Color):     78(ptr) Variable Output
               82:             TypePointer Output 6(float)
-       83(Depth):     82(ptr) Variable Output
+83(@entryPointOutput.Depth):     82(ptr) Variable Output
               86:             TypeImage 6(float) 1D sampled format:Unknown
               87:             TypePointer UniformConstant 86
  88(g_tTex1df4a):     87(ptr) Variable UniformConstant
@@ -349,10 +349,10 @@
                               Store 76(flattenTemp) 77
               80:     12(ptr) AccessChain 76(flattenTemp) 31
               81:    7(fvec4) Load 80
-                              Store 79(Color) 81
+                              Store 79(@entryPointOutput.Color) 81
               84:     71(ptr) AccessChain 76(flattenTemp) 30
               85:    6(float) Load 84
-                              Store 83(Depth) 85
+                              Store 83(@entryPointOutput.Depth) 85
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
index 73ecae0..85ea585 100644
--- a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
@@ -74,13 +74,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -94,8 +94,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -176,13 +176,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -196,8 +196,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -224,8 +224,8 @@
                               Name 55  "g_tTex2du4"
                               Name 68  "psout"
                               Name 77  "flattenTemp"
-                              Name 80  "Color"
-                              Name 84  "Depth"
+                              Name 80  "@entryPointOutput.Color"
+                              Name 84  "@entryPointOutput.Depth"
                               Name 89  "g_tTex1df4a"
                               Name 90  "g_tTex1df4"
                               Name 93  "g_tTex1di4"
@@ -235,8 +235,8 @@
                               Decorate 20(g_sSamp) Binding 0
                               Decorate 40(g_tTex2di4) DescriptorSet 0
                               Decorate 55(g_tTex2du4) DescriptorSet 0
-                              Decorate 80(Color) Location 0
-                              Decorate 84(Depth) BuiltIn FragDepth
+                              Decorate 80(@entryPointOutput.Color) Location 0
+                              Decorate 84(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 89(g_tTex1df4a) DescriptorSet 0
                               Decorate 89(g_tTex1df4a) Binding 1
                               Decorate 90(g_tTex1df4) DescriptorSet 0
@@ -294,9 +294,9 @@
               70:    7(fvec4) ConstantComposite 69 69 69 69
               72:             TypePointer Function 6(float)
               79:             TypePointer Output 7(fvec4)
-       80(Color):     79(ptr) Variable Output
+80(@entryPointOutput.Color):     79(ptr) Variable Output
               83:             TypePointer Output 6(float)
-       84(Depth):     83(ptr) Variable Output
+84(@entryPointOutput.Depth):     83(ptr) Variable Output
               87:             TypeImage 6(float) 1D array sampled format:Unknown
               88:             TypePointer UniformConstant 87
  89(g_tTex1df4a):     88(ptr) Variable UniformConstant
@@ -314,10 +314,10 @@
                               Store 77(flattenTemp) 78
               81:     12(ptr) AccessChain 77(flattenTemp) 32
               82:    7(fvec4) Load 81
-                              Store 80(Color) 82
+                              Store 80(@entryPointOutput.Color) 82
               85:     72(ptr) AccessChain 77(flattenTemp) 31
               86:    6(float) Load 85
-                              Store 84(Depth) 86
+                              Store 84(@entryPointOutput.Depth) 86
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
index 675e178..d80e59d 100644
--- a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
@@ -344,13 +344,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -368,8 +368,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -720,13 +720,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -744,8 +744,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -803,8 +803,8 @@
                               Name 218  "txval72"
                               Name 226  "psout"
                               Name 235  "flattenTemp"
-                              Name 238  "Color"
-                              Name 242  "Depth"
+                              Name 238  "@entryPointOutput.Color"
+                              Name 242  "@entryPointOutput.Depth"
                               Name 245  "g_sSamp2d"
                               Name 248  "g_tTex1df4a"
                               Name 251  "g_tTex1di4a"
@@ -823,8 +823,8 @@
                               Decorate 131(g_tTexcdf4a) DescriptorSet 0
                               Decorate 143(g_tTexcdi4a) DescriptorSet 0
                               Decorate 154(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 238(Color) Location 0
-                              Decorate 242(Depth) BuiltIn FragDepth
+                              Decorate 238(@entryPointOutput.Color) Location 0
+                              Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 245(g_sSamp2d) DescriptorSet 0
                               Decorate 248(g_tTex1df4a) DescriptorSet 0
                               Decorate 248(g_tTex1df4a) Binding 0
@@ -886,9 +886,9 @@
              228:    7(fvec4) ConstantComposite 227 227 227 227
              230:             TypePointer Function 6(float)
              237:             TypePointer Output 7(fvec4)
-      238(Color):    237(ptr) Variable Output
+238(@entryPointOutput.Color):    237(ptr) Variable Output
              241:             TypePointer Output 6(float)
-      242(Depth):    241(ptr) Variable Output
+242(@entryPointOutput.Depth):    241(ptr) Variable Output
   245(g_sSamp2d):     19(ptr) Variable UniformConstant
              246:             TypeImage 6(float) 1D array sampled format:Unknown
              247:             TypePointer UniformConstant 246
@@ -906,10 +906,10 @@
                               Store 235(flattenTemp) 236
              239:     12(ptr) AccessChain 235(flattenTemp) 34
              240:    7(fvec4) Load 239
-                              Store 238(Color) 240
+                              Store 238(@entryPointOutput.Color) 240
              243:    230(ptr) AccessChain 235(flattenTemp) 69
              244:    6(float) Load 243
-                              Store 242(Depth) 244
+                              Store 242(@entryPointOutput.Depth) 244
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
index 4d5da52..ab1d45b 100644
--- a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
@@ -344,13 +344,13 @@
 0:34          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:34          Color: direct index for structure ( temp 4-component vector of float)
 0:34            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34            Constant:
 0:34              0 (const int)
 0:34        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:34          Depth: direct index for structure ( temp float)
 0:34            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34            Constant:
@@ -372,8 +372,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -724,13 +724,13 @@
 0:34          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:34          Color: direct index for structure ( temp 4-component vector of float)
 0:34            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34            Constant:
 0:34              0 (const int)
 0:34        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:34          Depth: direct index for structure ( temp float)
 0:34            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:34            Constant:
@@ -752,8 +752,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -810,8 +810,8 @@
                               Name 218  "txval72"
                               Name 226  "psout"
                               Name 235  "flattenTemp"
-                              Name 238  "Color"
-                              Name 242  "Depth"
+                              Name 238  "@entryPointOutput.Color"
+                              Name 242  "@entryPointOutput.Depth"
                               Name 245  "g_sSamp2d"
                               Name 248  "g_tTex1df4a"
                               Name 249  "g_tTex1df4"
@@ -834,8 +834,8 @@
                               Decorate 131(g_tTexcdf4) DescriptorSet 0
                               Decorate 143(g_tTexcdi4) DescriptorSet 0
                               Decorate 154(g_tTexcdu4) DescriptorSet 0
-                              Decorate 238(Color) Location 0
-                              Decorate 242(Depth) BuiltIn FragDepth
+                              Decorate 238(@entryPointOutput.Color) Location 0
+                              Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 245(g_sSamp2d) DescriptorSet 0
                               Decorate 248(g_tTex1df4a) DescriptorSet 0
                               Decorate 248(g_tTex1df4a) Binding 1
@@ -902,9 +902,9 @@
              228:    7(fvec4) ConstantComposite 227 227 227 227
              230:             TypePointer Function 6(float)
              237:             TypePointer Output 7(fvec4)
-      238(Color):    237(ptr) Variable Output
+238(@entryPointOutput.Color):    237(ptr) Variable Output
              241:             TypePointer Output 6(float)
-      242(Depth):    241(ptr) Variable Output
+242(@entryPointOutput.Depth):    241(ptr) Variable Output
   245(g_sSamp2d):     19(ptr) Variable UniformConstant
              246:             TypeImage 6(float) 1D sampled format:Unknown
              247:             TypePointer UniformConstant 246
@@ -932,10 +932,10 @@
                               Store 235(flattenTemp) 236
              239:     12(ptr) AccessChain 235(flattenTemp) 34
              240:    7(fvec4) Load 239
-                              Store 238(Color) 240
+                              Store 238(@entryPointOutput.Color) 240
              243:    230(ptr) AccessChain 235(flattenTemp) 30
              244:    6(float) Load 243
-                              Store 242(Depth) 244
+                              Store 242(@entryPointOutput.Depth) 244
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
index a4fd588..8b8a610 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
@@ -596,13 +596,13 @@
 0:39          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:39          Color: direct index for structure ( temp 4-component vector of float)
 0:39            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39            Constant:
 0:39              0 (const int)
 0:39        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:39          Depth: direct index for structure ( temp float)
 0:39            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39            Constant:
@@ -624,8 +624,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1228,13 +1228,13 @@
 0:39          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:39          Color: direct index for structure ( temp 4-component vector of float)
 0:39            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39            Constant:
 0:39              0 (const int)
 0:39        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:39          Depth: direct index for structure ( temp float)
 0:39            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:39            Constant:
@@ -1256,8 +1256,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -1316,8 +1316,8 @@
                               Name 334  "txval324"
                               Name 351  "psout"
                               Name 360  "flattenTemp"
-                              Name 363  "Color"
-                              Name 367  "Depth"
+                              Name 363  "@entryPointOutput.Color"
+                              Name 367  "@entryPointOutput.Depth"
                               Name 370  "g_sSamp2d"
                               Name 373  "g_tTex1df4a"
                               Name 374  "g_tTex1df4"
@@ -1344,8 +1344,8 @@
                               Decorate 32 DescriptorSet 0
                               Decorate 47(g_tTex2di4) DescriptorSet 0
                               Decorate 63(g_tTex2du4) DescriptorSet 0
-                              Decorate 363(Color) Location 0
-                              Decorate 367(Depth) BuiltIn FragDepth
+                              Decorate 363(@entryPointOutput.Color) Location 0
+                              Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 370(g_sSamp2d) DescriptorSet 0
                               Decorate 373(g_tTex1df4a) DescriptorSet 0
                               Decorate 373(g_tTex1df4a) Binding 1
@@ -1408,9 +1408,9 @@
              353:    7(fvec4) ConstantComposite 352 352 352 352
              355:             TypePointer Function 6(float)
              362:             TypePointer Output 7(fvec4)
-      363(Color):    362(ptr) Variable Output
+363(@entryPointOutput.Color):    362(ptr) Variable Output
              366:             TypePointer Output 6(float)
-      367(Depth):    366(ptr) Variable Output
+367(@entryPointOutput.Depth):    366(ptr) Variable Output
   370(g_sSamp2d):     19(ptr) Variable UniformConstant
              371:             TypeImage 6(float) 1D sampled format:Unknown
              372:             TypePointer UniformConstant 371
@@ -1447,10 +1447,10 @@
                               Store 360(flattenTemp) 361
              364:     12(ptr) AccessChain 360(flattenTemp) 41
              365:    7(fvec4) Load 364
-                              Store 363(Color) 365
+                              Store 363(@entryPointOutput.Color) 365
              368:    355(ptr) AccessChain 360(flattenTemp) 33
              369:    6(float) Load 368
-                              Store 367(Depth) 369
+                              Store 367(@entryPointOutput.Depth) 369
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
index 23d26cc..f7bd523 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
@@ -596,13 +596,13 @@
 0:33          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:33          Color: direct index for structure ( temp 4-component vector of float)
 0:33            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33            Constant:
 0:33              0 (const int)
 0:33        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:33          Depth: direct index for structure ( temp float)
 0:33            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33            Constant:
@@ -620,8 +620,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1224,13 +1224,13 @@
 0:33          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:33          Color: direct index for structure ( temp 4-component vector of float)
 0:33            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33            Constant:
 0:33              0 (const int)
 0:33        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:33          Depth: direct index for structure ( temp float)
 0:33            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:33            Constant:
@@ -1248,8 +1248,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -1309,8 +1309,8 @@
                               Name 334  "txval324"
                               Name 351  "psout"
                               Name 360  "flattenTemp"
-                              Name 363  "Color"
-                              Name 367  "Depth"
+                              Name 363  "@entryPointOutput.Color"
+                              Name 367  "@entryPointOutput.Depth"
                               Name 370  "g_sSamp2d"
                               Name 373  "g_tTex1df4a"
                               Name 376  "g_tTex1di4a"
@@ -1333,8 +1333,8 @@
                               Decorate 32 DescriptorSet 0
                               Decorate 47(g_tTex2di4a) DescriptorSet 0
                               Decorate 63(g_tTex2du4a) DescriptorSet 0
-                              Decorate 363(Color) Location 0
-                              Decorate 367(Depth) BuiltIn FragDepth
+                              Decorate 363(@entryPointOutput.Color) Location 0
+                              Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 370(g_sSamp2d) DescriptorSet 0
                               Decorate 373(g_tTex1df4a) DescriptorSet 0
                               Decorate 373(g_tTex1df4a) Binding 0
@@ -1392,9 +1392,9 @@
              353:    7(fvec4) ConstantComposite 352 352 352 352
              355:             TypePointer Function 6(float)
              362:             TypePointer Output 7(fvec4)
-      363(Color):    362(ptr) Variable Output
+363(@entryPointOutput.Color):    362(ptr) Variable Output
              366:             TypePointer Output 6(float)
-      367(Depth):    366(ptr) Variable Output
+367(@entryPointOutput.Depth):    366(ptr) Variable Output
   370(g_sSamp2d):     19(ptr) Variable UniformConstant
              371:             TypeImage 6(float) 1D array sampled format:Unknown
              372:             TypePointer UniformConstant 371
@@ -1421,10 +1421,10 @@
                               Store 360(flattenTemp) 361
              364:     12(ptr) AccessChain 360(flattenTemp) 41
              365:    7(fvec4) Load 364
-                              Store 363(Color) 365
+                              Store 363(@entryPointOutput.Color) 365
              368:    355(ptr) AccessChain 360(flattenTemp) 131
              369:    6(float) Load 368
-                              Store 367(Depth) 369
+                              Store 367(@entryPointOutput.Depth) 369
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
index 0704ee0..996e070 100644
--- a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
@@ -194,13 +194,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -221,8 +221,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -423,13 +423,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -450,8 +450,8 @@
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform float c1,  uniform 2-component vector of float c2,  uniform 3-component vector of float c3,  uniform 4-component vector of float c4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -490,8 +490,8 @@
                               Name 112  "txval421"
                               Name 120  "psout"
                               Name 129  "flattenTemp"
-                              Name 132  "Color"
-                              Name 136  "Depth"
+                              Name 132  "@entryPointOutput.Color"
+                              Name 136  "@entryPointOutput.Depth"
                               Name 141  "g_tTex1df4a"
                               Name 142  "g_tTex1df4"
                               Name 145  "g_tTex1di4"
@@ -513,8 +513,8 @@
                               Decorate 29 DescriptorSet 0
                               Decorate 45(g_tTex2di4) DescriptorSet 0
                               Decorate 62(g_tTex2du4) DescriptorSet 0
-                              Decorate 132(Color) Location 0
-                              Decorate 136(Depth) BuiltIn FragDepth
+                              Decorate 132(@entryPointOutput.Color) Location 0
+                              Decorate 136(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 141(g_tTex1df4a) DescriptorSet 0
                               Decorate 141(g_tTex1df4a) Binding 1
                               Decorate 142(g_tTex1df4) DescriptorSet 0
@@ -582,9 +582,9 @@
              122:    7(fvec4) ConstantComposite 121 121 121 121
              124:             TypePointer Function 6(float)
              131:             TypePointer Output 7(fvec4)
-      132(Color):    131(ptr) Variable Output
+132(@entryPointOutput.Color):    131(ptr) Variable Output
              135:             TypePointer Output 6(float)
-      136(Depth):    135(ptr) Variable Output
+136(@entryPointOutput.Depth):    135(ptr) Variable Output
              139:             TypeImage 6(float) 1D sampled format:Unknown
              140:             TypePointer UniformConstant 139
 141(g_tTex1df4a):    140(ptr) Variable UniformConstant
@@ -620,10 +620,10 @@
                               Store 129(flattenTemp) 130
              133:     12(ptr) AccessChain 129(flattenTemp) 37
              134:    7(fvec4) Load 133
-                              Store 132(Color) 134
+                              Store 132(@entryPointOutput.Color) 134
              137:    124(ptr) AccessChain 129(flattenTemp) 31
              138:    6(float) Load 137
-                              Store 136(Depth) 138
+                              Store 136(@entryPointOutput.Depth) 138
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
index c3986d7..3780bd3 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
@@ -1112,13 +1112,13 @@
 0:46          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:46          Color: direct index for structure ( temp 4-component vector of float)
 0:46            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46            Constant:
 0:46              0 (const int)
 0:46        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:46          Depth: direct index for structure ( temp float)
 0:46            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46            Constant:
@@ -1152,8 +1152,8 @@
 0:?     'g_tTex2dmsf4a' ( uniform texture2DMSArray)
 0:?     'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -2272,13 +2272,13 @@
 0:46          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:46          Color: direct index for structure ( temp 4-component vector of float)
 0:46            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46            Constant:
 0:46              0 (const int)
 0:46        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:46          Depth: direct index for structure ( temp float)
 0:46            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:46            Constant:
@@ -2312,8 +2312,8 @@
 0:?     'g_tTex2dmsf4a' ( uniform texture2DMSArray)
 0:?     'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -2322,7 +2322,6 @@
                               Capability Shader
                               Capability Sampled1D
                               Capability SampledCubeArray
-                              Capability ImageMSArray
                               Capability ImageQuery
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
@@ -2417,8 +2416,8 @@
                               Name 514  "g_tTex2dmsu4a"
                               Name 526  "psout"
                               Name 537  "flattenTemp"
-                              Name 540  "Color"
-                              Name 544  "Depth"
+                              Name 540  "@entryPointOutput.Color"
+                              Name 544  "@entryPointOutput.Depth"
                               Name 549  "g_sSamp"
                               Decorate 17(g_tTex1df4) DescriptorSet 0
                               Decorate 17(g_tTex1df4) Binding 0
@@ -2448,8 +2447,8 @@
                               Decorate 486(g_tTex2dmsf4a) DescriptorSet 0
                               Decorate 500(g_tTex2dmsi4a) DescriptorSet 0
                               Decorate 514(g_tTex2dmsu4a) DescriptorSet 0
-                              Decorate 540(Color) Location 0
-                              Decorate 544(Depth) BuiltIn FragDepth
+                              Decorate 540(@entryPointOutput.Color) Location 0
+                              Decorate 544(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 549(g_sSamp) DescriptorSet 0
                               Decorate 549(g_sSamp) Binding 0
                2:             TypeVoid
@@ -2558,9 +2557,9 @@
              531:     19(int) Constant 1
              532:             TypePointer Function 6(float)
              539:             TypePointer Output 7(fvec4)
-      540(Color):    539(ptr) Variable Output
+540(@entryPointOutput.Color):    539(ptr) Variable Output
              543:             TypePointer Output 6(float)
-      544(Depth):    543(ptr) Variable Output
+544(@entryPointOutput.Depth):    543(ptr) Variable Output
              547:             TypeSampler
              548:             TypePointer UniformConstant 547
     549(g_sSamp):    548(ptr) Variable UniformConstant
@@ -2571,10 +2570,10 @@
                               Store 537(flattenTemp) 538
              541:    529(ptr) AccessChain 537(flattenTemp) 20
              542:    7(fvec4) Load 541
-                              Store 540(Color) 542
+                              Store 540(@entryPointOutput.Color) 542
              545:    532(ptr) AccessChain 537(flattenTemp) 531
              546:    6(float) Load 545
-                              Store 544(Depth) 546
+                              Store 544(@entryPointOutput.Depth) 546
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.vert.out b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
index cb1eae6..275cece 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.vert.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
@@ -45,7 +45,7 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:11          Pos: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:11            Constant:
@@ -53,7 +53,7 @@
 0:?   Linker Objects
 0:?     'g_sSamp' (layout( binding=0) uniform sampler)
 0:?     'g_tTex1df4' (layout( binding=0) uniform texture1D)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -105,7 +105,7 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:11          Pos: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:11            Constant:
@@ -113,18 +113,18 @@
 0:?   Linker Objects
 0:?     'g_sSamp' (layout( binding=0) uniform sampler)
 0:?     'g_tTex1df4' (layout( binding=0) uniform texture1D)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 51
+// Id's are bound by 48
 
                               Capability Shader
                               Capability Sampled1D
                               Capability ImageQuery
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 42 50
+                              EntryPoint Vertex 4  "main" 42
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -136,16 +136,13 @@
                               Name 24  "sizeQueryTemp"
                               Name 29  "NumberOfLevelsU"
                               Name 33  "vsout"
-                              Name 42  "@entryPointOutput_Pos"
+                              Name 42  "@entryPointOutput.Pos"
                               Name 47  "g_sSamp"
-                              Name 48  "VS_OUTPUT"
-                              Name 50  "@entryPointOutput"
                               Decorate 17(g_tTex1df4) DescriptorSet 0
                               Decorate 17(g_tTex1df4) Binding 0
-                              Decorate 42(@entryPointOutput_Pos) BuiltIn Position
+                              Decorate 42(@entryPointOutput.Pos) BuiltIn Position
                               Decorate 47(g_sSamp) DescriptorSet 0
                               Decorate 47(g_sSamp) Binding 0
-                              Decorate 50(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -165,18 +162,15 @@
               35:    7(fvec4) ConstantComposite 34 34 34 34
               36:             TypePointer Function 7(fvec4)
               41:             TypePointer Output 7(fvec4)
-42(@entryPointOutput_Pos):     41(ptr) Variable Output
+42(@entryPointOutput.Pos):     41(ptr) Variable Output
               45:             TypeSampler
               46:             TypePointer UniformConstant 45
      47(g_sSamp):     46(ptr) Variable UniformConstant
-   48(VS_OUTPUT):             TypeStruct
-              49:             TypePointer Output 48(VS_OUTPUT)
-50(@entryPointOutput):     49(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               43:8(VS_OUTPUT) FunctionCall 10(@main()
               44:    7(fvec4) CompositeExtract 43 0
-                              Store 42(@entryPointOutput_Pos) 44
+                              Store 42(@entryPointOutput.Pos) 44
                               Return
                               FunctionEnd
       10(@main():8(VS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
index 67b2f8f..b301a61 100644
--- a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
@@ -320,13 +320,13 @@
 0:44          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:44          Color: direct index for structure ( temp 4-component vector of float)
 0:44            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44            Constant:
 0:44              0 (const int)
 0:44        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:44          Depth: direct index for structure ( temp float)
 0:44            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44            Constant:
@@ -352,8 +352,8 @@
 0:?     'g_tBuffI' (layout( rgba32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -680,13 +680,13 @@
 0:44          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:44          Color: direct index for structure ( temp 4-component vector of float)
 0:44            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44            Constant:
 0:44              0 (const int)
 0:44        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:44          Depth: direct index for structure ( temp float)
 0:44            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:44            Constant:
@@ -712,16 +712,16 @@
 0:?     'g_tBuffI' (layout( rgba32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 232
 
                               Capability Shader
-                              Capability Sampled1D
-                              Capability SampledBuffer
+                              Capability Image1D
+                              Capability ImageBuffer
                               Capability ImageQuery
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
@@ -775,8 +775,8 @@
                               Name 191  "g_tTex3du4"
                               Name 201  "psout"
                               Name 213  "flattenTemp"
-                              Name 216  "Color"
-                              Name 220  "Depth"
+                              Name 216  "@entryPointOutput.Color"
+                              Name 220  "@entryPointOutput.Depth"
                               Name 225  "g_sSamp"
                               Name 229  "$Global"
                               MemberName 229($Global) 0  "c1"
@@ -807,8 +807,8 @@
                               Decorate 166(g_tTex3df4) DescriptorSet 0
                               Decorate 179(g_tTex3di4) DescriptorSet 0
                               Decorate 191(g_tTex3du4) DescriptorSet 0
-                              Decorate 216(Color) Location 0
-                              Decorate 220(Depth) BuiltIn FragDepth
+                              Decorate 216(@entryPointOutput.Color) Location 0
+                              Decorate 220(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 225(g_sSamp) DescriptorSet 0
                               Decorate 225(g_sSamp) Binding 0
                               MemberDecorate 229($Global) 0 Offset 0
@@ -899,9 +899,9 @@
              207:     23(int) Constant 1
              208:             TypePointer Function 6(float)
              215:             TypePointer Output 7(fvec4)
-      216(Color):    215(ptr) Variable Output
+216(@entryPointOutput.Color):    215(ptr) Variable Output
              219:             TypePointer Output 6(float)
-      220(Depth):    219(ptr) Variable Output
+220(@entryPointOutput.Depth):    219(ptr) Variable Output
              223:             TypeSampler
              224:             TypePointer UniformConstant 223
     225(g_sSamp):    224(ptr) Variable UniformConstant
@@ -918,10 +918,10 @@
                               Store 213(flattenTemp) 214
              217:    205(ptr) AccessChain 213(flattenTemp) 202
              218:    7(fvec4) Load 217
-                              Store 216(Color) 218
+                              Store 216(@entryPointOutput.Color) 218
              221:    208(ptr) AccessChain 213(flattenTemp) 207
              222:    6(float) Load 221
-                              Store 220(Depth) 222
+                              Store 220(@entryPointOutput.Depth) 222
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
index 3f346d4..12fe30c 100644
--- a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
+++ b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
@@ -267,13 +267,13 @@
 0:13          Function Call: @main(i1; ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:?             'sample' ( temp int)
 0:13        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:13          Color: direct index for structure ( temp 4-component vector of float)
 0:13            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:13          Depth: direct index for structure ( temp float)
 0:13            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:13            Constant:
@@ -282,8 +282,8 @@
 0:?     'g_sSamp' (layout( binding=0) uniform sampler)
 0:?     'g_tTex2dmsf4' ( uniform texture2DMS)
 0:?     'g_tTex2dmsf4a' ( uniform texture2DMSArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'sample' (layout( location=0) flat in int)
 
 
@@ -558,13 +558,13 @@
 0:13          Function Call: @main(i1; ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:?             'sample' ( temp int)
 0:13        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:13          Color: direct index for structure ( temp 4-component vector of float)
 0:13            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:13            Constant:
 0:13              0 (const int)
 0:13        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:13          Depth: direct index for structure ( temp float)
 0:13            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:13            Constant:
@@ -573,8 +573,8 @@
 0:?     'g_sSamp' (layout( binding=0) uniform sampler)
 0:?     'g_tTex2dmsf4' ( uniform texture2DMS)
 0:?     'g_tTex2dmsf4a' ( uniform texture2DMSArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'sample' (layout( location=0) flat in int)
 
 // Module Version 10000
@@ -582,7 +582,6 @@
 // Id's are bound by 221
 
                               Capability Shader
-                              Capability ImageMSArray
                               Capability ImageQuery
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
@@ -614,15 +613,15 @@
                               Name 204  "sample"
                               Name 206  "flattenTemp"
                               Name 207  "param"
-                              Name 211  "Color"
-                              Name 215  "Depth"
+                              Name 211  "@entryPointOutput.Color"
+                              Name 215  "@entryPointOutput.Depth"
                               Name 220  "g_sSamp"
                               Decorate 23(g_tTex2dmsf4) DescriptorSet 0
                               Decorate 142(g_tTex2dmsf4a) DescriptorSet 0
                               Decorate 204(sample) Flat
                               Decorate 204(sample) Location 0
-                              Decorate 211(Color) Location 0
-                              Decorate 215(Depth) BuiltIn FragDepth
+                              Decorate 211(@entryPointOutput.Color) Location 0
+                              Decorate 215(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 220(g_sSamp) DescriptorSet 0
                               Decorate 220(g_sSamp) Binding 0
                2:             TypeVoid
@@ -721,9 +720,9 @@
              203:             TypePointer Input 6(int)
      204(sample):    203(ptr) Variable Input
              210:             TypePointer Output 9(fvec4)
-      211(Color):    210(ptr) Variable Output
+211(@entryPointOutput.Color):    210(ptr) Variable Output
              214:             TypePointer Output 8(float)
-      215(Depth):    214(ptr) Variable Output
+215(@entryPointOutput.Depth):    214(ptr) Variable Output
              218:             TypeSampler
              219:             TypePointer UniformConstant 218
     220(g_sSamp):    219(ptr) Variable UniformConstant
@@ -740,10 +739,10 @@
                               Store 206(flattenTemp) 209
              212:    194(ptr) AccessChain 206(flattenTemp) 191
              213:    9(fvec4) Load 212
-                              Store 211(Color) 213
+                              Store 211(@entryPointOutput.Color) 213
              216:    197(ptr) AccessChain 206(flattenTemp) 196
              217:    8(float) Load 216
-                              Store 215(Depth) 217
+                              Store 215(@entryPointOutput.Depth) 217
                               Return
                               FunctionEnd
    13(@main(i1;):10(PS_OUTPUT) Function None 11
diff --git a/Test/baseResults/hlsl.hull.1.tesc.out b/Test/baseResults/hlsl.hull.1.tesc.out
index 3e1ad58..151a0b3 100644
--- a/Test/baseResults/hlsl.hull.1.tesc.out
+++ b/Test/baseResults/hlsl.hull.1.tesc.out
@@ -54,7 +54,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -66,7 +66,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -107,8 +107,7 @@
 0:?     'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?     'm_cpid' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 
 Linked tessellation control stage:
@@ -169,7 +168,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -181,7 +180,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -222,17 +221,16 @@
 0:?     'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?     'm_cpid' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 93
+// Id's are bound by 90
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 40 44 48 66 72 92
+                              EntryPoint TessellationControl 4  "main" 40 44 48 66 72
                               ExecutionMode 4 OutputVertices 4
                               ExecutionMode 4 Isolines
                               ExecutionMode 4 SpacingEqual
@@ -260,18 +258,14 @@
                               Name 65  "@patchConstantResult"
                               Name 66  "pid"
                               Name 67  "param"
-                              Name 72  "@patchConstantOutput_edges"
+                              Name 72  "@patchConstantOutput.edges"
                               Name 82  "output"
-                              Name 90  "HS_CONSTANT_OUT"
-                              Name 92  "@patchConstantOutput"
                               Decorate 40(ip) Location 0
                               Decorate 44(m_cpid) BuiltIn InvocationId
                               Decorate 48(@entryPointOutput) Location 0
                               Decorate 66(pid) BuiltIn PrimitiveId
-                              Decorate 72(@patchConstantOutput_edges) Patch
-                              Decorate 72(@patchConstantOutput_edges) BuiltIn TessLevelOuter
-                              Decorate 92(@patchConstantOutput) Patch
-                              Decorate 92(@patchConstantOutput) Location 1
+                              Decorate 72(@patchConstantOutput.edges) Patch
+                              Decorate 72(@patchConstantOutput.edges) BuiltIn TessLevelOuter
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -307,15 +301,12 @@
          66(pid):     43(ptr) Variable Input
               70:             TypeArray 6(float) 10
               71:             TypePointer Output 70
-72(@patchConstantOutput_edges):     71(ptr) Variable Output
+72(@patchConstantOutput.edges):     71(ptr) Variable Output
               73:             TypePointer Function 6(float)
               76:             TypePointer Output 6(float)
               78:     29(int) Constant 1
               83:    6(float) Constant 1073741824
               85:    6(float) Constant 1090519040
-90(HS_CONSTANT_OUT):             TypeStruct
-              91:             TypePointer Output 90(HS_CONSTANT_OUT)
-92(@patchConstantOutput):     91(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
           38(ip):     12(ptr) Variable Function
@@ -348,11 +339,11 @@
                                 Store 65(@patchConstantResult) 69
               74:     73(ptr)   AccessChain 65(@patchConstantResult) 30 30
               75:    6(float)   Load 74
-              77:     76(ptr)   AccessChain 72(@patchConstantOutput_edges) 30
+              77:     76(ptr)   AccessChain 72(@patchConstantOutput.edges) 30
                                 Store 77 75
               79:     73(ptr)   AccessChain 65(@patchConstantResult) 30 78
               80:    6(float)   Load 79
-              81:     76(ptr)   AccessChain 72(@patchConstantOutput_edges) 78
+              81:     76(ptr)   AccessChain 72(@patchConstantOutput.edges) 78
                                 Store 81 80
                                 Branch 63
               63:             Label
diff --git a/Test/baseResults/hlsl.hull.2.tesc.out b/Test/baseResults/hlsl.hull.2.tesc.out
index d32da52..11342ea 100644
--- a/Test/baseResults/hlsl.hull.2.tesc.out
+++ b/Test/baseResults/hlsl.hull.2.tesc.out
@@ -50,7 +50,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -62,7 +62,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -105,8 +105,7 @@
 0:?     'InvocationId' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
 0:?     'pos' ( in 4-component vector of float Position)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 
 Linked tessellation control stage:
@@ -163,7 +162,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -175,7 +174,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -218,17 +217,16 @@
 0:?     'InvocationId' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
 0:?     'pos' ( in 4-component vector of float Position)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 95
+// Id's are bound by 92
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 42 46 48 64 66 74 94
+                              EntryPoint TessellationControl 4  "main" 42 46 48 64 66 74
                               ExecutionMode 4 OutputVertices 4
                               ExecutionMode 4 Isolines
                               ExecutionMode 4 SpacingEqual
@@ -256,19 +254,15 @@
                               Name 66  "pos"
                               Name 67  "param"
                               Name 69  "param"
-                              Name 74  "@patchConstantOutput_edges"
+                              Name 74  "@patchConstantOutput.edges"
                               Name 84  "output"
-                              Name 92  "HS_CONSTANT_OUT"
-                              Name 94  "@patchConstantOutput"
                               Decorate 42(ip) Location 0
                               Decorate 46(@entryPointOutput) Location 0
                               Decorate 48(InvocationId) BuiltIn InvocationId
                               Decorate 64(pid) BuiltIn PrimitiveId
                               Decorate 66(pos) BuiltIn Position
-                              Decorate 74(@patchConstantOutput_edges) Patch
-                              Decorate 74(@patchConstantOutput_edges) BuiltIn TessLevelOuter
-                              Decorate 94(@patchConstantOutput) Patch
-                              Decorate 94(@patchConstantOutput) Location 1
+                              Decorate 74(@patchConstantOutput.edges) Patch
+                              Decorate 74(@patchConstantOutput.edges) BuiltIn TessLevelOuter
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -308,15 +302,12 @@
          66(pos):     65(ptr) Variable Input
               72:             TypeArray 6(float) 10
               73:             TypePointer Output 72
-74(@patchConstantOutput_edges):     73(ptr) Variable Output
+74(@patchConstantOutput.edges):     73(ptr) Variable Output
               75:             TypePointer Function 6(float)
               78:             TypePointer Output 6(float)
               80:     31(int) Constant 1
               85:    6(float) Constant 1073741824
               87:    6(float) Constant 1090519040
-92(HS_CONSTANT_OUT):             TypeStruct
-              93:             TypePointer Output 92(HS_CONSTANT_OUT)
-94(@patchConstantOutput):     93(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
           40(ip):     12(ptr) Variable Function
@@ -346,11 +337,11 @@
                                 Store 63(@patchConstantResult) 71
               76:     75(ptr)   AccessChain 63(@patchConstantResult) 32 32
               77:    6(float)   Load 76
-              79:     78(ptr)   AccessChain 74(@patchConstantOutput_edges) 32
+              79:     78(ptr)   AccessChain 74(@patchConstantOutput.edges) 32
                                 Store 79 77
               81:     75(ptr)   AccessChain 63(@patchConstantResult) 32 80
               82:    6(float)   Load 81
-              83:     78(ptr)   AccessChain 74(@patchConstantOutput_edges) 80
+              83:     78(ptr)   AccessChain 74(@patchConstantOutput.edges) 80
                                 Store 83 82
                                 Branch 61
               61:             Label
diff --git a/Test/baseResults/hlsl.hull.3.tesc.out b/Test/baseResults/hlsl.hull.3.tesc.out
index c8b7a73..39d9236 100755
--- a/Test/baseResults/hlsl.hull.3.tesc.out
+++ b/Test/baseResults/hlsl.hull.3.tesc.out
@@ -50,7 +50,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -62,7 +62,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -105,8 +105,7 @@
 0:?     'InvocationId' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
 0:?     'pos' ( in 4-component vector of float Position)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 
 Linked tessellation control stage:
@@ -163,7 +162,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -175,7 +174,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -218,17 +217,16 @@
 0:?     'InvocationId' ( in uint InvocationID)
 0:?     'pid' ( in uint PrimitiveID)
 0:?     'pos' ( in 4-component vector of float Position)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 95
+// Id's are bound by 92
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 42 46 48 64 66 74 94
+                              EntryPoint TessellationControl 4  "main" 42 46 48 64 66 74
                               ExecutionMode 4 OutputVertices 4
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 SpacingEqual
@@ -257,19 +255,15 @@
                               Name 66  "pos"
                               Name 67  "param"
                               Name 69  "param"
-                              Name 74  "@patchConstantOutput_edges"
+                              Name 74  "@patchConstantOutput.edges"
                               Name 84  "output"
-                              Name 92  "HS_CONSTANT_OUT"
-                              Name 94  "@patchConstantOutput"
                               Decorate 42(ip) Location 0
                               Decorate 46(@entryPointOutput) Location 0
                               Decorate 48(InvocationId) BuiltIn InvocationId
                               Decorate 64(pid) BuiltIn PrimitiveId
                               Decorate 66(pos) BuiltIn Position
-                              Decorate 74(@patchConstantOutput_edges) Patch
-                              Decorate 74(@patchConstantOutput_edges) BuiltIn TessLevelOuter
-                              Decorate 94(@patchConstantOutput) Patch
-                              Decorate 94(@patchConstantOutput) Location 1
+                              Decorate 74(@patchConstantOutput.edges) Patch
+                              Decorate 74(@patchConstantOutput.edges) BuiltIn TessLevelOuter
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -309,15 +303,12 @@
          66(pos):     65(ptr) Variable Input
               72:             TypeArray 6(float) 10
               73:             TypePointer Output 72
-74(@patchConstantOutput_edges):     73(ptr) Variable Output
+74(@patchConstantOutput.edges):     73(ptr) Variable Output
               75:             TypePointer Function 6(float)
               78:             TypePointer Output 6(float)
               80:     31(int) Constant 1
               85:    6(float) Constant 1073741824
               87:    6(float) Constant 1090519040
-92(HS_CONSTANT_OUT):             TypeStruct
-              93:             TypePointer Output 92(HS_CONSTANT_OUT)
-94(@patchConstantOutput):     93(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
           40(ip):     12(ptr) Variable Function
@@ -347,11 +338,11 @@
                                 Store 63(@patchConstantResult) 71
               76:     75(ptr)   AccessChain 63(@patchConstantResult) 32 32
               77:    6(float)   Load 76
-              79:     78(ptr)   AccessChain 74(@patchConstantOutput_edges) 32
+              79:     78(ptr)   AccessChain 74(@patchConstantOutput.edges) 32
                                 Store 79 77
               81:     75(ptr)   AccessChain 63(@patchConstantResult) 32 80
               82:    6(float)   Load 81
-              83:     78(ptr)   AccessChain 74(@patchConstantOutput_edges) 80
+              83:     78(ptr)   AccessChain 74(@patchConstantOutput.edges) 80
                                 Store 83 82
                                 Branch 61
               61:             Label
diff --git a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
index 3d2ff3d..7fbe0cb 100644
--- a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
+++ b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
@@ -78,7 +78,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -90,7 +90,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -102,7 +102,7 @@
 0:?                   1 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   2 (const int)
 0:?               direct index ( temp float)
@@ -114,7 +114,7 @@
 0:?                   2 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelInner)
-0:?                 '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               flInFactor: direct index for structure ( temp float)
@@ -192,9 +192,8 @@
 0:?     '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
 0:?     'cpid' ( in uint InvocationID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
-0:?     '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?     '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 
 Linked tessellation control stage:
@@ -279,7 +278,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -291,7 +290,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -303,7 +302,7 @@
 0:?                   1 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   2 (const int)
 0:?               direct index ( temp float)
@@ -315,7 +314,7 @@
 0:?                   2 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelInner)
-0:?                 '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               flInFactor: direct index for structure ( temp float)
@@ -393,18 +392,17 @@
 0:?     '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
 0:?     'cpid' ( in uint InvocationID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
-0:?     '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?     '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 127
+// Id's are bound by 124
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 41 45 48 94 108 126
+                              EntryPoint TessellationControl 4  "main" 41 45 48 94 108
                               ExecutionMode 4 OutputVertices 3
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 SpacingFractionalOdd
@@ -442,20 +440,16 @@
                               Name 82  "param"
                               Name 84  "param"
                               Name 88  "@patchConstantResult"
-                              Name 94  "@patchConstantOutput_tfactor"
-                              Name 108  "@patchConstantOutput_flInFactor"
+                              Name 94  "@patchConstantOutput.tfactor"
+                              Name 108  "@patchConstantOutput.flInFactor"
                               Name 112  "o"
-                              Name 124  "hs_pcf_t"
-                              Name 126  "@patchConstantOutput"
                               Decorate 41(i) Location 0
                               Decorate 45(cpid) BuiltIn InvocationId
                               Decorate 48(@entryPointOutput) Location 0
-                              Decorate 94(@patchConstantOutput_tfactor) Patch
-                              Decorate 94(@patchConstantOutput_tfactor) BuiltIn TessLevelOuter
-                              Decorate 108(@patchConstantOutput_flInFactor) Patch
-                              Decorate 108(@patchConstantOutput_flInFactor) BuiltIn TessLevelInner
-                              Decorate 126(@patchConstantOutput) Patch
-                              Decorate 126(@patchConstantOutput) Location 1
+                              Decorate 94(@patchConstantOutput.tfactor) Patch
+                              Decorate 94(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter
+                              Decorate 108(@patchConstantOutput.flInFactor) Patch
+                              Decorate 108(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -494,16 +488,13 @@
               91:      9(int) Constant 4
               92:             TypeArray 6(float) 91
               93:             TypePointer Output 92
-94(@patchConstantOutput_tfactor):     93(ptr) Variable Output
+94(@patchConstantOutput.tfactor):     93(ptr) Variable Output
               95:             TypePointer Function 6(float)
               98:             TypePointer Output 6(float)
              106:             TypeArray 6(float) 57
              107:             TypePointer Output 106
-108(@patchConstantOutput_flInFactor):    107(ptr) Variable Output
+108(@patchConstantOutput.flInFactor):    107(ptr) Variable Output
              119:    6(float) Constant 1082130432
-   124(hs_pcf_t):             TypeStruct
-             125:             TypePointer Output 124(hs_pcf_t)
-126(@patchConstantOutput):    125(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            39(i):     12(ptr) Variable Function
@@ -562,19 +553,19 @@
                                 Store 88(@patchConstantResult) 90
               96:     95(ptr)   AccessChain 88(@patchConstantResult) 30 30
               97:    6(float)   Load 96
-              99:     98(ptr)   AccessChain 94(@patchConstantOutput_tfactor) 30
+              99:     98(ptr)   AccessChain 94(@patchConstantOutput.tfactor) 30
                                 Store 99 97
              100:     95(ptr)   AccessChain 88(@patchConstantResult) 30 73
              101:    6(float)   Load 100
-             102:     98(ptr)   AccessChain 94(@patchConstantOutput_tfactor) 73
+             102:     98(ptr)   AccessChain 94(@patchConstantOutput.tfactor) 73
                                 Store 102 101
              103:     95(ptr)   AccessChain 88(@patchConstantResult) 30 80
              104:    6(float)   Load 103
-             105:     98(ptr)   AccessChain 94(@patchConstantOutput_tfactor) 80
+             105:     98(ptr)   AccessChain 94(@patchConstantOutput.tfactor) 80
                                 Store 105 104
              109:     95(ptr)   AccessChain 88(@patchConstantResult) 73
              110:    6(float)   Load 109
-             111:     98(ptr)   AccessChain 108(@patchConstantOutput_flInFactor) 30
+             111:     98(ptr)   AccessChain 108(@patchConstantOutput.flInFactor) 30
                                 Store 111 110
                                 Branch 64
               64:             Label
diff --git a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
index 29ab61d..32764f3 100644
--- a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
+++ b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
@@ -86,7 +86,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -98,7 +98,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -110,7 +110,7 @@
 0:?                   1 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   2 (const int)
 0:?               direct index ( temp float)
@@ -122,7 +122,7 @@
 0:?                   2 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelInner)
-0:?                 '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               flInFactor: direct index for structure ( temp float)
@@ -201,9 +201,8 @@
 0:?     '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
 0:?     'cpid' ( in uint InvocationID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
-0:?     '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?     '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 
 Linked tessellation control stage:
@@ -296,7 +295,7 @@
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               direct index ( temp float)
@@ -308,7 +307,7 @@
 0:?                   0 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   1 (const int)
 0:?               direct index ( temp float)
@@ -320,7 +319,7 @@
 0:?                   1 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
-0:?                 '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
 0:?                 Constant:
 0:?                   2 (const int)
 0:?               direct index ( temp float)
@@ -332,7 +331,7 @@
 0:?                   2 (const int)
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelInner)
-0:?                 '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 0:?                 Constant:
 0:?                   0 (const int)
 0:?               flInFactor: direct index for structure ( temp float)
@@ -411,18 +410,17 @@
 0:?     '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?     'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
 0:?     'cpid' ( in uint InvocationID)
-0:?     '@patchConstantOutput' (layout( location=1) patch out structure{})
-0:?     '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
-0:?     '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
+0:?     '@patchConstantOutput.tfactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 129
+// Id's are bound by 126
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 42 46 49 96 110 128
+                              EntryPoint TessellationControl 4  "main" 42 46 49 96 110
                               ExecutionMode 4 OutputVertices 3
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 SpacingFractionalOdd
@@ -461,20 +459,16 @@
                               Name 83  "param"
                               Name 85  "param"
                               Name 89  "@patchConstantResult"
-                              Name 96  "@patchConstantOutput_tfactor"
-                              Name 110  "@patchConstantOutput_flInFactor"
+                              Name 96  "@patchConstantOutput.tfactor"
+                              Name 110  "@patchConstantOutput.flInFactor"
                               Name 114  "o"
-                              Name 126  "hs_pcf_t"
-                              Name 128  "@patchConstantOutput"
                               Decorate 42(i) Location 0
                               Decorate 46(cpid) BuiltIn InvocationId
                               Decorate 49(@entryPointOutput) Location 0
-                              Decorate 96(@patchConstantOutput_tfactor) Patch
-                              Decorate 96(@patchConstantOutput_tfactor) BuiltIn TessLevelOuter
-                              Decorate 110(@patchConstantOutput_flInFactor) Patch
-                              Decorate 110(@patchConstantOutput_flInFactor) BuiltIn TessLevelInner
-                              Decorate 128(@patchConstantOutput) Patch
-                              Decorate 128(@patchConstantOutput) Location 1
+                              Decorate 96(@patchConstantOutput.tfactor) Patch
+                              Decorate 96(@patchConstantOutput.tfactor) BuiltIn TessLevelOuter
+                              Decorate 110(@patchConstantOutput.flInFactor) Patch
+                              Decorate 110(@patchConstantOutput.flInFactor) BuiltIn TessLevelInner
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -513,16 +507,13 @@
               93:      9(int) Constant 4
               94:             TypeArray 6(float) 93
               95:             TypePointer Output 94
-96(@patchConstantOutput_tfactor):     95(ptr) Variable Output
+96(@patchConstantOutput.tfactor):     95(ptr) Variable Output
               97:             TypePointer Function 6(float)
              100:             TypePointer Output 6(float)
              108:             TypeArray 6(float) 58
              109:             TypePointer Output 108
-110(@patchConstantOutput_flInFactor):    109(ptr) Variable Output
+110(@patchConstantOutput.flInFactor):    109(ptr) Variable Output
              121:    6(float) Constant 1082130432
-   126(hs_pcf_t):             TypeStruct
-             127:             TypePointer Output 126(hs_pcf_t)
-128(@patchConstantOutput):    127(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            40(i):     12(ptr) Variable Function
@@ -582,19 +573,19 @@
                                 Store 89(@patchConstantResult) 92
               98:     97(ptr)   AccessChain 89(@patchConstantResult) 29 29
               99:    6(float)   Load 98
-             101:    100(ptr)   AccessChain 96(@patchConstantOutput_tfactor) 29
+             101:    100(ptr)   AccessChain 96(@patchConstantOutput.tfactor) 29
                                 Store 101 99
              102:     97(ptr)   AccessChain 89(@patchConstantResult) 29 74
              103:    6(float)   Load 102
-             104:    100(ptr)   AccessChain 96(@patchConstantOutput_tfactor) 74
+             104:    100(ptr)   AccessChain 96(@patchConstantOutput.tfactor) 74
                                 Store 104 103
              105:     97(ptr)   AccessChain 89(@patchConstantResult) 29 81
              106:    6(float)   Load 105
-             107:    100(ptr)   AccessChain 96(@patchConstantOutput_tfactor) 81
+             107:    100(ptr)   AccessChain 96(@patchConstantOutput.tfactor) 81
                                 Store 107 106
              111:     97(ptr)   AccessChain 89(@patchConstantResult) 74
              112:    6(float)   Load 111
-             113:    100(ptr)   AccessChain 110(@patchConstantOutput_flInFactor) 29
+             113:    100(ptr)   AccessChain 110(@patchConstantOutput.flInFactor) 29
                                 Store 113 112
                                 Branch 65
               65:             Label
diff --git a/Test/baseResults/hlsl.init2.frag.out b/Test/baseResults/hlsl.init2.frag.out
index 45eca98..0b88500 100644
--- a/Test/baseResults/hlsl.init2.frag.out
+++ b/Test/baseResults/hlsl.init2.frag.out
@@ -168,13 +168,13 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:45          color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:45            Constant:
 0:45              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -349,13 +349,13 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:45          color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:45            Constant:
 0:45              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -392,8 +392,8 @@
                               MemberName 87(two) 1  "b"
                               Name 89  "twoNonConst"
                               Name 99  "ps_output"
-                              Name 109  "color"
-                              Decorate 109(color) Location 0
+                              Name 109  "@entryPointOutput.color"
+                              Decorate 109(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                8:             TypeFloat 32
@@ -445,12 +445,12 @@
              102:    9(fvec4) ConstantComposite 18 18 18 18
              103:             TypePointer Function 9(fvec4)
              108:             TypePointer Output 9(fvec4)
-      109(color):    108(ptr) Variable Output
+109(@entryPointOutput.color):    108(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              110:10(PS_OUTPUT) FunctionCall 12(@main()
              111:    9(fvec4) CompositeExtract 110 0
-                              Store 109(color) 111
+                              Store 109(@entryPointOutput.color) 111
                               Return
                               FunctionEnd
        6(Test1():           2 Function None 3
diff --git a/Test/baseResults/hlsl.inoutquals.frag.out b/Test/baseResults/hlsl.inoutquals.frag.out
index 3f7f139..1bc4944 100644
--- a/Test/baseResults/hlsl.inoutquals.frag.out
+++ b/Test/baseResults/hlsl.inoutquals.frag.out
@@ -80,13 +80,13 @@
 0:?             'inpos' ( temp 4-component vector of float)
 0:?             'sampleMask' ( temp int)
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:16          Color: direct index for structure ( temp 4-component vector of float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:16            Constant:
 0:16              0 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:16          Depth: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:16            Constant:
@@ -95,8 +95,8 @@
 0:?         'sampleMask' ( out int SampleMaskIn)
 0:?         'sampleMask' ( temp int)
 0:?   Linker Objects
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'inpos' ( noperspective in 4-component vector of float FragCoord)
 0:?     'sampleMask' ( out int SampleMaskIn)
 
@@ -185,13 +185,13 @@
 0:?             'inpos' ( temp 4-component vector of float)
 0:?             'sampleMask' ( temp int)
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:16          Color: direct index for structure ( temp 4-component vector of float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:16            Constant:
 0:16              0 (const int)
 0:16        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:16          Depth: direct index for structure ( temp float)
 0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:16            Constant:
@@ -200,8 +200,8 @@
 0:?         'sampleMask' ( out int SampleMaskIn)
 0:?         'sampleMask' ( temp int)
 0:?   Linker Objects
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:?     'inpos' ( noperspective in 4-component vector of float FragCoord)
 0:?     'sampleMask' ( out int SampleMaskIn)
 
@@ -242,13 +242,13 @@
                               Name 71  "sampleMask"
                               Name 72  "param"
                               Name 74  "param"
-                              Name 78  "Color"
-                              Name 82  "Depth"
+                              Name 78  "@entryPointOutput.Color"
+                              Name 82  "@entryPointOutput.Depth"
                               Name 86  "sampleMask"
                               Decorate 68(inpos) NoPerspective
                               Decorate 68(inpos) BuiltIn FragCoord
-                              Decorate 78(Color) Location 0
-                              Decorate 82(Depth) BuiltIn FragDepth
+                              Decorate 78(@entryPointOutput.Color) Location 0
+                              Decorate 82(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 86(sampleMask) BuiltIn SampleMask
                2:             TypeVoid
                3:             TypeFunction 2
@@ -273,9 +273,9 @@
               67:             TypePointer Input 15(fvec4)
        68(inpos):     67(ptr) Variable Input
               77:             TypePointer Output 15(fvec4)
-       78(Color):     77(ptr) Variable Output
+78(@entryPointOutput.Color):     77(ptr) Variable Output
               81:             TypePointer Output 6(float)
-       82(Depth):     81(ptr) Variable Output
+82(@entryPointOutput.Depth):     81(ptr) Variable Output
               85:             TypePointer Output 17(int)
   86(sampleMask):     85(ptr) Variable Output
          4(main):           2 Function None 3
@@ -295,10 +295,10 @@
                               Store 70(flattenTemp) 75
               79:     16(ptr) AccessChain 70(flattenTemp) 53
               80:   15(fvec4) Load 79
-                              Store 78(Color) 80
+                              Store 78(@entryPointOutput.Color) 80
               83:      7(ptr) AccessChain 70(flattenTemp) 59
               84:    6(float) Load 83
-                              Store 82(Depth) 84
+                              Store 82(@entryPointOutput.Depth) 84
               87:     17(int) Load 71(sampleMask)
                               Store 86(sampleMask) 87
                               Return
diff --git a/Test/baseResults/hlsl.intrinsic.frexp.frag.out b/Test/baseResults/hlsl.intrinsic.frexp.frag.out
index e62399a..2aa1229 100644
--- a/Test/baseResults/hlsl.intrinsic.frexp.frag.out
+++ b/Test/baseResults/hlsl.intrinsic.frexp.frag.out
@@ -84,13 +84,13 @@
 0:?     Sequence
 0:33      Sequence
 0:33        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:33          color: direct index for structure ( temp 4-component vector of float)
 0:33            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:33            Constant:
 0:33              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -181,13 +181,13 @@
 0:?     Sequence
 0:33      Sequence
 0:33        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:33          color: direct index for structure ( temp 4-component vector of float)
 0:33            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:33            Constant:
 0:33              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -224,8 +224,8 @@
                               Name 74  "r000"
                               Name 77  "ResType"
                               Name 87  "ps_output"
-                              Name 95  "color"
-                              Decorate 95(color) Location 0
+                              Name 95  "@entryPointOutput.color"
+                              Decorate 95(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -262,12 +262,12 @@
               88:     40(int) Constant 0
               89:   27(fvec4) ConstantComposite 57 57 57 57
               94:             TypePointer Output 27(fvec4)
-       95(color):     94(ptr) Variable Output
+95(@entryPointOutput.color):     94(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               96:34(PS_OUTPUT) FunctionCall 36(@main()
               97:   27(fvec4) CompositeExtract 96 0
-                              Store 95(color) 97
+                              Store 95(@entryPointOutput.color) 97
                               Return
                               FunctionEnd
 11(PixelShaderFunctionS(f1;f1;):    6(float) Function None 8
diff --git a/Test/baseResults/hlsl.intrinsics.frag.out b/Test/baseResults/hlsl.intrinsics.frag.out
index 82da747..ad70545 100644
--- a/Test/baseResults/hlsl.intrinsics.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.frag.out
@@ -2752,7 +2752,7 @@
 0:?     Sequence
 0:484      Sequence
 0:484        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:484          color: direct index for structure ( temp 4-component vector of float)
 0:484            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:484            Constant:
@@ -2770,7 +2770,7 @@
 0:?     'gs_ua4' ( shared 4-component vector of uint)
 0:?     'gs_ub4' ( shared 4-component vector of uint)
 0:?     'gs_uc4' ( shared 4-component vector of uint)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -5529,7 +5529,7 @@
 0:?     Sequence
 0:484      Sequence
 0:484        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:484          color: direct index for structure ( temp 4-component vector of float)
 0:484            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:484            Constant:
@@ -5547,7 +5547,7 @@
 0:?     'gs_ua4' ( shared 4-component vector of uint)
 0:?     'gs_ub4' ( shared 4-component vector of uint)
 0:?     'gs_uc4' ( shared 4-component vector of uint)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -6059,7 +6059,7 @@
                               Name 1769  "r15"
                               Name 1773  "r16"
                               Name 1778  "ps_output"
-                              Name 1786  "color"
+                              Name 1786  "@entryPointOutput.color"
                               Name 1790  "gs_ua"
                               Name 1791  "gs_ub"
                               Name 1792  "gs_uc"
@@ -6072,7 +6072,7 @@
                               Name 1802  "gs_ua4"
                               Name 1803  "gs_ub4"
                               Name 1804  "gs_uc4"
-                              Decorate 1786(color) Location 0
+                              Decorate 1786(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -6185,7 +6185,7 @@
             1779:    155(int) Constant 0
             1780:   48(fvec4) ConstantComposite 283 283 283 283
             1785:             TypePointer Output 48(fvec4)
-     1786(color):   1785(ptr) Variable Output
+1786(@entryPointOutput.color):   1785(ptr) Variable Output
             1789:             TypePointer Workgroup 8(int)
      1790(gs_ua):   1789(ptr) Variable Workgroup
      1791(gs_ub):   1789(ptr) Variable Workgroup
@@ -6206,7 +6206,7 @@
                5:             Label
             1787:131(PS_OUTPUT) FunctionCall 133(@main()
             1788:   48(fvec4) CompositeExtract 1787 0
-                              Store 1786(color) 1788
+                              Store 1786(@entryPointOutput.color) 1788
                               Return
                               FunctionEnd
 16(PixelShaderFunctionS(f1;f1;f1;u1;u1;):    6(float) Function None 10
diff --git a/Test/baseResults/hlsl.intrinsics.promote.down.frag.out b/Test/baseResults/hlsl.intrinsics.promote.down.frag.out
index d67b2e8..d6bd3df 100644
--- a/Test/baseResults/hlsl.intrinsics.promote.down.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.promote.down.frag.out
@@ -40,14 +40,14 @@
 0:?     Sequence
 0:15      Sequence
 0:15        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:15          color: direct index for structure ( temp 4-component vector of float)
 0:15            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:15            Constant:
 0:15              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2})
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -94,14 +94,14 @@
 0:?     Sequence
 0:15      Sequence
 0:15        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:15          color: direct index for structure ( temp 4-component vector of float)
 0:15            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:15            Constant:
 0:15              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2})
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -130,7 +130,7 @@
                               Name 21  ""
                               Name 29  "r01"
                               Name 37  "ps_output"
-                              Name 47  "color"
+                              Name 47  "@entryPointOutput.color"
                               MemberDecorate 19($Global) 0 Offset 0
                               MemberDecorate 19($Global) 1 Offset 4
                               MemberDecorate 19($Global) 2 Offset 8
@@ -141,7 +141,7 @@
                               MemberDecorate 19($Global) 7 Offset 40
                               Decorate 19($Global) Block
                               Decorate 21 DescriptorSet 0
-                              Decorate 47(color) Location 0
+                              Decorate 47(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -168,12 +168,12 @@
               40:    7(fvec4) ConstantComposite 39 39 39 39
               41:             TypePointer Function 7(fvec4)
               46:             TypePointer Output 7(fvec4)
-       47(color):     46(ptr) Variable Output
+47(@entryPointOutput.color):     46(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               48:8(PS_OUTPUT) FunctionCall 10(@main()
               49:    7(fvec4) CompositeExtract 48 0
-                              Store 47(color) 49
+                              Store 47(@entryPointOutput.color) 49
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.intrinsics.promote.frag.out b/Test/baseResults/hlsl.intrinsics.promote.frag.out
index b62d30d..107de38 100644
--- a/Test/baseResults/hlsl.intrinsics.promote.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.promote.frag.out
@@ -430,7 +430,7 @@
 0:?     Sequence
 0:20      Sequence
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:20          color: direct index for structure ( temp 4-component vector of float)
 0:20            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:20            Constant:
@@ -439,7 +439,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2,  uniform uint upos,  uniform float fpos})
 0:?     'g_tTexbfs' (layout( r32f) uniform textureBuffer)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -876,7 +876,7 @@
 0:?     Sequence
 0:20      Sequence
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:20          color: direct index for structure ( temp 4-component vector of float)
 0:20            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:20            Constant:
@@ -885,7 +885,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2,  uniform uint upos,  uniform float fpos})
 0:?     'g_tTexbfs' (layout( r32f) uniform textureBuffer)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -951,7 +951,7 @@
                               Name 297  "NumberOfLevelsI"
                               Name 301  "sizeQueryTemp"
                               Name 310  "ps_output"
-                              Name 319  "color"
+                              Name 319  "@entryPointOutput.color"
                               MemberDecorate 19($Global) 0 Offset 0
                               MemberDecorate 19($Global) 1 Offset 4
                               MemberDecorate 19($Global) 2 Offset 8
@@ -966,7 +966,7 @@
                               Decorate 21 DescriptorSet 0
                               Decorate 258(g_tTexbfs) DescriptorSet 0
                               Decorate 277(g_tTex1df4) DescriptorSet 0
-                              Decorate 319(color) Location 0
+                              Decorate 319(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -1025,12 +1025,12 @@
              309:             TypePointer Function 8(PS_OUTPUT)
              313:             TypePointer Function 7(fvec4)
              318:             TypePointer Output 7(fvec4)
-      319(color):    318(ptr) Variable Output
+319(@entryPointOutput.color):    318(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              320:8(PS_OUTPUT) FunctionCall 10(@main()
              321:    7(fvec4) CompositeExtract 320 0
-                              Store 319(color) 321
+                              Store 319(@entryPointOutput.color) 321
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out b/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out
index 87b425f..649f7ca 100644
--- a/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out
@@ -88,7 +88,7 @@
 0:?     Sequence
 0:20      Sequence
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:20          color: direct index for structure ( temp 4-component vector of float)
 0:20            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:20            Constant:
@@ -97,7 +97,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2,  uniform uint upos,  uniform float fpos})
 0:?     'g_tTexbfs' (layout( r32f) uniform textureBuffer)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -192,7 +192,7 @@
 0:?     Sequence
 0:20      Sequence
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:20          color: direct index for structure ( temp 4-component vector of float)
 0:20            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:20            Constant:
@@ -201,7 +201,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int i,  uniform uint u,  uniform float f,  uniform bool b,  uniform 2-component vector of int i2,  uniform 2-component vector of uint u2,  uniform 2-component vector of float f2,  uniform 2-component vector of bool b2,  uniform uint upos,  uniform float fpos})
 0:?     'g_tTexbfs' (layout( r32f) uniform textureBuffer)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -242,7 +242,7 @@
                               Name 53  "NumberOfLevelsI"
                               Name 57  "sizeQueryTemp"
                               Name 66  "ps_output"
-                              Name 74  "color"
+                              Name 74  "@entryPointOutput.color"
                               Name 79  "g_tTexbfs"
                               MemberDecorate 17($Global) 0 Offset 0
                               MemberDecorate 17($Global) 1 Offset 4
@@ -257,7 +257,7 @@
                               Decorate 17($Global) Block
                               Decorate 19 DescriptorSet 0
                               Decorate 31(g_tTex1df4) DescriptorSet 0
-                              Decorate 74(color) Location 0
+                              Decorate 74(@entryPointOutput.color) Location 0
                               Decorate 79(g_tTexbfs) DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -288,7 +288,7 @@
               67:    7(fvec4) ConstantComposite 24 24 24 24
               68:             TypePointer Function 7(fvec4)
               73:             TypePointer Output 7(fvec4)
-       74(color):     73(ptr) Variable Output
+74(@entryPointOutput.color):     73(ptr) Variable Output
               77:             TypeImage 6(float) Buffer sampled format:R32f
               78:             TypePointer UniformConstant 77
    79(g_tTexbfs):     78(ptr) Variable UniformConstant
@@ -296,7 +296,7 @@
                5:             Label
               75:8(PS_OUTPUT) FunctionCall 10(@main()
               76:    7(fvec4) CompositeExtract 75 0
-                              Store 74(color) 76
+                              Store 74(@entryPointOutput.color) 76
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.2dms.dx10.frag.out b/Test/baseResults/hlsl.load.2dms.dx10.frag.out
index 251d56e..b5d0466 100644
--- a/Test/baseResults/hlsl.load.2dms.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.2dms.dx10.frag.out
@@ -152,13 +152,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -172,8 +172,8 @@
 0:?     'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -332,13 +332,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -352,8 +352,8 @@
 0:?     'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -361,7 +361,6 @@
 
                               Capability Shader
                               Capability ImageGatherExtended
-                              Capability ImageMSArray
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 120 124
@@ -390,8 +389,8 @@
                               Name 82  "g_tTex2dmsu4a"
                               Name 106  "psout"
                               Name 117  "flattenTemp"
-                              Name 120  "Color"
-                              Name 124  "Depth"
+                              Name 120  "@entryPointOutput.Color"
+                              Name 124  "@entryPointOutput.Depth"
                               Name 129  "g_sSamp"
                               Decorate 14(g_tTex2dmsf4) DescriptorSet 0
                               MemberDecorate 20($Global) 0 Offset 0
@@ -409,8 +408,8 @@
                               Decorate 66(g_tTex2dmsf4a) DescriptorSet 0
                               Decorate 75(g_tTex2dmsi4a) DescriptorSet 0
                               Decorate 82(g_tTex2dmsu4a) DescriptorSet 0
-                              Decorate 120(Color) Location 0
-                              Decorate 124(Depth) BuiltIn FragDepth
+                              Decorate 120(@entryPointOutput.Color) Location 0
+                              Decorate 124(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 129(g_sSamp) DescriptorSet 0
                               Decorate 129(g_sSamp) Binding 0
                2:             TypeVoid
@@ -459,9 +458,9 @@
              110:             TypePointer Function 7(fvec4)
              112:             TypePointer Function 6(float)
              119:             TypePointer Output 7(fvec4)
-      120(Color):    119(ptr) Variable Output
+120(@entryPointOutput.Color):    119(ptr) Variable Output
              123:             TypePointer Output 6(float)
-      124(Depth):    123(ptr) Variable Output
+124(@entryPointOutput.Depth):    123(ptr) Variable Output
              127:             TypeSampler
              128:             TypePointer UniformConstant 127
     129(g_sSamp):    128(ptr) Variable UniformConstant
@@ -472,10 +471,10 @@
                               Store 117(flattenTemp) 118
              121:    110(ptr) AccessChain 117(flattenTemp) 107
              122:    7(fvec4) Load 121
-                              Store 120(Color) 122
+                              Store 120(@entryPointOutput.Color) 122
              125:    112(ptr) AccessChain 117(flattenTemp) 23
              126:    6(float) Load 125
-                              Store 124(Depth) 126
+                              Store 124(@entryPointOutput.Depth) 126
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.array.dx10.frag.out b/Test/baseResults/hlsl.load.array.dx10.frag.out
index 78e2b2c..9bfc678 100644
--- a/Test/baseResults/hlsl.load.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.array.dx10.frag.out
@@ -152,13 +152,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -187,8 +187,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -347,13 +347,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -382,8 +382,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -420,8 +420,8 @@
                               Name 80  "g_tTex2du4a"
                               Name 89  "psout"
                               Name 101  "flattenTemp"
-                              Name 104  "Color"
-                              Name 108  "Depth"
+                              Name 104  "@entryPointOutput.Color"
+                              Name 108  "@entryPointOutput.Depth"
                               Name 113  "g_sSamp"
                               Name 116  "g_tTex1df4"
                               Name 119  "g_tTex1di4"
@@ -454,8 +454,8 @@
                               Decorate 57(g_tTex2df4a) DescriptorSet 0
                               Decorate 70(g_tTex2di4a) DescriptorSet 0
                               Decorate 80(g_tTex2du4a) DescriptorSet 0
-                              Decorate 104(Color) Location 0
-                              Decorate 108(Depth) BuiltIn FragDepth
+                              Decorate 104(@entryPointOutput.Color) Location 0
+                              Decorate 108(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 113(g_sSamp) DescriptorSet 0
                               Decorate 113(g_sSamp) Binding 0
                               Decorate 116(g_tTex1df4) DescriptorSet 0
@@ -522,9 +522,9 @@
               95:     16(int) Constant 1
               96:             TypePointer Function 6(float)
              103:             TypePointer Output 7(fvec4)
-      104(Color):    103(ptr) Variable Output
+104(@entryPointOutput.Color):    103(ptr) Variable Output
              107:             TypePointer Output 6(float)
-      108(Depth):    107(ptr) Variable Output
+108(@entryPointOutput.Depth):    107(ptr) Variable Output
              111:             TypeSampler
              112:             TypePointer UniformConstant 111
     113(g_sSamp):    112(ptr) Variable UniformConstant
@@ -580,10 +580,10 @@
                               Store 101(flattenTemp) 102
              105:     93(ptr) AccessChain 101(flattenTemp) 90
              106:    7(fvec4) Load 105
-                              Store 104(Color) 106
+                              Store 104(@entryPointOutput.Color) 106
              109:     96(ptr) AccessChain 101(flattenTemp) 95
              110:    6(float) Load 109
-                              Store 108(Depth) 110
+                              Store 108(@entryPointOutput.Depth) 110
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.basic.dx10.frag.out b/Test/baseResults/hlsl.load.basic.dx10.frag.out
index 0da4048..20110a5 100644
--- a/Test/baseResults/hlsl.load.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.basic.dx10.frag.out
@@ -203,13 +203,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -238,8 +238,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -449,13 +449,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -484,8 +484,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -525,8 +525,8 @@
                               Name 110  "g_tTex3du4"
                               Name 119  "psout"
                               Name 130  "flattenTemp"
-                              Name 133  "Color"
-                              Name 137  "Depth"
+                              Name 133  "@entryPointOutput.Color"
+                              Name 137  "@entryPointOutput.Depth"
                               Name 142  "g_sSamp"
                               Name 145  "g_tTexcdf4"
                               Name 148  "g_tTexcdi4"
@@ -560,8 +560,8 @@
                               Decorate 87(g_tTex3df4) DescriptorSet 0
                               Decorate 100(g_tTex3di4) DescriptorSet 0
                               Decorate 110(g_tTex3du4) DescriptorSet 0
-                              Decorate 133(Color) Location 0
-                              Decorate 137(Depth) BuiltIn FragDepth
+                              Decorate 133(@entryPointOutput.Color) Location 0
+                              Decorate 137(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 142(g_sSamp) DescriptorSet 0
                               Decorate 142(g_sSamp) Binding 0
                               Decorate 145(g_tTexcdf4) DescriptorSet 0
@@ -635,9 +635,9 @@
              123:             TypePointer Function 7(fvec4)
              125:             TypePointer Function 6(float)
              132:             TypePointer Output 7(fvec4)
-      133(Color):    132(ptr) Variable Output
+133(@entryPointOutput.Color):    132(ptr) Variable Output
              136:             TypePointer Output 6(float)
-      137(Depth):    136(ptr) Variable Output
+137(@entryPointOutput.Depth):    136(ptr) Variable Output
              140:             TypeSampler
              141:             TypePointer UniformConstant 140
     142(g_sSamp):    141(ptr) Variable UniformConstant
@@ -684,10 +684,10 @@
                               Store 130(flattenTemp) 131
              134:    123(ptr) AccessChain 130(flattenTemp) 120
              135:    7(fvec4) Load 134
-                              Store 133(Color) 135
+                              Store 133(@entryPointOutput.Color) 135
              138:    125(ptr) AccessChain 130(flattenTemp) 23
              139:    6(float) Load 138
-                              Store 137(Depth) 139
+                              Store 137(@entryPointOutput.Depth) 139
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.basic.dx10.vert.out b/Test/baseResults/hlsl.load.basic.dx10.vert.out
index c3b7dc2..619bfda 100644
--- a/Test/baseResults/hlsl.load.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.load.basic.dx10.vert.out
@@ -192,7 +192,7 @@
 0:?     Sequence
 0:47      Sequence
 0:47        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:47          Pos: direct index for structure ( temp 4-component vector of float)
 0:47            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:47            Constant:
@@ -221,7 +221,7 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -420,7 +420,7 @@
 0:?     Sequence
 0:47      Sequence
 0:47        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:47          Pos: direct index for structure ( temp 4-component vector of float)
 0:47            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:47            Constant:
@@ -449,18 +449,18 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 174
+// Id's are bound by 171
 
                               Capability Shader
                               Capability Sampled1D
                               Capability SampledCubeArray
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 129 173
+                              EntryPoint Vertex 4  "main" 129
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -486,7 +486,7 @@
                               Name 100  "g_tTex3di4"
                               Name 110  "g_tTex3du4"
                               Name 119  "vsout"
-                              Name 129  "@entryPointOutput_Pos"
+                              Name 129  "@entryPointOutput.Pos"
                               Name 134  "g_sSamp"
                               Name 137  "g_tTexcdf4"
                               Name 140  "g_tTexcdi4"
@@ -500,8 +500,6 @@
                               Name 164  "g_tTexcdf4a"
                               Name 167  "g_tTexcdi4a"
                               Name 170  "g_tTexcdu4a"
-                              Name 171  "VS_OUTPUT"
-                              Name 173  "@entryPointOutput"
                               Decorate 14(g_tTex1df4) DescriptorSet 0
                               Decorate 14(g_tTex1df4) Binding 0
                               MemberDecorate 20($Global) 0 Offset 0
@@ -522,7 +520,7 @@
                               Decorate 87(g_tTex3df4) DescriptorSet 0
                               Decorate 100(g_tTex3di4) DescriptorSet 0
                               Decorate 110(g_tTex3du4) DescriptorSet 0
-                              Decorate 129(@entryPointOutput_Pos) BuiltIn Position
+                              Decorate 129(@entryPointOutput.Pos) BuiltIn Position
                               Decorate 134(g_sSamp) DescriptorSet 0
                               Decorate 134(g_sSamp) Binding 0
                               Decorate 137(g_tTexcdf4) DescriptorSet 0
@@ -537,7 +535,6 @@
                               Decorate 164(g_tTexcdf4a) DescriptorSet 0
                               Decorate 167(g_tTexcdi4a) DescriptorSet 0
                               Decorate 170(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 173(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -596,7 +593,7 @@
              122:    7(fvec4) ConstantComposite 121 121 121 121
              123:             TypePointer Function 7(fvec4)
              128:             TypePointer Output 7(fvec4)
-129(@entryPointOutput_Pos):    128(ptr) Variable Output
+129(@entryPointOutput.Pos):    128(ptr) Variable Output
              132:             TypeSampler
              133:             TypePointer UniformConstant 132
     134(g_sSamp):    133(ptr) Variable UniformConstant
@@ -636,14 +633,11 @@
              168:             TypeImage 24(int) Cube array sampled format:Unknown
              169:             TypePointer UniformConstant 168
 170(g_tTexcdu4a):    169(ptr) Variable UniformConstant
-  171(VS_OUTPUT):             TypeStruct
-             172:             TypePointer Output 171(VS_OUTPUT)
-173(@entryPointOutput):    172(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              130:8(VS_OUTPUT) FunctionCall 10(@main()
              131:    7(fvec4) CompositeExtract 130 0
-                              Store 129(@entryPointOutput_Pos) 131
+                              Store 129(@entryPointOutput.Pos) 131
                               Return
                               FunctionEnd
       10(@main():8(VS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.buffer.dx10.frag.out b/Test/baseResults/hlsl.load.buffer.dx10.frag.out
index e68e5f9..0e876ab 100644
--- a/Test/baseResults/hlsl.load.buffer.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.buffer.dx10.frag.out
@@ -59,13 +59,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -76,8 +76,8 @@
 0:?     'g_tTexbi4' (layout( rgba32i) uniform itextureBuffer)
 0:?     'g_tTexbu4' (layout( rgba32ui) uniform utextureBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -143,13 +143,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -160,8 +160,8 @@
 0:?     'g_tTexbi4' (layout( rgba32i) uniform itextureBuffer)
 0:?     'g_tTexbu4' (layout( rgba32ui) uniform utextureBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -197,8 +197,8 @@
                               Name 45  "g_tTexbu4"
                               Name 51  "psout"
                               Name 61  "flattenTemp"
-                              Name 64  "Color"
-                              Name 68  "Depth"
+                              Name 64  "@entryPointOutput.Color"
+                              Name 68  "@entryPointOutput.Depth"
                               Name 71  "g_tTexbf4_test"
                               Decorate 16(g_tTexbf4) DescriptorSet 0
                               MemberDecorate 22($Global) 0 Offset 0
@@ -213,8 +213,8 @@
                               Decorate 24 DescriptorSet 0
                               Decorate 34(g_tTexbi4) DescriptorSet 0
                               Decorate 45(g_tTexbu4) DescriptorSet 0
-                              Decorate 64(Color) Location 0
-                              Decorate 68(Depth) BuiltIn FragDepth
+                              Decorate 64(@entryPointOutput.Color) Location 0
+                              Decorate 68(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 71(g_tTexbf4_test) DescriptorSet 0
                               Decorate 71(g_tTexbf4_test) Binding 0
                2:             TypeVoid
@@ -252,9 +252,9 @@
               55:     18(int) Constant 1
               56:             TypePointer Function 6(float)
               63:             TypePointer Output 7(fvec4)
-       64(Color):     63(ptr) Variable Output
+64(@entryPointOutput.Color):     63(ptr) Variable Output
               67:             TypePointer Output 6(float)
-       68(Depth):     67(ptr) Variable Output
+68(@entryPointOutput.Depth):     67(ptr) Variable Output
 71(g_tTexbf4_test):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -263,10 +263,10 @@
                               Store 61(flattenTemp) 62
               65:     12(ptr) AccessChain 61(flattenTemp) 25
               66:    7(fvec4) Load 65
-                              Store 64(Color) 66
+                              Store 64(@entryPointOutput.Color) 66
               69:     56(ptr) AccessChain 61(flattenTemp) 55
               70:    6(float) Load 69
-                              Store 68(Depth) 70
+                              Store 68(@entryPointOutput.Depth) 70
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out b/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out
index ff686a3..2b7440f 100644
--- a/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out
@@ -62,13 +62,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -79,8 +79,8 @@
 0:?     'g_tTexbis' (layout( r32i) uniform itextureBuffer)
 0:?     'g_tTexbus' (layout( r32ui) uniform utextureBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -149,13 +149,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -166,8 +166,8 @@
 0:?     'g_tTexbis' (layout( r32i) uniform itextureBuffer)
 0:?     'g_tTexbus' (layout( r32ui) uniform utextureBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -203,8 +203,8 @@
                               Name 46  "g_tTexbus"
                               Name 54  "psout"
                               Name 64  "flattenTemp"
-                              Name 67  "Color"
-                              Name 71  "Depth"
+                              Name 67  "@entryPointOutput.Color"
+                              Name 71  "@entryPointOutput.Depth"
                               Name 74  "g_tTexbfs_test"
                               Decorate 16(g_tTexbfs) DescriptorSet 0
                               MemberDecorate 22($Global) 0 Offset 0
@@ -219,8 +219,8 @@
                               Decorate 24 DescriptorSet 0
                               Decorate 35(g_tTexbis) DescriptorSet 0
                               Decorate 46(g_tTexbus) DescriptorSet 0
-                              Decorate 67(Color) Location 0
-                              Decorate 71(Depth) BuiltIn FragDepth
+                              Decorate 67(@entryPointOutput.Color) Location 0
+                              Decorate 71(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 74(g_tTexbfs_test) DescriptorSet 0
                               Decorate 74(g_tTexbfs_test) Binding 0
                2:             TypeVoid
@@ -258,9 +258,9 @@
               57:             TypePointer Function 7(fvec4)
               59:     18(int) Constant 1
               66:             TypePointer Output 7(fvec4)
-       67(Color):     66(ptr) Variable Output
+67(@entryPointOutput.Color):     66(ptr) Variable Output
               70:             TypePointer Output 6(float)
-       71(Depth):     70(ptr) Variable Output
+71(@entryPointOutput.Depth):     70(ptr) Variable Output
 74(g_tTexbfs_test):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -269,10 +269,10 @@
                               Store 64(flattenTemp) 65
               68:     57(ptr) AccessChain 64(flattenTemp) 25
               69:    7(fvec4) Load 68
-                              Store 67(Color) 69
+                              Store 67(@entryPointOutput.Color) 69
               72:     12(ptr) AccessChain 64(flattenTemp) 59
               73:    6(float) Load 72
-                              Store 71(Depth) 73
+                              Store 71(@entryPointOutput.Depth) 73
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.offset.dx10.frag.out b/Test/baseResults/hlsl.load.offset.dx10.frag.out
index 473db61..9f77ec0 100644
--- a/Test/baseResults/hlsl.load.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.offset.dx10.frag.out
@@ -239,13 +239,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -274,8 +274,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -521,13 +521,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -556,8 +556,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -598,8 +598,8 @@
                               Name 130  "g_tTex3du4"
                               Name 141  "psout"
                               Name 152  "flattenTemp"
-                              Name 155  "Color"
-                              Name 159  "Depth"
+                              Name 155  "@entryPointOutput.Color"
+                              Name 159  "@entryPointOutput.Depth"
                               Name 164  "g_sSamp"
                               Name 167  "g_tTexcdf4"
                               Name 170  "g_tTexcdi4"
@@ -633,8 +633,8 @@
                               Decorate 102(g_tTex3df4) DescriptorSet 0
                               Decorate 118(g_tTex3di4) DescriptorSet 0
                               Decorate 130(g_tTex3du4) DescriptorSet 0
-                              Decorate 155(Color) Location 0
-                              Decorate 159(Depth) BuiltIn FragDepth
+                              Decorate 155(@entryPointOutput.Color) Location 0
+                              Decorate 159(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 164(g_sSamp) DescriptorSet 0
                               Decorate 164(g_sSamp) Binding 0
                               Decorate 167(g_tTexcdf4) DescriptorSet 0
@@ -712,9 +712,9 @@
              145:             TypePointer Function 7(fvec4)
              147:             TypePointer Function 6(float)
              154:             TypePointer Output 7(fvec4)
-      155(Color):    154(ptr) Variable Output
+155(@entryPointOutput.Color):    154(ptr) Variable Output
              158:             TypePointer Output 6(float)
-      159(Depth):    158(ptr) Variable Output
+159(@entryPointOutput.Depth):    158(ptr) Variable Output
              162:             TypeSampler
              163:             TypePointer UniformConstant 162
     164(g_sSamp):    163(ptr) Variable UniformConstant
@@ -761,10 +761,10 @@
                               Store 152(flattenTemp) 153
              156:    145(ptr) AccessChain 152(flattenTemp) 142
              157:    7(fvec4) Load 156
-                              Store 155(Color) 157
+                              Store 155(@entryPointOutput.Color) 157
              160:    147(ptr) AccessChain 152(flattenTemp) 23
              161:    6(float) Load 160
-                              Store 159(Depth) 161
+                              Store 159(@entryPointOutput.Depth) 161
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out
index 4b6a09f..2e4eca9 100644
--- a/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out
@@ -176,13 +176,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -211,8 +211,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -395,13 +395,13 @@
 0:48          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:48          Color: direct index for structure ( temp 4-component vector of float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
 0:48              0 (const int)
 0:48        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:48          Depth: direct index for structure ( temp float)
 0:48            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:48            Constant:
@@ -430,8 +430,8 @@
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -469,8 +469,8 @@
                               Name 93  "g_tTex2du4a"
                               Name 104  "psout"
                               Name 116  "flattenTemp"
-                              Name 119  "Color"
-                              Name 123  "Depth"
+                              Name 119  "@entryPointOutput.Color"
+                              Name 123  "@entryPointOutput.Depth"
                               Name 128  "g_sSamp"
                               Name 131  "g_tTex1df4"
                               Name 134  "g_tTex1di4"
@@ -503,8 +503,8 @@
                               Decorate 64(g_tTex2df4a) DescriptorSet 0
                               Decorate 81(g_tTex2di4a) DescriptorSet 0
                               Decorate 93(g_tTex2du4a) DescriptorSet 0
-                              Decorate 119(Color) Location 0
-                              Decorate 123(Depth) BuiltIn FragDepth
+                              Decorate 119(@entryPointOutput.Color) Location 0
+                              Decorate 123(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 128(g_sSamp) DescriptorSet 0
                               Decorate 128(g_sSamp) Binding 0
                               Decorate 131(g_tTex1df4) DescriptorSet 0
@@ -574,9 +574,9 @@
              110:     16(int) Constant 1
              111:             TypePointer Function 6(float)
              118:             TypePointer Output 7(fvec4)
-      119(Color):    118(ptr) Variable Output
+119(@entryPointOutput.Color):    118(ptr) Variable Output
              122:             TypePointer Output 6(float)
-      123(Depth):    122(ptr) Variable Output
+123(@entryPointOutput.Depth):    122(ptr) Variable Output
              126:             TypeSampler
              127:             TypePointer UniformConstant 126
     128(g_sSamp):    127(ptr) Variable UniformConstant
@@ -632,10 +632,10 @@
                               Store 116(flattenTemp) 117
              120:    108(ptr) AccessChain 116(flattenTemp) 105
              121:    7(fvec4) Load 120
-                              Store 119(Color) 121
+                              Store 119(@entryPointOutput.Color) 121
              124:    111(ptr) AccessChain 116(flattenTemp) 110
              125:    6(float) Load 124
-                              Store 123(Depth) 125
+                              Store 123(@entryPointOutput.Depth) 125
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out
index 3e748cc..851f824 100644
--- a/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out
@@ -40,7 +40,7 @@
 0:?     Sequence
 0:22      Sequence
 0:22        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:22          Color: direct index for structure ( temp 4-component vector of float)
 0:22            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:22            Constant:
@@ -50,7 +50,7 @@
 0:?     'g_tBuffI' (layout( rgba32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -97,7 +97,7 @@
 0:?     Sequence
 0:22      Sequence
 0:22        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:22          Color: direct index for structure ( temp 4-component vector of float)
 0:22            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:22            Constant:
@@ -107,14 +107,14 @@
 0:?     'g_tBuffI' (layout( rgba32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 57
 
                               Capability Shader
-                              Capability SampledBuffer
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 54
@@ -138,7 +138,7 @@
                               Name 31  "g_tBuffU"
                               Name 39  "g_tBuffI"
                               Name 45  "psout"
-                              Name 54  "Color"
+                              Name 54  "@entryPointOutput.Color"
                               Decorate 14(g_tBuffF) DescriptorSet 0
                               MemberDecorate 20($Global) 0 Offset 0
                               MemberDecorate 20($Global) 1 Offset 8
@@ -152,7 +152,7 @@
                               Decorate 22 DescriptorSet 0
                               Decorate 31(g_tBuffU) DescriptorSet 0
                               Decorate 39(g_tBuffI) DescriptorSet 0
-                              Decorate 54(Color) Location 0
+                              Decorate 54(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -184,12 +184,12 @@
               47:    7(fvec4) ConstantComposite 46 46 46 46
               48:             TypePointer Function 7(fvec4)
               53:             TypePointer Output 7(fvec4)
-       54(Color):     53(ptr) Variable Output
+54(@entryPointOutput.Color):     53(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               55:8(PS_OUTPUT) FunctionCall 10(@main()
               56:    7(fvec4) CompositeExtract 55 0
-                              Store 54(Color) 56
+                              Store 54(@entryPointOutput.Color) 56
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out
index 884ed8f..1093100 100644
--- a/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out
@@ -68,13 +68,13 @@
 0:40          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:40          Color: direct index for structure ( temp 4-component vector of float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
 0:40              0 (const int)
 0:40        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:40          Depth: direct index for structure ( temp float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
@@ -97,8 +97,8 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -173,13 +173,13 @@
 0:40          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:40          Color: direct index for structure ( temp 4-component vector of float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
 0:40              0 (const int)
 0:40        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:40          Depth: direct index for structure ( temp float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
@@ -202,15 +202,15 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 119
 
                               Capability Shader
-                              Capability Sampled1D
+                              Capability Image1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 82 86
@@ -239,8 +239,8 @@
                               Name 62  "g_tTex2du4a"
                               Name 68  "psout"
                               Name 79  "flattenTemp"
-                              Name 82  "Color"
-                              Name 86  "Depth"
+                              Name 82  "@entryPointOutput.Color"
+                              Name 86  "@entryPointOutput.Depth"
                               Name 91  "g_sSamp"
                               Name 94  "g_tTex1df4"
                               Name 97  "g_tTex1di4"
@@ -267,8 +267,8 @@
                               Decorate 46(g_tTex2df4a) DescriptorSet 0
                               Decorate 55(g_tTex2di4a) DescriptorSet 0
                               Decorate 62(g_tTex2du4a) DescriptorSet 0
-                              Decorate 82(Color) Location 0
-                              Decorate 86(Depth) BuiltIn FragDepth
+                              Decorate 82(@entryPointOutput.Color) Location 0
+                              Decorate 86(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 91(g_sSamp) DescriptorSet 0
                               Decorate 91(g_sSamp) Binding 0
                               Decorate 94(g_tTex1df4) DescriptorSet 0
@@ -325,9 +325,9 @@
               72:             TypePointer Function 7(fvec4)
               74:             TypePointer Function 6(float)
               81:             TypePointer Output 7(fvec4)
-       82(Color):     81(ptr) Variable Output
+82(@entryPointOutput.Color):     81(ptr) Variable Output
               85:             TypePointer Output 6(float)
-       86(Depth):     85(ptr) Variable Output
+86(@entryPointOutput.Depth):     85(ptr) Variable Output
               89:             TypeSampler
               90:             TypePointer UniformConstant 89
      91(g_sSamp):     90(ptr) Variable UniformConstant
@@ -365,10 +365,10 @@
                               Store 79(flattenTemp) 80
               83:     72(ptr) AccessChain 79(flattenTemp) 69
               84:    7(fvec4) Load 83
-                              Store 82(Color) 84
+                              Store 82(@entryPointOutput.Color) 84
               87:     74(ptr) AccessChain 79(flattenTemp) 23
               88:    6(float) Load 87
-                              Store 86(Depth) 88
+                              Store 86(@entryPointOutput.Depth) 88
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out
index 3061867..1347a51 100644
--- a/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out
+++ b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out
@@ -86,13 +86,13 @@
 0:40          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:40          Color: direct index for structure ( temp 4-component vector of float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
 0:40              0 (const int)
 0:40        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:40          Depth: direct index for structure ( temp float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
@@ -115,8 +115,8 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -209,13 +209,13 @@
 0:40          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:40          Color: direct index for structure ( temp 4-component vector of float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
 0:40              0 (const int)
 0:40        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:40          Depth: direct index for structure ( temp float)
 0:40            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:40            Constant:
@@ -238,15 +238,15 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 132
 
                               Capability Shader
-                              Capability Sampled1D
+                              Capability Image1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 104 108
@@ -278,8 +278,8 @@
                               Name 85  "g_tTex3du4"
                               Name 91  "psout"
                               Name 101  "flattenTemp"
-                              Name 104  "Color"
-                              Name 108  "Depth"
+                              Name 104  "@entryPointOutput.Color"
+                              Name 108  "@entryPointOutput.Depth"
                               Name 113  "g_sSamp"
                               Name 116  "g_tTex1df4a"
                               Name 119  "g_tTex1di4a"
@@ -307,8 +307,8 @@
                               Decorate 69(g_tTex3df4) DescriptorSet 0
                               Decorate 78(g_tTex3di4) DescriptorSet 0
                               Decorate 85(g_tTex3du4) DescriptorSet 0
-                              Decorate 104(Color) Location 0
-                              Decorate 108(Depth) BuiltIn FragDepth
+                              Decorate 104(@entryPointOutput.Color) Location 0
+                              Decorate 108(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 113(g_sSamp) DescriptorSet 0
                               Decorate 113(g_sSamp) Binding 0
                               Decorate 116(g_tTex1df4a) DescriptorSet 0
@@ -371,9 +371,9 @@
               94:             TypePointer Function 7(fvec4)
               96:             TypePointer Function 6(float)
              103:             TypePointer Output 7(fvec4)
-      104(Color):    103(ptr) Variable Output
+104(@entryPointOutput.Color):    103(ptr) Variable Output
              107:             TypePointer Output 6(float)
-      108(Depth):    107(ptr) Variable Output
+108(@entryPointOutput.Depth):    107(ptr) Variable Output
              111:             TypeSampler
              112:             TypePointer UniformConstant 111
     113(g_sSamp):    112(ptr) Variable UniformConstant
@@ -402,10 +402,10 @@
                               Store 101(flattenTemp) 102
              105:     94(ptr) AccessChain 101(flattenTemp) 23
              106:    7(fvec4) Load 105
-                              Store 104(Color) 106
+                              Store 104(@entryPointOutput.Color) 106
              109:     96(ptr) AccessChain 101(flattenTemp) 48
              110:    6(float) Load 109
-                              Store 108(Depth) 110
+                              Store 108(@entryPointOutput.Depth) 110
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.logical.binary.frag.out b/Test/baseResults/hlsl.logical.binary.frag.out
index 730205b..1df6ae4 100644
--- a/Test/baseResults/hlsl.logical.binary.frag.out
+++ b/Test/baseResults/hlsl.logical.binary.frag.out
@@ -52,14 +52,14 @@
 0:?     Sequence
 0:12      Sequence
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:12          Color: direct index for structure ( temp 4-component vector of float)
 0:12            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:12            Constant:
 0:12              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -118,14 +118,14 @@
 0:?     Sequence
 0:12      Sequence
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:12          Color: direct index for structure ( temp 4-component vector of float)
 0:12            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:12            Constant:
 0:12              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -148,14 +148,14 @@
                               MemberName 14($Global) 3  "fval4"
                               Name 16  ""
                               Name 45  "psout"
-                              Name 54  "Color"
+                              Name 54  "@entryPointOutput.Color"
                               MemberDecorate 14($Global) 0 Offset 0
                               MemberDecorate 14($Global) 1 Offset 16
                               MemberDecorate 14($Global) 2 Offset 32
                               MemberDecorate 14($Global) 3 Offset 48
                               Decorate 14($Global) Block
                               Decorate 16 DescriptorSet 0
-                              Decorate 54(Color) Location 0
+                              Decorate 54(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -179,12 +179,12 @@
               47:    7(fvec4) ConstantComposite 46 46 46 46
               48:             TypePointer Function 7(fvec4)
               53:             TypePointer Output 7(fvec4)
-       54(Color):     53(ptr) Variable Output
+54(@entryPointOutput.Color):     53(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               55:8(PS_OUTPUT) FunctionCall 10(@main()
               56:    7(fvec4) CompositeExtract 55 0
-                              Store 54(Color) 56
+                              Store 54(@entryPointOutput.Color) 56
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.logical.binary.vec.frag.out b/Test/baseResults/hlsl.logical.binary.vec.frag.out
index 8243814..53fa2c1 100644
--- a/Test/baseResults/hlsl.logical.binary.vec.frag.out
+++ b/Test/baseResults/hlsl.logical.binary.vec.frag.out
@@ -115,14 +115,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a,  uniform 4-component vector of bool b4b,  uniform bool b1a,  uniform bool b1b})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -244,14 +244,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a,  uniform 4-component vector of bool b4b,  uniform bool b1a,  uniform bool b1b})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -281,14 +281,14 @@
                               Name 67  "r20"
                               Name 77  "r21"
                               Name 87  "psout"
-                              Name 112  "Color"
+                              Name 112  "@entryPointOutput.Color"
                               MemberDecorate 18($Global) 0 Offset 0
                               MemberDecorate 18($Global) 1 Offset 16
                               MemberDecorate 18($Global) 2 Offset 32
                               MemberDecorate 18($Global) 3 Offset 36
                               Decorate 18($Global) Block
                               Decorate 20 DescriptorSet 0
-                              Decorate 112(Color) Location 0
+                              Decorate 112(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -319,12 +319,12 @@
              104:    7(fvec4) ConstantComposite 102 102 102 102
              106:             TypePointer Function 7(fvec4)
              111:             TypePointer Output 7(fvec4)
-      112(Color):    111(ptr) Variable Output
+112(@entryPointOutput.Color):    111(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              113:8(PS_OUTPUT) FunctionCall 10(@main()
              114:    7(fvec4) CompositeExtract 113 0
-                              Store 112(Color) 114
+                              Store 112(@entryPointOutput.Color) 114
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.logical.unary.frag.out b/Test/baseResults/hlsl.logical.unary.frag.out
index 7121d92..a27b0bd 100644
--- a/Test/baseResults/hlsl.logical.unary.frag.out
+++ b/Test/baseResults/hlsl.logical.unary.frag.out
@@ -80,14 +80,14 @@
 0:?     Sequence
 0:12      Sequence
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:12          Color: direct index for structure ( temp 4-component vector of float)
 0:12            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:12            Constant:
 0:12              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -174,14 +174,14 @@
 0:?     Sequence
 0:12      Sequence
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:12          Color: direct index for structure ( temp 4-component vector of float)
 0:12            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:12            Constant:
 0:12              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -204,14 +204,14 @@
                               MemberName 14($Global) 3  "fval4"
                               Name 16  ""
                               Name 72  "psout"
-                              Name 81  "Color"
+                              Name 81  "@entryPointOutput.Color"
                               MemberDecorate 14($Global) 0 Offset 0
                               MemberDecorate 14($Global) 1 Offset 16
                               MemberDecorate 14($Global) 2 Offset 32
                               MemberDecorate 14($Global) 3 Offset 48
                               Decorate 14($Global) Block
                               Decorate 16 DescriptorSet 0
-                              Decorate 81(Color) Location 0
+                              Decorate 81(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -244,12 +244,12 @@
               74:    7(fvec4) ConstantComposite 73 73 73 73
               75:             TypePointer Function 7(fvec4)
               80:             TypePointer Output 7(fvec4)
-       81(Color):     80(ptr) Variable Output
+81(@entryPointOutput.Color):     80(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               82:8(PS_OUTPUT) FunctionCall 10(@main()
               83:    7(fvec4) CompositeExtract 82 0
-                              Store 81(Color) 83
+                              Store 81(@entryPointOutput.Color) 83
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.matNx1.frag.out b/Test/baseResults/hlsl.matNx1.frag.out
index 0360db4..f3b5dd2 100644
--- a/Test/baseResults/hlsl.matNx1.frag.out
+++ b/Test/baseResults/hlsl.matNx1.frag.out
@@ -65,13 +65,13 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:27          color: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:27            Constant:
 0:27              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -143,13 +143,13 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:27          color: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:27            Constant:
 0:27              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -182,8 +182,8 @@
                               Name 58  "r13"
                               Name 59  "f1x4"
                               Name 63  "ps_output"
-                              Name 74  "color"
-                              Decorate 74(color) Location 0
+                              Name 74  "@entryPointOutput.color"
+                              Decorate 74(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                8:             TypeFloat 32
@@ -214,12 +214,12 @@
               67:    9(fvec4) ConstantComposite 66 66 66 66
               68:             TypePointer Function 9(fvec4)
               73:             TypePointer Output 9(fvec4)
-       74(color):     73(ptr) Variable Output
+74(@entryPointOutput.color):     73(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               75:10(PS_OUTPUT) FunctionCall 12(@main()
               76:    9(fvec4) CompositeExtract 75 0
-                              Store 74(color) 76
+                              Store 74(@entryPointOutput.color) 76
                               Return
                               FunctionEnd
   6(TestMatNx1():           2 Function None 3
diff --git a/Test/baseResults/hlsl.matType.bool.frag.out b/Test/baseResults/hlsl.matType.bool.frag.out
index 3f261a3..894f203 100644
--- a/Test/baseResults/hlsl.matType.bool.frag.out
+++ b/Test/baseResults/hlsl.matType.bool.frag.out
@@ -105,13 +105,13 @@
 0:?     Sequence
 0:49      Sequence
 0:49        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:49          color: direct index for structure ( temp 4-component vector of float)
 0:49            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:49            Constant:
 0:49              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -223,13 +223,13 @@
 0:?     Sequence
 0:49      Sequence
 0:49        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:49          color: direct index for structure ( temp 4-component vector of float)
 0:49            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:49            Constant:
 0:49              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -279,8 +279,8 @@
                               Name 111  "r33"
                               Name 112  "b4x4"
                               Name 116  "ps_output"
-                              Name 127  "color"
-                              Decorate 127(color) Location 0
+                              Name 127  "@entryPointOutput.color"
+                              Decorate 127(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                8:             TypeFloat 32
@@ -331,12 +331,12 @@
              120:    9(fvec4) ConstantComposite 119 119 119 119
              121:             TypePointer Function 9(fvec4)
              126:             TypePointer Output 9(fvec4)
-      127(color):    126(ptr) Variable Output
+127(@entryPointOutput.color):    126(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              128:10(PS_OUTPUT) FunctionCall 12(@main()
              129:    9(fvec4) CompositeExtract 128 0
-                              Store 127(color) 129
+                              Store 127(@entryPointOutput.color) 129
                               Return
                               FunctionEnd
 6(TestBoolMatTypes():           2 Function None 3
diff --git a/Test/baseResults/hlsl.matType.int.frag.out b/Test/baseResults/hlsl.matType.int.frag.out
index 602f068..7aa3a5d 100644
--- a/Test/baseResults/hlsl.matType.int.frag.out
+++ b/Test/baseResults/hlsl.matType.int.frag.out
@@ -188,13 +188,13 @@
 0:?     Sequence
 0:93      Sequence
 0:93        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:93          color: direct index for structure ( temp 4-component vector of float)
 0:93            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:93            Constant:
 0:93              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -389,13 +389,13 @@
 0:?     Sequence
 0:93      Sequence
 0:93        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:93          color: direct index for structure ( temp 4-component vector of float)
 0:93            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:93            Constant:
 0:93              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -478,8 +478,8 @@
                               Name 214  "r33"
                               Name 215  "u4x4"
                               Name 219  "ps_output"
-                              Name 229  "color"
-                              Decorate 229(color) Location 0
+                              Name 229  "@entryPointOutput.color"
+                              Decorate 229(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
               10:             TypeFloat 32
@@ -566,12 +566,12 @@
              222:   11(fvec4) ConstantComposite 221 221 221 221
              223:             TypePointer Function 11(fvec4)
              228:             TypePointer Output 11(fvec4)
-      229(color):    228(ptr) Variable Output
+229(@entryPointOutput.color):    228(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              230:12(PS_OUTPUT) FunctionCall 14(@main()
              231:   11(fvec4) CompositeExtract 230 0
-                              Store 229(color) 231
+                              Store 229(@entryPointOutput.color) 231
                               Return
                               FunctionEnd
 6(TestIntMatTypes():           2 Function None 3
diff --git a/Test/baseResults/hlsl.matpack-1.frag.out b/Test/baseResults/hlsl.matpack-1.frag.out
new file mode 100644
index 0000000..761c8c3
--- /dev/null
+++ b/Test/baseResults/hlsl.matpack-1.frag.out
@@ -0,0 +1,187 @@
+hlsl.matpack-1.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:23  Function Definition: @main( ( temp 4-component vector of float)
+0:23    Function Parameters: 
+0:?     Sequence
+0:25      Branch: Return with expression
+0:24        add ( temp 4-component vector of float)
+0:24          vector-times-matrix ( temp 4-component vector of float)
+0:24            vec1: direct index for structure ( temp 4-component vector of float)
+0:24              g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo})
+0:24                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:24                Constant:
+0:24                  0 (const uint)
+0:24              Constant:
+0:24                2 (const int)
+0:24            mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:24              g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo})
+0:24                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:24                Constant:
+0:24                  0 (const uint)
+0:24              Constant:
+0:24                0 (const int)
+0:25          vector-times-matrix ( temp 4-component vector of float)
+0:25            vec1: direct index for structure ( temp 4-component vector of float)
+0:25              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1})
+0:25                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:25                Constant:
+0:25                  1 (const uint)
+0:25              Constant:
+0:25                1 (const int)
+0:25            mat1: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:25              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1})
+0:25                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:25                Constant:
+0:25                  1 (const uint)
+0:25              Constant:
+0:25                0 (const int)
+0:23  Function Definition: main( ( temp void)
+0:23    Function Parameters: 
+0:?     Sequence
+0:23      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:23        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:23  Function Definition: @main( ( temp 4-component vector of float)
+0:23    Function Parameters: 
+0:?     Sequence
+0:25      Branch: Return with expression
+0:24        add ( temp 4-component vector of float)
+0:24          vector-times-matrix ( temp 4-component vector of float)
+0:24            vec1: direct index for structure ( temp 4-component vector of float)
+0:24              g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo})
+0:24                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:24                Constant:
+0:24                  0 (const uint)
+0:24              Constant:
+0:24                2 (const int)
+0:24            mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:24              g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo})
+0:24                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:24                Constant:
+0:24                  0 (const uint)
+0:24              Constant:
+0:24                0 (const int)
+0:25          vector-times-matrix ( temp 4-component vector of float)
+0:25            vec1: direct index for structure ( temp 4-component vector of float)
+0:25              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1})
+0:25                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:25                Constant:
+0:25                  1 (const uint)
+0:25              Constant:
+0:25                1 (const int)
+0:25            mat1: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:25              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1})
+0:25                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:25                Constant:
+0:25                  1 (const uint)
+0:25              Constant:
+0:25                0 (const int)
+0:23  Function Definition: main( ( temp void)
+0:23    Function Parameters: 
+0:?     Sequence
+0:23      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:23        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2,  temp 4-component vector of float vec1,  temp float foo} g_MyBuffer1, layout( row_major std140) uniform structure{layout( column_major) temp 4X4 matrix of float mat1,  temp 4-component vector of float vec1} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 39
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 37
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "@main("
+                              Name 12  "MyBuffer1"
+                              MemberName 12(MyBuffer1) 0  "mat1"
+                              MemberName 12(MyBuffer1) 1  "mat2"
+                              MemberName 12(MyBuffer1) 2  "vec1"
+                              MemberName 12(MyBuffer1) 3  "foo"
+                              Name 13  "MyBuffer2"
+                              MemberName 13(MyBuffer2) 0  "mat1"
+                              MemberName 13(MyBuffer2) 1  "vec1"
+                              Name 14  "Example"
+                              MemberName 14(Example) 0  "g_MyBuffer1"
+                              MemberName 14(Example) 1  "g_MyBuffer2"
+                              MemberName 14(Example) 2  "mat1a"
+                              Name 16  ""
+                              Name 37  "@entryPointOutput"
+                              MemberDecorate 12(MyBuffer1) 0 RowMajor
+                              MemberDecorate 12(MyBuffer1) 0 Offset 0
+                              MemberDecorate 12(MyBuffer1) 0 MatrixStride 16
+                              MemberDecorate 12(MyBuffer1) 1 ColMajor
+                              MemberDecorate 12(MyBuffer1) 1 Offset 64
+                              MemberDecorate 12(MyBuffer1) 1 MatrixStride 16
+                              MemberDecorate 12(MyBuffer1) 2 Offset 128
+                              MemberDecorate 12(MyBuffer1) 3 Offset 144
+                              MemberDecorate 13(MyBuffer2) 0 ColMajor
+                              MemberDecorate 13(MyBuffer2) 0 Offset 0
+                              MemberDecorate 13(MyBuffer2) 0 MatrixStride 16
+                              MemberDecorate 13(MyBuffer2) 1 Offset 64
+                              MemberDecorate 14(Example) 0 Offset 0
+                              MemberDecorate 14(Example) 1 Offset 160
+                              MemberDecorate 14(Example) 2 RowMajor
+                              MemberDecorate 14(Example) 2 Offset 240
+                              MemberDecorate 14(Example) 2 MatrixStride 16
+                              Decorate 14(Example) Block
+                              Decorate 16 DescriptorSet 0
+                              Decorate 37(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              11:             TypeMatrix 7(fvec4) 4
+   12(MyBuffer1):             TypeStruct 11 11 7(fvec4) 6(float)
+   13(MyBuffer2):             TypeStruct 11 7(fvec4)
+     14(Example):             TypeStruct 12(MyBuffer1) 13(MyBuffer2) 11
+              15:             TypePointer Uniform 14(Example)
+              16:     15(ptr) Variable Uniform
+              17:             TypeInt 32 1
+              18:     17(int) Constant 0
+              19:     17(int) Constant 2
+              20:             TypePointer Uniform 7(fvec4)
+              23:             TypePointer Uniform 11
+              27:     17(int) Constant 1
+              36:             TypePointer Output 7(fvec4)
+37(@entryPointOutput):     36(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              38:    7(fvec4) FunctionCall 9(@main()
+                              Store 37(@entryPointOutput) 38
+                              Return
+                              FunctionEnd
+       9(@main():    7(fvec4) Function None 8
+              10:             Label
+              21:     20(ptr) AccessChain 16 18 19
+              22:    7(fvec4) Load 21
+              24:     23(ptr) AccessChain 16 18 18
+              25:          11 Load 24
+              26:    7(fvec4) VectorTimesMatrix 22 25
+              28:     20(ptr) AccessChain 16 27 27
+              29:    7(fvec4) Load 28
+              30:     23(ptr) AccessChain 16 27 18
+              31:          11 Load 30
+              32:    7(fvec4) VectorTimesMatrix 29 31
+              33:    7(fvec4) FAdd 26 32
+                              ReturnValue 33
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.matpack-pragma.frag.out b/Test/baseResults/hlsl.matpack-pragma.frag.out
new file mode 100644
index 0000000..761ab9a
--- /dev/null
+++ b/Test/baseResults/hlsl.matpack-pragma.frag.out
@@ -0,0 +1,268 @@
+hlsl.matpack-pragma.frag
+WARNING: 0:19: 'random_string_foo' : unknown pack_matrix pragma value 
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:29  Function Definition: @main( ( temp 4-component vector of float)
+0:29    Function Parameters: 
+0:?     Sequence
+0:32      Branch: Return with expression
+0:32        add ( temp 4-component vector of float)
+0:32          add ( temp 4-component vector of float)
+0:31            add ( temp 4-component vector of float)
+0:31              add ( temp 4-component vector of float)
+0:31                add ( temp 4-component vector of float)
+0:31                  direct index (layout( row_major) temp 4-component vector of float)
+0:31                    mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:31                      g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                        'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                        Constant:
+0:31                          0 (const uint)
+0:31                      Constant:
+0:31                        0 (const int)
+0:31                    Constant:
+0:31                      0 (const int)
+0:31                  direct index (layout( column_major) temp 4-component vector of float)
+0:31                    mat2: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:31                      g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                        'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                        Constant:
+0:31                          0 (const uint)
+0:31                      Constant:
+0:31                        1 (const int)
+0:31                    Constant:
+0:31                      0 (const int)
+0:31                direct index (layout( column_major) temp 4-component vector of float)
+0:31                  mat3: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:31                    g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                      'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                      Constant:
+0:31                        0 (const uint)
+0:31                    Constant:
+0:31                      2 (const int)
+0:31                  Constant:
+0:31                    0 (const int)
+0:32              direct index (layout( row_major) temp 4-component vector of float)
+0:32                mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:32                  g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                    'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                    Constant:
+0:32                      1 (const uint)
+0:32                  Constant:
+0:32                    0 (const int)
+0:32                Constant:
+0:32                  0 (const int)
+0:32            direct index (layout( column_major) temp 4-component vector of float)
+0:32              mat2: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:32                g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                  'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                  Constant:
+0:32                    1 (const uint)
+0:32                Constant:
+0:32                  1 (const int)
+0:32              Constant:
+0:32                0 (const int)
+0:32          direct index (layout( row_major) temp 4-component vector of float)
+0:32            mat3: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:32              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                Constant:
+0:32                  1 (const uint)
+0:32              Constant:
+0:32                2 (const int)
+0:32            Constant:
+0:32              0 (const int)
+0:29  Function Definition: main( ( temp void)
+0:29    Function Parameters: 
+0:?     Sequence
+0:29      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:29        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:29  Function Definition: @main( ( temp 4-component vector of float)
+0:29    Function Parameters: 
+0:?     Sequence
+0:32      Branch: Return with expression
+0:32        add ( temp 4-component vector of float)
+0:32          add ( temp 4-component vector of float)
+0:31            add ( temp 4-component vector of float)
+0:31              add ( temp 4-component vector of float)
+0:31                add ( temp 4-component vector of float)
+0:31                  direct index (layout( row_major) temp 4-component vector of float)
+0:31                    mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:31                      g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                        'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                        Constant:
+0:31                          0 (const uint)
+0:31                      Constant:
+0:31                        0 (const int)
+0:31                    Constant:
+0:31                      0 (const int)
+0:31                  direct index (layout( column_major) temp 4-component vector of float)
+0:31                    mat2: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:31                      g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                        'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                        Constant:
+0:31                          0 (const uint)
+0:31                      Constant:
+0:31                        1 (const int)
+0:31                    Constant:
+0:31                      0 (const int)
+0:31                direct index (layout( column_major) temp 4-component vector of float)
+0:31                  mat3: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:31                    g_MyBuffer1: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3})
+0:31                      'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:31                      Constant:
+0:31                        0 (const uint)
+0:31                    Constant:
+0:31                      2 (const int)
+0:31                  Constant:
+0:31                    0 (const int)
+0:32              direct index (layout( row_major) temp 4-component vector of float)
+0:32                mat1: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:32                  g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                    'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                    Constant:
+0:32                      1 (const uint)
+0:32                  Constant:
+0:32                    0 (const int)
+0:32                Constant:
+0:32                  0 (const int)
+0:32            direct index (layout( column_major) temp 4-component vector of float)
+0:32              mat2: direct index for structure (layout( column_major) temp 4X4 matrix of float)
+0:32                g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                  'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                  Constant:
+0:32                    1 (const uint)
+0:32                Constant:
+0:32                  1 (const int)
+0:32              Constant:
+0:32                0 (const int)
+0:32          direct index (layout( row_major) temp 4-component vector of float)
+0:32            mat3: direct index for structure (layout( row_major) temp 4X4 matrix of float)
+0:32              g_MyBuffer2: direct index for structure (layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3})
+0:32                'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:32                Constant:
+0:32                  1 (const uint)
+0:32              Constant:
+0:32                2 (const int)
+0:32            Constant:
+0:32              0 (const int)
+0:29  Function Definition: main( ( temp void)
+0:29    Function Parameters: 
+0:?     Sequence
+0:29      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:29        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( column_major) temp 4X4 matrix of float mat3} g_MyBuffer1, layout( row_major std140) uniform structure{layout( row_major) temp 4X4 matrix of float mat1, layout( column_major) temp 4X4 matrix of float mat2, layout( row_major) temp 4X4 matrix of float mat3} g_MyBuffer2, layout( row_major std140) uniform 4X4 matrix of float mat1a})
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 44
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 42
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "@main("
+                              Name 12  "MyBuffer1"
+                              MemberName 12(MyBuffer1) 0  "mat1"
+                              MemberName 12(MyBuffer1) 1  "mat2"
+                              MemberName 12(MyBuffer1) 2  "mat3"
+                              Name 13  "MyBuffer2"
+                              MemberName 13(MyBuffer2) 0  "mat1"
+                              MemberName 13(MyBuffer2) 1  "mat2"
+                              MemberName 13(MyBuffer2) 2  "mat3"
+                              Name 14  "Example"
+                              MemberName 14(Example) 0  "g_MyBuffer1"
+                              MemberName 14(Example) 1  "g_MyBuffer2"
+                              MemberName 14(Example) 2  "mat1a"
+                              Name 16  ""
+                              Name 42  "@entryPointOutput"
+                              MemberDecorate 12(MyBuffer1) 0 RowMajor
+                              MemberDecorate 12(MyBuffer1) 0 Offset 0
+                              MemberDecorate 12(MyBuffer1) 0 MatrixStride 16
+                              MemberDecorate 12(MyBuffer1) 1 ColMajor
+                              MemberDecorate 12(MyBuffer1) 1 Offset 64
+                              MemberDecorate 12(MyBuffer1) 1 MatrixStride 16
+                              MemberDecorate 12(MyBuffer1) 2 ColMajor
+                              MemberDecorate 12(MyBuffer1) 2 Offset 128
+                              MemberDecorate 12(MyBuffer1) 2 MatrixStride 16
+                              MemberDecorate 13(MyBuffer2) 0 RowMajor
+                              MemberDecorate 13(MyBuffer2) 0 Offset 0
+                              MemberDecorate 13(MyBuffer2) 0 MatrixStride 16
+                              MemberDecorate 13(MyBuffer2) 1 ColMajor
+                              MemberDecorate 13(MyBuffer2) 1 Offset 64
+                              MemberDecorate 13(MyBuffer2) 1 MatrixStride 16
+                              MemberDecorate 13(MyBuffer2) 2 RowMajor
+                              MemberDecorate 13(MyBuffer2) 2 Offset 128
+                              MemberDecorate 13(MyBuffer2) 2 MatrixStride 16
+                              MemberDecorate 14(Example) 0 Offset 0
+                              MemberDecorate 14(Example) 1 Offset 192
+                              MemberDecorate 14(Example) 2 RowMajor
+                              MemberDecorate 14(Example) 2 Offset 384
+                              MemberDecorate 14(Example) 2 MatrixStride 16
+                              Decorate 14(Example) Block
+                              Decorate 16 DescriptorSet 0
+                              Decorate 42(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+              11:             TypeMatrix 7(fvec4) 4
+   12(MyBuffer1):             TypeStruct 11 11 11
+   13(MyBuffer2):             TypeStruct 11 11 11
+     14(Example):             TypeStruct 12(MyBuffer1) 13(MyBuffer2) 11
+              15:             TypePointer Uniform 14(Example)
+              16:     15(ptr) Variable Uniform
+              17:             TypeInt 32 1
+              18:     17(int) Constant 0
+              19:             TypePointer Uniform 7(fvec4)
+              22:     17(int) Constant 1
+              26:     17(int) Constant 2
+              41:             TypePointer Output 7(fvec4)
+42(@entryPointOutput):     41(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              43:    7(fvec4) FunctionCall 9(@main()
+                              Store 42(@entryPointOutput) 43
+                              Return
+                              FunctionEnd
+       9(@main():    7(fvec4) Function None 8
+              10:             Label
+              20:     19(ptr) AccessChain 16 18 18 18
+              21:    7(fvec4) Load 20
+              23:     19(ptr) AccessChain 16 18 22 18
+              24:    7(fvec4) Load 23
+              25:    7(fvec4) FAdd 21 24
+              27:     19(ptr) AccessChain 16 18 26 18
+              28:    7(fvec4) Load 27
+              29:    7(fvec4) FAdd 25 28
+              30:     19(ptr) AccessChain 16 22 18 18
+              31:    7(fvec4) Load 30
+              32:    7(fvec4) FAdd 29 31
+              33:     19(ptr) AccessChain 16 22 22 18
+              34:    7(fvec4) Load 33
+              35:    7(fvec4) FAdd 32 34
+              36:     19(ptr) AccessChain 16 22 26 18
+              37:    7(fvec4) Load 36
+              38:    7(fvec4) FAdd 35 37
+                              ReturnValue 38
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.matrixindex.frag.out b/Test/baseResults/hlsl.matrixindex.frag.out
index 9741c5d..c5c96a3 100644
--- a/Test/baseResults/hlsl.matrixindex.frag.out
+++ b/Test/baseResults/hlsl.matrixindex.frag.out
@@ -124,14 +124,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int idx,  uniform 3X2 matrix of float um})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -262,14 +262,14 @@
 0:?     Sequence
 0:10      Sequence
 0:10        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:10          Color: direct index for structure ( temp 4-component vector of float)
 0:10            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:10            Constant:
 0:10              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int idx,  uniform 3X2 matrix of float um})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -308,14 +308,14 @@
                               Name 60  "indexable"
                               Name 63  "r0c"
                               Name 71  "psout"
-                              Name 80  "Color"
+                              Name 80  "@entryPointOutput.Color"
                               MemberDecorate 52($Global) 0 Offset 0
                               MemberDecorate 52($Global) 1 RowMajor
                               MemberDecorate 52($Global) 1 Offset 16
                               MemberDecorate 52($Global) 1 MatrixStride 16
                               Decorate 52($Global) Block
                               Decorate 54 DescriptorSet 0
-                              Decorate 80(Color) Location 0
+                              Decorate 80(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -357,12 +357,12 @@
               70:             TypePointer Function 8(PS_OUTPUT)
               74:             TypePointer Function 7(fvec4)
               79:             TypePointer Output 7(fvec4)
-       80(Color):     79(ptr) Variable Output
+80(@entryPointOutput.Color):     79(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               81:8(PS_OUTPUT) FunctionCall 10(@main()
               82:    7(fvec4) CompositeExtract 81 0
-                              Store 80(Color) 82
+                              Store 80(@entryPointOutput.Color) 82
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.mintypes.frag.out b/Test/baseResults/hlsl.mintypes.frag.out
index 1cbd477..74bb655 100644
--- a/Test/baseResults/hlsl.mintypes.frag.out
+++ b/Test/baseResults/hlsl.mintypes.frag.out
@@ -37,14 +37,14 @@
 0:?     Sequence
 0:9      Sequence
 0:9        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:9          Color: direct index for structure ( temp 4-component vector of float)
 0:9            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:9            Constant:
 0:9              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform mediump float b1a,  uniform mediump float b1b})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -88,14 +88,14 @@
 0:?     Sequence
 0:9      Sequence
 0:9        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:9          Color: direct index for structure ( temp 4-component vector of float)
 0:9            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:9            Constant:
 0:9              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform mediump float b1a,  uniform mediump float b1b})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -122,7 +122,7 @@
                               Name 46  "mu16_2"
                               Name 49  "mu16"
                               Name 54  "psout"
-                              Name 64  "Color"
+                              Name 64  "@entryPointOutput.Color"
                               Name 67  "$Global"
                               MemberName 67($Global) 0  "b1a"
                               MemberName 67($Global) 1  "b1b"
@@ -157,7 +157,7 @@
                               Decorate 50 RelaxedPrecision
                               Decorate 51 RelaxedPrecision
                               Decorate 52 RelaxedPrecision
-                              Decorate 64(Color) Location 0
+                              Decorate 64(@entryPointOutput.Color) Location 0
                               MemberDecorate 67($Global) 0 RelaxedPrecision
                               MemberDecorate 67($Global) 0 Offset 0
                               MemberDecorate 67($Global) 1 RelaxedPrecision
@@ -187,7 +187,7 @@
               57:    7(fvec4) ConstantComposite 56 56 56 56
               58:             TypePointer Function 7(fvec4)
               63:             TypePointer Output 7(fvec4)
-       64(Color):     63(ptr) Variable Output
+64(@entryPointOutput.Color):     63(ptr) Variable Output
      67($Global):             TypeStruct 6(float) 6(float)
               68:             TypePointer Uniform 67($Global)
               69:     68(ptr) Variable Uniform
@@ -195,7 +195,7 @@
                5:             Label
               65:8(PS_OUTPUT) FunctionCall 10(@main()
               66:    7(fvec4) CompositeExtract 65 0
-                              Store 64(Color) 66
+                              Store 64(@entryPointOutput.Color) 66
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.multiDescriptorSet.frag.out b/Test/baseResults/hlsl.multiDescriptorSet.frag.out
index c6fb83f..1c0e503 100644
--- a/Test/baseResults/hlsl.multiDescriptorSet.frag.out
+++ b/Test/baseResults/hlsl.multiDescriptorSet.frag.out
@@ -1,12 +1,12 @@
 hlsl.multiDescriptorSet.frag
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 95
+// Id's are bound by 92
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 78 83 89
+                              EntryPoint Fragment 4  "main" 78 82 86
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -29,14 +29,12 @@
                               Name 59  "txDiffuseA"
                               Name 63  "samLinearA"
                               Name 76  "input"
-                              Name 78  "input_Pos"
-                              Name 81  "PS_INPUT"
-                              MemberName 81(PS_INPUT) 0  "Tex"
-                              Name 83  "input"
-                              Name 89  "@entryPointOutput"
-                              Name 90  "param"
-                              Name 93  "txDiffuseB"
-                              Name 94  "samLinearB"
+                              Name 78  "input.Pos"
+                              Name 82  "input.Tex"
+                              Name 86  "@entryPointOutput"
+                              Name 87  "param"
+                              Name 90  "txDiffuseB"
+                              Name 91  "samLinearB"
                               MemberDecorate 23(cbChangesEveryFrame) 0 RowMajor
                               MemberDecorate 23(cbChangesEveryFrame) 0 Offset 0
                               MemberDecorate 23(cbChangesEveryFrame) 0 MatrixStride 16
@@ -60,13 +58,13 @@
                               Decorate 59(txDiffuseA) Binding 0
                               Decorate 63(samLinearA) DescriptorSet 0
                               Decorate 63(samLinearA) Binding 1
-                              Decorate 78(input_Pos) BuiltIn FragCoord
-                              Decorate 83(input) Location 0
-                              Decorate 89(@entryPointOutput) Location 0
-                              Decorate 93(txDiffuseB) DescriptorSet 1
-                              Decorate 93(txDiffuseB) Binding 0
-                              Decorate 94(samLinearB) DescriptorSet 1
-                              Decorate 94(samLinearB) Binding 1
+                              Decorate 78(input.Pos) BuiltIn FragCoord
+                              Decorate 82(input.Tex) Location 0
+                              Decorate 86(@entryPointOutput) Location 0
+                              Decorate 90(txDiffuseB) DescriptorSet 1
+                              Decorate 90(txDiffuseB) Binding 0
+                              Decorate 91(samLinearB) DescriptorSet 1
+                              Decorate 91(samLinearB) Binding 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -104,30 +102,27 @@
               65:             TypeSampledImage 57
               70:             TypePointer Uniform 7(fvec4)
               77:             TypePointer Input 7(fvec4)
-   78(input_Pos):     77(ptr) Variable Input
-    81(PS_INPUT):             TypeStruct 8(fvec2)
-              82:             TypePointer Input 81(PS_INPUT)
-       83(input):     82(ptr) Variable Input
-              84:             TypePointer Input 8(fvec2)
-              88:             TypePointer Output 7(fvec4)
-89(@entryPointOutput):     88(ptr) Variable Output
-  93(txDiffuseB):     58(ptr) Variable UniformConstant
-  94(samLinearB):     62(ptr) Variable UniformConstant
+   78(input.Pos):     77(ptr) Variable Input
+              81:             TypePointer Input 8(fvec2)
+   82(input.Tex):     81(ptr) Variable Input
+              85:             TypePointer Output 7(fvec4)
+86(@entryPointOutput):     85(ptr) Variable Output
+  90(txDiffuseB):     58(ptr) Variable UniformConstant
+  91(samLinearB):     62(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
        76(input):     10(ptr) Variable Function
-       90(param):     10(ptr) Variable Function
-              79:    7(fvec4) Load 78(input_Pos)
+       87(param):     10(ptr) Variable Function
+              79:    7(fvec4) Load 78(input.Pos)
               80:     29(ptr) AccessChain 76(input) 21
                               Store 80 79
-              85:     84(ptr) AccessChain 83(input) 21
-              86:    8(fvec2) Load 85
-              87:     53(ptr) AccessChain 76(input) 52
-                              Store 87 86
-              91: 9(PS_INPUT) Load 76(input)
-                              Store 90(param) 91
-              92:    7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 90(param)
-                              Store 89(@entryPointOutput) 92
+              83:    8(fvec2) Load 82(input.Tex)
+              84:     53(ptr) AccessChain 76(input) 52
+                              Store 84 83
+              88: 9(PS_INPUT) Load 76(input)
+                              Store 87(param) 88
+              89:    7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 87(param)
+                              Store 86(@entryPointOutput) 89
                               Return
                               FunctionEnd
 13(@main(struct-PS_INPUT-vf4-vf21;):    7(fvec4) Function None 11
diff --git a/Test/baseResults/hlsl.numericsuffixes.frag.out b/Test/baseResults/hlsl.numericsuffixes.frag.out
index ee25cb3..6b7b88c 100644
--- a/Test/baseResults/hlsl.numericsuffixes.frag.out
+++ b/Test/baseResults/hlsl.numericsuffixes.frag.out
@@ -85,13 +85,13 @@
 0:?     Sequence
 0:5      Sequence
 0:5        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:5          color: direct index for structure ( temp 4-component vector of float)
 0:5            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:5            Constant:
 0:5              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -183,13 +183,13 @@
 0:?     Sequence
 0:5      Sequence
 0:5        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:5          color: direct index for structure ( temp 4-component vector of float)
 0:5            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:5            Constant:
 0:5              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -219,8 +219,8 @@
                               Name 36  "r11"
                               Name 38  "r12"
                               Name 40  "ps_output"
-                              Name 51  "color"
-                              Decorate 51(color) Location 0
+                              Name 51  "@entryPointOutput.color"
+                              Decorate 51(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -245,12 +245,12 @@
               41:     24(int) Constant 0
               45:             TypePointer Function 7(fvec4)
               50:             TypePointer Output 7(fvec4)
-       51(color):     50(ptr) Variable Output
+51(@entryPointOutput.color):     50(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               52:8(PS_OUTPUT) FunctionCall 10(@main()
               53:    7(fvec4) CompositeExtract 52 0
-                              Store 51(color) 53
+                              Store 51(@entryPointOutput.color) 53
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.partialInit.frag.out b/Test/baseResults/hlsl.partialInit.frag.out
index b326799..db70518 100755
--- a/Test/baseResults/hlsl.partialInit.frag.out
+++ b/Test/baseResults/hlsl.partialInit.frag.out
@@ -157,25 +157,25 @@
 0:18          Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:?             'input' ( temp 4-component vector of float)
 0:18        move second child to first child ( temp int)
-0:?           'a' (layout( location=0) out int)
+0:?           '@entryPointOutput.a' (layout( location=0) out int)
 0:18          a: direct index for structure ( temp int)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              0 (const int)
 0:18        move second child to first child ( temp float)
-0:?           'b' (layout( location=1) out float)
+0:?           '@entryPointOutput.b' (layout( location=1) out float)
 0:18          b: direct index for structure ( temp float)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              1 (const int)
 0:18        move second child to first child ( temp bool)
-0:?           'c' (layout( location=2) out bool)
+0:?           '@entryPointOutput.c' (layout( location=2) out bool)
 0:18          c: direct index for structure ( temp bool)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              2 (const int)
 0:18        move second child to first child ( temp 4-component vector of float)
-0:?           'v' (layout( location=3) out 4-component vector of float)
+0:?           '@entryPointOutput.v' (layout( location=3) out 4-component vector of float)
 0:18          v: direct index for structure ( temp 4-component vector of float)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
@@ -183,10 +183,10 @@
 0:?   Linker Objects
 0:?     'gv' ( global 4-component vector of float)
 0:?     'gfa' ( global 3-element array of float)
-0:?     'a' (layout( location=0) out int)
-0:?     'b' (layout( location=1) out float)
-0:?     'c' (layout( location=2) out bool)
-0:?     'v' (layout( location=3) out 4-component vector of float)
+0:?     '@entryPointOutput.a' (layout( location=0) out int)
+0:?     '@entryPointOutput.b' (layout( location=1) out float)
+0:?     '@entryPointOutput.c' (layout( location=2) out bool)
+0:?     '@entryPointOutput.v' (layout( location=3) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     'cgf2a' ( const 3-element array of 2-component vector of float)
 0:?       0.000000
@@ -357,25 +357,25 @@
 0:18          Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:?             'input' ( temp 4-component vector of float)
 0:18        move second child to first child ( temp int)
-0:?           'a' (layout( location=0) out int)
+0:?           '@entryPointOutput.a' (layout( location=0) out int)
 0:18          a: direct index for structure ( temp int)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              0 (const int)
 0:18        move second child to first child ( temp float)
-0:?           'b' (layout( location=1) out float)
+0:?           '@entryPointOutput.b' (layout( location=1) out float)
 0:18          b: direct index for structure ( temp float)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              1 (const int)
 0:18        move second child to first child ( temp bool)
-0:?           'c' (layout( location=2) out bool)
+0:?           '@entryPointOutput.c' (layout( location=2) out bool)
 0:18          c: direct index for structure ( temp bool)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
 0:18              2 (const int)
 0:18        move second child to first child ( temp 4-component vector of float)
-0:?           'v' (layout( location=3) out 4-component vector of float)
+0:?           '@entryPointOutput.v' (layout( location=3) out 4-component vector of float)
 0:18          v: direct index for structure ( temp 4-component vector of float)
 0:18            'flattenTemp' ( temp structure{ temp int a,  temp float b,  temp bool c,  temp 4-component vector of float v})
 0:18            Constant:
@@ -383,10 +383,10 @@
 0:?   Linker Objects
 0:?     'gv' ( global 4-component vector of float)
 0:?     'gfa' ( global 3-element array of float)
-0:?     'a' (layout( location=0) out int)
-0:?     'b' (layout( location=1) out float)
-0:?     'c' (layout( location=2) out bool)
-0:?     'v' (layout( location=3) out 4-component vector of float)
+0:?     '@entryPointOutput.a' (layout( location=0) out int)
+0:?     '@entryPointOutput.b' (layout( location=1) out float)
+0:?     '@entryPointOutput.c' (layout( location=2) out bool)
+0:?     '@entryPointOutput.v' (layout( location=3) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     'cgf2a' ( const 3-element array of 2-component vector of float)
 0:?       0.000000
@@ -433,15 +433,15 @@
                               Name 80  "input"
                               Name 82  "flattenTemp"
                               Name 83  "param"
-                              Name 87  "a"
-                              Name 91  "b"
-                              Name 95  "c"
-                              Name 99  "v"
+                              Name 87  "@entryPointOutput.a"
+                              Name 91  "@entryPointOutput.b"
+                              Name 95  "@entryPointOutput.c"
+                              Name 99  "@entryPointOutput.v"
                               Decorate 80(input) Location 0
-                              Decorate 87(a) Location 0
-                              Decorate 91(b) Location 1
-                              Decorate 95(c) Location 2
-                              Decorate 99(v) Location 3
+                              Decorate 87(@entryPointOutput.a) Location 0
+                              Decorate 91(@entryPointOutput.b) Location 1
+                              Decorate 95(@entryPointOutput.c) Location 2
+                              Decorate 99(@entryPointOutput.v) Location 3
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -492,13 +492,13 @@
               79:             TypePointer Input 7(fvec4)
        80(input):     79(ptr) Variable Input
               86:             TypePointer Output 9(int)
-           87(a):     86(ptr) Variable Output
+87(@entryPointOutput.a):     86(ptr) Variable Output
               90:             TypePointer Output 6(float)
-           91(b):     90(ptr) Variable Output
+91(@entryPointOutput.b):     90(ptr) Variable Output
               94:             TypePointer Output 10(bool)
-           95(c):     94(ptr) Variable Output
+95(@entryPointOutput.c):     94(ptr) Variable Output
               98:             TypePointer Output 7(fvec4)
-           99(v):     98(ptr) Variable Output
+99(@entryPointOutput.v):     98(ptr) Variable Output
              102:             TypeArray 57(fvec2) 22
              103:         102 ConstantComposite 62 62 62
 4(PixelShaderFunction):           2 Function None 3
@@ -516,16 +516,16 @@
                               Store 82(flattenTemp) 85
               88:     64(ptr) AccessChain 82(flattenTemp) 42
               89:      9(int) Load 88
-                              Store 87(a) 89
+                              Store 87(@entryPointOutput.a) 89
               92:     68(ptr) AccessChain 82(flattenTemp) 66
               93:    6(float) Load 92
-                              Store 91(b) 93
+                              Store 91(@entryPointOutput.b) 93
               96:     45(ptr) AccessChain 82(flattenTemp) 35
               97:    10(bool) Load 96
-                              Store 95(c) 97
+                              Store 95(@entryPointOutput.c) 97
              100:      8(ptr) AccessChain 82(flattenTemp) 29
              101:    7(fvec4) Load 100
-                              Store 99(v) 101
+                              Store 99(@entryPointOutput.v) 101
                               Return
                               FunctionEnd
 14(@PixelShaderFunction(vf4;):    11(outs) Function None 12
diff --git a/Test/baseResults/hlsl.pp.line.frag.out b/Test/baseResults/hlsl.pp.line.frag.out
index 727fdd0..638e7b0 100644
--- a/Test/baseResults/hlsl.pp.line.frag.out
+++ b/Test/baseResults/hlsl.pp.line.frag.out
@@ -41,20 +41,20 @@
 0:4          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:4          Color: direct index for structure ( temp 4-component vector of float)
 0:4            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:4          Depth: direct index for structure ( temp float)
 0:4            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4            Constant:
 0:4              1 (const int)
 0:?   Linker Objects
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -102,20 +102,20 @@
 0:4          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:4          Color: direct index for structure ( temp 4-component vector of float)
 0:4            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4            Constant:
 0:4              0 (const int)
 0:4        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:4          Depth: direct index for structure ( temp float)
 0:4            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:4            Constant:
 0:4              1 (const int)
 0:?   Linker Objects
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -135,10 +135,10 @@
                               Name 14  "thisLineIs"
                               Name 17  "psout"
                               Name 32  "flattenTemp"
-                              Name 35  "Color"
-                              Name 39  "Depth"
-                              Decorate 35(Color) Location 0
-                              Decorate 39(Depth) BuiltIn FragDepth
+                              Name 35  "@entryPointOutput.Color"
+                              Name 39  "@entryPointOutput.Depth"
+                              Decorate 35(@entryPointOutput.Color) Location 0
+                              Decorate 39(@entryPointOutput.Depth) BuiltIn FragDepth
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -156,9 +156,9 @@
               26:     12(int) Constant 1
               27:             TypePointer Function 6(float)
               34:             TypePointer Output 7(fvec4)
-       35(Color):     34(ptr) Variable Output
+35(@entryPointOutput.Color):     34(ptr) Variable Output
               38:             TypePointer Output 6(float)
-       39(Depth):     38(ptr) Variable Output
+39(@entryPointOutput.Depth):     38(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
  32(flattenTemp):     16(ptr) Variable Function
@@ -166,10 +166,10 @@
                               Store 32(flattenTemp) 33
               36:     24(ptr) AccessChain 32(flattenTemp) 18
               37:    7(fvec4) Load 36
-                              Store 35(Color) 37
+                              Store 35(@entryPointOutput.Color) 37
               40:     27(ptr) AccessChain 32(flattenTemp) 26
               41:    6(float) Load 40
-                              Store 39(Depth) 41
+                              Store 39(@entryPointOutput.Depth) 41
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.precise.frag.out b/Test/baseResults/hlsl.precise.frag.out
index 442f6c2..72f9cec 100644
--- a/Test/baseResults/hlsl.precise.frag.out
+++ b/Test/baseResults/hlsl.precise.frag.out
@@ -26,14 +26,14 @@
 0:?     Sequence
 0:9      Sequence
 0:9        move second child to first child ( noContraction temp 4-component vector of float)
-0:?           'color' (layout( location=0) noContraction out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float)
 0:9          color: direct index for structure ( noContraction temp 4-component vector of float)
 0:9            Function Call: @main( ( temp structure{ noContraction temp 4-component vector of float color})
 0:9            Constant:
 0:9              0 (const int)
 0:?   Linker Objects
 0:?     'precisefloat' ( noContraction global float)
-0:?     'color' (layout( location=0) noContraction out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -66,14 +66,14 @@
 0:?     Sequence
 0:9      Sequence
 0:9        move second child to first child ( noContraction temp 4-component vector of float)
-0:?           'color' (layout( location=0) noContraction out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float)
 0:9          color: direct index for structure ( noContraction temp 4-component vector of float)
 0:9            Function Call: @main( ( temp structure{ noContraction temp 4-component vector of float color})
 0:9            Constant:
 0:9              0 (const int)
 0:?   Linker Objects
 0:?     'precisefloat' ( noContraction global float)
-0:?     'color' (layout( location=0) noContraction out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -93,9 +93,9 @@
                               MemberName 16(PS_OUTPUT) 0  "color"
                               Name 18  "@main("
                               Name 21  "ps_output"
-                              Name 32  "color"
+                              Name 32  "@entryPointOutput.color"
                               Name 36  "precisefloat"
-                              Decorate 32(color) Location 0
+                              Decorate 32(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -113,14 +113,14 @@
               25:   15(fvec4) ConstantComposite 24 24 24 24
               26:             TypePointer Function 15(fvec4)
               31:             TypePointer Output 15(fvec4)
-       32(color):     31(ptr) Variable Output
+32(@entryPointOutput.color):     31(ptr) Variable Output
               35:             TypePointer Private 6(float)
 36(precisefloat):     35(ptr) Variable Private
          4(main):           2 Function None 3
                5:             Label
               33:16(PS_OUTPUT) FunctionCall 18(@main()
               34:   15(fvec4) CompositeExtract 33 0
-                              Store 32(color) 34
+                              Store 32(@entryPointOutput.color) 34
                               Return
                               FunctionEnd
 13(MyFunction(f1;vf3;):           2 Function None 10
diff --git a/Test/baseResults/hlsl.preprocessor.frag.out b/Test/baseResults/hlsl.preprocessor.frag.out
new file mode 100644
index 0000000..1db7c24
--- /dev/null
+++ b/Test/baseResults/hlsl.preprocessor.frag.out
@@ -0,0 +1,163 @@
+hlsl.preprocessor.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:9  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:9    Function Parameters: 
+0:9      'input' ( in 4-component vector of float)
+0:?     Sequence
+0:10      Sequence
+0:10        move second child to first child ( temp 4-component vector of float)
+0:10          'tex' ( temp 4-component vector of float)
+0:10          texture ( temp 4-component vector of float)
+0:10            Construct combined texture-sampler ( temp sampler2D)
+0:10              'test_texture' ( uniform texture2D)
+0:10              'test_texture_ss' ( uniform sampler)
+0:10            vector swizzle ( temp 2-component vector of float)
+0:10              vector swizzle ( temp 2-component vector of float)
+0:10                'input' ( in 4-component vector of float)
+0:10                Sequence
+0:10                  Constant:
+0:10                    0 (const int)
+0:10                  Constant:
+0:10                    1 (const int)
+0:10              Sequence
+0:10                Constant:
+0:10                  0 (const int)
+0:10                Constant:
+0:10                  1 (const int)
+0:11      Branch: Return with expression
+0:11        'tex' ( temp 4-component vector of float)
+0:9  Function Definition: main( ( temp void)
+0:9    Function Parameters: 
+0:?     Sequence
+0:9      move second child to first child ( temp 4-component vector of float)
+0:?         'input' ( temp 4-component vector of float)
+0:?         'input' (layout( location=0) in 4-component vector of float)
+0:9      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:9        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'input' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'test_texture' ( uniform texture2D)
+0:?     'test_texture_ss' ( uniform sampler)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'input' (layout( location=0) in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:9  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:9    Function Parameters: 
+0:9      'input' ( in 4-component vector of float)
+0:?     Sequence
+0:10      Sequence
+0:10        move second child to first child ( temp 4-component vector of float)
+0:10          'tex' ( temp 4-component vector of float)
+0:10          texture ( temp 4-component vector of float)
+0:10            Construct combined texture-sampler ( temp sampler2D)
+0:10              'test_texture' ( uniform texture2D)
+0:10              'test_texture_ss' ( uniform sampler)
+0:10            vector swizzle ( temp 2-component vector of float)
+0:10              vector swizzle ( temp 2-component vector of float)
+0:10                'input' ( in 4-component vector of float)
+0:10                Sequence
+0:10                  Constant:
+0:10                    0 (const int)
+0:10                  Constant:
+0:10                    1 (const int)
+0:10              Sequence
+0:10                Constant:
+0:10                  0 (const int)
+0:10                Constant:
+0:10                  1 (const int)
+0:11      Branch: Return with expression
+0:11        'tex' ( temp 4-component vector of float)
+0:9  Function Definition: main( ( temp void)
+0:9    Function Parameters: 
+0:?     Sequence
+0:9      move second child to first child ( temp 4-component vector of float)
+0:?         'input' ( temp 4-component vector of float)
+0:?         'input' (layout( location=0) in 4-component vector of float)
+0:9      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:9        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'input' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'test_texture' ( uniform texture2D)
+0:?     'test_texture_ss' ( uniform sampler)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'input' (layout( location=0) in 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 40
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 33 36
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 11  "@main(vf4;"
+                              Name 10  "input"
+                              Name 13  "tex"
+                              Name 16  "test_texture"
+                              Name 20  "test_texture_ss"
+                              Name 31  "input"
+                              Name 33  "input"
+                              Name 36  "@entryPointOutput"
+                              Name 37  "param"
+                              Decorate 16(test_texture) DescriptorSet 0
+                              Decorate 20(test_texture_ss) DescriptorSet 0
+                              Decorate 33(input) Location 0
+                              Decorate 36(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeFunction 7(fvec4) 8(ptr)
+              14:             TypeImage 6(float) 2D sampled format:Unknown
+              15:             TypePointer UniformConstant 14
+16(test_texture):     15(ptr) Variable UniformConstant
+              18:             TypeSampler
+              19:             TypePointer UniformConstant 18
+20(test_texture_ss):     19(ptr) Variable UniformConstant
+              22:             TypeSampledImage 14
+              24:             TypeVector 6(float) 2
+              32:             TypePointer Input 7(fvec4)
+       33(input):     32(ptr) Variable Input
+              35:             TypePointer Output 7(fvec4)
+36(@entryPointOutput):     35(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+       31(input):      8(ptr) Variable Function
+       37(param):      8(ptr) Variable Function
+              34:    7(fvec4) Load 33(input)
+                              Store 31(input) 34
+              38:    7(fvec4) Load 31(input)
+                              Store 37(param) 38
+              39:    7(fvec4) FunctionCall 11(@main(vf4;) 37(param)
+                              Store 36(@entryPointOutput) 39
+                              Return
+                              FunctionEnd
+  11(@main(vf4;):    7(fvec4) Function None 9
+       10(input):      8(ptr) FunctionParameter
+              12:             Label
+         13(tex):      8(ptr) Variable Function
+              17:          14 Load 16(test_texture)
+              21:          18 Load 20(test_texture_ss)
+              23:          22 SampledImage 17 21
+              25:    7(fvec4) Load 10(input)
+              26:   24(fvec2) VectorShuffle 25 25 0 1
+              27:    7(fvec4) ImageSampleImplicitLod 23 26
+                              Store 13(tex) 27
+              28:    7(fvec4) Load 13(tex)
+                              ReturnValue 28
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.promote.atomic.frag.out b/Test/baseResults/hlsl.promote.atomic.frag.out
index b31ac61..ead4fe3 100644
--- a/Test/baseResults/hlsl.promote.atomic.frag.out
+++ b/Test/baseResults/hlsl.promote.atomic.frag.out
@@ -68,7 +68,7 @@
 // Id's are bound by 36
 
                               Capability Shader
-                              Capability SampledBuffer
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 34
diff --git a/Test/baseResults/hlsl.promote.binary.frag.out b/Test/baseResults/hlsl.promote.binary.frag.out
index 09c1f93..50ba644 100644
--- a/Test/baseResults/hlsl.promote.binary.frag.out
+++ b/Test/baseResults/hlsl.promote.binary.frag.out
@@ -74,14 +74,14 @@
 0:?     Sequence
 0:14      Sequence
 0:14        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:14          Color: direct index for structure ( temp 4-component vector of float)
 0:14            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:14            Constant:
 0:14              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform bool bval,  uniform 4-component vector of bool bval4,  uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -162,14 +162,14 @@
 0:?     Sequence
 0:14      Sequence
 0:14        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:14          Color: direct index for structure ( temp 4-component vector of float)
 0:14            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:14            Constant:
 0:14              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform bool bval,  uniform 4-component vector of bool bval4,  uniform int ival,  uniform 4-component vector of int ival4,  uniform float fval,  uniform 4-component vector of float fval4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -195,7 +195,7 @@
                               Name 18  ""
                               Name 66  "l_int"
                               Name 73  "psout"
-                              Name 80  "Color"
+                              Name 80  "@entryPointOutput.Color"
                               MemberDecorate 16($Global) 0 Offset 0
                               MemberDecorate 16($Global) 1 Offset 16
                               MemberDecorate 16($Global) 2 Offset 32
@@ -204,7 +204,7 @@
                               MemberDecorate 16($Global) 5 Offset 80
                               Decorate 16($Global) Block
                               Decorate 18 DescriptorSet 0
-                              Decorate 80(Color) Location 0
+                              Decorate 80(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -242,12 +242,12 @@
               72:             TypePointer Function 8(PS_OUTPUT)
               74:             TypePointer Function 7(fvec4)
               79:             TypePointer Output 7(fvec4)
-       80(Color):     79(ptr) Variable Output
+80(@entryPointOutput.Color):     79(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               81:8(PS_OUTPUT) FunctionCall 10(@main()
               82:    7(fvec4) CompositeExtract 81 0
-                              Store 80(Color) 82
+                              Store 80(@entryPointOutput.Color) 82
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.promotions.frag.out b/Test/baseResults/hlsl.promotions.frag.out
index e1953e0..6270715 100644
--- a/Test/baseResults/hlsl.promotions.frag.out
+++ b/Test/baseResults/hlsl.promotions.frag.out
@@ -779,14 +779,14 @@
 0:?     Sequence
 0:52      Sequence
 0:52        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:52          Color: direct index for structure ( temp 4-component vector of float)
 0:52            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:52            Constant:
 0:52              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 3-component vector of int i3,  uniform 3-component vector of bool b3,  uniform 3-component vector of float f3,  uniform 3-component vector of uint u3,  uniform 3-component vector of double d3,  uniform int is,  uniform bool bs,  uniform float fs,  uniform uint us,  uniform double ds})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1572,14 +1572,14 @@
 0:?     Sequence
 0:52      Sequence
 0:52        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:52          Color: direct index for structure ( temp 4-component vector of float)
 0:52            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:52            Constant:
 0:52              0 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 3-component vector of int i3,  uniform 3-component vector of bool b3,  uniform 3-component vector of float f3,  uniform 3-component vector of uint u3,  uniform 3-component vector of double d3,  uniform int is,  uniform bool bs,  uniform float fs,  uniform uint us,  uniform double ds})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -1682,7 +1682,7 @@
                               Name 576  "c2"
                               Name 578  "outval"
                               Name 586  "psout"
-                              Name 593  "Color"
+                              Name 593  "@entryPointOutput.Color"
                               MemberDecorate 111($Global) 0 Offset 0
                               MemberDecorate 111($Global) 1 Offset 16
                               MemberDecorate 111($Global) 2 Offset 32
@@ -1695,7 +1695,7 @@
                               MemberDecorate 111($Global) 9 Offset 104
                               Decorate 111($Global) Block
                               Decorate 113 DescriptorSet 0
-                              Decorate 593(Color) Location 0
+                              Decorate 593(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -1766,12 +1766,12 @@
              579:    6(float) Constant 1080452710
              585:             TypePointer Function 107(PS_OUTPUT)
              592:             TypePointer Output 106(fvec4)
-      593(Color):    592(ptr) Variable Output
+593(@entryPointOutput.Color):    592(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              594:107(PS_OUTPUT) FunctionCall 109(@main()
              595:  106(fvec4) CompositeExtract 594 0
-                              Store 593(Color) 595
+                              Store 593(@entryPointOutput.Color) 595
                               Return
                               FunctionEnd
   11(Fn_F3(vf3;):           2 Function None 9
diff --git a/Test/baseResults/hlsl.rw.atomics.frag.out b/Test/baseResults/hlsl.rw.atomics.frag.out
index 08369c0..99c4174 100644
--- a/Test/baseResults/hlsl.rw.atomics.frag.out
+++ b/Test/baseResults/hlsl.rw.atomics.frag.out
@@ -1942,7 +1942,7 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:45          Color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:45            Constant:
@@ -1968,7 +1968,7 @@
 0:?     'g_tBuffI' (layout( r32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( r32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform uint u1,  uniform 2-component vector of uint u2,  uniform 3-component vector of uint u3,  uniform uint u1b,  uniform uint u1c,  uniform int i1,  uniform 2-component vector of int i2,  uniform 3-component vector of int i3,  uniform int i1b,  uniform int i1c})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -3917,7 +3917,7 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:45          Color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:45            Constant:
@@ -3943,15 +3943,15 @@
 0:?     'g_tBuffI' (layout( r32i) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout( r32ui) uniform uimageBuffer)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform uint u1,  uniform 2-component vector of uint u2,  uniform 3-component vector of uint u3,  uniform uint u1b,  uniform uint u1c,  uniform int i1,  uniform 2-component vector of int i2,  uniform 3-component vector of int i3,  uniform int i1b,  uniform int i1c})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 1147
 
                               Capability Shader
-                              Capability Sampled1D
-                              Capability SampledBuffer
+                              Capability Image1D
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 1117
@@ -3986,7 +3986,7 @@
                               Name 931  "g_tBuffI"
                               Name 1020  "g_tBuffU"
                               Name 1108  "psout"
-                              Name 1117  "Color"
+                              Name 1117  "@entryPointOutput.Color"
                               Name 1122  "g_sSamp"
                               Name 1125  "g_tTex1df1"
                               Name 1128  "g_tTex2df1"
@@ -4018,7 +4018,7 @@
                               Decorate 670(g_tTex1du1a) DescriptorSet 0
                               Decorate 931(g_tBuffI) DescriptorSet 0
                               Decorate 1020(g_tBuffU) DescriptorSet 0
-                              Decorate 1117(Color) Location 0
+                              Decorate 1117(@entryPointOutput.Color) Location 0
                               Decorate 1122(g_sSamp) DescriptorSet 0
                               Decorate 1125(g_tTex1df1) DescriptorSet 0
                               Decorate 1128(g_tTex2df1) DescriptorSet 0
@@ -4100,7 +4100,7 @@
             1110:    7(fvec4) ConstantComposite 1109 1109 1109 1109
             1111:             TypePointer Function 7(fvec4)
             1116:             TypePointer Output 7(fvec4)
-     1117(Color):   1116(ptr) Variable Output
+1117(@entryPointOutput.Color):   1116(ptr) Variable Output
             1120:             TypeSampler
             1121:             TypePointer UniformConstant 1120
    1122(g_sSamp):   1121(ptr) Variable UniformConstant
@@ -4132,7 +4132,7 @@
                5:             Label
             1118:8(PS_OUTPUT) FunctionCall 10(@main()
             1119:    7(fvec4) CompositeExtract 1118 0
-                              Store 1117(Color) 1119
+                              Store 1117(@entryPointOutput.Color) 1119
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.rw.bracket.frag.out b/Test/baseResults/hlsl.rw.bracket.frag.out
index 55264de..7804e33 100644
--- a/Test/baseResults/hlsl.rw.bracket.frag.out
+++ b/Test/baseResults/hlsl.rw.bracket.frag.out
@@ -844,7 +844,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -867,7 +867,7 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform 4-component vector of float uf4,  uniform 4-component vector of int ui4,  uniform 4-component vector of uint uu4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1718,7 +1718,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -1741,14 +1741,14 @@
 0:?     'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray)
 0:?     'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform 4-component vector of float uf4,  uniform 4-component vector of int ui4,  uniform 4-component vector of uint uu4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 607
 
                               Capability Shader
-                              Capability Sampled1D
+                              Capability Image1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 583
@@ -1872,7 +1872,7 @@
                               Name 561  "storeTempPost"
                               Name 569  "storeTemp"
                               Name 576  "psout"
-                              Name 583  "Color"
+                              Name 583  "@entryPointOutput.Color"
                               Name 588  "g_sSamp"
                               Name 591  "g_tTex1df4a"
                               Name 594  "g_tTex1di4a"
@@ -1903,7 +1903,7 @@
                               Decorate 131(g_tTex3df4) DescriptorSet 0
                               Decorate 141(g_tTex3di4) DescriptorSet 0
                               Decorate 149(g_tTex3du4) DescriptorSet 0
-                              Decorate 583(Color) Location 0
+                              Decorate 583(@entryPointOutput.Color) Location 0
                               Decorate 588(g_sSamp) DescriptorSet 0
                               Decorate 588(g_sSamp) Binding 0
                               Decorate 591(g_tTex1df4a) DescriptorSet 0
@@ -2005,7 +2005,7 @@
              575:             TypePointer Function 42(PS_OUTPUT)
              577:   21(fvec4) ConstantComposite 408 408 408 408
              582:             TypePointer Output 21(fvec4)
-      583(Color):    582(ptr) Variable Output
+583(@entryPointOutput.Color):    582(ptr) Variable Output
              586:             TypeSampler
              587:             TypePointer UniformConstant 586
     588(g_sSamp):    587(ptr) Variable UniformConstant
@@ -2031,7 +2031,7 @@
                5:             Label
              584:42(PS_OUTPUT) FunctionCall 44(@main()
              585:   21(fvec4) CompositeExtract 584 0
-                              Store 583(Color) 585
+                              Store 583(@entryPointOutput.Color) 585
                               Return
                               FunctionEnd
     11(Fn1(vi4;):    7(ivec4) Function None 9
diff --git a/Test/baseResults/hlsl.rw.register.frag.out b/Test/baseResults/hlsl.rw.register.frag.out
index 525c6aa..5464ac2 100644
--- a/Test/baseResults/hlsl.rw.register.frag.out
+++ b/Test/baseResults/hlsl.rw.register.frag.out
@@ -36,7 +36,7 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:11          Color: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:11            Constant:
@@ -44,7 +44,7 @@
 0:?   Linker Objects
 0:?     'g_tTex1df1' (layout( binding=2 r32f) uniform image1D)
 0:?     'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -87,7 +87,7 @@
 0:?     Sequence
 0:11      Sequence
 0:11        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:11          Color: direct index for structure ( temp 4-component vector of float)
 0:11            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:11            Constant:
@@ -95,15 +95,15 @@
 0:?   Linker Objects
 0:?     'g_tTex1df1' (layout( binding=2 r32f) uniform image1D)
 0:?     'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 42
 
                               Capability Shader
-                              Capability Sampled1D
-                              Capability SampledBuffer
+                              Capability Image1D
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 39
@@ -118,12 +118,12 @@
                               Name 23  "r01"
                               Name 26  "g_tBuf1du1"
                               Name 30  "psout"
-                              Name 39  "Color"
+                              Name 39  "@entryPointOutput.Color"
                               Decorate 16(g_tTex1df1) DescriptorSet 0
                               Decorate 16(g_tTex1df1) Binding 2
                               Decorate 26(g_tBuf1du1) DescriptorSet 0
                               Decorate 26(g_tBuf1du1) Binding 3
-                              Decorate 39(Color) Location 0
+                              Decorate 39(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -146,12 +146,12 @@
               32:    7(fvec4) ConstantComposite 31 31 31 31
               33:             TypePointer Function 7(fvec4)
               38:             TypePointer Output 7(fvec4)
-       39(Color):     38(ptr) Variable Output
+39(@entryPointOutput.Color):     38(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               40:8(PS_OUTPUT) FunctionCall 10(@main()
               41:    7(fvec4) CompositeExtract 40 0
-                              Store 39(Color) 41
+                              Store 39(@entryPointOutput.Color) 41
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.rw.scalar.bracket.frag.out b/Test/baseResults/hlsl.rw.scalar.bracket.frag.out
index e0e88d1..7ff34fa 100644
--- a/Test/baseResults/hlsl.rw.scalar.bracket.frag.out
+++ b/Test/baseResults/hlsl.rw.scalar.bracket.frag.out
@@ -817,7 +817,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -840,7 +840,7 @@
 0:?     'g_tTex2di1a' (layout( r32i) uniform iimage2DArray)
 0:?     'g_tTex2du1a' (layout( r32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform float uf1,  uniform int ui1,  uniform uint uu1})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1664,7 +1664,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -1687,14 +1687,14 @@
 0:?     'g_tTex2di1a' (layout( r32i) uniform iimage2DArray)
 0:?     'g_tTex2du1a' (layout( r32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform float uf1,  uniform int ui1,  uniform uint uu1})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 571
 
                               Capability Shader
-                              Capability Sampled1D
+                              Capability Image1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 547
@@ -1818,7 +1818,7 @@
                               Name 524  "storeTempPost"
                               Name 531  "storeTemp"
                               Name 539  "psout"
-                              Name 547  "Color"
+                              Name 547  "@entryPointOutput.Color"
                               Name 552  "g_sSamp"
                               Name 555  "g_tTex1df1a"
                               Name 558  "g_tTex1di1a"
@@ -1848,7 +1848,7 @@
                               Decorate 125(g_tTex3df1) DescriptorSet 0
                               Decorate 135(g_tTex3di1) DescriptorSet 0
                               Decorate 143(g_tTex3du1) DescriptorSet 0
-                              Decorate 547(Color) Location 0
+                              Decorate 547(@entryPointOutput.Color) Location 0
                               Decorate 552(g_sSamp) DescriptorSet 0
                               Decorate 552(g_sSamp) Binding 0
                               Decorate 555(g_tTex1df1a) DescriptorSet 0
@@ -1934,7 +1934,7 @@
              540:   39(fvec4) ConstantComposite 382 382 382 382
              541:             TypePointer Function 39(fvec4)
              546:             TypePointer Output 39(fvec4)
-      547(Color):    546(ptr) Variable Output
+547(@entryPointOutput.Color):    546(ptr) Variable Output
              550:             TypeSampler
              551:             TypePointer UniformConstant 550
     552(g_sSamp):    551(ptr) Variable UniformConstant
@@ -1960,7 +1960,7 @@
                5:             Label
              548:40(PS_OUTPUT) FunctionCall 42(@main()
              549:   39(fvec4) CompositeExtract 548 0
-                              Store 547(Color) 549
+                              Store 547(@entryPointOutput.Color) 549
                               Return
                               FunctionEnd
      10(Fn1(i1;):      6(int) Function None 8
diff --git a/Test/baseResults/hlsl.rw.swizzle.frag.out b/Test/baseResults/hlsl.rw.swizzle.frag.out
index 60a6b99..4d804e9 100644
--- a/Test/baseResults/hlsl.rw.swizzle.frag.out
+++ b/Test/baseResults/hlsl.rw.swizzle.frag.out
@@ -206,7 +206,7 @@
 // Id's are bound by 63
 
                               Capability Shader
-                              Capability SampledBuffer
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 58
diff --git a/Test/baseResults/hlsl.rw.vec2.bracket.frag.out b/Test/baseResults/hlsl.rw.vec2.bracket.frag.out
index afcc52a..980c82b 100644
--- a/Test/baseResults/hlsl.rw.vec2.bracket.frag.out
+++ b/Test/baseResults/hlsl.rw.vec2.bracket.frag.out
@@ -826,7 +826,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -849,7 +849,7 @@
 0:?     'g_tTex2di2a' (layout( rg32i) uniform iimage2DArray)
 0:?     'g_tTex2du2a' (layout( rg32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform 2-component vector of float uf2,  uniform 2-component vector of int ui2,  uniform 2-component vector of uint uu2})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -1682,7 +1682,7 @@
 0:?     Sequence
 0:53      Sequence
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:53            Constant:
@@ -1705,14 +1705,14 @@
 0:?     'g_tTex2di2a' (layout( rg32i) uniform iimage2DArray)
 0:?     'g_tTex2du2a' (layout( rg32ui) uniform uimage2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4,  uniform 2-component vector of float uf2,  uniform 2-component vector of int ui2,  uniform 2-component vector of uint uu2})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 605
 
                               Capability Shader
-                              Capability Sampled1D
+                              Capability Image1D
                               Capability StorageImageExtendedFormats
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
@@ -1837,7 +1837,7 @@
                               Name 557  "storeTempPost"
                               Name 565  "storeTemp"
                               Name 573  "psout"
-                              Name 581  "Color"
+                              Name 581  "@entryPointOutput.Color"
                               Name 586  "g_sSamp"
                               Name 589  "g_tTex1df2a"
                               Name 592  "g_tTex1di2a"
@@ -1867,7 +1867,7 @@
                               Decorate 130(g_tTex3df2) DescriptorSet 0
                               Decorate 140(g_tTex3di2) DescriptorSet 0
                               Decorate 148(g_tTex3du2) DescriptorSet 0
-                              Decorate 581(Color) Location 0
+                              Decorate 581(@entryPointOutput.Color) Location 0
                               Decorate 586(g_sSamp) DescriptorSet 0
                               Decorate 586(g_sSamp) Binding 0
                               Decorate 589(g_tTex1df2a) DescriptorSet 0
@@ -1967,7 +1967,7 @@
              574:   42(fvec4) ConstantComposite 404 404 404 404
              575:             TypePointer Function 42(fvec4)
              580:             TypePointer Output 42(fvec4)
-      581(Color):    580(ptr) Variable Output
+581(@entryPointOutput.Color):    580(ptr) Variable Output
              584:             TypeSampler
              585:             TypePointer UniformConstant 584
     586(g_sSamp):    585(ptr) Variable UniformConstant
@@ -1993,7 +1993,7 @@
                5:             Label
              582:43(PS_OUTPUT) FunctionCall 45(@main()
              583:   42(fvec4) CompositeExtract 582 0
-                              Store 581(Color) 583
+                              Store 581(@entryPointOutput.Color) 583
                               Return
                               FunctionEnd
     11(Fn1(vi2;):    7(ivec2) Function None 9
diff --git a/Test/baseResults/hlsl.sample.array.dx10.frag.out b/Test/baseResults/hlsl.sample.array.dx10.frag.out
index 1ac123e..c470134 100644
--- a/Test/baseResults/hlsl.sample.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.sample.array.dx10.frag.out
@@ -131,13 +131,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -154,8 +154,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -293,13 +293,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -316,8 +316,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -357,8 +357,8 @@
                               Name 114  "g_tTexcdu4"
                               Name 125  "psout"
                               Name 135  "flattenTemp"
-                              Name 138  "Color"
-                              Name 142  "Depth"
+                              Name 138  "@entryPointOutput.Color"
+                              Name 142  "@entryPointOutput.Depth"
                               Name 145  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -372,8 +372,8 @@
                               Decorate 94(g_tTexcdf4) DescriptorSet 0
                               Decorate 104(g_tTexcdi4) DescriptorSet 0
                               Decorate 114(g_tTexcdu4) DescriptorSet 0
-                              Decorate 138(Color) Location 0
-                              Decorate 142(Depth) BuiltIn FragDepth
+                              Decorate 138(@entryPointOutput.Color) Location 0
+                              Decorate 142(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 145(g_tTex1df4a) DescriptorSet 0
                               Decorate 145(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -455,9 +455,9 @@
              129:     29(int) Constant 1
              130:             TypePointer Function 6(float)
              137:             TypePointer Output 7(fvec4)
-      138(Color):    137(ptr) Variable Output
+138(@entryPointOutput.Color):    137(ptr) Variable Output
              141:             TypePointer Output 6(float)
-      142(Depth):    141(ptr) Variable Output
+142(@entryPointOutput.Depth):    141(ptr) Variable Output
 145(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -466,10 +466,10 @@
                               Store 135(flattenTemp) 136
              139:     12(ptr) AccessChain 135(flattenTemp) 126
              140:    7(fvec4) Load 139
-                              Store 138(Color) 140
+                              Store 138(@entryPointOutput.Color) 140
              143:    130(ptr) AccessChain 135(flattenTemp) 129
              144:    6(float) Load 143
-                              Store 142(Depth) 144
+                              Store 142(@entryPointOutput.Depth) 144
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.sample.basic.dx10.frag.out b/Test/baseResults/hlsl.sample.basic.dx10.frag.out
index 61abf2a..11ce999 100644
--- a/Test/baseResults/hlsl.sample.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.sample.basic.dx10.frag.out
@@ -241,13 +241,13 @@
 0:53          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53            Constant:
 0:53              0 (const int)
 0:53        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:53          Depth: direct index for structure ( temp float)
 0:53            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53            Constant:
@@ -269,8 +269,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -516,13 +516,13 @@
 0:53          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:53          Color: direct index for structure ( temp 4-component vector of float)
 0:53            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53            Constant:
 0:53              0 (const int)
 0:53        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:53          Depth: direct index for structure ( temp float)
 0:53            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:53            Constant:
@@ -544,8 +544,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -604,8 +604,8 @@
                               Name 169  "g_tTexcdu4"
                               Name 176  "psout"
                               Name 185  "flattenTemp"
-                              Name 188  "Color"
-                              Name 192  "Depth"
+                              Name 188  "@entryPointOutput.Color"
+                              Name 192  "@entryPointOutput.Depth"
                               Name 195  "g_sSamp2d"
                               Name 196  "g_sSamp2D_b"
                               Name 197  "g_tTex1df4a"
@@ -624,8 +624,8 @@
                               Decorate 151(g_tTexcdf4) DescriptorSet 0
                               Decorate 160(g_tTexcdi4) DescriptorSet 0
                               Decorate 169(g_tTexcdu4) DescriptorSet 0
-                              Decorate 188(Color) Location 0
-                              Decorate 192(Depth) BuiltIn FragDepth
+                              Decorate 188(@entryPointOutput.Color) Location 0
+                              Decorate 192(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 195(g_sSamp2d) DescriptorSet 0
                               Decorate 196(g_sSamp2D_b) DescriptorSet 0
                               Decorate 197(g_tTex1df4a) DescriptorSet 0
@@ -731,9 +731,9 @@
              178:    7(fvec4) ConstantComposite 177 177 177 177
              180:             TypePointer Function 6(float)
              187:             TypePointer Output 7(fvec4)
-      188(Color):    187(ptr) Variable Output
+188(@entryPointOutput.Color):    187(ptr) Variable Output
              191:             TypePointer Output 6(float)
-      192(Depth):    191(ptr) Variable Output
+192(@entryPointOutput.Depth):    191(ptr) Variable Output
   195(g_sSamp2d):     48(ptr) Variable UniformConstant
 196(g_sSamp2D_b):     48(ptr) Variable UniformConstant
 197(g_tTex1df4a):     44(ptr) Variable UniformConstant
@@ -744,10 +744,10 @@
                               Store 185(flattenTemp) 186
              189:     41(ptr) AccessChain 185(flattenTemp) 29
              190:    7(fvec4) Load 189
-                              Store 188(Color) 190
+                              Store 188(@entryPointOutput.Color) 190
              193:    180(ptr) AccessChain 185(flattenTemp) 16
              194:    6(float) Load 193
-                              Store 192(Depth) 194
+                              Store 192(@entryPointOutput.Depth) 194
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.sample.offset.dx10.frag.out b/Test/baseResults/hlsl.sample.offset.dx10.frag.out
index f6bfb8d..abc7362 100644
--- a/Test/baseResults/hlsl.sample.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.sample.offset.dx10.frag.out
@@ -149,13 +149,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -175,8 +175,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -332,13 +332,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -358,8 +358,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -398,8 +398,8 @@
                               Name 120  "g_tTex3du4"
                               Name 132  "psout"
                               Name 141  "flattenTemp"
-                              Name 144  "Color"
-                              Name 148  "Depth"
+                              Name 144  "@entryPointOutput.Color"
+                              Name 148  "@entryPointOutput.Depth"
                               Name 151  "g_tTex1df4a"
                               Name 154  "g_tTexcdf4"
                               Name 157  "g_tTexcdi4"
@@ -416,8 +416,8 @@
                               Decorate 96(g_tTex3df4) DescriptorSet 0
                               Decorate 109(g_tTex3di4) DescriptorSet 0
                               Decorate 120(g_tTex3du4) DescriptorSet 0
-                              Decorate 144(Color) Location 0
-                              Decorate 148(Depth) BuiltIn FragDepth
+                              Decorate 144(@entryPointOutput.Color) Location 0
+                              Decorate 148(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 151(g_tTex1df4a) DescriptorSet 0
                               Decorate 151(g_tTex1df4a) Binding 1
                               Decorate 154(g_tTexcdf4) DescriptorSet 0
@@ -508,9 +508,9 @@
              134:    7(fvec4) ConstantComposite 133 133 133 133
              136:             TypePointer Function 6(float)
              143:             TypePointer Output 7(fvec4)
-      144(Color):    143(ptr) Variable Output
+144(@entryPointOutput.Color):    143(ptr) Variable Output
              147:             TypePointer Output 6(float)
-      148(Depth):    147(ptr) Variable Output
+148(@entryPointOutput.Depth):    147(ptr) Variable Output
 151(g_tTex1df4a):     15(ptr) Variable UniformConstant
              152:             TypeImage 6(float) Cube sampled format:Unknown
              153:             TypePointer UniformConstant 152
@@ -528,10 +528,10 @@
                               Store 141(flattenTemp) 142
              145:     12(ptr) AccessChain 141(flattenTemp) 64
              146:    7(fvec4) Load 145
-                              Store 144(Color) 146
+                              Store 144(@entryPointOutput.Color) 146
              149:    136(ptr) AccessChain 141(flattenTemp) 26
              150:    6(float) Load 149
-                              Store 148(Depth) 150
+                              Store 148(@entryPointOutput.Depth) 150
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out
index c08ec5c..6d1d67d 100644
--- a/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out
@@ -110,13 +110,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -130,8 +130,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -248,13 +248,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -268,8 +268,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -302,8 +302,8 @@
                               Name 87  "g_tTex2du4"
                               Name 98  "psout"
                               Name 107  "flattenTemp"
-                              Name 110  "Color"
-                              Name 114  "Depth"
+                              Name 110  "@entryPointOutput.Color"
+                              Name 114  "@entryPointOutput.Depth"
                               Name 117  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -314,8 +314,8 @@
                               Decorate 63(g_tTex2df4) DescriptorSet 0
                               Decorate 76(g_tTex2di4) DescriptorSet 0
                               Decorate 87(g_tTex2du4) DescriptorSet 0
-                              Decorate 110(Color) Location 0
-                              Decorate 114(Depth) BuiltIn FragDepth
+                              Decorate 110(@entryPointOutput.Color) Location 0
+                              Decorate 114(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 117(g_tTex1df4a) DescriptorSet 0
                               Decorate 117(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -384,9 +384,9 @@
              100:    7(fvec4) ConstantComposite 99 99 99 99
              102:             TypePointer Function 6(float)
              109:             TypePointer Output 7(fvec4)
-      110(Color):    109(ptr) Variable Output
+110(@entryPointOutput.Color):    109(ptr) Variable Output
              113:             TypePointer Output 6(float)
-      114(Depth):    113(ptr) Variable Output
+114(@entryPointOutput.Depth):    113(ptr) Variable Output
 117(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -395,10 +395,10 @@
                               Store 107(flattenTemp) 108
              111:     12(ptr) AccessChain 107(flattenTemp) 29
              112:    7(fvec4) Load 111
-                              Store 110(Color) 112
+                              Store 110(@entryPointOutput.Color) 112
              115:    102(ptr) AccessChain 107(flattenTemp) 43
              116:    6(float) Load 115
-                              Store 114(Depth) 116
+                              Store 114(@entryPointOutput.Depth) 116
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out b/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out
index 2829c02..ffb6a49 100644
--- a/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out
+++ b/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out
@@ -61,7 +61,7 @@
 0:?     Sequence
 0:14      Sequence
 0:14        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:14          Color: direct index for structure ( temp 4-component vector of float)
 0:14            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:14            Constant:
@@ -72,7 +72,7 @@
 0:?     'g_tTex1df2' ( uniform texture1D)
 0:?     'g_tTex1df3' ( uniform texture1D)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -140,7 +140,7 @@
 0:?     Sequence
 0:14      Sequence
 0:14        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:14          Color: direct index for structure ( temp 4-component vector of float)
 0:14            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:14            Constant:
@@ -151,7 +151,7 @@
 0:?     'g_tTex1df2' ( uniform texture1D)
 0:?     'g_tTex1df3' ( uniform texture1D)
 0:?     'g_tTex1df4' ( uniform texture1D)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -178,14 +178,14 @@
                               Name 52  "txval13"
                               Name 53  "g_tTex1df4"
                               Name 59  "psout"
-                              Name 69  "Color"
+                              Name 69  "@entryPointOutput.Color"
                               Decorate 16(g_tTex1df1) DescriptorSet 0
                               Decorate 20(g_sSamp) DescriptorSet 0
                               Decorate 20(g_sSamp) Binding 0
                               Decorate 30(g_tTex1df2) DescriptorSet 0
                               Decorate 42(g_tTex1df3) DescriptorSet 0
                               Decorate 53(g_tTex1df4) DescriptorSet 0
-                              Decorate 69(Color) Location 0
+                              Decorate 69(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -216,12 +216,12 @@
               62:    6(float) Constant 1065353216
               63:    7(fvec4) ConstantComposite 62 62 62 62
               68:             TypePointer Output 7(fvec4)
-       69(Color):     68(ptr) Variable Output
+69(@entryPointOutput.Color):     68(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               70:8(PS_OUTPUT) FunctionCall 10(@main()
               71:    7(fvec4) CompositeExtract 70 0
-                              Store 69(Color) 71
+                              Store 69(@entryPointOutput.Color) 71
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplebias.array.dx10.frag.out b/Test/baseResults/hlsl.samplebias.array.dx10.frag.out
index afed0a4..dd99697 100644
--- a/Test/baseResults/hlsl.samplebias.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplebias.array.dx10.frag.out
@@ -149,13 +149,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -172,8 +172,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -329,13 +329,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -352,8 +352,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -393,8 +393,8 @@
                               Name 114  "g_tTexcdu4"
                               Name 125  "psout"
                               Name 135  "flattenTemp"
-                              Name 138  "Color"
-                              Name 142  "Depth"
+                              Name 138  "@entryPointOutput.Color"
+                              Name 142  "@entryPointOutput.Depth"
                               Name 145  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -408,8 +408,8 @@
                               Decorate 94(g_tTexcdf4) DescriptorSet 0
                               Decorate 104(g_tTexcdi4) DescriptorSet 0
                               Decorate 114(g_tTexcdu4) DescriptorSet 0
-                              Decorate 138(Color) Location 0
-                              Decorate 142(Depth) BuiltIn FragDepth
+                              Decorate 138(@entryPointOutput.Color) Location 0
+                              Decorate 142(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 145(g_tTex1df4a) DescriptorSet 0
                               Decorate 145(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -491,9 +491,9 @@
              129:     30(int) Constant 1
              130:             TypePointer Function 6(float)
              137:             TypePointer Output 7(fvec4)
-      138(Color):    137(ptr) Variable Output
+138(@entryPointOutput.Color):    137(ptr) Variable Output
              141:             TypePointer Output 6(float)
-      142(Depth):    141(ptr) Variable Output
+142(@entryPointOutput.Depth):    141(ptr) Variable Output
 145(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -502,10 +502,10 @@
                               Store 135(flattenTemp) 136
              139:     12(ptr) AccessChain 135(flattenTemp) 126
              140:    7(fvec4) Load 139
-                              Store 138(Color) 140
+                              Store 138(@entryPointOutput.Color) 140
              143:    130(ptr) AccessChain 135(flattenTemp) 129
              144:    6(float) Load 143
-                              Store 142(Depth) 144
+                              Store 142(@entryPointOutput.Depth) 144
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out b/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out
index cff271f..18441e6 100644
--- a/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out
@@ -179,13 +179,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -205,8 +205,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -392,13 +392,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -418,8 +418,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -464,8 +464,8 @@
                               Name 141  "g_tTexcdu4"
                               Name 148  "psout"
                               Name 159  "flattenTemp"
-                              Name 162  "Color"
-                              Name 166  "Depth"
+                              Name 162  "@entryPointOutput.Color"
+                              Name 166  "@entryPointOutput.Depth"
                               Name 169  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -482,8 +482,8 @@
                               Decorate 123(g_tTexcdf4) DescriptorSet 0
                               Decorate 132(g_tTexcdi4) DescriptorSet 0
                               Decorate 141(g_tTexcdu4) DescriptorSet 0
-                              Decorate 162(Color) Location 0
-                              Decorate 166(Depth) BuiltIn FragDepth
+                              Decorate 162(@entryPointOutput.Color) Location 0
+                              Decorate 166(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 169(g_tTex1df4a) DescriptorSet 0
                               Decorate 169(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -574,9 +574,9 @@
              153:     27(int) Constant 1
              154:             TypePointer Function 6(float)
              161:             TypePointer Output 7(fvec4)
-      162(Color):    161(ptr) Variable Output
+162(@entryPointOutput.Color):    161(ptr) Variable Output
              165:             TypePointer Output 6(float)
-      166(Depth):    165(ptr) Variable Output
+166(@entryPointOutput.Depth):    165(ptr) Variable Output
 169(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -585,10 +585,10 @@
                               Store 159(flattenTemp) 160
              163:     12(ptr) AccessChain 159(flattenTemp) 149
              164:    7(fvec4) Load 163
-                              Store 162(Color) 164
+                              Store 162(@entryPointOutput.Color) 164
              167:    154(ptr) AccessChain 159(flattenTemp) 153
              168:    6(float) Load 167
-                              Store 166(Depth) 168
+                              Store 166(@entryPointOutput.Depth) 168
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out
index b05d1d7..59ecdb7 100644
--- a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out
@@ -167,13 +167,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -193,8 +193,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -368,13 +368,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -394,8 +394,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -434,8 +434,8 @@
                               Name 120  "g_tTex3du4"
                               Name 132  "psout"
                               Name 141  "flattenTemp"
-                              Name 144  "Color"
-                              Name 148  "Depth"
+                              Name 144  "@entryPointOutput.Color"
+                              Name 148  "@entryPointOutput.Depth"
                               Name 151  "g_tTex1df4a"
                               Name 154  "g_tTexcdf4"
                               Name 157  "g_tTexcdi4"
@@ -452,8 +452,8 @@
                               Decorate 96(g_tTex3df4) DescriptorSet 0
                               Decorate 109(g_tTex3di4) DescriptorSet 0
                               Decorate 120(g_tTex3du4) DescriptorSet 0
-                              Decorate 144(Color) Location 0
-                              Decorate 148(Depth) BuiltIn FragDepth
+                              Decorate 144(@entryPointOutput.Color) Location 0
+                              Decorate 148(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 151(g_tTex1df4a) DescriptorSet 0
                               Decorate 151(g_tTex1df4a) Binding 1
                               Decorate 154(g_tTexcdf4) DescriptorSet 0
@@ -544,9 +544,9 @@
              134:    7(fvec4) ConstantComposite 133 133 133 133
              136:             TypePointer Function 6(float)
              143:             TypePointer Output 7(fvec4)
-      144(Color):    143(ptr) Variable Output
+144(@entryPointOutput.Color):    143(ptr) Variable Output
              147:             TypePointer Output 6(float)
-      148(Depth):    147(ptr) Variable Output
+148(@entryPointOutput.Depth):    147(ptr) Variable Output
 151(g_tTex1df4a):     15(ptr) Variable UniformConstant
              152:             TypeImage 6(float) Cube sampled format:Unknown
              153:             TypePointer UniformConstant 152
@@ -564,10 +564,10 @@
                               Store 141(flattenTemp) 142
              145:     12(ptr) AccessChain 141(flattenTemp) 65
              146:    7(fvec4) Load 145
-                              Store 144(Color) 146
+                              Store 144(@entryPointOutput.Color) 146
              149:    136(ptr) AccessChain 141(flattenTemp) 27
              150:    6(float) Load 149
-                              Store 148(Depth) 150
+                              Store 148(@entryPointOutput.Depth) 150
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out
index e718743..a18c80e 100644
--- a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out
@@ -122,13 +122,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -142,8 +142,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -272,13 +272,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -292,8 +292,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -326,8 +326,8 @@
                               Name 87  "g_tTex2du4"
                               Name 98  "psout"
                               Name 107  "flattenTemp"
-                              Name 110  "Color"
-                              Name 114  "Depth"
+                              Name 110  "@entryPointOutput.Color"
+                              Name 114  "@entryPointOutput.Depth"
                               Name 117  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -338,8 +338,8 @@
                               Decorate 64(g_tTex2df4) DescriptorSet 0
                               Decorate 77(g_tTex2di4) DescriptorSet 0
                               Decorate 87(g_tTex2du4) DescriptorSet 0
-                              Decorate 110(Color) Location 0
-                              Decorate 114(Depth) BuiltIn FragDepth
+                              Decorate 110(@entryPointOutput.Color) Location 0
+                              Decorate 114(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 117(g_tTex1df4a) DescriptorSet 0
                               Decorate 117(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -408,9 +408,9 @@
              100:    7(fvec4) ConstantComposite 99 99 99 99
              102:             TypePointer Function 6(float)
              109:             TypePointer Output 7(fvec4)
-      110(Color):    109(ptr) Variable Output
+110(@entryPointOutput.Color):    109(ptr) Variable Output
              113:             TypePointer Output 6(float)
-      114(Depth):    113(ptr) Variable Output
+114(@entryPointOutput.Depth):    113(ptr) Variable Output
 117(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -419,10 +419,10 @@
                               Store 107(flattenTemp) 108
              111:     12(ptr) AccessChain 107(flattenTemp) 30
              112:    7(fvec4) Load 111
-                              Store 110(Color) 112
+                              Store 110(@entryPointOutput.Color) 112
              115:    102(ptr) AccessChain 107(flattenTemp) 44
              116:    6(float) Load 115
-                              Store 114(Depth) 116
+                              Store 114(@entryPointOutput.Depth) 116
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out
index 1ddff1a..299cade 100644
--- a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out
@@ -158,13 +158,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -192,8 +192,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -358,13 +358,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -392,8 +392,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -433,8 +433,8 @@
                               Name 148  "g_tTexcdu4a"
                               Name 161  "psout"
                               Name 172  "flattenTemp"
-                              Name 175  "Color"
-                              Name 179  "Depth"
+                              Name 175  "@entryPointOutput.Color"
+                              Name 179  "@entryPointOutput.Depth"
                               Name 184  "g_tTex1df4"
                               Name 187  "g_tTex1di4"
                               Name 190  "g_tTex1du4"
@@ -458,8 +458,8 @@
                               Decorate 116(g_tTexcdf4a) DescriptorSet 0
                               Decorate 133(g_tTexcdi4a) DescriptorSet 0
                               Decorate 148(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 175(Color) Location 0
-                              Decorate 179(Depth) BuiltIn FragDepth
+                              Decorate 175(@entryPointOutput.Color) Location 0
+                              Decorate 179(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 184(g_tTex1df4) DescriptorSet 0
                               Decorate 184(g_tTex1df4) Binding 0
                               Decorate 187(g_tTex1di4) DescriptorSet 0
@@ -547,9 +547,9 @@
              165:             TypePointer Function 7(fvec4)
              167:     37(int) Constant 1
              174:             TypePointer Output 7(fvec4)
-      175(Color):    174(ptr) Variable Output
+175(@entryPointOutput.Color):    174(ptr) Variable Output
              178:             TypePointer Output 6(float)
-      179(Depth):    178(ptr) Variable Output
+179(@entryPointOutput.Depth):    178(ptr) Variable Output
              182:             TypeImage 6(float) 1D sampled format:Unknown
              183:             TypePointer UniformConstant 182
  184(g_tTex1df4):    183(ptr) Variable UniformConstant
@@ -593,10 +593,10 @@
                               Store 172(flattenTemp) 173
              176:    165(ptr) AccessChain 172(flattenTemp) 162
              177:    7(fvec4) Load 176
-                              Store 175(Color) 177
+                              Store 175(@entryPointOutput.Color) 177
              180:     12(ptr) AccessChain 172(flattenTemp) 167
              181:    6(float) Load 180
-                              Store 179(Depth) 181
+                              Store 179(@entryPointOutput.Depth) 181
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out
index 373423a..d6579ba 100644
--- a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out
@@ -149,13 +149,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -183,8 +183,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -340,13 +340,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -374,8 +374,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -415,8 +415,8 @@
                               Name 137  "g_tTexcdu4"
                               Name 150  "psout"
                               Name 161  "flattenTemp"
-                              Name 164  "Color"
-                              Name 168  "Depth"
+                              Name 164  "@entryPointOutput.Color"
+                              Name 168  "@entryPointOutput.Depth"
                               Name 173  "g_tTex3df4"
                               Name 176  "g_tTex3di4"
                               Name 179  "g_tTex3du4"
@@ -441,8 +441,8 @@
                               Decorate 105(g_tTexcdf4) DescriptorSet 0
                               Decorate 122(g_tTexcdi4) DescriptorSet 0
                               Decorate 137(g_tTexcdu4) DescriptorSet 0
-                              Decorate 164(Color) Location 0
-                              Decorate 168(Depth) BuiltIn FragDepth
+                              Decorate 164(@entryPointOutput.Color) Location 0
+                              Decorate 168(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 173(g_tTex3df4) DescriptorSet 0
                               Decorate 176(g_tTex3di4) DescriptorSet 0
                               Decorate 179(g_tTex3du4) DescriptorSet 0
@@ -527,9 +527,9 @@
              154:             TypePointer Function 7(fvec4)
              156:     32(int) Constant 1
              163:             TypePointer Output 7(fvec4)
-      164(Color):    163(ptr) Variable Output
+164(@entryPointOutput.Color):    163(ptr) Variable Output
              167:             TypePointer Output 6(float)
-      168(Depth):    167(ptr) Variable Output
+168(@entryPointOutput.Depth):    167(ptr) Variable Output
              171:             TypeImage 6(float) 3D sampled format:Unknown
              172:             TypePointer UniformConstant 171
  173(g_tTex3df4):    172(ptr) Variable UniformConstant
@@ -573,10 +573,10 @@
                               Store 161(flattenTemp) 162
              165:    154(ptr) AccessChain 161(flattenTemp) 151
              166:    7(fvec4) Load 165
-                              Store 164(Color) 166
+                              Store 164(@entryPointOutput.Color) 166
              169:     12(ptr) AccessChain 161(flattenTemp) 156
              170:    6(float) Load 169
-                              Store 168(Depth) 170
+                              Store 168(@entryPointOutput.Depth) 170
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out
index 290c8b4..d9e1b77 100644
--- a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out
@@ -122,13 +122,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -156,8 +156,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -286,13 +286,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -320,8 +320,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -355,8 +355,8 @@
                               Name 95  "g_tTex2du4"
                               Name 107  "psout"
                               Name 118  "flattenTemp"
-                              Name 121  "Color"
-                              Name 125  "Depth"
+                              Name 121  "@entryPointOutput.Color"
+                              Name 125  "@entryPointOutput.Depth"
                               Name 130  "g_tTex3df4"
                               Name 133  "g_tTex3di4"
                               Name 136  "g_tTex3du4"
@@ -381,8 +381,8 @@
                               Decorate 61(g_tTex2df4) DescriptorSet 0
                               Decorate 81(g_tTex2di4) DescriptorSet 0
                               Decorate 95(g_tTex2du4) DescriptorSet 0
-                              Decorate 121(Color) Location 0
-                              Decorate 125(Depth) BuiltIn FragDepth
+                              Decorate 121(@entryPointOutput.Color) Location 0
+                              Decorate 125(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 130(g_tTex3df4) DescriptorSet 0
                               Decorate 133(g_tTex3di4) DescriptorSet 0
                               Decorate 136(g_tTex3du4) DescriptorSet 0
@@ -457,9 +457,9 @@
              111:             TypePointer Function 7(fvec4)
              113:     29(int) Constant 1
              120:             TypePointer Output 7(fvec4)
-      121(Color):    120(ptr) Variable Output
+121(@entryPointOutput.Color):    120(ptr) Variable Output
              124:             TypePointer Output 6(float)
-      125(Depth):    124(ptr) Variable Output
+125(@entryPointOutput.Depth):    124(ptr) Variable Output
              128:             TypeImage 6(float) 3D sampled format:Unknown
              129:             TypePointer UniformConstant 128
  130(g_tTex3df4):    129(ptr) Variable UniformConstant
@@ -512,10 +512,10 @@
                               Store 118(flattenTemp) 119
              122:    111(ptr) AccessChain 118(flattenTemp) 108
              123:    7(fvec4) Load 122
-                              Store 121(Color) 123
+                              Store 121(@entryPointOutput.Color) 123
              126:     12(ptr) AccessChain 118(flattenTemp) 113
              127:    6(float) Load 126
-                              Store 125(Depth) 127
+                              Store 125(@entryPointOutput.Depth) 127
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out
index ed40102..067c8a6 100644
--- a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out
@@ -128,13 +128,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -162,8 +162,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -298,13 +298,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -332,8 +332,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -367,8 +367,8 @@
                               Name 105  "g_tTex2du4a"
                               Name 118  "psout"
                               Name 129  "flattenTemp"
-                              Name 132  "Color"
-                              Name 136  "Depth"
+                              Name 132  "@entryPointOutput.Color"
+                              Name 136  "@entryPointOutput.Depth"
                               Name 141  "g_tTex1df4"
                               Name 144  "g_tTex1di4"
                               Name 147  "g_tTex1du4"
@@ -392,8 +392,8 @@
                               Decorate 70(g_tTex2df4a) DescriptorSet 0
                               Decorate 90(g_tTex2di4a) DescriptorSet 0
                               Decorate 105(g_tTex2du4a) DescriptorSet 0
-                              Decorate 132(Color) Location 0
-                              Decorate 136(Depth) BuiltIn FragDepth
+                              Decorate 132(@entryPointOutput.Color) Location 0
+                              Decorate 136(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 141(g_tTex1df4) DescriptorSet 0
                               Decorate 141(g_tTex1df4) Binding 0
                               Decorate 144(g_tTex1di4) DescriptorSet 0
@@ -471,9 +471,9 @@
              122:             TypePointer Function 7(fvec4)
              124:     34(int) Constant 1
              131:             TypePointer Output 7(fvec4)
-      132(Color):    131(ptr) Variable Output
+132(@entryPointOutput.Color):    131(ptr) Variable Output
              135:             TypePointer Output 6(float)
-      136(Depth):    135(ptr) Variable Output
+136(@entryPointOutput.Depth):    135(ptr) Variable Output
              139:             TypeImage 6(float) 1D sampled format:Unknown
              140:             TypePointer UniformConstant 139
  141(g_tTex1df4):    140(ptr) Variable UniformConstant
@@ -526,10 +526,10 @@
                               Store 129(flattenTemp) 130
              133:    122(ptr) AccessChain 129(flattenTemp) 119
              134:    7(fvec4) Load 133
-                              Store 132(Color) 134
+                              Store 132(@entryPointOutput.Color) 134
              137:     12(ptr) AccessChain 129(flattenTemp) 124
              138:    6(float) Load 137
-                              Store 136(Depth) 138
+                              Store 136(@entryPointOutput.Depth) 138
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out
index beae082..40a8202 100644
--- a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out
@@ -176,13 +176,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -210,8 +210,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -394,13 +394,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -428,8 +428,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -469,8 +469,8 @@
                               Name 149  "g_tTexcdu4a"
                               Name 162  "psout"
                               Name 173  "flattenTemp"
-                              Name 176  "Color"
-                              Name 180  "Depth"
+                              Name 176  "@entryPointOutput.Color"
+                              Name 180  "@entryPointOutput.Depth"
                               Name 185  "g_tTex1df4"
                               Name 188  "g_tTex1di4"
                               Name 191  "g_tTex1du4"
@@ -494,8 +494,8 @@
                               Decorate 117(g_tTexcdf4a) DescriptorSet 0
                               Decorate 134(g_tTexcdi4a) DescriptorSet 0
                               Decorate 149(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 176(Color) Location 0
-                              Decorate 180(Depth) BuiltIn FragDepth
+                              Decorate 176(@entryPointOutput.Color) Location 0
+                              Decorate 180(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 185(g_tTex1df4) DescriptorSet 0
                               Decorate 185(g_tTex1df4) Binding 0
                               Decorate 188(g_tTex1di4) DescriptorSet 0
@@ -584,9 +584,9 @@
              166:             TypePointer Function 7(fvec4)
              168:     38(int) Constant 1
              175:             TypePointer Output 7(fvec4)
-      176(Color):    175(ptr) Variable Output
+176(@entryPointOutput.Color):    175(ptr) Variable Output
              179:             TypePointer Output 6(float)
-      180(Depth):    179(ptr) Variable Output
+180(@entryPointOutput.Depth):    179(ptr) Variable Output
              183:             TypeImage 6(float) 1D sampled format:Unknown
              184:             TypePointer UniformConstant 183
  185(g_tTex1df4):    184(ptr) Variable UniformConstant
@@ -630,10 +630,10 @@
                               Store 173(flattenTemp) 174
              177:    166(ptr) AccessChain 173(flattenTemp) 163
              178:    7(fvec4) Load 177
-                              Store 176(Color) 178
+                              Store 176(@entryPointOutput.Color) 178
              181:     12(ptr) AccessChain 173(flattenTemp) 168
              182:    6(float) Load 181
-                              Store 180(Depth) 182
+                              Store 180(@entryPointOutput.Depth) 182
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out
index 9d2802d..87dee88 100644
--- a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out
@@ -167,13 +167,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -201,8 +201,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -376,13 +376,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -410,8 +410,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -451,8 +451,8 @@
                               Name 138  "g_tTexcdu4"
                               Name 151  "psout"
                               Name 162  "flattenTemp"
-                              Name 165  "Color"
-                              Name 169  "Depth"
+                              Name 165  "@entryPointOutput.Color"
+                              Name 169  "@entryPointOutput.Depth"
                               Name 174  "g_tTex3df4"
                               Name 177  "g_tTex3di4"
                               Name 180  "g_tTex3du4"
@@ -477,8 +477,8 @@
                               Decorate 106(g_tTexcdf4) DescriptorSet 0
                               Decorate 123(g_tTexcdi4) DescriptorSet 0
                               Decorate 138(g_tTexcdu4) DescriptorSet 0
-                              Decorate 165(Color) Location 0
-                              Decorate 169(Depth) BuiltIn FragDepth
+                              Decorate 165(@entryPointOutput.Color) Location 0
+                              Decorate 169(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 174(g_tTex3df4) DescriptorSet 0
                               Decorate 177(g_tTex3di4) DescriptorSet 0
                               Decorate 180(g_tTex3du4) DescriptorSet 0
@@ -564,9 +564,9 @@
              155:             TypePointer Function 7(fvec4)
              157:     33(int) Constant 1
              164:             TypePointer Output 7(fvec4)
-      165(Color):    164(ptr) Variable Output
+165(@entryPointOutput.Color):    164(ptr) Variable Output
              168:             TypePointer Output 6(float)
-      169(Depth):    168(ptr) Variable Output
+169(@entryPointOutput.Depth):    168(ptr) Variable Output
              172:             TypeImage 6(float) 3D sampled format:Unknown
              173:             TypePointer UniformConstant 172
  174(g_tTex3df4):    173(ptr) Variable UniformConstant
@@ -610,10 +610,10 @@
                               Store 162(flattenTemp) 163
              166:    155(ptr) AccessChain 162(flattenTemp) 152
              167:    7(fvec4) Load 166
-                              Store 165(Color) 167
+                              Store 165(@entryPointOutput.Color) 167
              170:     12(ptr) AccessChain 162(flattenTemp) 157
              171:    6(float) Load 170
-                              Store 169(Depth) 171
+                              Store 169(@entryPointOutput.Depth) 171
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out
index 2e30e7c..ad5225c 100644
--- a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out
@@ -134,13 +134,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -168,8 +168,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -310,13 +310,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -344,8 +344,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -379,8 +379,8 @@
                               Name 96  "g_tTex2du4"
                               Name 108  "psout"
                               Name 119  "flattenTemp"
-                              Name 122  "Color"
-                              Name 126  "Depth"
+                              Name 122  "@entryPointOutput.Color"
+                              Name 126  "@entryPointOutput.Depth"
                               Name 131  "g_tTex3df4"
                               Name 134  "g_tTex3di4"
                               Name 137  "g_tTex3du4"
@@ -405,8 +405,8 @@
                               Decorate 62(g_tTex2df4) DescriptorSet 0
                               Decorate 82(g_tTex2di4) DescriptorSet 0
                               Decorate 96(g_tTex2du4) DescriptorSet 0
-                              Decorate 122(Color) Location 0
-                              Decorate 126(Depth) BuiltIn FragDepth
+                              Decorate 122(@entryPointOutput.Color) Location 0
+                              Decorate 126(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 131(g_tTex3df4) DescriptorSet 0
                               Decorate 134(g_tTex3di4) DescriptorSet 0
                               Decorate 137(g_tTex3du4) DescriptorSet 0
@@ -482,9 +482,9 @@
              112:             TypePointer Function 7(fvec4)
              114:     30(int) Constant 1
              121:             TypePointer Output 7(fvec4)
-      122(Color):    121(ptr) Variable Output
+122(@entryPointOutput.Color):    121(ptr) Variable Output
              125:             TypePointer Output 6(float)
-      126(Depth):    125(ptr) Variable Output
+126(@entryPointOutput.Depth):    125(ptr) Variable Output
              129:             TypeImage 6(float) 3D sampled format:Unknown
              130:             TypePointer UniformConstant 129
  131(g_tTex3df4):    130(ptr) Variable UniformConstant
@@ -537,10 +537,10 @@
                               Store 119(flattenTemp) 120
              123:    112(ptr) AccessChain 119(flattenTemp) 109
              124:    7(fvec4) Load 123
-                              Store 122(Color) 124
+                              Store 122(@entryPointOutput.Color) 124
              127:     12(ptr) AccessChain 119(flattenTemp) 114
              128:    6(float) Load 127
-                              Store 126(Depth) 128
+                              Store 126(@entryPointOutput.Depth) 128
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out
index eda17f2..7246fe7 100644
--- a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out
@@ -140,13 +140,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -174,8 +174,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -322,13 +322,13 @@
 0:38          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:38          Color: direct index for structure ( temp 4-component vector of float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
 0:38              0 (const int)
 0:38        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:38          Depth: direct index for structure ( temp float)
 0:38            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:38            Constant:
@@ -356,8 +356,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -391,8 +391,8 @@
                               Name 106  "g_tTex2du4a"
                               Name 119  "psout"
                               Name 130  "flattenTemp"
-                              Name 133  "Color"
-                              Name 137  "Depth"
+                              Name 133  "@entryPointOutput.Color"
+                              Name 137  "@entryPointOutput.Depth"
                               Name 142  "g_tTex1df4"
                               Name 145  "g_tTex1di4"
                               Name 148  "g_tTex1du4"
@@ -416,8 +416,8 @@
                               Decorate 71(g_tTex2df4a) DescriptorSet 0
                               Decorate 91(g_tTex2di4a) DescriptorSet 0
                               Decorate 106(g_tTex2du4a) DescriptorSet 0
-                              Decorate 133(Color) Location 0
-                              Decorate 137(Depth) BuiltIn FragDepth
+                              Decorate 133(@entryPointOutput.Color) Location 0
+                              Decorate 137(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 142(g_tTex1df4) DescriptorSet 0
                               Decorate 142(g_tTex1df4) Binding 0
                               Decorate 145(g_tTex1di4) DescriptorSet 0
@@ -496,9 +496,9 @@
              123:             TypePointer Function 7(fvec4)
              125:     35(int) Constant 1
              132:             TypePointer Output 7(fvec4)
-      133(Color):    132(ptr) Variable Output
+133(@entryPointOutput.Color):    132(ptr) Variable Output
              136:             TypePointer Output 6(float)
-      137(Depth):    136(ptr) Variable Output
+137(@entryPointOutput.Depth):    136(ptr) Variable Output
              140:             TypeImage 6(float) 1D sampled format:Unknown
              141:             TypePointer UniformConstant 140
  142(g_tTex1df4):    141(ptr) Variable UniformConstant
@@ -551,10 +551,10 @@
                               Store 130(flattenTemp) 131
              134:    123(ptr) AccessChain 130(flattenTemp) 120
              135:    7(fvec4) Load 134
-                              Store 133(Color) 135
+                              Store 133(@entryPointOutput.Color) 135
              138:     12(ptr) AccessChain 130(flattenTemp) 125
              139:    6(float) Load 138
-                              Store 137(Depth) 139
+                              Store 137(@entryPointOutput.Depth) 139
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out
index 03449f8..244a70b 100644
--- a/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out
@@ -185,13 +185,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -208,8 +208,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -401,13 +401,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -424,8 +424,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -465,8 +465,8 @@
                               Name 111  "g_tTexcdu4"
                               Name 118  "psout"
                               Name 129  "flattenTemp"
-                              Name 132  "Color"
-                              Name 136  "Depth"
+                              Name 132  "@entryPointOutput.Color"
+                              Name 136  "@entryPointOutput.Depth"
                               Name 139  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -480,8 +480,8 @@
                               Decorate 89(g_tTexcdf4) DescriptorSet 0
                               Decorate 102(g_tTexcdi4) DescriptorSet 0
                               Decorate 111(g_tTexcdu4) DescriptorSet 0
-                              Decorate 132(Color) Location 0
-                              Decorate 136(Depth) BuiltIn FragDepth
+                              Decorate 132(@entryPointOutput.Color) Location 0
+                              Decorate 136(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 139(g_tTex1df4a) DescriptorSet 0
                               Decorate 139(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -557,9 +557,9 @@
              123:     31(int) Constant 1
              124:             TypePointer Function 6(float)
              131:             TypePointer Output 7(fvec4)
-      132(Color):    131(ptr) Variable Output
+132(@entryPointOutput.Color):    131(ptr) Variable Output
              135:             TypePointer Output 6(float)
-      136(Depth):    135(ptr) Variable Output
+136(@entryPointOutput.Depth):    135(ptr) Variable Output
 139(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -568,10 +568,10 @@
                               Store 129(flattenTemp) 130
              133:     12(ptr) AccessChain 129(flattenTemp) 119
              134:    7(fvec4) Load 133
-                              Store 132(Color) 134
+                              Store 132(@entryPointOutput.Color) 134
              137:    124(ptr) AccessChain 129(flattenTemp) 123
              138:    6(float) Load 137
-                              Store 136(Depth) 138
+                              Store 136(@entryPointOutput.Depth) 138
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out
index 42a27bf..24c510c 100644
--- a/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out
@@ -233,13 +233,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -259,8 +259,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -500,13 +500,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -526,8 +526,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -572,8 +572,8 @@
                               Name 146  "g_tTexcdu4"
                               Name 153  "psout"
                               Name 164  "flattenTemp"
-                              Name 167  "Color"
-                              Name 171  "Depth"
+                              Name 167  "@entryPointOutput.Color"
+                              Name 171  "@entryPointOutput.Depth"
                               Name 174  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -590,8 +590,8 @@
                               Decorate 128(g_tTexcdf4) DescriptorSet 0
                               Decorate 137(g_tTexcdi4) DescriptorSet 0
                               Decorate 146(g_tTexcdu4) DescriptorSet 0
-                              Decorate 167(Color) Location 0
-                              Decorate 171(Depth) BuiltIn FragDepth
+                              Decorate 167(@entryPointOutput.Color) Location 0
+                              Decorate 171(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 174(g_tTex1df4a) DescriptorSet 0
                               Decorate 174(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -687,9 +687,9 @@
              158:     28(int) Constant 1
              159:             TypePointer Function 6(float)
              166:             TypePointer Output 7(fvec4)
-      167(Color):    166(ptr) Variable Output
+167(@entryPointOutput.Color):    166(ptr) Variable Output
              170:             TypePointer Output 6(float)
-      171(Depth):    170(ptr) Variable Output
+171(@entryPointOutput.Depth):    170(ptr) Variable Output
 174(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -698,10 +698,10 @@
                               Store 164(flattenTemp) 165
              168:     12(ptr) AccessChain 164(flattenTemp) 154
              169:    7(fvec4) Load 168
-                              Store 167(Color) 169
+                              Store 167(@entryPointOutput.Color) 169
              172:    159(ptr) AccessChain 164(flattenTemp) 158
              173:    6(float) Load 172
-                              Store 171(Depth) 173
+                              Store 171(@entryPointOutput.Depth) 173
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out b/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out
index a93cbdf..8081913 100644
--- a/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out
@@ -222,7 +222,7 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:27          Pos: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:27            Constant:
@@ -242,7 +242,7 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -471,7 +471,7 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:27          Pos: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:27            Constant:
@@ -491,17 +491,17 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 169
+// Id's are bound by 166
 
                               Capability Shader
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 162 168
+                              EntryPoint Vertex 4  "main" 162
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -533,10 +533,8 @@
                               Name 143  "txval42"
                               Name 146  "g_tTexcdu4"
                               Name 153  "vsout"
-                              Name 162  "@entryPointOutput_Pos"
+                              Name 162  "@entryPointOutput.Pos"
                               Name 165  "g_tTex1df4a"
-                              Name 166  "VS_OUTPUT"
-                              Name 168  "@entryPointOutput"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
                               Decorate 20(g_sSamp) DescriptorSet 0
@@ -552,10 +550,9 @@
                               Decorate 128(g_tTexcdf4) DescriptorSet 0
                               Decorate 137(g_tTexcdi4) DescriptorSet 0
                               Decorate 146(g_tTexcdu4) DescriptorSet 0
-                              Decorate 162(@entryPointOutput_Pos) BuiltIn Position
+                              Decorate 162(@entryPointOutput.Pos) BuiltIn Position
                               Decorate 165(g_tTex1df4a) DescriptorSet 0
                               Decorate 165(g_tTex1df4a) Binding 1
-                              Decorate 168(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -647,16 +644,13 @@
              155:    6(float) Constant 0
              156:    7(fvec4) ConstantComposite 155 155 155 155
              161:             TypePointer Output 7(fvec4)
-162(@entryPointOutput_Pos):    161(ptr) Variable Output
+162(@entryPointOutput.Pos):    161(ptr) Variable Output
 165(g_tTex1df4a):     15(ptr) Variable UniformConstant
-  166(VS_OUTPUT):             TypeStruct
-             167:             TypePointer Output 166(VS_OUTPUT)
-168(@entryPointOutput):    167(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              163:8(VS_OUTPUT) FunctionCall 10(@main()
              164:    7(fvec4) CompositeExtract 163 0
-                              Store 162(@entryPointOutput_Pos) 164
+                              Store 162(@entryPointOutput.Pos) 164
                               Return
                               FunctionEnd
       10(@main():8(VS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out
index 4b4e718..3a67807 100644
--- a/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out
@@ -203,13 +203,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -229,8 +229,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -440,13 +440,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -466,8 +466,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -506,8 +506,8 @@
                               Name 125  "g_tTex3du4"
                               Name 137  "psout"
                               Name 146  "flattenTemp"
-                              Name 149  "Color"
-                              Name 153  "Depth"
+                              Name 149  "@entryPointOutput.Color"
+                              Name 153  "@entryPointOutput.Depth"
                               Name 156  "g_tTex1df4a"
                               Name 159  "g_tTexcdf4"
                               Name 162  "g_tTexcdi4"
@@ -524,8 +524,8 @@
                               Decorate 99(g_tTex3df4) DescriptorSet 0
                               Decorate 114(g_tTex3di4) DescriptorSet 0
                               Decorate 125(g_tTex3du4) DescriptorSet 0
-                              Decorate 149(Color) Location 0
-                              Decorate 153(Depth) BuiltIn FragDepth
+                              Decorate 149(@entryPointOutput.Color) Location 0
+                              Decorate 153(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 156(g_tTex1df4a) DescriptorSet 0
                               Decorate 156(g_tTex1df4a) Binding 1
                               Decorate 159(g_tTexcdf4) DescriptorSet 0
@@ -621,9 +621,9 @@
              139:    7(fvec4) ConstantComposite 138 138 138 138
              141:             TypePointer Function 6(float)
              148:             TypePointer Output 7(fvec4)
-      149(Color):    148(ptr) Variable Output
+149(@entryPointOutput.Color):    148(ptr) Variable Output
              152:             TypePointer Output 6(float)
-      153(Depth):    152(ptr) Variable Output
+153(@entryPointOutput.Depth):    152(ptr) Variable Output
 156(g_tTex1df4a):     15(ptr) Variable UniformConstant
              157:             TypeImage 6(float) Cube sampled format:Unknown
              158:             TypePointer UniformConstant 157
@@ -641,10 +641,10 @@
                               Store 146(flattenTemp) 147
              150:     12(ptr) AccessChain 146(flattenTemp) 67
              151:    7(fvec4) Load 150
-                              Store 149(Color) 151
+                              Store 149(@entryPointOutput.Color) 151
              154:    141(ptr) AccessChain 146(flattenTemp) 28
              155:    6(float) Load 154
-                              Store 153(Depth) 155
+                              Store 153(@entryPointOutput.Depth) 155
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out
index 1f714e6..56532b8 100644
--- a/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out
@@ -140,13 +140,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -163,8 +163,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -311,13 +311,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -334,8 +334,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -369,8 +369,8 @@
                               Name 84  "g_tTex2du4"
                               Name 91  "psout"
                               Name 100  "flattenTemp"
-                              Name 103  "Color"
-                              Name 107  "Depth"
+                              Name 103  "@entryPointOutput.Color"
+                              Name 107  "@entryPointOutput.Depth"
                               Name 110  "g_tTex1df4a"
                               Name 113  "g_tTexcdf4"
                               Name 116  "g_tTexcdi4"
@@ -384,8 +384,8 @@
                               Decorate 59(g_tTex2df4) DescriptorSet 0
                               Decorate 75(g_tTex2di4) DescriptorSet 0
                               Decorate 84(g_tTex2du4) DescriptorSet 0
-                              Decorate 103(Color) Location 0
-                              Decorate 107(Depth) BuiltIn FragDepth
+                              Decorate 103(@entryPointOutput.Color) Location 0
+                              Decorate 107(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 110(g_tTex1df4a) DescriptorSet 0
                               Decorate 110(g_tTex1df4a) Binding 1
                               Decorate 113(g_tTexcdf4) DescriptorSet 0
@@ -450,9 +450,9 @@
               93:    7(fvec4) ConstantComposite 92 92 92 92
               95:             TypePointer Function 6(float)
              102:             TypePointer Output 7(fvec4)
-      103(Color):    102(ptr) Variable Output
+103(@entryPointOutput.Color):    102(ptr) Variable Output
              106:             TypePointer Output 6(float)
-      107(Depth):    106(ptr) Variable Output
+107(@entryPointOutput.Depth):    106(ptr) Variable Output
 110(g_tTex1df4a):     15(ptr) Variable UniformConstant
              111:             TypeImage 6(float) Cube array sampled format:Unknown
              112:             TypePointer UniformConstant 111
@@ -470,10 +470,10 @@
                               Store 100(flattenTemp) 101
              104:     12(ptr) AccessChain 100(flattenTemp) 69
              105:    7(fvec4) Load 104
-                              Store 103(Color) 105
+                              Store 103(@entryPointOutput.Color) 105
              108:     95(ptr) AccessChain 100(flattenTemp) 31
              109:    6(float) Load 108
-                              Store 107(Depth) 109
+                              Store 107(@entryPointOutput.Depth) 109
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out
index 0a3e7fd..f02dfd2 100644
--- a/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out
@@ -149,13 +149,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -172,8 +172,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -329,13 +329,13 @@
 0:24          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:24          Color: direct index for structure ( temp 4-component vector of float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:24          Depth: direct index for structure ( temp float)
 0:24            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:24            Constant:
@@ -352,8 +352,8 @@
 0:?     'g_tTexcdf4a' ( uniform textureCubeArray)
 0:?     'g_tTexcdi4a' ( uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' ( uniform utextureCubeArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -393,8 +393,8 @@
                               Name 115  "g_tTexcdu4a"
                               Name 126  "psout"
                               Name 136  "flattenTemp"
-                              Name 139  "Color"
-                              Name 143  "Depth"
+                              Name 139  "@entryPointOutput.Color"
+                              Name 143  "@entryPointOutput.Depth"
                               Name 146  "g_tTex1df4"
                               Decorate 16(g_tTex1df4a) DescriptorSet 0
                               Decorate 16(g_tTex1df4a) Binding 1
@@ -408,8 +408,8 @@
                               Decorate 95(g_tTexcdf4a) DescriptorSet 0
                               Decorate 105(g_tTexcdi4a) DescriptorSet 0
                               Decorate 115(g_tTexcdu4a) DescriptorSet 0
-                              Decorate 139(Color) Location 0
-                              Decorate 143(Depth) BuiltIn FragDepth
+                              Decorate 139(@entryPointOutput.Color) Location 0
+                              Decorate 143(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 146(g_tTex1df4) DescriptorSet 0
                               Decorate 146(g_tTex1df4) Binding 0
                2:             TypeVoid
@@ -492,9 +492,9 @@
              130:     30(int) Constant 1
              131:             TypePointer Function 6(float)
              138:             TypePointer Output 7(fvec4)
-      139(Color):    138(ptr) Variable Output
+139(@entryPointOutput.Color):    138(ptr) Variable Output
              142:             TypePointer Output 6(float)
-      143(Depth):    142(ptr) Variable Output
+143(@entryPointOutput.Depth):    142(ptr) Variable Output
  146(g_tTex1df4):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -503,10 +503,10 @@
                               Store 136(flattenTemp) 137
              140:     12(ptr) AccessChain 136(flattenTemp) 127
              141:    7(fvec4) Load 140
-                              Store 139(Color) 141
+                              Store 139(@entryPointOutput.Color) 141
              144:    131(ptr) AccessChain 136(flattenTemp) 130
              145:    6(float) Load 144
-                              Store 143(Depth) 145
+                              Store 143(@entryPointOutput.Depth) 145
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out
index 6ff36be..9a7cb9a 100644
--- a/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out
@@ -179,13 +179,13 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:29          Color: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:29          Depth: direct index for structure ( temp float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
@@ -206,8 +206,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -393,13 +393,13 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:29          Color: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:29          Depth: direct index for structure ( temp float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:29            Constant:
@@ -420,8 +420,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -466,8 +466,8 @@
                               Name 142  "g_tTexcdu4"
                               Name 149  "psout"
                               Name 160  "flattenTemp"
-                              Name 163  "Color"
-                              Name 167  "Depth"
+                              Name 163  "@entryPointOutput.Color"
+                              Name 167  "@entryPointOutput.Depth"
                               Name 170  "g_sSamp2d"
                               Name 171  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
@@ -485,8 +485,8 @@
                               Decorate 124(g_tTexcdf4) DescriptorSet 0
                               Decorate 133(g_tTexcdi4) DescriptorSet 0
                               Decorate 142(g_tTexcdu4) DescriptorSet 0
-                              Decorate 163(Color) Location 0
-                              Decorate 167(Depth) BuiltIn FragDepth
+                              Decorate 163(@entryPointOutput.Color) Location 0
+                              Decorate 167(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 170(g_sSamp2d) DescriptorSet 0
                               Decorate 171(g_tTex1df4a) DescriptorSet 0
                               Decorate 171(g_tTex1df4a) Binding 1
@@ -579,9 +579,9 @@
              154:     27(int) Constant 1
              155:             TypePointer Function 6(float)
              162:             TypePointer Output 7(fvec4)
-      163(Color):    162(ptr) Variable Output
+163(@entryPointOutput.Color):    162(ptr) Variable Output
              166:             TypePointer Output 6(float)
-      167(Depth):    166(ptr) Variable Output
+167(@entryPointOutput.Depth):    166(ptr) Variable Output
   170(g_sSamp2d):     19(ptr) Variable UniformConstant
 171(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
@@ -591,10 +591,10 @@
                               Store 160(flattenTemp) 161
              164:     12(ptr) AccessChain 160(flattenTemp) 150
              165:    7(fvec4) Load 164
-                              Store 163(Color) 165
+                              Store 163(@entryPointOutput.Color) 165
              168:    155(ptr) AccessChain 160(flattenTemp) 154
              169:    6(float) Load 168
-                              Store 167(Depth) 169
+                              Store 167(@entryPointOutput.Depth) 169
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out b/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out
index 5b2f950..aaaf05a 100644
--- a/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out
@@ -168,7 +168,7 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:27          Pos: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:27            Constant:
@@ -188,7 +188,7 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -363,7 +363,7 @@
 0:?     Sequence
 0:27      Sequence
 0:27        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:27          Pos: direct index for structure ( temp 4-component vector of float)
 0:27            Function Call: @main( ( temp structure{ temp 4-component vector of float Pos})
 0:27            Constant:
@@ -383,17 +383,17 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 165
+// Id's are bound by 162
 
                               Capability Shader
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 158 164
+                              EntryPoint Vertex 4  "main" 158
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_OUTPUT"
@@ -425,10 +425,8 @@
                               Name 139  "txval42"
                               Name 142  "g_tTexcdu4"
                               Name 149  "vsout"
-                              Name 158  "@entryPointOutput_Pos"
+                              Name 158  "@entryPointOutput.Pos"
                               Name 161  "g_tTex1df4a"
-                              Name 162  "VS_OUTPUT"
-                              Name 164  "@entryPointOutput"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
                               Decorate 20(g_sSamp) DescriptorSet 0
@@ -444,10 +442,9 @@
                               Decorate 124(g_tTexcdf4) DescriptorSet 0
                               Decorate 133(g_tTexcdi4) DescriptorSet 0
                               Decorate 142(g_tTexcdu4) DescriptorSet 0
-                              Decorate 158(@entryPointOutput_Pos) BuiltIn Position
+                              Decorate 158(@entryPointOutput.Pos) BuiltIn Position
                               Decorate 161(g_tTex1df4a) DescriptorSet 0
                               Decorate 161(g_tTex1df4a) Binding 1
-                              Decorate 164(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -535,16 +532,13 @@
              151:    6(float) Constant 0
              152:    7(fvec4) ConstantComposite 151 151 151 151
              157:             TypePointer Output 7(fvec4)
-158(@entryPointOutput_Pos):    157(ptr) Variable Output
+158(@entryPointOutput.Pos):    157(ptr) Variable Output
 161(g_tTex1df4a):     15(ptr) Variable UniformConstant
-  162(VS_OUTPUT):             TypeStruct
-             163:             TypePointer Output 162(VS_OUTPUT)
-164(@entryPointOutput):    163(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
              159:8(VS_OUTPUT) FunctionCall 10(@main()
              160:    7(fvec4) CompositeExtract 159 0
-                              Store 158(@entryPointOutput_Pos) 160
+                              Store 158(@entryPointOutput.Pos) 160
                               Return
                               FunctionEnd
       10(@main():8(VS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out
index 7311ae4..bb92ea7 100644
--- a/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out
@@ -167,13 +167,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -193,8 +193,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -368,13 +368,13 @@
 0:28          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:28          Color: direct index for structure ( temp 4-component vector of float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
 0:28              0 (const int)
 0:28        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:28          Depth: direct index for structure ( temp float)
 0:28            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:28            Constant:
@@ -394,8 +394,8 @@
 0:?     'g_tTexcdf4' ( uniform textureCube)
 0:?     'g_tTexcdi4' ( uniform itextureCube)
 0:?     'g_tTexcdu4' ( uniform utextureCube)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -434,8 +434,8 @@
                               Name 121  "g_tTex3du4"
                               Name 133  "psout"
                               Name 142  "flattenTemp"
-                              Name 145  "Color"
-                              Name 149  "Depth"
+                              Name 145  "@entryPointOutput.Color"
+                              Name 149  "@entryPointOutput.Depth"
                               Name 152  "g_tTex1df4a"
                               Name 155  "g_tTexcdf4"
                               Name 158  "g_tTexcdi4"
@@ -452,8 +452,8 @@
                               Decorate 97(g_tTex3df4) DescriptorSet 0
                               Decorate 110(g_tTex3di4) DescriptorSet 0
                               Decorate 121(g_tTex3du4) DescriptorSet 0
-                              Decorate 145(Color) Location 0
-                              Decorate 149(Depth) BuiltIn FragDepth
+                              Decorate 145(@entryPointOutput.Color) Location 0
+                              Decorate 149(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 152(g_tTex1df4a) DescriptorSet 0
                               Decorate 152(g_tTex1df4a) Binding 1
                               Decorate 155(g_tTexcdf4) DescriptorSet 0
@@ -545,9 +545,9 @@
              135:    7(fvec4) ConstantComposite 134 134 134 134
              137:             TypePointer Function 6(float)
              144:             TypePointer Output 7(fvec4)
-      145(Color):    144(ptr) Variable Output
+145(@entryPointOutput.Color):    144(ptr) Variable Output
              148:             TypePointer Output 6(float)
-      149(Depth):    148(ptr) Variable Output
+149(@entryPointOutput.Depth):    148(ptr) Variable Output
 152(g_tTex1df4a):     15(ptr) Variable UniformConstant
              153:             TypeImage 6(float) Cube sampled format:Unknown
              154:             TypePointer UniformConstant 153
@@ -565,10 +565,10 @@
                               Store 142(flattenTemp) 143
              146:     12(ptr) AccessChain 142(flattenTemp) 65
              147:    7(fvec4) Load 146
-                              Store 145(Color) 147
+                              Store 145(@entryPointOutput.Color) 147
              150:    137(ptr) AccessChain 142(flattenTemp) 27
              151:    6(float) Load 150
-                              Store 149(Depth) 151
+                              Store 149(@entryPointOutput.Depth) 151
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out
index 223bfaf..adb4a8f 100644
--- a/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out
@@ -122,13 +122,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -142,8 +142,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -272,13 +272,13 @@
 0:20          'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20          Function Call: @main( ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:20          Color: direct index for structure ( temp 4-component vector of float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
 0:20              0 (const int)
 0:20        move second child to first child ( temp float)
-0:?           'Depth' ( out float FragDepth)
+0:?           '@entryPointOutput.Depth' ( out float FragDepth)
 0:20          Depth: direct index for structure ( temp float)
 0:20            'flattenTemp' ( temp structure{ temp 4-component vector of float Color,  temp float Depth})
 0:20            Constant:
@@ -292,8 +292,8 @@
 0:?     'g_tTex2df4' ( uniform texture2DArray)
 0:?     'g_tTex2di4' ( uniform itexture2DArray)
 0:?     'g_tTex2du4' ( uniform utexture2DArray)
-0:?     'Color' (layout( location=0) out 4-component vector of float)
-0:?     'Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Depth' ( out float FragDepth)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -326,8 +326,8 @@
                               Name 88  "g_tTex2du4"
                               Name 99  "psout"
                               Name 108  "flattenTemp"
-                              Name 111  "Color"
-                              Name 115  "Depth"
+                              Name 111  "@entryPointOutput.Color"
+                              Name 115  "@entryPointOutput.Depth"
                               Name 118  "g_tTex1df4a"
                               Decorate 16(g_tTex1df4) DescriptorSet 0
                               Decorate 16(g_tTex1df4) Binding 0
@@ -338,8 +338,8 @@
                               Decorate 64(g_tTex2df4) DescriptorSet 0
                               Decorate 77(g_tTex2di4) DescriptorSet 0
                               Decorate 88(g_tTex2du4) DescriptorSet 0
-                              Decorate 111(Color) Location 0
-                              Decorate 115(Depth) BuiltIn FragDepth
+                              Decorate 111(@entryPointOutput.Color) Location 0
+                              Decorate 115(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 118(g_tTex1df4a) DescriptorSet 0
                               Decorate 118(g_tTex1df4a) Binding 1
                2:             TypeVoid
@@ -409,9 +409,9 @@
              101:    7(fvec4) ConstantComposite 100 100 100 100
              103:             TypePointer Function 6(float)
              110:             TypePointer Output 7(fvec4)
-      111(Color):    110(ptr) Variable Output
+111(@entryPointOutput.Color):    110(ptr) Variable Output
              114:             TypePointer Output 6(float)
-      115(Depth):    114(ptr) Variable Output
+115(@entryPointOutput.Depth):    114(ptr) Variable Output
 118(g_tTex1df4a):     15(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
@@ -420,10 +420,10 @@
                               Store 108(flattenTemp) 109
              112:     12(ptr) AccessChain 108(flattenTemp) 30
              113:    7(fvec4) Load 112
-                              Store 111(Color) 113
+                              Store 111(@entryPointOutput.Color) 113
              116:    103(ptr) AccessChain 108(flattenTemp) 44
              117:    6(float) Load 116
-                              Store 115(Depth) 117
+                              Store 115(@entryPointOutput.Depth) 117
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.scalarCast.vert.out b/Test/baseResults/hlsl.scalarCast.vert.out
index c7ac142..70a8512 100755
--- a/Test/baseResults/hlsl.scalarCast.vert.out
+++ b/Test/baseResults/hlsl.scalarCast.vert.out
@@ -143,22 +143,20 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.position' ( out 4-component vector of float Position)
 0:29          position: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp 2-component vector of float)
-0:29          texCoord: direct index for structure ( temp 2-component vector of float)
-0:29            '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
-0:29            Constant:
-0:29              0 (const int)
+0:?           '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 0:29          texCoord: direct index for structure ( temp 2-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
+0:?     '@entryPointOutput.position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 
 
 Linked vertex stage:
@@ -308,31 +306,29 @@
 0:29          'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29          Function Call: @main( ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_position' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.position' ( out 4-component vector of float Position)
 0:29          position: direct index for structure ( temp 4-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp 2-component vector of float)
-0:29          texCoord: direct index for structure ( temp 2-component vector of float)
-0:29            '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
-0:29            Constant:
-0:29              0 (const int)
+0:?           '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 0:29          texCoord: direct index for structure ( temp 2-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              1 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
+0:?     '@entryPointOutput.position' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 123
+// Id's are bound by 120
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 108 116
+                              EntryPoint Vertex 4  "main" 108 115
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VertexOut"
@@ -357,12 +353,10 @@
                               Name 96  "v4"
                               Name 98  "v5"
                               Name 105  "flattenTemp"
-                              Name 108  "@entryPointOutput_position"
-                              Name 114  "VertexOut"
-                              MemberName 114(VertexOut) 0  "texCoord"
-                              Name 116  "@entryPointOutput"
-                              Decorate 108(@entryPointOutput_position) BuiltIn Position
-                              Decorate 116(@entryPointOutput) Location 0
+                              Name 108  "@entryPointOutput.position"
+                              Name 115  "@entryPointOutput.texCoord"
+                              Decorate 108(@entryPointOutput.position) BuiltIn Position
+                              Decorate 115(@entryPointOutput.texCoord) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -389,16 +383,14 @@
              101:    8(fvec2) ConstantComposite 59 59
              102:9(VertexOut) ConstantComposite 100 101
              107:             TypePointer Output 7(fvec4)
-108(@entryPointOutput_position):    107(ptr) Variable Output
+108(@entryPointOutput.position):    107(ptr) Variable Output
              109:             TypeInt 32 1
              110:    109(int) Constant 0
              111:             TypePointer Function 7(fvec4)
-  114(VertexOut):             TypeStruct 8(fvec2)
-             115:             TypePointer Output 114(VertexOut)
-116(@entryPointOutput):    115(ptr) Variable Output
-             117:    109(int) Constant 1
-             118:             TypePointer Function 8(fvec2)
-             121:             TypePointer Output 8(fvec2)
+             114:             TypePointer Output 8(fvec2)
+115(@entryPointOutput.texCoord):    114(ptr) Variable Output
+             116:    109(int) Constant 1
+             117:             TypePointer Function 8(fvec2)
          4(main):           2 Function None 3
                5:             Label
 105(flattenTemp):     87(ptr) Variable Function
@@ -406,11 +398,10 @@
                               Store 105(flattenTemp) 106
              112:    111(ptr) AccessChain 105(flattenTemp) 110
              113:    7(fvec4) Load 112
-                              Store 108(@entryPointOutput_position) 113
-             119:    118(ptr) AccessChain 105(flattenTemp) 117
-             120:    8(fvec2) Load 119
-             122:    121(ptr) AccessChain 116(@entryPointOutput) 110
-                              Store 122 120
+                              Store 108(@entryPointOutput.position) 113
+             118:    117(ptr) AccessChain 105(flattenTemp) 116
+             119:    8(fvec2) Load 118
+                              Store 115(@entryPointOutput.texCoord) 119
                               Return
                               FunctionEnd
          11(r0():9(VertexOut) Function None 10
diff --git a/Test/baseResults/hlsl.semantic-1.vert.out b/Test/baseResults/hlsl.semantic-1.vert.out
new file mode 100644
index 0000000..9678570
--- /dev/null
+++ b/Test/baseResults/hlsl.semantic-1.vert.out
@@ -0,0 +1,374 @@
+hlsl.semantic-1.vert
+Shader version: 500
+0:? Sequence
+0:16  Function Definition: @main(vf4; ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16    Function Parameters: 
+0:16      'v' ( in 4-component vector of float)
+0:?     Sequence
+0:18      move second child to first child ( temp 4-component vector of float)
+0:18        pos: direct index for structure ( temp 4-component vector of float)
+0:18          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:18          Constant:
+0:18            0 (const int)
+0:18        'v' ( in 4-component vector of float)
+0:19      move second child to first child ( temp 2-component vector of float)
+0:19        UV0: direct index for structure ( temp 2-component vector of float)
+0:19          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:19          Constant:
+0:19            1 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:19          direct index ( temp float)
+0:19            'v' ( in 4-component vector of float)
+0:19            Constant:
+0:19              0 (const int)
+0:19          direct index ( temp float)
+0:19            'v' ( in 4-component vector of float)
+0:19            Constant:
+0:19              0 (const int)
+0:20      move second child to first child ( temp 2-component vector of float)
+0:20        UV1: direct index for structure ( temp 2-component vector of float)
+0:20          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:20          Constant:
+0:20            2 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:20          direct index ( temp float)
+0:20            'v' ( in 4-component vector of float)
+0:20            Constant:
+0:20              1 (const int)
+0:20          direct index ( temp float)
+0:20            'v' ( in 4-component vector of float)
+0:20            Constant:
+0:20              1 (const int)
+0:21      move second child to first child ( temp 2-component vector of float)
+0:21        UV2: direct index for structure ( temp 2-component vector of float)
+0:21          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:21          Constant:
+0:21            3 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:21          direct index ( temp float)
+0:21            'v' ( in 4-component vector of float)
+0:21            Constant:
+0:21              2 (const int)
+0:21          direct index ( temp float)
+0:21            'v' ( in 4-component vector of float)
+0:21            Constant:
+0:21              2 (const int)
+0:22      move second child to first child ( temp 2-component vector of float)
+0:22        UV3: direct index for structure ( temp 2-component vector of float)
+0:22          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:22          Constant:
+0:22            4 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:22          direct index ( temp float)
+0:22            'v' ( in 4-component vector of float)
+0:22            Constant:
+0:22              3 (const int)
+0:22          direct index ( temp float)
+0:22            'v' ( in 4-component vector of float)
+0:22            Constant:
+0:22              3 (const int)
+0:23      Branch: Return with expression
+0:23        's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16  Function Definition: main( ( temp void)
+0:16    Function Parameters: 
+0:?     Sequence
+0:16      move second child to first child ( temp 4-component vector of float)
+0:?         'v' ( temp 4-component vector of float)
+0:?         'v' (layout( location=0) in 4-component vector of float)
+0:16      Sequence
+0:16        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16          Function Call: @main(vf4; ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:?             'v' ( temp 4-component vector of float)
+0:16        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:16          pos: direct index for structure ( temp 4-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              0 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV0' (layout( location=1) out 2-component vector of float)
+0:16          UV0: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              1 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV1' (layout( location=2) out 2-component vector of float)
+0:16          UV1: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              2 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV2' (layout( location=3) out 2-component vector of float)
+0:16          UV2: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              3 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV3' (layout( location=4) out 2-component vector of float)
+0:16          UV3: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              4 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.UV0' (layout( location=1) out 2-component vector of float)
+0:?     '@entryPointOutput.UV1' (layout( location=2) out 2-component vector of float)
+0:?     '@entryPointOutput.UV2' (layout( location=3) out 2-component vector of float)
+0:?     '@entryPointOutput.UV3' (layout( location=4) out 2-component vector of float)
+0:?     'v' (layout( location=0) in 4-component vector of float)
+
+
+Linked vertex stage:
+
+
+Shader version: 500
+0:? Sequence
+0:16  Function Definition: @main(vf4; ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16    Function Parameters: 
+0:16      'v' ( in 4-component vector of float)
+0:?     Sequence
+0:18      move second child to first child ( temp 4-component vector of float)
+0:18        pos: direct index for structure ( temp 4-component vector of float)
+0:18          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:18          Constant:
+0:18            0 (const int)
+0:18        'v' ( in 4-component vector of float)
+0:19      move second child to first child ( temp 2-component vector of float)
+0:19        UV0: direct index for structure ( temp 2-component vector of float)
+0:19          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:19          Constant:
+0:19            1 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:19          direct index ( temp float)
+0:19            'v' ( in 4-component vector of float)
+0:19            Constant:
+0:19              0 (const int)
+0:19          direct index ( temp float)
+0:19            'v' ( in 4-component vector of float)
+0:19            Constant:
+0:19              0 (const int)
+0:20      move second child to first child ( temp 2-component vector of float)
+0:20        UV1: direct index for structure ( temp 2-component vector of float)
+0:20          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:20          Constant:
+0:20            2 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:20          direct index ( temp float)
+0:20            'v' ( in 4-component vector of float)
+0:20            Constant:
+0:20              1 (const int)
+0:20          direct index ( temp float)
+0:20            'v' ( in 4-component vector of float)
+0:20            Constant:
+0:20              1 (const int)
+0:21      move second child to first child ( temp 2-component vector of float)
+0:21        UV2: direct index for structure ( temp 2-component vector of float)
+0:21          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:21          Constant:
+0:21            3 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:21          direct index ( temp float)
+0:21            'v' ( in 4-component vector of float)
+0:21            Constant:
+0:21              2 (const int)
+0:21          direct index ( temp float)
+0:21            'v' ( in 4-component vector of float)
+0:21            Constant:
+0:21              2 (const int)
+0:22      move second child to first child ( temp 2-component vector of float)
+0:22        UV3: direct index for structure ( temp 2-component vector of float)
+0:22          's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:22          Constant:
+0:22            4 (const int)
+0:?         Construct vec2 ( temp 2-component vector of float)
+0:22          direct index ( temp float)
+0:22            'v' ( in 4-component vector of float)
+0:22            Constant:
+0:22              3 (const int)
+0:22          direct index ( temp float)
+0:22            'v' ( in 4-component vector of float)
+0:22            Constant:
+0:22              3 (const int)
+0:23      Branch: Return with expression
+0:23        's' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16  Function Definition: main( ( temp void)
+0:16    Function Parameters: 
+0:?     Sequence
+0:16      move second child to first child ( temp 4-component vector of float)
+0:?         'v' ( temp 4-component vector of float)
+0:?         'v' (layout( location=0) in 4-component vector of float)
+0:16      Sequence
+0:16        move second child to first child ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16          'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16          Function Call: @main(vf4; ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:?             'v' ( temp 4-component vector of float)
+0:16        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:16          pos: direct index for structure ( temp 4-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              0 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV0' (layout( location=1) out 2-component vector of float)
+0:16          UV0: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              1 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV1' (layout( location=2) out 2-component vector of float)
+0:16          UV1: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              2 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV2' (layout( location=3) out 2-component vector of float)
+0:16          UV2: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              3 (const int)
+0:16        move second child to first child ( temp 2-component vector of float)
+0:?           '@entryPointOutput.UV3' (layout( location=4) out 2-component vector of float)
+0:16          UV3: direct index for structure ( temp 2-component vector of float)
+0:16            'flattenTemp' ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float UV0,  temp 2-component vector of float UV1,  temp 2-component vector of float UV2,  temp 2-component vector of float UV3})
+0:16            Constant:
+0:16              4 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.pos' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.UV0' (layout( location=1) out 2-component vector of float)
+0:?     '@entryPointOutput.UV1' (layout( location=2) out 2-component vector of float)
+0:?     '@entryPointOutput.UV2' (layout( location=3) out 2-component vector of float)
+0:?     '@entryPointOutput.UV3' (layout( location=4) out 2-component vector of float)
+0:?     'v' (layout( location=0) in 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 84
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 61 68 72 75 78 81
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 10  "S"
+                              MemberName 10(S) 0  "pos"
+                              MemberName 10(S) 1  "UV0"
+                              MemberName 10(S) 2  "UV1"
+                              MemberName 10(S) 3  "UV2"
+                              MemberName 10(S) 4  "UV3"
+                              Name 13  "@main(vf4;"
+                              Name 12  "v"
+                              Name 16  "s"
+                              Name 59  "v"
+                              Name 61  "v"
+                              Name 63  "flattenTemp"
+                              Name 64  "param"
+                              Name 68  "@entryPointOutput.pos"
+                              Name 72  "@entryPointOutput.UV0"
+                              Name 75  "@entryPointOutput.UV1"
+                              Name 78  "@entryPointOutput.UV2"
+                              Name 81  "@entryPointOutput.UV3"
+                              Decorate 61(v) Location 0
+                              Decorate 68(@entryPointOutput.pos) Location 0
+                              Decorate 72(@entryPointOutput.UV0) Location 1
+                              Decorate 75(@entryPointOutput.UV1) Location 2
+                              Decorate 78(@entryPointOutput.UV2) Location 3
+                              Decorate 81(@entryPointOutput.UV3) Location 4
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeVector 6(float) 2
+           10(S):             TypeStruct 7(fvec4) 9(fvec2) 9(fvec2) 9(fvec2) 9(fvec2)
+              11:             TypeFunction 10(S) 8(ptr)
+              15:             TypePointer Function 10(S)
+              17:             TypeInt 32 1
+              18:     17(int) Constant 0
+              21:     17(int) Constant 1
+              22:             TypeInt 32 0
+              23:     22(int) Constant 0
+              24:             TypePointer Function 6(float)
+              30:             TypePointer Function 9(fvec2)
+              32:     17(int) Constant 2
+              33:     22(int) Constant 1
+              40:     17(int) Constant 3
+              41:     22(int) Constant 2
+              48:     17(int) Constant 4
+              49:     22(int) Constant 3
+              60:             TypePointer Input 7(fvec4)
+           61(v):     60(ptr) Variable Input
+              67:             TypePointer Output 7(fvec4)
+68(@entryPointOutput.pos):     67(ptr) Variable Output
+              71:             TypePointer Output 9(fvec2)
+72(@entryPointOutput.UV0):     71(ptr) Variable Output
+75(@entryPointOutput.UV1):     71(ptr) Variable Output
+78(@entryPointOutput.UV2):     71(ptr) Variable Output
+81(@entryPointOutput.UV3):     71(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           59(v):      8(ptr) Variable Function
+ 63(flattenTemp):     15(ptr) Variable Function
+       64(param):      8(ptr) Variable Function
+              62:    7(fvec4) Load 61(v)
+                              Store 59(v) 62
+              65:    7(fvec4) Load 59(v)
+                              Store 64(param) 65
+              66:       10(S) FunctionCall 13(@main(vf4;) 64(param)
+                              Store 63(flattenTemp) 66
+              69:      8(ptr) AccessChain 63(flattenTemp) 18
+              70:    7(fvec4) Load 69
+                              Store 68(@entryPointOutput.pos) 70
+              73:     30(ptr) AccessChain 63(flattenTemp) 21
+              74:    9(fvec2) Load 73
+                              Store 72(@entryPointOutput.UV0) 74
+              76:     30(ptr) AccessChain 63(flattenTemp) 32
+              77:    9(fvec2) Load 76
+                              Store 75(@entryPointOutput.UV1) 77
+              79:     30(ptr) AccessChain 63(flattenTemp) 40
+              80:    9(fvec2) Load 79
+                              Store 78(@entryPointOutput.UV2) 80
+              82:     30(ptr) AccessChain 63(flattenTemp) 48
+              83:    9(fvec2) Load 82
+                              Store 81(@entryPointOutput.UV3) 83
+                              Return
+                              FunctionEnd
+  13(@main(vf4;):       10(S) Function None 11
+           12(v):      8(ptr) FunctionParameter
+              14:             Label
+           16(s):     15(ptr) Variable Function
+              19:    7(fvec4) Load 12(v)
+              20:      8(ptr) AccessChain 16(s) 18
+                              Store 20 19
+              25:     24(ptr) AccessChain 12(v) 23
+              26:    6(float) Load 25
+              27:     24(ptr) AccessChain 12(v) 23
+              28:    6(float) Load 27
+              29:    9(fvec2) CompositeConstruct 26 28
+              31:     30(ptr) AccessChain 16(s) 21
+                              Store 31 29
+              34:     24(ptr) AccessChain 12(v) 33
+              35:    6(float) Load 34
+              36:     24(ptr) AccessChain 12(v) 33
+              37:    6(float) Load 36
+              38:    9(fvec2) CompositeConstruct 35 37
+              39:     30(ptr) AccessChain 16(s) 32
+                              Store 39 38
+              42:     24(ptr) AccessChain 12(v) 41
+              43:    6(float) Load 42
+              44:     24(ptr) AccessChain 12(v) 41
+              45:    6(float) Load 44
+              46:    9(fvec2) CompositeConstruct 43 45
+              47:     30(ptr) AccessChain 16(s) 40
+                              Store 47 46
+              50:     24(ptr) AccessChain 12(v) 49
+              51:    6(float) Load 50
+              52:     24(ptr) AccessChain 12(v) 49
+              53:    6(float) Load 52
+              54:    9(fvec2) CompositeConstruct 51 53
+              55:     30(ptr) AccessChain 16(s) 48
+                              Store 55 54
+              56:       10(S) Load 16(s)
+                              ReturnValue 56
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.semantic.geom.out b/Test/baseResults/hlsl.semantic.geom.out
index fef418f..74f7a26 100755
--- a/Test/baseResults/hlsl.semantic.geom.out
+++ b/Test/baseResults/hlsl.semantic.geom.out
@@ -5,73 +5,75 @@
 input primitive = triangles
 output primitive = line_strip
 0:? Sequence
-0:12  Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12    Function Parameters: 
-0:12      'VertexID' ( in 3-element array of uint)
-0:12      'OutputStream' ( out structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:13  Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
+0:13    Function Parameters: 
+0:13      'VertexID' ( in 3-element array of uint)
+0:13      'OutputStream' ( out structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:?     Sequence
-0:14      Branch: Return with expression
-0:14        's' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12  Function Definition: main( ( temp void)
-0:12    Function Parameters: 
+0:15      Sequence
+0:15        Sequence
+0:15          move second child to first child ( temp float)
+0:?             'OutputStream.clip0' ( out float Position)
+0:15            clip0: direct index for structure ( temp float)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                0 (const int)
+0:?           Sequence
+0:15            move second child to first child ( temp float)
+0:15              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip0' ( out 1-element array of float ClipDistance)
+0:15                Constant:
+0:15                  0 (const int)
+0:15              clip0: direct index for structure ( temp float)
+0:15                's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15                Constant:
+0:15                  1 (const int)
+0:?           Sequence
+0:15            move second child to first child ( temp float)
+0:15              direct index ( out float CullDistance)
+0:?                 'OutputStream.cull0' ( out 1-element array of float CullDistance)
+0:15                Constant:
+0:15                  0 (const int)
+0:15              cull0: direct index for structure ( temp float)
+0:15                's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15                Constant:
+0:15                  2 (const int)
+0:15          move second child to first child ( temp uint)
+0:?             'OutputStream.vpai' ( out uint ViewportIndex)
+0:15            vpai: direct index for structure ( temp uint)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                3 (const int)
+0:15          move second child to first child ( temp uint)
+0:?             'OutputStream.rtai' ( out uint Layer)
+0:15            rtai: direct index for structure ( temp uint)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                4 (const int)
+0:15          move second child to first child ( temp int)
+0:?             'OutputStream.ii' (layout( location=0) out int)
+0:15            ii: direct index for structure ( temp int)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                5 (const int)
+0:15        EmitVertex ( temp void)
+0:13  Function Definition: main( ( temp void)
+0:13    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp 3-element array of uint)
+0:13      move second child to first child ( temp 3-element array of uint)
 0:?         'VertexID' ( temp 3-element array of uint)
 0:?         'VertexID' (layout( location=0) in 3-element array of uint)
-0:12      Sequence
-0:12        move second child to first child ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12          'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12          Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:?             'VertexID' ( temp 3-element array of uint)
-0:?             'OutputStream' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               'OutputStream_clip0' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12              Constant:
-0:12                0 (const int)
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               'OutputStream_cull0' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12              Constant:
-0:12                1 (const int)
-0:12        move second child to first child ( temp uint)
-0:?           'OutputStream_vpai' ( out uint ViewportIndex)
-0:12          vpai: direct index for structure ( temp uint)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              2 (const int)
-0:12        move second child to first child ( temp uint)
-0:?           'OutputStream_rtai' ( out uint Layer)
-0:12          rtai: direct index for structure ( temp uint)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              3 (const int)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:12            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:12          ii: direct index for structure ( temp int)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              4 (const int)
+0:13      Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
-0:?     'OutputStream' (layout( location=1) out structure{ temp int ii})
-0:?     'OutputStream_clip0' ( out 1-element array of float ClipDistance)
-0:?     'OutputStream_cull0' ( out 1-element array of float CullDistance)
-0:?     'OutputStream_vpai' ( out uint ViewportIndex)
+0:?     'OutputStream.clip0' ( out float Position)
+0:?     'OutputStream.vpai' ( out uint ViewportIndex)
+0:?     'OutputStream.rtai' ( out uint Layer)
+0:?     'OutputStream.ii' (layout( location=0) out int)
+0:?     'OutputStream.clip0' ( out 1-element array of float ClipDistance)
+0:?     'OutputStream.cull0' ( out 1-element array of float CullDistance)
 
 
 Linked geometry stage:
@@ -83,77 +85,79 @@
 input primitive = triangles
 output primitive = line_strip
 0:? Sequence
-0:12  Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12    Function Parameters: 
-0:12      'VertexID' ( in 3-element array of uint)
-0:12      'OutputStream' ( out structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:13  Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
+0:13    Function Parameters: 
+0:13      'VertexID' ( in 3-element array of uint)
+0:13      'OutputStream' ( out structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:?     Sequence
-0:14      Branch: Return with expression
-0:14        's' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12  Function Definition: main( ( temp void)
-0:12    Function Parameters: 
+0:15      Sequence
+0:15        Sequence
+0:15          move second child to first child ( temp float)
+0:?             'OutputStream.clip0' ( out float Position)
+0:15            clip0: direct index for structure ( temp float)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                0 (const int)
+0:?           Sequence
+0:15            move second child to first child ( temp float)
+0:15              direct index ( out float ClipDistance)
+0:?                 'OutputStream.clip0' ( out 1-element array of float ClipDistance)
+0:15                Constant:
+0:15                  0 (const int)
+0:15              clip0: direct index for structure ( temp float)
+0:15                's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15                Constant:
+0:15                  1 (const int)
+0:?           Sequence
+0:15            move second child to first child ( temp float)
+0:15              direct index ( out float CullDistance)
+0:?                 'OutputStream.cull0' ( out 1-element array of float CullDistance)
+0:15                Constant:
+0:15                  0 (const int)
+0:15              cull0: direct index for structure ( temp float)
+0:15                's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15                Constant:
+0:15                  2 (const int)
+0:15          move second child to first child ( temp uint)
+0:?             'OutputStream.vpai' ( out uint ViewportIndex)
+0:15            vpai: direct index for structure ( temp uint)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                3 (const int)
+0:15          move second child to first child ( temp uint)
+0:?             'OutputStream.rtai' ( out uint Layer)
+0:15            rtai: direct index for structure ( temp uint)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                4 (const int)
+0:15          move second child to first child ( temp int)
+0:?             'OutputStream.ii' (layout( location=0) out int)
+0:15            ii: direct index for structure ( temp int)
+0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
+0:15              Constant:
+0:15                5 (const int)
+0:15        EmitVertex ( temp void)
+0:13  Function Definition: main( ( temp void)
+0:13    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp 3-element array of uint)
+0:13      move second child to first child ( temp 3-element array of uint)
 0:?         'VertexID' ( temp 3-element array of uint)
 0:?         'VertexID' (layout( location=0) in 3-element array of uint)
-0:12      Sequence
-0:12        move second child to first child ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12          'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12          Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:?             'VertexID' ( temp 3-element array of uint)
-0:?             'OutputStream' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               'OutputStream_clip0' ( out 1-element array of float ClipDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            clip0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12              Constant:
-0:12                0 (const int)
-0:?         Sequence
-0:12          move second child to first child ( temp float)
-0:12            direct index ( temp float)
-0:?               'OutputStream_cull0' ( out 1-element array of float CullDistance)
-0:12              Constant:
-0:12                0 (const int)
-0:12            cull0: direct index for structure ( temp float)
-0:12              'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12              Constant:
-0:12                1 (const int)
-0:12        move second child to first child ( temp uint)
-0:?           'OutputStream_vpai' ( out uint ViewportIndex)
-0:12          vpai: direct index for structure ( temp uint)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              2 (const int)
-0:12        move second child to first child ( temp uint)
-0:?           'OutputStream_rtai' ( out uint Layer)
-0:12          rtai: direct index for structure ( temp uint)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              3 (const int)
-0:12        move second child to first child ( temp int)
-0:12          ii: direct index for structure ( temp int)
-0:12            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:12            Constant:
-0:12              0 (const int)
-0:12          ii: direct index for structure ( temp int)
-0:12            'flattenTemp' ( temp structure{ temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
-0:12            Constant:
-0:12              4 (const int)
+0:13      Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
+0:?         'VertexID' ( temp 3-element array of uint)
+0:?         'OutputStream' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
 0:?     'VertexID' (layout( location=0) in 3-element array of uint)
-0:?     'OutputStream' (layout( location=1) out structure{ temp int ii})
-0:?     'OutputStream_clip0' ( out 1-element array of float ClipDistance)
-0:?     'OutputStream_cull0' ( out 1-element array of float CullDistance)
-0:?     'OutputStream_vpai' ( out uint ViewportIndex)
+0:?     'OutputStream.clip0' ( out float Position)
+0:?     'OutputStream.vpai' ( out uint ViewportIndex)
+0:?     'OutputStream.rtai' ( out uint Layer)
+0:?     'OutputStream.ii' (layout( location=0) out int)
+0:?     'OutputStream.clip0' ( out 1-element array of float ClipDistance)
+0:?     'OutputStream.cull0' ( out 1-element array of float CullDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 71
+// Id's are bound by 65
 
                               Capability Geometry
                               Capability ClipDistance
@@ -161,7 +165,7 @@
                               Capability MultiViewport
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 25 37 44 50 55 61 70
+                              EntryPoint Geometry 4  "main" 20 29 34 40 45 50 57
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputLineStrip
@@ -170,37 +174,33 @@
                               Name 4  "main"
                               Name 12  "S"
                               MemberName 12(S) 0  "clip0"
-                              MemberName 12(S) 1  "cull0"
-                              MemberName 12(S) 2  "vpai"
-                              MemberName 12(S) 3  "rtai"
-                              MemberName 12(S) 4  "ii"
-                              Name 17  "@main(u1[3];struct-S-f1-f1-u1-u1-i11;"
+                              MemberName 12(S) 1  "clip0"
+                              MemberName 12(S) 2  "cull0"
+                              MemberName 12(S) 3  "vpai"
+                              MemberName 12(S) 4  "rtai"
+                              MemberName 12(S) 5  "ii"
+                              Name 17  "@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;"
                               Name 15  "VertexID"
                               Name 16  "OutputStream"
-                              Name 19  "s"
-                              Name 23  "VertexID"
-                              Name 25  "VertexID"
-                              Name 27  "flattenTemp"
-                              Name 28  "OutputStream"
-                              Name 29  "param"
-                              Name 31  "param"
-                              Name 37  "OutputStream_clip0"
-                              Name 44  "OutputStream_cull0"
-                              Name 50  "OutputStream_vpai"
-                              Name 55  "OutputStream_rtai"
-                              Name 59  "S"
-                              MemberName 59(S) 0  "ii"
-                              Name 61  "@entryPointOutput"
-                              Name 68  "S"
-                              MemberName 68(S) 0  "ii"
-                              Name 70  "OutputStream"
-                              Decorate 25(VertexID) Location 0
-                              Decorate 37(OutputStream_clip0) BuiltIn ClipDistance
-                              Decorate 44(OutputStream_cull0) BuiltIn CullDistance
-                              Decorate 50(OutputStream_vpai) BuiltIn ViewportIndex
-                              Decorate 55(OutputStream_rtai) BuiltIn Layer
-                              Decorate 61(@entryPointOutput) Location 0
-                              Decorate 70(OutputStream) Location 1
+                              Name 20  "OutputStream.clip0"
+                              Name 21  "s"
+                              Name 29  "OutputStream.clip0"
+                              Name 34  "OutputStream.cull0"
+                              Name 40  "OutputStream.vpai"
+                              Name 45  "OutputStream.rtai"
+                              Name 50  "OutputStream.ii"
+                              Name 55  "VertexID"
+                              Name 57  "VertexID"
+                              Name 59  "OutputStream"
+                              Name 60  "param"
+                              Name 62  "param"
+                              Decorate 20(OutputStream.clip0) BuiltIn Position
+                              Decorate 29(OutputStream.clip0) BuiltIn ClipDistance
+                              Decorate 34(OutputStream.cull0) BuiltIn CullDistance
+                              Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex
+                              Decorate 45(OutputStream.rtai) BuiltIn Layer
+                              Decorate 50(OutputStream.ii) Location 0
+                              Decorate 57(VertexID) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -209,75 +209,72 @@
                9:             TypePointer Function 8
               10:             TypeFloat 32
               11:             TypeInt 32 1
-           12(S):             TypeStruct 10(float) 10(float) 6(int) 6(int) 11(int)
+           12(S):             TypeStruct 10(float) 10(float) 10(float) 6(int) 6(int) 11(int)
               13:             TypePointer Function 12(S)
-              14:             TypeFunction 12(S) 9(ptr) 13(ptr)
-              24:             TypePointer Input 8
-    25(VertexID):     24(ptr) Variable Input
-              34:      6(int) Constant 1
-              35:             TypeArray 10(float) 34
-              36:             TypePointer Output 35
-37(OutputStream_clip0):     36(ptr) Variable Output
-              38:     11(int) Constant 0
-              39:             TypePointer Function 10(float)
-              42:             TypePointer Output 10(float)
-44(OutputStream_cull0):     36(ptr) Variable Output
-              45:     11(int) Constant 1
-              49:             TypePointer Output 6(int)
-50(OutputStream_vpai):     49(ptr) Variable Output
-              51:     11(int) Constant 2
-              52:             TypePointer Function 6(int)
-55(OutputStream_rtai):     49(ptr) Variable Output
-              56:     11(int) Constant 3
-           59(S):             TypeStruct 11(int)
-              60:             TypePointer Output 59(S)
-61(@entryPointOutput):     60(ptr) Variable Output
-              62:     11(int) Constant 4
-              63:             TypePointer Function 11(int)
-              66:             TypePointer Output 11(int)
-           68(S):             TypeStruct 11(int)
-              69:             TypePointer Output 68(S)
-70(OutputStream):     69(ptr) Variable Output
+              14:             TypeFunction 2 9(ptr) 13(ptr)
+              19:             TypePointer Output 10(float)
+20(OutputStream.clip0):     19(ptr) Variable Output
+              22:     11(int) Constant 0
+              23:             TypePointer Function 10(float)
+              26:      6(int) Constant 1
+              27:             TypeArray 10(float) 26
+              28:             TypePointer Output 27
+29(OutputStream.clip0):     28(ptr) Variable Output
+              30:     11(int) Constant 1
+34(OutputStream.cull0):     28(ptr) Variable Output
+              35:     11(int) Constant 2
+              39:             TypePointer Output 6(int)
+40(OutputStream.vpai):     39(ptr) Variable Output
+              41:     11(int) Constant 3
+              42:             TypePointer Function 6(int)
+45(OutputStream.rtai):     39(ptr) Variable Output
+              46:     11(int) Constant 4
+              49:             TypePointer Output 11(int)
+50(OutputStream.ii):     49(ptr) Variable Output
+              51:     11(int) Constant 5
+              52:             TypePointer Function 11(int)
+              56:             TypePointer Input 8
+    57(VertexID):     56(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-    23(VertexID):      9(ptr) Variable Function
- 27(flattenTemp):     13(ptr) Variable Function
-28(OutputStream):     13(ptr) Variable Function
-       29(param):      9(ptr) Variable Function
-       31(param):     13(ptr) Variable Function
-              26:           8 Load 25(VertexID)
-                              Store 23(VertexID) 26
-              30:           8 Load 23(VertexID)
-                              Store 29(param) 30
-              32:       12(S) FunctionCall 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;) 29(param) 31(param)
-              33:       12(S) Load 31(param)
-                              Store 28(OutputStream) 33
-                              Store 27(flattenTemp) 32
-              40:     39(ptr) AccessChain 27(flattenTemp) 38
-              41:   10(float) Load 40
-              43:     42(ptr) AccessChain 37(OutputStream_clip0) 38
-                              Store 43 41
-              46:     39(ptr) AccessChain 27(flattenTemp) 45
-              47:   10(float) Load 46
-              48:     42(ptr) AccessChain 44(OutputStream_cull0) 38
-                              Store 48 47
-              53:     52(ptr) AccessChain 27(flattenTemp) 51
-              54:      6(int) Load 53
-                              Store 50(OutputStream_vpai) 54
-              57:     52(ptr) AccessChain 27(flattenTemp) 56
-              58:      6(int) Load 57
-                              Store 55(OutputStream_rtai) 58
-              64:     63(ptr) AccessChain 27(flattenTemp) 62
-              65:     11(int) Load 64
-              67:     66(ptr) AccessChain 61(@entryPointOutput) 38
-                              Store 67 65
+    55(VertexID):      9(ptr) Variable Function
+59(OutputStream):     13(ptr) Variable Function
+       60(param):      9(ptr) Variable Function
+       62(param):     13(ptr) Variable Function
+              58:           8 Load 57(VertexID)
+                              Store 55(VertexID) 58
+              61:           8 Load 55(VertexID)
+                              Store 60(param) 61
+              63:           2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 60(param) 62(param)
+              64:       12(S) Load 62(param)
+                              Store 59(OutputStream) 64
                               Return
                               FunctionEnd
-17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;):       12(S) Function None 14
+17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;):           2 Function None 14
     15(VertexID):      9(ptr) FunctionParameter
 16(OutputStream):     13(ptr) FunctionParameter
               18:             Label
-           19(s):     13(ptr) Variable Function
-              20:       12(S) Load 19(s)
-                              ReturnValue 20
+           21(s):     13(ptr) Variable Function
+              24:     23(ptr) AccessChain 21(s) 22
+              25:   10(float) Load 24
+                              Store 20(OutputStream.clip0) 25
+              31:     23(ptr) AccessChain 21(s) 30
+              32:   10(float) Load 31
+              33:     19(ptr) AccessChain 29(OutputStream.clip0) 22
+                              Store 33 32
+              36:     23(ptr) AccessChain 21(s) 35
+              37:   10(float) Load 36
+              38:     19(ptr) AccessChain 34(OutputStream.cull0) 22
+                              Store 38 37
+              43:     42(ptr) AccessChain 21(s) 41
+              44:      6(int) Load 43
+                              Store 40(OutputStream.vpai) 44
+              47:     42(ptr) AccessChain 21(s) 46
+              48:      6(int) Load 47
+                              Store 45(OutputStream.rtai) 48
+              53:     52(ptr) AccessChain 21(s) 51
+              54:     11(int) Load 53
+                              Store 50(OutputStream.ii) 54
+                              EmitVertex
+                              Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.semantic.vert.out b/Test/baseResults/hlsl.semantic.vert.out
index 1ff53fa..50a653d 100755
--- a/Test/baseResults/hlsl.semantic.vert.out
+++ b/Test/baseResults/hlsl.semantic.vert.out
@@ -16,31 +16,31 @@
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              0 (const int)
-0:?           'clip0' (layout( location=0) in float)
+0:?           'ins.clip0' (layout( location=0) in float)
 0:10        move second child to first child ( temp float)
 0:10          clip1: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              1 (const int)
-0:?           'clip1' (layout( location=1) in float)
+0:?           'ins.clip1' (layout( location=1) in float)
 0:10        move second child to first child ( temp float)
 0:10          cull0: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              2 (const int)
-0:?           'cull0' (layout( location=2) in float)
+0:?           'ins.cull0' (layout( location=0) in float)
 0:10        move second child to first child ( temp float)
 0:10          cull1: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              3 (const int)
-0:?           'cull1' (layout( location=3) in float)
+0:?           'ins.cull1' (layout( location=1) in float)
 0:10        move second child to first child ( temp int)
 0:10          ii: direct index for structure ( temp int)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
-0:?           'ii' ( in int InstanceIndex)
+0:?           'ins.ii' ( in int InstanceIndex)
 0:10      Sequence
 0:10        move second child to first child ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10          'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
@@ -48,8 +48,8 @@
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
 0:10              Constant:
 0:10                0 (const int)
 0:10            clip0: direct index for structure ( temp float)
@@ -58,8 +58,8 @@
 0:10                0 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
 0:10              Constant:
 0:10                1 (const int)
 0:10            clip1: direct index for structure ( temp float)
@@ -68,8 +68,8 @@
 0:10                1 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10            direct index ( out float CullDistance)
+0:?               '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 0:10              Constant:
 0:10                0 (const int)
 0:10            cull0: direct index for structure ( temp float)
@@ -78,8 +78,8 @@
 0:10                2 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10            direct index ( out float CullDistance)
+0:?               '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 0:10              Constant:
 0:10                1 (const int)
 0:10            cull1: direct index for structure ( temp float)
@@ -87,23 +87,20 @@
 0:10              Constant:
 0:10                3 (const int)
 0:10        move second child to first child ( temp int)
-0:10          ii: direct index for structure ( temp int)
-0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:10            Constant:
-0:10              0 (const int)
+0:?           '@entryPointOutput.ii' (layout( location=0) out int)
 0:10          ii: direct index for structure ( temp int)
 0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:?     'clip0' (layout( location=0) in float)
-0:?     'clip1' (layout( location=1) in float)
-0:?     'cull0' (layout( location=2) in float)
-0:?     'cull1' (layout( location=3) in float)
-0:?     'ii' ( in int InstanceIndex)
-0:?     '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
-0:?     '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:?     '@entryPointOutput.ii' (layout( location=0) out int)
+0:?     'ins.ii' ( in int InstanceIndex)
+0:?     'ins.clip0' (layout( location=0) in float)
+0:?     'ins.clip1' (layout( location=1) in float)
+0:?     'ins.cull0' (layout( location=0) in float)
+0:?     'ins.cull1' (layout( location=1) in float)
+0:?     '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
+0:?     '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 
 
 Linked vertex stage:
@@ -126,31 +123,31 @@
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              0 (const int)
-0:?           'clip0' (layout( location=0) in float)
+0:?           'ins.clip0' (layout( location=0) in float)
 0:10        move second child to first child ( temp float)
 0:10          clip1: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              1 (const int)
-0:?           'clip1' (layout( location=1) in float)
+0:?           'ins.clip1' (layout( location=1) in float)
 0:10        move second child to first child ( temp float)
 0:10          cull0: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              2 (const int)
-0:?           'cull0' (layout( location=2) in float)
+0:?           'ins.cull0' (layout( location=0) in float)
 0:10        move second child to first child ( temp float)
 0:10          cull1: direct index for structure ( temp float)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              3 (const int)
-0:?           'cull1' (layout( location=3) in float)
+0:?           'ins.cull1' (layout( location=1) in float)
 0:10        move second child to first child ( temp int)
 0:10          ii: direct index for structure ( temp int)
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
-0:?           'ii' ( in int InstanceIndex)
+0:?           'ins.ii' ( in int InstanceIndex)
 0:10      Sequence
 0:10        move second child to first child ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10          'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
@@ -158,8 +155,8 @@
 0:?             'ins' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
 0:10              Constant:
 0:10                0 (const int)
 0:10            clip0: direct index for structure ( temp float)
@@ -168,8 +165,8 @@
 0:10                0 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
+0:10            direct index ( out float ClipDistance)
+0:?               '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
 0:10              Constant:
 0:10                1 (const int)
 0:10            clip1: direct index for structure ( temp float)
@@ -178,8 +175,8 @@
 0:10                1 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10            direct index ( out float CullDistance)
+0:?               '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 0:10              Constant:
 0:10                0 (const int)
 0:10            cull0: direct index for structure ( temp float)
@@ -188,8 +185,8 @@
 0:10                2 (const int)
 0:?         Sequence
 0:10          move second child to first child ( temp float)
-0:10            direct index ( temp float)
-0:?               '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:10            direct index ( out float CullDistance)
+0:?               '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 0:10              Constant:
 0:10                1 (const int)
 0:10            cull1: direct index for structure ( temp float)
@@ -197,34 +194,31 @@
 0:10              Constant:
 0:10                3 (const int)
 0:10        move second child to first child ( temp int)
-0:10          ii: direct index for structure ( temp int)
-0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:10            Constant:
-0:10              0 (const int)
+0:?           '@entryPointOutput.ii' (layout( location=0) out int)
 0:10          ii: direct index for structure ( temp int)
 0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:?     'clip0' (layout( location=0) in float)
-0:?     'clip1' (layout( location=1) in float)
-0:?     'cull0' (layout( location=2) in float)
-0:?     'cull1' (layout( location=3) in float)
-0:?     'ii' ( in int InstanceIndex)
-0:?     '@entryPointOutput_clip1' ( out 2-element array of float ClipDistance)
-0:?     '@entryPointOutput_cull1' ( out 2-element array of float CullDistance)
+0:?     '@entryPointOutput.ii' (layout( location=0) out int)
+0:?     'ins.ii' ( in int InstanceIndex)
+0:?     'ins.clip0' (layout( location=0) in float)
+0:?     'ins.clip1' (layout( location=1) in float)
+0:?     'ins.cull0' (layout( location=0) in float)
+0:?     'ins.cull1' (layout( location=1) in float)
+0:?     '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance)
+0:?     '@entryPointOutput.cull1' ( out 2-element array of float CullDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 70
 
                               Capability Shader
                               Capability ClipDistance
                               Capability CullDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 21 26 30 34 39 51 59 68
+                              EntryPoint Vertex 4  "main" 21 26 30 34 39 51 59 67
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "S"
@@ -237,26 +231,24 @@
                               Name 11  "ins"
                               Name 14  "s"
                               Name 18  "ins"
-                              Name 21  "clip0"
-                              Name 26  "clip1"
-                              Name 30  "cull0"
-                              Name 34  "cull1"
-                              Name 39  "ii"
+                              Name 21  "ins.clip0"
+                              Name 26  "ins.clip1"
+                              Name 30  "ins.cull0"
+                              Name 34  "ins.cull1"
+                              Name 39  "ins.ii"
                               Name 43  "flattenTemp"
                               Name 44  "param"
-                              Name 51  "@entryPointOutput_clip1"
-                              Name 59  "@entryPointOutput_cull1"
-                              Name 66  "S"
-                              MemberName 66(S) 0  "ii"
-                              Name 68  "@entryPointOutput"
-                              Decorate 21(clip0) Location 0
-                              Decorate 26(clip1) Location 1
-                              Decorate 30(cull0) Location 2
-                              Decorate 34(cull1) Location 3
-                              Decorate 39(ii) BuiltIn InstanceIndex
-                              Decorate 51(@entryPointOutput_clip1) BuiltIn ClipDistance
-                              Decorate 59(@entryPointOutput_cull1) BuiltIn CullDistance
-                              Decorate 68(@entryPointOutput) Location 0
+                              Name 51  "@entryPointOutput.clip1"
+                              Name 59  "@entryPointOutput.cull1"
+                              Name 67  "@entryPointOutput.ii"
+                              Decorate 21(ins.clip0) Location 0
+                              Decorate 26(ins.clip1) Location 1
+                              Decorate 30(ins.cull0) Location 0
+                              Decorate 34(ins.cull1) Location 1
+                              Decorate 39(ins.ii) BuiltIn InstanceIndex
+                              Decorate 51(@entryPointOutput.clip1) BuiltIn ClipDistance
+                              Decorate 59(@entryPointOutput.cull1) BuiltIn CullDistance
+                              Decorate 67(@entryPointOutput.ii) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -266,47 +258,45 @@
               10:             TypeFunction 8(S) 9(ptr)
               19:      7(int) Constant 0
               20:             TypePointer Input 6(float)
-       21(clip0):     20(ptr) Variable Input
+   21(ins.clip0):     20(ptr) Variable Input
               23:             TypePointer Function 6(float)
               25:      7(int) Constant 1
-       26(clip1):     20(ptr) Variable Input
+   26(ins.clip1):     20(ptr) Variable Input
               29:      7(int) Constant 2
-       30(cull0):     20(ptr) Variable Input
+   30(ins.cull0):     20(ptr) Variable Input
               33:      7(int) Constant 3
-       34(cull1):     20(ptr) Variable Input
+   34(ins.cull1):     20(ptr) Variable Input
               37:      7(int) Constant 4
               38:             TypePointer Input 7(int)
-          39(ii):     38(ptr) Variable Input
+      39(ins.ii):     38(ptr) Variable Input
               41:             TypePointer Function 7(int)
               47:             TypeInt 32 0
               48:     47(int) Constant 2
               49:             TypeArray 6(float) 48
               50:             TypePointer Output 49
-51(@entryPointOutput_clip1):     50(ptr) Variable Output
+51(@entryPointOutput.clip1):     50(ptr) Variable Output
               54:             TypePointer Output 6(float)
-59(@entryPointOutput_cull1):     50(ptr) Variable Output
-           66(S):             TypeStruct 7(int)
-              67:             TypePointer Output 66(S)
-68(@entryPointOutput):     67(ptr) Variable Output
-              71:             TypePointer Output 7(int)
+59(@entryPointOutput.cull1):     50(ptr) Variable Output
+              66:             TypePointer Output 7(int)
+67(@entryPointOutput.ii):     66(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
          18(ins):      9(ptr) Variable Function
  43(flattenTemp):      9(ptr) Variable Function
        44(param):      9(ptr) Variable Function
-              22:    6(float) Load 21(clip0)
+              22:    6(float) Load 21(ins.clip0)
               24:     23(ptr) AccessChain 18(ins) 19
                               Store 24 22
-              27:    6(float) Load 26(clip1)
+              27:    6(float) Load 26(ins.clip1)
               28:     23(ptr) AccessChain 18(ins) 25
                               Store 28 27
-              31:    6(float) Load 30(cull0)
+              31:    6(float) Load 30(ins.cull0)
               32:     23(ptr) AccessChain 18(ins) 29
                               Store 32 31
-              35:    6(float) Load 34(cull1)
+              35:    6(float) Load 34(ins.cull1)
               36:     23(ptr) AccessChain 18(ins) 33
                               Store 36 35
-              40:      7(int) Load 39(ii)
+              40:      7(int) Load 39(ins.ii)
               42:     41(ptr) AccessChain 18(ins) 37
                               Store 42 40
               45:        8(S) Load 18(ins)
@@ -315,24 +305,23 @@
                               Store 43(flattenTemp) 46
               52:     23(ptr) AccessChain 43(flattenTemp) 19
               53:    6(float) Load 52
-              55:     54(ptr) AccessChain 51(@entryPointOutput_clip1) 19
+              55:     54(ptr) AccessChain 51(@entryPointOutput.clip1) 19
                               Store 55 53
               56:     23(ptr) AccessChain 43(flattenTemp) 25
               57:    6(float) Load 56
-              58:     54(ptr) AccessChain 51(@entryPointOutput_clip1) 25
+              58:     54(ptr) AccessChain 51(@entryPointOutput.clip1) 25
                               Store 58 57
               60:     23(ptr) AccessChain 43(flattenTemp) 29
               61:    6(float) Load 60
-              62:     54(ptr) AccessChain 59(@entryPointOutput_cull1) 19
+              62:     54(ptr) AccessChain 59(@entryPointOutput.cull1) 19
                               Store 62 61
               63:     23(ptr) AccessChain 43(flattenTemp) 33
               64:    6(float) Load 63
-              65:     54(ptr) AccessChain 59(@entryPointOutput_cull1) 25
+              65:     54(ptr) AccessChain 59(@entryPointOutput.cull1) 25
                               Store 65 64
-              69:     41(ptr) AccessChain 43(flattenTemp) 37
-              70:      7(int) Load 69
-              72:     71(ptr) AccessChain 68(@entryPointOutput) 19
-                              Store 72 70
+              68:     41(ptr) AccessChain 43(flattenTemp) 37
+              69:      7(int) Load 68
+                              Store 67(@entryPointOutput.ii) 69
                               Return
                               FunctionEnd
 12(@main(struct-S-f1-f1-f1-f1-i11;):        8(S) Function None 10
diff --git a/Test/baseResults/hlsl.semicolons.frag.out b/Test/baseResults/hlsl.semicolons.frag.out
index 2c26daa..87e0a4e 100644
--- a/Test/baseResults/hlsl.semicolons.frag.out
+++ b/Test/baseResults/hlsl.semicolons.frag.out
@@ -26,13 +26,13 @@
 0:?     Sequence
 0:13      Sequence
 0:13        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:13          color: direct index for structure ( temp 4-component vector of float)
 0:13            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:13            Constant:
 0:13              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -65,13 +65,13 @@
 0:?     Sequence
 0:13      Sequence
 0:13        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 0:13          color: direct index for structure ( temp 4-component vector of float)
 0:13            Function Call: @main( ( temp structure{ temp 4-component vector of float color})
 0:13            Constant:
 0:13              0 (const int)
 0:?   Linker Objects
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -90,8 +90,8 @@
                               MemberName 12(PS_OUTPUT) 0  "color"
                               Name 14  "@main("
                               Name 17  "ps_output"
-                              Name 28  "color"
-                              Decorate 28(color) Location 0
+                              Name 28  "@entryPointOutput.color"
+                              Decorate 28(@entryPointOutput.color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
               10:             TypeFloat 32
@@ -105,12 +105,12 @@
               21:   11(fvec4) ConstantComposite 20 20 20 20
               22:             TypePointer Function 11(fvec4)
               27:             TypePointer Output 11(fvec4)
-       28(color):     27(ptr) Variable Output
+28(@entryPointOutput.color):     27(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               29:12(PS_OUTPUT) FunctionCall 14(@main()
               30:   11(fvec4) CompositeExtract 29 0
-                              Store 28(color) 30
+                              Store 28(@entryPointOutput.color) 30
                               Return
                               FunctionEnd
       6(MyFunc():           2 Function None 3
diff --git a/Test/baseResults/hlsl.stringtoken.frag.out b/Test/baseResults/hlsl.stringtoken.frag.out
index 045b8fe..d1f7522 100644
--- a/Test/baseResults/hlsl.stringtoken.frag.out
+++ b/Test/baseResults/hlsl.stringtoken.frag.out
@@ -22,7 +22,7 @@
 0:?     Sequence
 0:16      Sequence
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:16          Color: direct index for structure ( temp 4-component vector of float)
 0:16            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:16            Constant:
@@ -30,7 +30,7 @@
 0:?   Linker Objects
 0:?     'TestTexture' ( uniform texture2D)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float TestUF})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -59,7 +59,7 @@
 0:?     Sequence
 0:16      Sequence
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:16          Color: direct index for structure ( temp 4-component vector of float)
 0:16            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:16            Constant:
@@ -67,7 +67,7 @@
 0:?   Linker Objects
 0:?     'TestTexture' ( uniform texture2D)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float TestUF})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -84,12 +84,12 @@
                               MemberName 8(PS_OUTPUT) 0  "Color"
                               Name 10  "@main("
                               Name 13  "psout"
-                              Name 25  "Color"
+                              Name 25  "@entryPointOutput.Color"
                               Name 30  "TestTexture"
                               Name 31  "$Global"
                               MemberName 31($Global) 0  "TestUF"
                               Name 33  ""
-                              Decorate 25(Color) Location 0
+                              Decorate 25(@entryPointOutput.Color) Location 0
                               Decorate 30(TestTexture) DescriptorSet 0
                               MemberDecorate 31($Global) 0 Offset 0
                               Decorate 31($Global) Block
@@ -108,7 +108,7 @@
               18:    7(fvec4) ConstantComposite 16 16 16 17
               19:             TypePointer Function 7(fvec4)
               24:             TypePointer Output 7(fvec4)
-       25(Color):     24(ptr) Variable Output
+25(@entryPointOutput.Color):     24(ptr) Variable Output
               28:             TypeImage 6(float) 2D sampled format:Unknown
               29:             TypePointer UniformConstant 28
  30(TestTexture):     29(ptr) Variable UniformConstant
@@ -119,7 +119,7 @@
                5:             Label
               26:8(PS_OUTPUT) FunctionCall 10(@main()
               27:    7(fvec4) CompositeExtract 26 0
-                              Store 25(Color) 27
+                              Store 25(@entryPointOutput.Color) 27
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/hlsl.struct.frag.out b/Test/baseResults/hlsl.struct.frag.out
index 4501f80..d088164 100755
--- a/Test/baseResults/hlsl.struct.frag.out
+++ b/Test/baseResults/hlsl.struct.frag.out
@@ -43,70 +43,49 @@
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              0 (const int)
-0:40          a: direct index for structure ( smooth temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              0 (const int)
+0:?           's.a' (layout( location=1) smooth in 4-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          b: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              1 (const int)
-0:40          b: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              1 (const int)
+0:?           's.b' (layout( location=2) flat in bool)
 0:40        move second child to first child ( temp 1-component vector of float)
 0:40          c: direct index for structure ( temp 1-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              2 (const int)
-0:40          c: direct index for structure ( centroid noperspective temp 1-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              2 (const int)
+0:?           's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
 0:40        move second child to first child ( temp 2-component vector of float)
 0:40          d: direct index for structure ( temp 2-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              3 (const int)
-0:40          d: direct index for structure ( centroid sample temp 2-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              3 (const int)
+0:?           's.d' (layout( location=4) centroid sample in 2-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          ff1: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              4 (const int)
-0:?           's_ff1' ( flat in bool Face)
+0:?           's.ff1' ( flat in bool Face)
 0:40        move second child to first child ( temp bool)
 0:40          ff2: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              5 (const int)
-0:40          ff2: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              4 (const int)
+0:?           's.ff2' (layout( location=5) flat in bool)
 0:40        move second child to first child ( temp bool)
 0:40          ff3: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              6 (const int)
-0:40          ff3: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              5 (const int)
+0:?           's.ff3' (layout( location=6) flat in bool)
 0:40        move second child to first child ( temp 4-component vector of float)
 0:40          ff4: direct index for structure ( temp 4-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              7 (const int)
-0:40          ff4: direct index for structure ( temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              6 (const int)
+0:?           's.ff4' (layout( location=7) in 4-component vector of float)
 0:40      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:40        Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float)
@@ -117,8 +96,14 @@
 0:?     's2' ( global structure{ temp 4-component vector of float i})
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
-0:?     's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:?     's_ff1' ( flat in bool Face)
+0:?     's.ff1' ( flat in bool Face)
+0:?     's.a' (layout( location=1) smooth in 4-component vector of float)
+0:?     's.b' (layout( location=2) flat in bool)
+0:?     's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
+0:?     's.d' (layout( location=4) centroid sample in 2-component vector of float)
+0:?     's.ff2' (layout( location=5) flat in bool)
+0:?     's.ff3' (layout( location=6) flat in bool)
+0:?     's.ff4' (layout( location=7) in 4-component vector of float)
 
 
 Linked fragment stage:
@@ -164,70 +149,49 @@
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              0 (const int)
-0:40          a: direct index for structure ( smooth temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              0 (const int)
+0:?           's.a' (layout( location=1) smooth in 4-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          b: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              1 (const int)
-0:40          b: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              1 (const int)
+0:?           's.b' (layout( location=2) flat in bool)
 0:40        move second child to first child ( temp 1-component vector of float)
 0:40          c: direct index for structure ( temp 1-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              2 (const int)
-0:40          c: direct index for structure ( centroid noperspective temp 1-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              2 (const int)
+0:?           's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
 0:40        move second child to first child ( temp 2-component vector of float)
 0:40          d: direct index for structure ( temp 2-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              3 (const int)
-0:40          d: direct index for structure ( centroid sample temp 2-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              3 (const int)
+0:?           's.d' (layout( location=4) centroid sample in 2-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          ff1: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              4 (const int)
-0:?           's_ff1' ( flat in bool Face)
+0:?           's.ff1' ( flat in bool Face)
 0:40        move second child to first child ( temp bool)
 0:40          ff2: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              5 (const int)
-0:40          ff2: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              4 (const int)
+0:?           's.ff2' (layout( location=5) flat in bool)
 0:40        move second child to first child ( temp bool)
 0:40          ff3: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              6 (const int)
-0:40          ff3: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              5 (const int)
+0:?           's.ff3' (layout( location=6) flat in bool)
 0:40        move second child to first child ( temp 4-component vector of float)
 0:40          ff4: direct index for structure ( temp 4-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              7 (const int)
-0:40          ff4: direct index for structure ( temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              6 (const int)
+0:?           's.ff4' (layout( location=7) in 4-component vector of float)
 0:40      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:40        Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float)
@@ -238,17 +202,23 @@
 0:?     's2' ( global structure{ temp 4-component vector of float i})
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
-0:?     's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:?     's_ff1' ( flat in bool Face)
+0:?     's.ff1' ( flat in bool Face)
+0:?     's.a' (layout( location=1) smooth in 4-component vector of float)
+0:?     's.b' (layout( location=2) flat in bool)
+0:?     's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
+0:?     's.d' (layout( location=4) centroid sample in 2-component vector of float)
+0:?     's.ff2' (layout( location=5) flat in bool)
+0:?     's.ff3' (layout( location=6) flat in bool)
+0:?     's.ff4' (layout( location=7) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 105
+// Id's are bound by 102
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "PixelShaderFunction" 51 56 79 94
+                              EntryPoint Fragment 4  "PixelShaderFunction" 51 54 59 65 71 76 80 84 87 91
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "PixelShaderFunction"
@@ -278,49 +248,53 @@
                               Name 49  "input"
                               Name 51  "input"
                               Name 53  "s"
-                              Name 54  "IN_S"
-                              MemberName 54(IN_S) 0  "a"
-                              MemberName 54(IN_S) 1  "b"
-                              MemberName 54(IN_S) 2  "c"
-                              MemberName 54(IN_S) 3  "d"
-                              MemberName 54(IN_S) 4  "ff2"
-                              MemberName 54(IN_S) 5  "ff3"
-                              MemberName 54(IN_S) 6  "ff4"
-                              Name 56  "s"
-                              Name 79  "s_ff1"
-                              Name 94  "@entryPointOutput"
-                              Name 95  "param"
-                              Name 97  "param"
-                              Name 101  "myS"
-                              MemberName 101(myS) 0  "b"
-                              MemberName 101(myS) 1  "c"
-                              MemberName 101(myS) 2  "a"
-                              MemberName 101(myS) 3  "d"
-                              Name 102  "$Global"
-                              MemberName 102($Global) 0  "s1"
-                              MemberName 102($Global) 1  "ff5"
-                              MemberName 102($Global) 2  "ff6"
-                              Name 104  ""
+                              Name 54  "s.a"
+                              Name 59  "s.b"
+                              Name 65  "s.c"
+                              Name 71  "s.d"
+                              Name 76  "s.ff1"
+                              Name 80  "s.ff2"
+                              Name 84  "s.ff3"
+                              Name 87  "s.ff4"
+                              Name 91  "@entryPointOutput"
+                              Name 92  "param"
+                              Name 94  "param"
+                              Name 98  "myS"
+                              MemberName 98(myS) 0  "b"
+                              MemberName 98(myS) 1  "c"
+                              MemberName 98(myS) 2  "a"
+                              MemberName 98(myS) 3  "d"
+                              Name 99  "$Global"
+                              MemberName 99($Global) 0  "s1"
+                              MemberName 99($Global) 1  "ff5"
+                              MemberName 99($Global) 2  "ff6"
+                              Name 101  ""
                               Decorate 51(input) Location 0
-                              MemberDecorate 54(IN_S) 1 Flat
-                              MemberDecorate 54(IN_S) 2 NoPerspective
-                              MemberDecorate 54(IN_S) 2 Centroid
-                              MemberDecorate 54(IN_S) 3 Centroid
-                              MemberDecorate 54(IN_S) 4 Flat
-                              MemberDecorate 54(IN_S) 5 Flat
-                              Decorate 56(s) Location 1
-                              Decorate 79(s_ff1) Flat
-                              Decorate 79(s_ff1) BuiltIn FrontFacing
-                              Decorate 94(@entryPointOutput) Location 0
-                              MemberDecorate 101(myS) 0 Offset 0
-                              MemberDecorate 101(myS) 1 Offset 4
-                              MemberDecorate 101(myS) 2 Offset 16
-                              MemberDecorate 101(myS) 3 Offset 32
-                              MemberDecorate 102($Global) 0 Offset 0
-                              MemberDecorate 102($Global) 1 Offset 1620
-                              MemberDecorate 102($Global) 2 Offset 1636
-                              Decorate 102($Global) Block
-                              Decorate 104 DescriptorSet 0
+                              Decorate 54(s.a) Location 1
+                              Decorate 59(s.b) Flat
+                              Decorate 59(s.b) Location 2
+                              Decorate 65(s.c) NoPerspective
+                              Decorate 65(s.c) Centroid
+                              Decorate 65(s.c) Location 3
+                              Decorate 71(s.d) Centroid
+                              Decorate 71(s.d) Location 4
+                              Decorate 76(s.ff1) Flat
+                              Decorate 76(s.ff1) BuiltIn FrontFacing
+                              Decorate 80(s.ff2) Flat
+                              Decorate 80(s.ff2) Location 5
+                              Decorate 84(s.ff3) Flat
+                              Decorate 84(s.ff3) Location 6
+                              Decorate 87(s.ff4) Location 7
+                              Decorate 91(@entryPointOutput) Location 0
+                              MemberDecorate 98(myS) 0 Offset 0
+                              MemberDecorate 98(myS) 1 Offset 4
+                              MemberDecorate 98(myS) 2 Offset 16
+                              MemberDecorate 98(myS) 3 Offset 32
+                              MemberDecorate 99($Global) 0 Offset 0
+                              MemberDecorate 99($Global) 1 Offset 1620
+                              MemberDecorate 99($Global) 2 Offset 1636
+                              Decorate 99($Global) Block
+                              Decorate 101 DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -347,74 +321,71 @@
               42:             TypePointer Function 41(containEmpty)
               50:             TypePointer Input 7(fvec4)
        51(input):     50(ptr) Variable Input
-        54(IN_S):             TypeStruct 7(fvec4) 9(bool) 6(float) 10(fvec2) 9(bool) 9(bool) 7(fvec4)
-              55:             TypePointer Input 54(IN_S)
-           56(s):     55(ptr) Variable Input
-              60:     31(int) Constant 1
-              61:             TypePointer Input 9(bool)
-              64:             TypePointer Function 9(bool)
-              66:     31(int) Constant 2
-              67:             TypePointer Input 6(float)
-              70:             TypePointer Function 6(float)
-              72:     31(int) Constant 3
-              73:             TypePointer Input 10(fvec2)
-              76:             TypePointer Function 10(fvec2)
-              78:     31(int) Constant 4
-       79(s_ff1):     61(ptr) Variable Input
-              82:     31(int) Constant 5
-              86:     31(int) Constant 6
-              93:             TypePointer Output 7(fvec4)
-94(@entryPointOutput):     93(ptr) Variable Output
-             100:             TypeInt 32 0
-        101(myS):             TypeStruct 100(int) 100(int) 7(fvec4) 7(fvec4)
-    102($Global):             TypeStruct 101(myS) 6(float) 6(float)
-             103:             TypePointer Uniform 102($Global)
-             104:    103(ptr) Variable Uniform
+         54(s.a):     50(ptr) Variable Input
+              57:     31(int) Constant 1
+              58:             TypePointer Input 9(bool)
+         59(s.b):     58(ptr) Variable Input
+              61:             TypePointer Function 9(bool)
+              63:     31(int) Constant 2
+              64:             TypePointer Input 6(float)
+         65(s.c):     64(ptr) Variable Input
+              67:             TypePointer Function 6(float)
+              69:     31(int) Constant 3
+              70:             TypePointer Input 10(fvec2)
+         71(s.d):     70(ptr) Variable Input
+              73:             TypePointer Function 10(fvec2)
+              75:     31(int) Constant 4
+       76(s.ff1):     58(ptr) Variable Input
+              79:     31(int) Constant 5
+       80(s.ff2):     58(ptr) Variable Input
+              83:     31(int) Constant 6
+       84(s.ff3):     58(ptr) Variable Input
+       87(s.ff4):     50(ptr) Variable Input
+              90:             TypePointer Output 7(fvec4)
+91(@entryPointOutput):     90(ptr) Variable Output
+              97:             TypeInt 32 0
+         98(myS):             TypeStruct 97(int) 97(int) 7(fvec4) 7(fvec4)
+     99($Global):             TypeStruct 98(myS) 6(float) 6(float)
+             100:             TypePointer Uniform 99($Global)
+             101:    100(ptr) Variable Uniform
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
        49(input):      8(ptr) Variable Function
            53(s):     12(ptr) Variable Function
-       95(param):      8(ptr) Variable Function
-       97(param):     12(ptr) Variable Function
+       92(param):      8(ptr) Variable Function
+       94(param):     12(ptr) Variable Function
               52:    7(fvec4) Load 51(input)
                               Store 49(input) 52
-              57:     50(ptr) AccessChain 56(s) 32
-              58:    7(fvec4) Load 57
-              59:      8(ptr) AccessChain 53(s) 32
-                              Store 59 58
-              62:     61(ptr) AccessChain 56(s) 60
-              63:     9(bool) Load 62
-              65:     64(ptr) AccessChain 53(s) 60
-                              Store 65 63
-              68:     67(ptr) AccessChain 56(s) 66
-              69:    6(float) Load 68
-              71:     70(ptr) AccessChain 53(s) 66
-                              Store 71 69
-              74:     73(ptr) AccessChain 56(s) 72
-              75:   10(fvec2) Load 74
-              77:     76(ptr) AccessChain 53(s) 72
-                              Store 77 75
-              80:     9(bool) Load 79(s_ff1)
-              81:     64(ptr) AccessChain 53(s) 78
-                              Store 81 80
-              83:     61(ptr) AccessChain 56(s) 78
-              84:     9(bool) Load 83
-              85:     64(ptr) AccessChain 53(s) 82
-                              Store 85 84
-              87:     61(ptr) AccessChain 56(s) 82
-              88:     9(bool) Load 87
-              89:     64(ptr) AccessChain 53(s) 86
+              55:    7(fvec4) Load 54(s.a)
+              56:      8(ptr) AccessChain 53(s) 32
+                              Store 56 55
+              60:     9(bool) Load 59(s.b)
+              62:     61(ptr) AccessChain 53(s) 57
+                              Store 62 60
+              66:    6(float) Load 65(s.c)
+              68:     67(ptr) AccessChain 53(s) 63
+                              Store 68 66
+              72:   10(fvec2) Load 71(s.d)
+              74:     73(ptr) AccessChain 53(s) 69
+                              Store 74 72
+              77:     9(bool) Load 76(s.ff1)
+              78:     61(ptr) AccessChain 53(s) 75
+                              Store 78 77
+              81:     9(bool) Load 80(s.ff2)
+              82:     61(ptr) AccessChain 53(s) 79
+                              Store 82 81
+              85:     9(bool) Load 84(s.ff3)
+              86:     61(ptr) AccessChain 53(s) 83
+                              Store 86 85
+              88:    7(fvec4) Load 87(s.ff4)
+              89:      8(ptr) AccessChain 53(s) 33
                               Store 89 88
-              90:     50(ptr) AccessChain 56(s) 86
-              91:    7(fvec4) Load 90
-              92:      8(ptr) AccessChain 53(s) 33
-                              Store 92 91
-              96:    7(fvec4) Load 49(input)
-                              Store 95(param) 96
-              98:    11(IN_S) Load 53(s)
-                              Store 97(param) 98
-              99:    7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 95(param) 97(param)
-                              Store 94(@entryPointOutput) 99
+              93:    7(fvec4) Load 49(input)
+                              Store 92(param) 93
+              95:    11(IN_S) Load 53(s)
+                              Store 94(param) 95
+              96:    7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 92(param) 94(param)
+                              Store 91(@entryPointOutput) 96
                               Return
                               FunctionEnd
 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;):    7(fvec4) Function None 13
diff --git a/Test/baseResults/hlsl.struct.split-1.vert.out b/Test/baseResults/hlsl.struct.split-1.vert.out
index db40682..896e124 100644
--- a/Test/baseResults/hlsl.struct.split-1.vert.out
+++ b/Test/baseResults/hlsl.struct.split-1.vert.out
@@ -46,19 +46,19 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              0 (const int)
-0:?           'x0_in' (layout( location=0) in int)
+0:?           'vsin.x0_in' (layout( location=0) in int)
 0:17        move second child to first child ( temp 4-component vector of float)
 0:17          Pos_in: direct index for structure ( temp 4-component vector of float)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              1 (const int)
-0:?           'Pos_in' (layout( location=1) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:17        move second child to first child ( temp int)
 0:17          x1_in: direct index for structure ( temp int)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              2 (const int)
-0:?           'x1_in' (layout( location=2) in int)
+0:?           'vsin.x1_in' (layout( location=2) in int)
 0:17      move second child to first child ( temp 4-component vector of float)
 0:?         'Pos_loose' ( temp 4-component vector of float)
 0:?         'Pos_loose' (layout( location=3) in 4-component vector of float)
@@ -69,34 +69,30 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:?             'Pos_loose' ( temp 4-component vector of float)
 0:17        move second child to first child ( temp int)
-0:17          x0_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:17          x0_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              0 (const int)
 0:17        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos_out' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
 0:17          Pos_out: direct index for structure ( temp 4-component vector of float)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              1 (const int)
 0:17        move second child to first child ( temp int)
-0:17          x1_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:17          x1_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:?     'x0_in' (layout( location=0) in int)
-0:?     'Pos_in' (layout( location=1) in 4-component vector of float)
-0:?     'x1_in' (layout( location=2) in int)
+0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
+0:?     'vsin.x0_in' (layout( location=0) in int)
+0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
+0:?     'vsin.x1_in' (layout( location=2) in int)
 0:?     'Pos_loose' (layout( location=3) in 4-component vector of float)
 
 
@@ -150,19 +146,19 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              0 (const int)
-0:?           'x0_in' (layout( location=0) in int)
+0:?           'vsin.x0_in' (layout( location=0) in int)
 0:17        move second child to first child ( temp 4-component vector of float)
 0:17          Pos_in: direct index for structure ( temp 4-component vector of float)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              1 (const int)
-0:?           'Pos_in' (layout( location=1) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:17        move second child to first child ( temp int)
 0:17          x1_in: direct index for structure ( temp int)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:17            Constant:
 0:17              2 (const int)
-0:?           'x1_in' (layout( location=2) in int)
+0:?           'vsin.x1_in' (layout( location=2) in int)
 0:17      move second child to first child ( temp 4-component vector of float)
 0:?         'Pos_loose' ( temp 4-component vector of float)
 0:?         'Pos_loose' (layout( location=3) in 4-component vector of float)
@@ -173,44 +169,40 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:?             'Pos_loose' ( temp 4-component vector of float)
 0:17        move second child to first child ( temp int)
-0:17          x0_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:17          x0_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              0 (const int)
 0:17        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos_out' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
 0:17          Pos_out: direct index for structure ( temp 4-component vector of float)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              1 (const int)
 0:17        move second child to first child ( temp int)
-0:17          x1_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:17          x1_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:?     'x0_in' (layout( location=0) in int)
-0:?     'Pos_in' (layout( location=1) in 4-component vector of float)
-0:?     'x1_in' (layout( location=2) in int)
+0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
+0:?     'vsin.x0_in' (layout( location=0) in int)
+0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
+0:?     'vsin.x1_in' (layout( location=2) in int)
 0:?     'Pos_loose' (layout( location=3) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 70
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 40 44 47 51 61 67
+                              EntryPoint Vertex 4  "main" 40 44 47 51 60 64 67
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_INPUT"
@@ -226,25 +218,24 @@
                               Name 15  "Pos_loose"
                               Name 19  "vsout"
                               Name 38  "vsin"
-                              Name 40  "x0_in"
-                              Name 44  "Pos_in"
-                              Name 47  "x1_in"
+                              Name 40  "vsin.x0_in"
+                              Name 44  "vsin.Pos_in"
+                              Name 47  "vsin.x1_in"
                               Name 50  "Pos_loose"
                               Name 51  "Pos_loose"
                               Name 53  "flattenTemp"
                               Name 54  "param"
                               Name 56  "param"
-                              Name 59  "VS_OUTPUT"
-                              MemberName 59(VS_OUTPUT) 0  "x0_out"
-                              MemberName 59(VS_OUTPUT) 1  "x1_out"
-                              Name 61  "@entryPointOutput"
-                              Name 67  "@entryPointOutput_Pos_out"
-                              Decorate 40(x0_in) Location 0
-                              Decorate 44(Pos_in) Location 1
-                              Decorate 47(x1_in) Location 2
+                              Name 60  "@entryPointOutput.x0_out"
+                              Name 64  "@entryPointOutput.Pos_out"
+                              Name 67  "@entryPointOutput.x1_out"
+                              Decorate 40(vsin.x0_in) Location 0
+                              Decorate 44(vsin.Pos_in) Location 1
+                              Decorate 47(vsin.x1_in) Location 2
                               Decorate 51(Pos_loose) Location 3
-                              Decorate 61(@entryPointOutput) Location 0
-                              Decorate 67(@entryPointOutput_Pos_out) BuiltIn Position
+                              Decorate 60(@entryPointOutput.x0_out) Location 0
+                              Decorate 64(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 67(@entryPointOutput.x1_out) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -261,17 +252,16 @@
               25:      6(int) Constant 1
               31:      6(int) Constant 2
               39:             TypePointer Input 6(int)
-       40(x0_in):     39(ptr) Variable Input
+  40(vsin.x0_in):     39(ptr) Variable Input
               43:             TypePointer Input 8(fvec4)
-      44(Pos_in):     43(ptr) Variable Input
-       47(x1_in):     39(ptr) Variable Input
+ 44(vsin.Pos_in):     43(ptr) Variable Input
+  47(vsin.x1_in):     39(ptr) Variable Input
    51(Pos_loose):     43(ptr) Variable Input
-   59(VS_OUTPUT):             TypeStruct 6(int) 6(int)
-              60:             TypePointer Output 59(VS_OUTPUT)
-61(@entryPointOutput):     60(ptr) Variable Output
-              64:             TypePointer Output 6(int)
-              66:             TypePointer Output 8(fvec4)
-67(@entryPointOutput_Pos_out):     66(ptr) Variable Output
+              59:             TypePointer Output 6(int)
+60(@entryPointOutput.x0_out):     59(ptr) Variable Output
+              63:             TypePointer Output 8(fvec4)
+64(@entryPointOutput.Pos_out):     63(ptr) Variable Output
+67(@entryPointOutput.x1_out):     59(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
         38(vsin):     10(ptr) Variable Function
@@ -279,13 +269,13 @@
  53(flattenTemp):     18(ptr) Variable Function
        54(param):     10(ptr) Variable Function
        56(param):     11(ptr) Variable Function
-              41:      6(int) Load 40(x0_in)
+              41:      6(int) Load 40(vsin.x0_in)
               42:     21(ptr) AccessChain 38(vsin) 20
                               Store 42 41
-              45:    8(fvec4) Load 44(Pos_in)
+              45:    8(fvec4) Load 44(vsin.Pos_in)
               46:     11(ptr) AccessChain 38(vsin) 25
                               Store 46 45
-              48:      6(int) Load 47(x1_in)
+              48:      6(int) Load 47(vsin.x1_in)
               49:     21(ptr) AccessChain 38(vsin) 31
                               Store 49 48
               52:    8(fvec4) Load 51(Pos_loose)
@@ -296,17 +286,15 @@
                               Store 56(param) 57
               58:12(VS_OUTPUT) FunctionCall 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;) 54(param) 56(param)
                               Store 53(flattenTemp) 58
-              62:     21(ptr) AccessChain 53(flattenTemp) 20
-              63:      6(int) Load 62
-              65:     64(ptr) AccessChain 61(@entryPointOutput) 20
-                              Store 65 63
-              68:     11(ptr) AccessChain 53(flattenTemp) 25
-              69:    8(fvec4) Load 68
-                              Store 67(@entryPointOutput_Pos_out) 69
-              70:     21(ptr) AccessChain 53(flattenTemp) 31
-              71:      6(int) Load 70
-              72:     64(ptr) AccessChain 61(@entryPointOutput) 25
-                              Store 72 71
+              61:     21(ptr) AccessChain 53(flattenTemp) 20
+              62:      6(int) Load 61
+                              Store 60(@entryPointOutput.x0_out) 62
+              65:     11(ptr) AccessChain 53(flattenTemp) 25
+              66:    8(fvec4) Load 65
+                              Store 64(@entryPointOutput.Pos_out) 66
+              68:     21(ptr) AccessChain 53(flattenTemp) 31
+              69:      6(int) Load 68
+                              Store 67(@entryPointOutput.x1_out) 69
                               Return
                               FunctionEnd
 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;):12(VS_OUTPUT) Function None 13
diff --git a/Test/baseResults/hlsl.struct.split.array.geom.out b/Test/baseResults/hlsl.struct.split.array.geom.out
index 5c36e2b..8aae6f3 100644
--- a/Test/baseResults/hlsl.struct.split.array.geom.out
+++ b/Test/baseResults/hlsl.struct.split.array.geom.out
@@ -72,7 +72,10 @@
 0:?         'OutputStream' ( temp structure{ temp 4-component vector of float Pos,  temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
 0:?   Linker Objects
 0:?     'v' (layout( location=0) in 1-element array of uint)
-0:?     'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
+0:?     'OutputStream.Pos' ( out 4-component vector of float Position)
+0:?     'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
+0:?     'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
+0:?     'OutputStream.VertexID' (layout( location=2) out uint)
 
 
 Linked geometry stage:
@@ -151,16 +154,19 @@
 0:?         'OutputStream' ( temp structure{ temp 4-component vector of float Pos,  temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
 0:?   Linker Objects
 0:?     'v' (layout( location=0) in 1-element array of uint)
-0:?     'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
+0:?     'OutputStream.Pos' ( out 4-component vector of float Position)
+0:?     'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
+0:?     'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
+0:?     'OutputStream.VertexID' (layout( location=2) out uint)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 77
+// Id's are bound by 82
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 66 76
+                              EntryPoint Geometry 4  "main" 66 75 77 79 81
                               ExecutionMode 4 InputPoints
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -184,13 +190,15 @@
                               Name 68  "OutputStream"
                               Name 69  "param"
                               Name 71  "param"
-                              Name 74  "PSInput"
-                              MemberName 74(PSInput) 0  "TexCoord"
-                              MemberName 74(PSInput) 1  "TerrainPos"
-                              MemberName 74(PSInput) 2  "VertexID"
-                              Name 76  "OutputStream"
+                              Name 75  "OutputStream.Pos"
+                              Name 77  "OutputStream.TexCoord"
+                              Name 79  "OutputStream.TerrainPos"
+                              Name 81  "OutputStream.VertexID"
                               Decorate 66(v) Location 0
-                              Decorate 76(OutputStream) Location 0
+                              Decorate 75(OutputStream.Pos) BuiltIn Position
+                              Decorate 77(OutputStream.TexCoord) Location 0
+                              Decorate 79(OutputStream.TerrainPos) Location 1
+                              Decorate 81(OutputStream.VertexID) Location 2
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -223,9 +231,14 @@
               60:     28(int) Constant 1
               65:             TypePointer Input 8
            66(v):     65(ptr) Variable Input
-     74(PSInput):             TypeStruct 12(fvec2) 13(fvec3) 6(int)
-              75:             TypePointer Output 74(PSInput)
-76(OutputStream):     75(ptr) Variable Output
+              74:             TypePointer Output 11(fvec4)
+75(OutputStream.Pos):     74(ptr) Variable Output
+              76:             TypePointer Output 12(fvec2)
+77(OutputStream.TexCoord):     76(ptr) Variable Output
+              78:             TypePointer Output 13(fvec3)
+79(OutputStream.TerrainPos):     78(ptr) Variable Output
+              80:             TypePointer Output 6(int)
+81(OutputStream.VertexID):     80(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            64(v):      9(ptr) Variable Function
diff --git a/Test/baseResults/hlsl.struct.split.assign.frag.out b/Test/baseResults/hlsl.struct.split.assign.frag.out
index 7bce9c9..fca9751 100644
--- a/Test/baseResults/hlsl.struct.split.assign.frag.out
+++ b/Test/baseResults/hlsl.struct.split.assign.frag.out
@@ -11,10 +11,13 @@
 0:9        'input' ( in 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
 0:9        'a' ( temp 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
 0:11      Branch: Return with expression
-0:11        Constant:
-0:11          1.000000
-0:11          1.000000
-0:11          1.000000
+0:11        pos: direct index for structure ( temp 4-component vector of float)
+0:11          direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
+0:11            'a' ( temp 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
+0:11            Constant:
+0:11              1 (const int)
+0:11          Constant:
+0:11            1 (const int)
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
@@ -30,13 +33,7 @@
 0:7                0 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                0 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[0].f' (layout( location=1) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -46,7 +43,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              0 (const int)
 0:7        move second child to first child ( temp float)
@@ -57,13 +54,7 @@
 0:7                1 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                1 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[1].f' (layout( location=2) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -73,7 +64,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              1 (const int)
 0:7        move second child to first child ( temp float)
@@ -84,13 +75,7 @@
 0:7                2 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                2 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[2].f' (layout( location=3) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -100,7 +85,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              2 (const int)
 0:7      move second child to first child ( temp 4-component vector of float)
@@ -111,8 +96,10 @@
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i' (layout( location=0) flat in int)
-0:?     'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:?     'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?     'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?     'input[0].f' (layout( location=1) in float)
+0:?     'input[1].f' (layout( location=2) in float)
+0:?     'input[2].f' (layout( location=3) in float)
 
 
 Linked fragment stage:
@@ -130,10 +117,13 @@
 0:9        'input' ( in 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
 0:9        'a' ( temp 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
 0:11      Branch: Return with expression
-0:11        Constant:
-0:11          1.000000
-0:11          1.000000
-0:11          1.000000
+0:11        pos: direct index for structure ( temp 4-component vector of float)
+0:11          direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
+0:11            'a' ( temp 3-element array of structure{ temp float f,  temp 4-component vector of float pos})
+0:11            Constant:
+0:11              1 (const int)
+0:11          Constant:
+0:11            1 (const int)
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
@@ -149,13 +139,7 @@
 0:7                0 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                0 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[0].f' (layout( location=1) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -165,7 +149,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              0 (const int)
 0:7        move second child to first child ( temp float)
@@ -176,13 +160,7 @@
 0:7                1 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                1 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[1].f' (layout( location=2) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -192,7 +170,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              1 (const int)
 0:7        move second child to first child ( temp float)
@@ -203,13 +181,7 @@
 0:7                2 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                2 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[2].f' (layout( location=3) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -219,7 +191,7 @@
 0:7            Constant:
 0:7              1 (const int)
 0:7          direct index ( in 4-component vector of float FragCoord)
-0:?             'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?             'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
 0:7            Constant:
 0:7              2 (const int)
 0:7      move second child to first child ( temp 4-component vector of float)
@@ -230,17 +202,19 @@
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i' (layout( location=0) flat in int)
-0:?     'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:?     'input_pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?     'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
+0:?     'input[0].f' (layout( location=1) in float)
+0:?     'input[1].f' (layout( location=2) in float)
+0:?     'input[2].f' (layout( location=3) in float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 66
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 32 39 48 67
+                              EntryPoint Fragment 4  "main" 30 35 41 46 53 60
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -251,21 +225,23 @@
                               Name 16  "i"
                               Name 17  "input"
                               Name 20  "a"
+                              Name 28  "i"
                               Name 30  "i"
-                              Name 32  "i"
-                              Name 34  "input"
-                              Name 36  "S"
-                              MemberName 36(S) 0  "f"
-                              Name 39  "input"
-                              Name 48  "input_pos"
-                              Name 67  "@entryPointOutput"
-                              Name 68  "param"
-                              Name 70  "param"
-                              Decorate 32(i) Flat
-                              Decorate 32(i) Location 0
-                              Decorate 39(input) Location 1
-                              Decorate 48(input_pos) BuiltIn FragCoord
-                              Decorate 67(@entryPointOutput) Location 0
+                              Name 32  "input"
+                              Name 35  "input[0].f"
+                              Name 41  "input.pos"
+                              Name 46  "input[1].f"
+                              Name 53  "input[2].f"
+                              Name 60  "@entryPointOutput"
+                              Name 61  "param"
+                              Name 63  "param"
+                              Decorate 30(i) Flat
+                              Decorate 30(i) Location 0
+                              Decorate 35(input[0].f) Location 1
+                              Decorate 41(input.pos) BuiltIn FragCoord
+                              Decorate 46(input[1].f) Location 2
+                              Decorate 53(input[2].f) Location 3
+                              Decorate 60(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -278,65 +254,58 @@
               13:             TypeArray 10(S) 12
               14:             TypePointer Function 13
               15:             TypeFunction 9(fvec4) 7(ptr) 14(ptr)
-              22:             TypeVector 8(float) 3
-              23:    8(float) Constant 1065353216
-              24:   22(fvec3) ConstantComposite 23 23 23
-              25:             TypePointer Function 9(fvec4)
-              31:             TypePointer Input 6(int)
-           32(i):     31(ptr) Variable Input
-              35:      6(int) Constant 0
-           36(S):             TypeStruct 8(float)
-              37:             TypeArray 36(S) 12
-              38:             TypePointer Input 37
-       39(input):     38(ptr) Variable Input
-              40:             TypePointer Input 8(float)
-              43:             TypePointer Function 8(float)
-              45:      6(int) Constant 1
-              46:             TypeArray 9(fvec4) 12
-              47:             TypePointer Input 46
-   48(input_pos):     47(ptr) Variable Input
-              49:             TypePointer Input 9(fvec4)
-              59:      6(int) Constant 2
-              66:             TypePointer Output 9(fvec4)
-67(@entryPointOutput):     66(ptr) Variable Output
+              22:      6(int) Constant 1
+              23:             TypePointer Function 9(fvec4)
+              29:             TypePointer Input 6(int)
+           30(i):     29(ptr) Variable Input
+              33:      6(int) Constant 0
+              34:             TypePointer Input 8(float)
+  35(input[0].f):     34(ptr) Variable Input
+              37:             TypePointer Function 8(float)
+              39:             TypeArray 9(fvec4) 12
+              40:             TypePointer Input 39
+   41(input.pos):     40(ptr) Variable Input
+              42:             TypePointer Input 9(fvec4)
+  46(input[1].f):     34(ptr) Variable Input
+              52:      6(int) Constant 2
+  53(input[2].f):     34(ptr) Variable Input
+              59:             TypePointer Output 9(fvec4)
+60(@entryPointOutput):     59(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-           30(i):      7(ptr) Variable Function
-       34(input):     14(ptr) Variable Function
-       68(param):      7(ptr) Variable Function
-       70(param):     14(ptr) Variable Function
-              33:      6(int) Load 32(i)
-                              Store 30(i) 33
-              41:     40(ptr) AccessChain 39(input) 35 35
-              42:    8(float) Load 41
-              44:     43(ptr) AccessChain 34(input) 35 35
-                              Store 44 42
-              50:     49(ptr) AccessChain 48(input_pos) 35
-              51:    9(fvec4) Load 50
-              52:     25(ptr) AccessChain 34(input) 35 45
-                              Store 52 51
-              53:     40(ptr) AccessChain 39(input) 45 35
-              54:    8(float) Load 53
-              55:     43(ptr) AccessChain 34(input) 45 35
+           28(i):      7(ptr) Variable Function
+       32(input):     14(ptr) Variable Function
+       61(param):      7(ptr) Variable Function
+       63(param):     14(ptr) Variable Function
+              31:      6(int) Load 30(i)
+                              Store 28(i) 31
+              36:    8(float) Load 35(input[0].f)
+              38:     37(ptr) AccessChain 32(input) 33 33
+                              Store 38 36
+              43:     42(ptr) AccessChain 41(input.pos) 33
+              44:    9(fvec4) Load 43
+              45:     23(ptr) AccessChain 32(input) 33 22
+                              Store 45 44
+              47:    8(float) Load 46(input[1].f)
+              48:     37(ptr) AccessChain 32(input) 22 33
+                              Store 48 47
+              49:     42(ptr) AccessChain 41(input.pos) 22
+              50:    9(fvec4) Load 49
+              51:     23(ptr) AccessChain 32(input) 22 22
+                              Store 51 50
+              54:    8(float) Load 53(input[2].f)
+              55:     37(ptr) AccessChain 32(input) 52 33
                               Store 55 54
-              56:     49(ptr) AccessChain 48(input_pos) 45
+              56:     42(ptr) AccessChain 41(input.pos) 52
               57:    9(fvec4) Load 56
-              58:     25(ptr) AccessChain 34(input) 45 45
+              58:     23(ptr) AccessChain 32(input) 52 22
                               Store 58 57
-              60:     40(ptr) AccessChain 39(input) 59 35
-              61:    8(float) Load 60
-              62:     43(ptr) AccessChain 34(input) 59 35
-                              Store 62 61
-              63:     49(ptr) AccessChain 48(input_pos) 59
-              64:    9(fvec4) Load 63
-              65:     25(ptr) AccessChain 34(input) 59 45
-                              Store 65 64
-              69:      6(int) Load 30(i)
-                              Store 68(param) 69
-              71:          13 Load 34(input)
-                              Store 70(param) 71
-              72:    9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 68(param) 70(param)
-                              Store 67(@entryPointOutput) 72
+              62:      6(int) Load 28(i)
+                              Store 61(param) 62
+              64:          13 Load 32(input)
+                              Store 63(param) 64
+              65:    9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 61(param) 63(param)
+                              Store 60(@entryPointOutput) 65
                               Return
                               FunctionEnd
 18(@main(i1;struct-S-f1-vf41[3];):    9(fvec4) Function None 15
@@ -344,10 +313,9 @@
        17(input):     14(ptr) FunctionParameter
               19:             Label
            20(a):     14(ptr) Variable Function
-              26:     25(ptr) Variable Function
               21:          13 Load 20(a)
                               Store 17(input) 21
-                              Store 26 24
-              27:    9(fvec4) Load 26
-                              ReturnValue 27
+              24:     23(ptr) AccessChain 20(a) 22 22
+              25:    9(fvec4) Load 24
+                              ReturnValue 25
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.struct.split.call.vert.out b/Test/baseResults/hlsl.struct.split.call.vert.out
index 647f9b4..bbbbe9a 100644
--- a/Test/baseResults/hlsl.struct.split.call.vert.out
+++ b/Test/baseResults/hlsl.struct.split.call.vert.out
@@ -60,53 +60,49 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              0 (const int)
-0:?           'x0_in' (layout( location=0) in int)
+0:?           'vsin.x0_in' (layout( location=0) in int)
 0:22        move second child to first child ( temp 4-component vector of float)
 0:22          Pos_in: direct index for structure ( temp 4-component vector of float)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              1 (const int)
-0:?           'Pos_in' (layout( location=1) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:22        move second child to first child ( temp int)
 0:22          x1_in: direct index for structure ( temp int)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              2 (const int)
-0:?           'x1_in' (layout( location=2) in int)
+0:?           'vsin.x1_in' (layout( location=2) in int)
 0:22      Sequence
 0:22        move second child to first child ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22          'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22          Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22        move second child to first child ( temp int)
-0:22          x0_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:22          x0_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              0 (const int)
 0:22        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos_out' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
 0:22          Pos_out: direct index for structure ( temp 4-component vector of float)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp int)
-0:22          x1_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:22          x1_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:?     'x0_in' (layout( location=0) in int)
-0:?     'Pos_in' (layout( location=1) in 4-component vector of float)
-0:?     'x1_in' (layout( location=2) in int)
+0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
+0:?     'vsin.x0_in' (layout( location=0) in int)
+0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
+0:?     'vsin.x1_in' (layout( location=2) in int)
 
 
 Linked vertex stage:
@@ -173,62 +169,58 @@
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              0 (const int)
-0:?           'x0_in' (layout( location=0) in int)
+0:?           'vsin.x0_in' (layout( location=0) in int)
 0:22        move second child to first child ( temp 4-component vector of float)
 0:22          Pos_in: direct index for structure ( temp 4-component vector of float)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              1 (const int)
-0:?           'Pos_in' (layout( location=1) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:22        move second child to first child ( temp int)
 0:22          x1_in: direct index for structure ( temp int)
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22            Constant:
 0:22              2 (const int)
-0:?           'x1_in' (layout( location=2) in int)
+0:?           'vsin.x1_in' (layout( location=2) in int)
 0:22      Sequence
 0:22        move second child to first child ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22          'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22          Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22        move second child to first child ( temp int)
-0:22          x0_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:22          x0_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              0 (const int)
 0:22        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos_out' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
 0:22          Pos_out: direct index for structure ( temp 4-component vector of float)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp int)
-0:22          x1_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:22          x1_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:?     'x0_in' (layout( location=0) in int)
-0:?     'Pos_in' (layout( location=1) in 4-component vector of float)
-0:?     'x1_in' (layout( location=2) in int)
+0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
+0:?     'vsin.x0_in' (layout( location=0) in int)
+0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
+0:?     'vsin.x1_in' (layout( location=2) in int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 80
+// Id's are bound by 77
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 52 56 59 68 74
+                              EntryPoint Vertex 4  "main" 52 56 59 67 71 74
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_INPUT"
@@ -248,21 +240,20 @@
                               Name 42  "param"
                               Name 44  "param"
                               Name 50  "vsin"
-                              Name 52  "x0_in"
-                              Name 56  "Pos_in"
-                              Name 59  "x1_in"
+                              Name 52  "vsin.x0_in"
+                              Name 56  "vsin.Pos_in"
+                              Name 59  "vsin.x1_in"
                               Name 62  "flattenTemp"
                               Name 63  "param"
-                              Name 66  "VS_OUTPUT"
-                              MemberName 66(VS_OUTPUT) 0  "x0_out"
-                              MemberName 66(VS_OUTPUT) 1  "x1_out"
-                              Name 68  "@entryPointOutput"
-                              Name 74  "@entryPointOutput_Pos_out"
-                              Decorate 52(x0_in) Location 0
-                              Decorate 56(Pos_in) Location 1
-                              Decorate 59(x1_in) Location 2
-                              Decorate 68(@entryPointOutput) Location 0
-                              Decorate 74(@entryPointOutput_Pos_out) BuiltIn Position
+                              Name 67  "@entryPointOutput.x0_out"
+                              Name 71  "@entryPointOutput.Pos_out"
+                              Name 74  "@entryPointOutput.x1_out"
+                              Decorate 52(vsin.x0_in) Location 0
+                              Decorate 56(vsin.Pos_in) Location 1
+                              Decorate 59(vsin.x1_in) Location 2
+                              Decorate 67(@entryPointOutput.x0_out) Location 0
+                              Decorate 71(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 74(@entryPointOutput.x1_out) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -280,45 +271,42 @@
               31:             TypePointer Function 6(int)
               38:      6(int) Constant 2
               51:             TypePointer Input 6(int)
-       52(x0_in):     51(ptr) Variable Input
+  52(vsin.x0_in):     51(ptr) Variable Input
               55:             TypePointer Input 8(fvec4)
-      56(Pos_in):     55(ptr) Variable Input
-       59(x1_in):     51(ptr) Variable Input
-   66(VS_OUTPUT):             TypeStruct 6(int) 6(int)
-              67:             TypePointer Output 66(VS_OUTPUT)
-68(@entryPointOutput):     67(ptr) Variable Output
-              71:             TypePointer Output 6(int)
-              73:             TypePointer Output 8(fvec4)
-74(@entryPointOutput_Pos_out):     73(ptr) Variable Output
+ 56(vsin.Pos_in):     55(ptr) Variable Input
+  59(vsin.x1_in):     51(ptr) Variable Input
+              66:             TypePointer Output 6(int)
+67(@entryPointOutput.x0_out):     66(ptr) Variable Output
+              70:             TypePointer Output 8(fvec4)
+71(@entryPointOutput.Pos_out):     70(ptr) Variable Output
+74(@entryPointOutput.x1_out):     66(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
         50(vsin):     10(ptr) Variable Function
  62(flattenTemp):     12(ptr) Variable Function
        63(param):     10(ptr) Variable Function
-              53:      6(int) Load 52(x0_in)
+              53:      6(int) Load 52(vsin.x0_in)
               54:     31(ptr) AccessChain 50(vsin) 30
                               Store 54 53
-              57:    8(fvec4) Load 56(Pos_in)
+              57:    8(fvec4) Load 56(vsin.Pos_in)
               58:     23(ptr) AccessChain 50(vsin) 22
                               Store 58 57
-              60:      6(int) Load 59(x1_in)
+              60:      6(int) Load 59(vsin.x1_in)
               61:     31(ptr) AccessChain 50(vsin) 38
                               Store 61 60
               64: 9(VS_INPUT) Load 50(vsin)
                               Store 63(param) 64
               65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param)
                               Store 62(flattenTemp) 65
-              69:     31(ptr) AccessChain 62(flattenTemp) 30
-              70:      6(int) Load 69
-              72:     71(ptr) AccessChain 68(@entryPointOutput) 30
-                              Store 72 70
-              75:     23(ptr) AccessChain 62(flattenTemp) 22
-              76:    8(fvec4) Load 75
-                              Store 74(@entryPointOutput_Pos_out) 76
-              77:     31(ptr) AccessChain 62(flattenTemp) 38
-              78:      6(int) Load 77
-              79:     71(ptr) AccessChain 68(@entryPointOutput) 22
-                              Store 79 78
+              68:     31(ptr) AccessChain 62(flattenTemp) 30
+              69:      6(int) Load 68
+                              Store 67(@entryPointOutput.x0_out) 69
+              72:     23(ptr) AccessChain 62(flattenTemp) 22
+              73:    8(fvec4) Load 72
+                              Store 71(@entryPointOutput.Pos_out) 73
+              75:     31(ptr) AccessChain 62(flattenTemp) 38
+              76:      6(int) Load 75
+                              Store 74(@entryPointOutput.x1_out) 76
                               Return
                               FunctionEnd
 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;):           2 Function None 13
diff --git a/Test/baseResults/hlsl.struct.split.nested.geom.out b/Test/baseResults/hlsl.struct.split.nested.geom.out
index 9cb61ca..d01d9bd 100644
--- a/Test/baseResults/hlsl.struct.split.nested.geom.out
+++ b/Test/baseResults/hlsl.struct.split.nested.geom.out
@@ -73,7 +73,7 @@
 0:33      Sequence
 0:33        Sequence
 0:33          move second child to first child ( temp 4-component vector of float)
-0:?             'ts_psIn_pos' ( out 4-component vector of float Position)
+0:?             'ts.pos' ( out 4-component vector of float Position)
 0:33            pos: direct index for structure ( temp 4-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -82,13 +82,7 @@
 0:33              Constant:
 0:33                0 (const int)
 0:33          move second child to first child ( temp 2-component vector of float)
-0:33            tc: direct index for structure ( temp 2-component vector of float)
-0:33              psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
-0:33                'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
-0:33                Constant:
-0:33                  0 (const int)
-0:33              Constant:
-0:33                0 (const int)
+0:?             'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
 0:33            tc: direct index for structure ( temp 2-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -96,13 +90,37 @@
 0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33          move second child to first child ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
+0:33              Constant:
+0:33                0 (const int)
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp int)
+0:?             'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
+0:33            m1: direct index for structure ( temp int)
+0:33              contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                Constant:
+0:33                  1 (const int)
 0:33              Constant:
 0:33                1 (const int)
 0:33        EmitVertex ( temp void)
@@ -119,7 +137,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -146,7 +164,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              1 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -173,7 +191,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              2 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -195,8 +213,13 @@
 0:?         'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:?         'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
 0:?   Linker Objects
+0:?     'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:?     'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
-0:?     'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:?     'ts.pos' ( out 4-component vector of float Position)
+0:?     'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
+0:?     'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:?     'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:?     'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
 
 
 Linked geometry stage:
@@ -276,7 +299,7 @@
 0:33      Sequence
 0:33        Sequence
 0:33          move second child to first child ( temp 4-component vector of float)
-0:?             'ts_psIn_pos' ( out 4-component vector of float Position)
+0:?             'ts.pos' ( out 4-component vector of float Position)
 0:33            pos: direct index for structure ( temp 4-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -285,13 +308,7 @@
 0:33              Constant:
 0:33                0 (const int)
 0:33          move second child to first child ( temp 2-component vector of float)
-0:33            tc: direct index for structure ( temp 2-component vector of float)
-0:33              psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
-0:33                'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
-0:33                Constant:
-0:33                  0 (const int)
-0:33              Constant:
-0:33                0 (const int)
+0:?             'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
 0:33            tc: direct index for structure ( temp 2-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -299,13 +316,37 @@
 0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33          move second child to first child ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
+0:33              Constant:
+0:33                0 (const int)
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp int)
+0:?             'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
+0:33            m1: direct index for structure ( temp int)
+0:33              contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                Constant:
+0:33                  1 (const int)
 0:33              Constant:
 0:33                1 (const int)
 0:33        EmitVertex ( temp void)
@@ -322,7 +363,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              0 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -349,7 +390,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              1 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -376,7 +417,7 @@
 0:24            Constant:
 0:24              0 (const int)
 0:24          direct index ( in 4-component vector of float Position)
-0:?             'tin_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:24            Constant:
 0:24              2 (const int)
 0:24        move second child to first child ( temp 2-component vector of float)
@@ -398,17 +439,22 @@
 0:?         'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:?         'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
 0:?   Linker Objects
+0:?     'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:?     'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
-0:?     'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:?     'ts.pos' ( out 4-component vector of float Position)
+0:?     'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
+0:?     'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:?     'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:?     'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 105
+// Id's are bound by 100
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 48 55 74 82
+                              EntryPoint Geometry 4  "main" 48 52 56 59 63 69 77
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -428,28 +474,26 @@
                               Name 21  "tin"
                               Name 22  "ts"
                               Name 25  "o"
-                              Name 48  "ts_psIn_pos"
-                              Name 51  "PS_IN"
-                              MemberName 51(PS_IN) 0  "tc"
-                              Name 52  "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
-                              MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0  "m0_array"
-                              MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1  "m1"
-                              Name 53  "GS_OUT"
-                              MemberName 53(GS_OUT) 0  "psIn"
-                              MemberName 53(GS_OUT) 1  "contains_no_builtin_io"
-                              Name 55  "ts"
-                              Name 71  "tin"
-                              Name 74  "tin_pos"
-                              Name 79  "PS_IN"
-                              MemberName 79(PS_IN) 0  "tc"
-                              Name 82  "tin"
-                              Name 99  "ts"
-                              Name 100  "param"
-                              Name 102  "param"
-                              Decorate 48(ts_psIn_pos) BuiltIn Position
-                              Decorate 55(ts) Location 0
-                              Decorate 74(tin_pos) BuiltIn Position
-                              Decorate 82(tin) Location 0
+                              Name 48  "ts.pos"
+                              Name 52  "ts.psIn.tc"
+                              Name 56  "ts.contains_no_builtin_io.m0_array[0]"
+                              Name 59  "ts.contains_no_builtin_io.m0_array[1]"
+                              Name 63  "ts.contains_no_builtin_io.m1"
+                              Name 66  "tin"
+                              Name 69  "tin.pos"
+                              Name 74  "PS_IN"
+                              MemberName 74(PS_IN) 0  "tc"
+                              Name 77  "tin"
+                              Name 94  "ts"
+                              Name 95  "param"
+                              Name 97  "param"
+                              Decorate 48(ts.pos) BuiltIn Position
+                              Decorate 52(ts.psIn.tc) Location 0
+                              Decorate 56(ts.contains_no_builtin_io.m0_array[0]) Location 1
+                              Decorate 59(ts.contains_no_builtin_io.m0_array[1]) Location 2
+                              Decorate 63(ts.contains_no_builtin_io.m1) Location 3
+                              Decorate 69(tin.pos) BuiltIn Position
+                              Decorate 77(tin) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -484,61 +528,58 @@
               44:     16(int) Constant 2
               45:             TypePointer Function 16(int)
               47:             TypePointer Output 7(fvec4)
- 48(ts_psIn_pos):     47(ptr) Variable Output
-       51(PS_IN):             TypeStruct 8(fvec2)
-52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO):             TypeStruct 15 16(int)
-      53(GS_OUT):             TypeStruct 51(PS_IN) 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              54:             TypePointer Output 53(GS_OUT)
-          55(ts):     54(ptr) Variable Output
-              58:             TypePointer Output 8(fvec2)
-              60:             TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              63:             TypePointer Output 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              66:             TypePointer Output 15
-              69:             TypePointer Output 16(int)
-              72:             TypeArray 7(fvec4) 11
-              73:             TypePointer Input 72
-     74(tin_pos):     73(ptr) Variable Input
-              75:             TypePointer Input 7(fvec4)
-       79(PS_IN):             TypeStruct 8(fvec2)
-              80:             TypeArray 79(PS_IN) 11
-              81:             TypePointer Input 80
-         82(tin):     81(ptr) Variable Input
-              83:             TypePointer Input 8(fvec2)
+      48(ts.pos):     47(ptr) Variable Output
+              51:             TypePointer Output 8(fvec2)
+  52(ts.psIn.tc):     51(ptr) Variable Output
+              55:             TypePointer Output 6(float)
+56(ts.contains_no_builtin_io.m0_array[0]):     55(ptr) Variable Output
+59(ts.contains_no_builtin_io.m0_array[1]):     55(ptr) Variable Output
+              62:             TypePointer Output 16(int)
+63(ts.contains_no_builtin_io.m1):     62(ptr) Variable Output
+              67:             TypeArray 7(fvec4) 11
+              68:             TypePointer Input 67
+     69(tin.pos):     68(ptr) Variable Input
+              70:             TypePointer Input 7(fvec4)
+       74(PS_IN):             TypeStruct 8(fvec2)
+              75:             TypeArray 74(PS_IN) 11
+              76:             TypePointer Input 75
+         77(tin):     76(ptr) Variable Input
+              78:             TypePointer Input 8(fvec2)
          4(main):           2 Function None 3
                5:             Label
-         71(tin):     13(ptr) Variable Function
-          99(ts):     19(ptr) Variable Function
-      100(param):     13(ptr) Variable Function
-      102(param):     19(ptr) Variable Function
-              76:     75(ptr) AccessChain 74(tin_pos) 26
-              77:    7(fvec4) Load 76
-              78:     32(ptr) AccessChain 71(tin) 26 26
-                              Store 78 77
-              84:     83(ptr) AccessChain 82(tin) 26 26
-              85:    8(fvec2) Load 84
-              86:     38(ptr) AccessChain 71(tin) 26 34
-                              Store 86 85
-              87:     75(ptr) AccessChain 74(tin_pos) 34
-              88:    7(fvec4) Load 87
-              89:     32(ptr) AccessChain 71(tin) 34 26
-                              Store 89 88
-              90:     83(ptr) AccessChain 82(tin) 34 26
-              91:    8(fvec2) Load 90
-              92:     38(ptr) AccessChain 71(tin) 34 34
-                              Store 92 91
-              93:     75(ptr) AccessChain 74(tin_pos) 44
-              94:    7(fvec4) Load 93
-              95:     32(ptr) AccessChain 71(tin) 44 26
-                              Store 95 94
-              96:     83(ptr) AccessChain 82(tin) 44 26
-              97:    8(fvec2) Load 96
-              98:     38(ptr) AccessChain 71(tin) 44 34
-                              Store 98 97
-             101:          12 Load 71(tin)
-                              Store 100(param) 101
-             103:           2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 100(param) 102(param)
-             104:  18(GS_OUT) Load 102(param)
-                              Store 99(ts) 104
+         66(tin):     13(ptr) Variable Function
+          94(ts):     19(ptr) Variable Function
+       95(param):     13(ptr) Variable Function
+       97(param):     19(ptr) Variable Function
+              71:     70(ptr) AccessChain 69(tin.pos) 26
+              72:    7(fvec4) Load 71
+              73:     32(ptr) AccessChain 66(tin) 26 26
+                              Store 73 72
+              79:     78(ptr) AccessChain 77(tin) 26 26
+              80:    8(fvec2) Load 79
+              81:     38(ptr) AccessChain 66(tin) 26 34
+                              Store 81 80
+              82:     70(ptr) AccessChain 69(tin.pos) 34
+              83:    7(fvec4) Load 82
+              84:     32(ptr) AccessChain 66(tin) 34 26
+                              Store 84 83
+              85:     78(ptr) AccessChain 77(tin) 34 26
+              86:    8(fvec2) Load 85
+              87:     38(ptr) AccessChain 66(tin) 34 34
+                              Store 87 86
+              88:     70(ptr) AccessChain 69(tin.pos) 44
+              89:    7(fvec4) Load 88
+              90:     32(ptr) AccessChain 66(tin) 44 26
+                              Store 90 89
+              91:     78(ptr) AccessChain 77(tin) 44 26
+              92:    8(fvec2) Load 91
+              93:     38(ptr) AccessChain 66(tin) 44 34
+                              Store 93 92
+              96:          12 Load 66(tin)
+                              Store 95(param) 96
+              98:           2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 95(param) 97(param)
+              99:  18(GS_OUT) Load 97(param)
+                              Store 94(ts) 99
                               Return
                               FunctionEnd
 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;):           2 Function None 20
@@ -558,20 +599,19 @@
                               Store 46 44
               49:     32(ptr) AccessChain 25(o) 26 26
               50:    7(fvec4) Load 49
-                              Store 48(ts_psIn_pos) 50
-              56:     38(ptr) AccessChain 25(o) 26 34
-              57:    8(fvec2) Load 56
-              59:     58(ptr) AccessChain 55(ts) 26 26
-                              Store 59 57
-              61:     60(ptr) AccessChain 25(o) 34
-              62:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 61
-              64:     63(ptr) AccessChain 55(ts) 34
-              65:          15 CompositeExtract 62 0
-              67:     66(ptr) AccessChain 64 26
-                              Store 67 65
-              68:     16(int) CompositeExtract 62 1
-              70:     69(ptr) AccessChain 64 34
-                              Store 70 68
+                              Store 48(ts.pos) 50
+              53:     38(ptr) AccessChain 25(o) 26 34
+              54:    8(fvec2) Load 53
+                              Store 52(ts.psIn.tc) 54
+              57:     41(ptr) AccessChain 25(o) 34 26 26
+              58:    6(float) Load 57
+                              Store 56(ts.contains_no_builtin_io.m0_array[0]) 58
+              60:     41(ptr) AccessChain 25(o) 34 26 34
+              61:    6(float) Load 60
+                              Store 59(ts.contains_no_builtin_io.m0_array[1]) 61
+              64:     45(ptr) AccessChain 25(o) 34 34
+              65:     16(int) Load 64
+                              Store 63(ts.contains_no_builtin_io.m1) 65
                               EmitVertex
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.struct.split.trivial.geom.out b/Test/baseResults/hlsl.struct.split.trivial.geom.out
index c552675..25f2fdf 100644
--- a/Test/baseResults/hlsl.struct.split.trivial.geom.out
+++ b/Test/baseResults/hlsl.struct.split.trivial.geom.out
@@ -37,7 +37,7 @@
 0:19            Sequence
 0:19              Sequence
 0:19                move second child to first child ( temp 4-component vector of float)
-0:?                   'ts_pos' ( out 4-component vector of float Position)
+0:?                   'ts.pos' ( out 4-component vector of float Position)
 0:19                  pos: direct index for structure ( temp 4-component vector of float)
 0:19                    'o' ( temp structure{ temp 4-component vector of float pos})
 0:19                    Constant:
@@ -59,7 +59,7 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              0 (const int)
 0:14        move second child to first child ( temp 4-component vector of float)
@@ -71,7 +71,7 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              1 (const int)
 0:14        move second child to first child ( temp 4-component vector of float)
@@ -83,15 +83,15 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              2 (const int)
 0:14      Function Call: @main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; ( temp void)
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos})
 0:?         'ts' ( temp structure{ temp 4-component vector of float pos})
 0:?   Linker Objects
-0:?     'i' (layout( location=0) in 3-element array of structure{})
-0:?     'ts' (layout( location=0) out structure{})
+0:?     'i.pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'ts.pos' ( out 4-component vector of float Position)
 
 
 Linked geometry stage:
@@ -135,7 +135,7 @@
 0:19            Sequence
 0:19              Sequence
 0:19                move second child to first child ( temp 4-component vector of float)
-0:?                   'ts_pos' ( out 4-component vector of float Position)
+0:?                   'ts.pos' ( out 4-component vector of float Position)
 0:19                  pos: direct index for structure ( temp 4-component vector of float)
 0:19                    'o' ( temp structure{ temp 4-component vector of float pos})
 0:19                    Constant:
@@ -157,7 +157,7 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              0 (const int)
 0:14        move second child to first child ( temp 4-component vector of float)
@@ -169,7 +169,7 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              1 (const int)
 0:14        move second child to first child ( temp 4-component vector of float)
@@ -181,24 +181,24 @@
 0:14            Constant:
 0:14              0 (const int)
 0:14          direct index ( in 4-component vector of float Position)
-0:?             'i_pos' ( in 3-element array of 4-component vector of float Position)
+0:?             'i.pos' ( in 3-element array of 4-component vector of float Position)
 0:14            Constant:
 0:14              2 (const int)
 0:14      Function Call: @main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; ( temp void)
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos})
 0:?         'ts' ( temp structure{ temp 4-component vector of float pos})
 0:?   Linker Objects
-0:?     'i' (layout( location=0) in 3-element array of structure{})
-0:?     'ts' (layout( location=0) out structure{})
+0:?     'i.pos' ( in 3-element array of 4-component vector of float Position)
+0:?     'ts.pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 74
+// Id's are bound by 67
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 40 49 70 73
+                              EntryPoint Geometry 4  "main" 40 49
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -214,20 +214,14 @@
                               Name 17  "ts"
                               Name 22  "x"
                               Name 33  "o"
-                              Name 40  "ts_pos"
+                              Name 40  "ts.pos"
                               Name 46  "i"
-                              Name 49  "i_pos"
+                              Name 49  "i.pos"
                               Name 61  "ts"
                               Name 62  "param"
                               Name 64  "param"
-                              Name 67  "PS_IN"
-                              Name 70  "i"
-                              Name 71  "GS_OUT"
-                              Name 73  "ts"
-                              Decorate 40(ts_pos) BuiltIn Position
-                              Decorate 49(i_pos) BuiltIn Position
-                              Decorate 70(i) Location 0
-                              Decorate 73(ts) Location 0
+                              Decorate 40(ts.pos) BuiltIn Position
+                              Decorate 49(i.pos) BuiltIn Position
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -247,35 +241,28 @@
               31:             TypeBool
               35:             TypePointer Function 7(fvec4)
               39:             TypePointer Output 7(fvec4)
-      40(ts_pos):     39(ptr) Variable Output
+      40(ts.pos):     39(ptr) Variable Output
               44:     20(int) Constant 1
               47:             TypeArray 7(fvec4) 10
               48:             TypePointer Input 47
-       49(i_pos):     48(ptr) Variable Input
+       49(i.pos):     48(ptr) Variable Input
               50:             TypePointer Input 7(fvec4)
               57:     20(int) Constant 2
-       67(PS_IN):             TypeStruct
-              68:             TypeArray 67(PS_IN) 10
-              69:             TypePointer Input 68
-           70(i):     69(ptr) Variable Input
-      71(GS_OUT):             TypeStruct
-              72:             TypePointer Output 71(GS_OUT)
-          73(ts):     72(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            46(i):     12(ptr) Variable Function
           61(ts):     14(ptr) Variable Function
        62(param):     12(ptr) Variable Function
        64(param):     14(ptr) Variable Function
-              51:     50(ptr) AccessChain 49(i_pos) 23
+              51:     50(ptr) AccessChain 49(i.pos) 23
               52:    7(fvec4) Load 51
               53:     35(ptr) AccessChain 46(i) 23 23
                               Store 53 52
-              54:     50(ptr) AccessChain 49(i_pos) 44
+              54:     50(ptr) AccessChain 49(i.pos) 44
               55:    7(fvec4) Load 54
               56:     35(ptr) AccessChain 46(i) 44 23
                               Store 56 55
-              58:     50(ptr) AccessChain 49(i_pos) 57
+              58:     50(ptr) AccessChain 49(i.pos) 57
               59:    7(fvec4) Load 58
               60:     35(ptr) AccessChain 46(i) 57 23
                               Store 60 59
@@ -309,7 +296,7 @@
                                 Store 38 37
               41:     35(ptr)   AccessChain 33(o) 23
               42:    7(fvec4)   Load 41
-                                Store 40(ts_pos) 42
+                                Store 40(ts.pos) 42
                                 EmitVertex
                                 Branch 27
               27:               Label
diff --git a/Test/baseResults/hlsl.struct.split.trivial.vert.out b/Test/baseResults/hlsl.struct.split.trivial.vert.out
index 05dcb26..6711312 100644
--- a/Test/baseResults/hlsl.struct.split.trivial.vert.out
+++ b/Test/baseResults/hlsl.struct.split.trivial.vert.out
@@ -28,13 +28,13 @@
 0:?             'vsin' ( temp structure{ temp 4-component vector of float Pos_in})
 0:16            Constant:
 0:16              0 (const int)
-0:?           'Pos_in' (layout( location=0) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=0) in 4-component vector of float)
 0:16      move second child to first child ( temp 4-component vector of float)
 0:?         'Pos_loose' ( temp 4-component vector of float)
 0:?         'Pos_loose' (layout( location=1) in 4-component vector of float)
 0:16      Sequence
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:16          Pos: direct index for structure ( temp 4-component vector of float)
 0:16            Function Call: @main(struct-VS_INPUT-vf41;vf4; ( temp structure{ temp 4-component vector of float Pos})
 0:?               'vsin' ( temp structure{ temp 4-component vector of float Pos_in})
@@ -42,8 +42,8 @@
 0:16            Constant:
 0:16              0 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Pos_in' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
+0:?     'vsin.Pos_in' (layout( location=0) in 4-component vector of float)
 0:?     'Pos_loose' (layout( location=1) in 4-component vector of float)
 
 
@@ -79,13 +79,13 @@
 0:?             'vsin' ( temp structure{ temp 4-component vector of float Pos_in})
 0:16            Constant:
 0:16              0 (const int)
-0:?           'Pos_in' (layout( location=0) in 4-component vector of float)
+0:?           'vsin.Pos_in' (layout( location=0) in 4-component vector of float)
 0:16      move second child to first child ( temp 4-component vector of float)
 0:?         'Pos_loose' ( temp 4-component vector of float)
 0:?         'Pos_loose' (layout( location=1) in 4-component vector of float)
 0:16      Sequence
 0:16        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_Pos' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 0:16          Pos: direct index for structure ( temp 4-component vector of float)
 0:16            Function Call: @main(struct-VS_INPUT-vf41;vf4; ( temp structure{ temp 4-component vector of float Pos})
 0:?               'vsin' ( temp structure{ temp 4-component vector of float Pos_in})
@@ -93,18 +93,18 @@
 0:16            Constant:
 0:16              0 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{})
-0:?     'Pos_in' (layout( location=0) in 4-component vector of float)
+0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
+0:?     'vsin.Pos_in' (layout( location=0) in 4-component vector of float)
 0:?     'Pos_loose' (layout( location=1) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 48
+// Id's are bound by 45
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 31 35 38 47
+                              EntryPoint Vertex 4  "main" 31 35 38
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "VS_INPUT"
@@ -116,18 +116,15 @@
                               Name 14  "Pos_loose"
                               Name 18  "vsout"
                               Name 29  "vsin"
-                              Name 31  "Pos_in"
+                              Name 31  "vsin.Pos_in"
                               Name 34  "Pos_loose"
                               Name 35  "Pos_loose"
-                              Name 38  "@entryPointOutput_Pos"
+                              Name 38  "@entryPointOutput.Pos"
                               Name 39  "param"
                               Name 41  "param"
-                              Name 45  "VS_OUTPUT"
-                              Name 47  "@entryPointOutput"
-                              Decorate 31(Pos_in) Location 0
+                              Decorate 31(vsin.Pos_in) Location 0
                               Decorate 35(Pos_loose) Location 1
-                              Decorate 38(@entryPointOutput_Pos) BuiltIn Position
-                              Decorate 47(@entryPointOutput) Location 0
+                              Decorate 38(@entryPointOutput.Pos) BuiltIn Position
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -141,20 +138,17 @@
               19:             TypeInt 32 1
               20:     19(int) Constant 0
               30:             TypePointer Input 7(fvec4)
-      31(Pos_in):     30(ptr) Variable Input
+ 31(vsin.Pos_in):     30(ptr) Variable Input
    35(Pos_loose):     30(ptr) Variable Input
               37:             TypePointer Output 7(fvec4)
-38(@entryPointOutput_Pos):     37(ptr) Variable Output
-   45(VS_OUTPUT):             TypeStruct
-              46:             TypePointer Output 45(VS_OUTPUT)
-47(@entryPointOutput):     46(ptr) Variable Output
+38(@entryPointOutput.Pos):     37(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
         29(vsin):      9(ptr) Variable Function
    34(Pos_loose):     10(ptr) Variable Function
        39(param):      9(ptr) Variable Function
        41(param):     10(ptr) Variable Function
-              32:    7(fvec4) Load 31(Pos_in)
+              32:    7(fvec4) Load 31(vsin.Pos_in)
               33:     10(ptr) AccessChain 29(vsin) 20
                               Store 33 32
               36:    7(fvec4) Load 35(Pos_loose)
@@ -165,7 +159,7 @@
                               Store 41(param) 42
               43:11(VS_OUTPUT) FunctionCall 15(@main(struct-VS_INPUT-vf41;vf4;) 39(param) 41(param)
               44:    7(fvec4) CompositeExtract 43 0
-                              Store 38(@entryPointOutput_Pos) 44
+                              Store 38(@entryPointOutput.Pos) 44
                               Return
                               FunctionEnd
 15(@main(struct-VS_INPUT-vf41;vf4;):11(VS_OUTPUT) Function None 12
diff --git a/Test/baseResults/hlsl.structIoFourWay.frag.out b/Test/baseResults/hlsl.structIoFourWay.frag.out
index cb26bb0..e0d9725 100755
--- a/Test/baseResults/hlsl.structIoFourWay.frag.out
+++ b/Test/baseResults/hlsl.structIoFourWay.frag.out
@@ -12,46 +12,71 @@
 0:15  Function Definition: main( ( temp void)
 0:15    Function Parameters: 
 0:?     Sequence
-0:15      move second child to first child ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
-0:?         't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
-0:?         't' (layout( location=0) in structure{ temp float f,  centroid temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15      Sequence
+0:15        move second child to first child ( temp float)
+0:15          f: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              0 (const int)
+0:?           't.f' (layout( location=0) in float)
+0:15        move second child to first child ( temp float)
+0:15          g: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              1 (const int)
+0:?           't.g' (layout( location=1) centroid in float)
+0:15        move second child to first child ( temp float)
+0:15          d: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              2 (const int)
+0:?           't.d' (layout( location=2) in float)
+0:15        move second child to first child ( temp 4-component vector of float)
+0:15          normal: direct index for structure ( temp 4-component vector of float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              3 (const int)
+0:?           't.normal' (layout( location=3) in 4-component vector of float)
 0:15      Sequence
 0:15        move second child to first child ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15          'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15          Function Call: @main(struct-T-f1-f1-f1-vf41; ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15        move second child to first child ( temp float)
-0:?           'f' (layout( location=0) out float)
+0:?           '@entryPointOutput.f' (layout( location=0) out float)
 0:15          f: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              0 (const int)
 0:15        move second child to first child ( temp float)
-0:?           'g' (layout( location=1) out float)
+0:?           '@entryPointOutput.g' (layout( location=1) out float)
 0:15          g: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              1 (const int)
 0:15        move second child to first child ( temp float)
-0:?           'd' ( out float FragDepth)
+0:?           '@entryPointOutput.d' ( out float FragDepth)
 0:15          d: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              2 (const int)
 0:15        move second child to first child ( temp 4-component vector of float)
-0:?           'normal' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float)
 0:15          normal: direct index for structure ( temp 4-component vector of float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              3 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} s})
-0:?     'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} t})
-0:?     'f' (layout( location=0) out float)
-0:?     'g' (layout( location=1) out float)
-0:?     'd' ( out float FragDepth)
-0:?     'normal' (layout( location=2) out 4-component vector of float)
-0:?     't' (layout( location=0) in structure{ temp float f,  centroid temp float g,  temp float d,  temp 4-component vector of float normal})
+0:?     'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{layout( offset=68) temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} t})
+0:?     '@entryPointOutput.d' ( out float FragDepth)
+0:?     '@entryPointOutput.f' (layout( location=0) out float)
+0:?     '@entryPointOutput.g' (layout( location=1) out float)
+0:?     '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float)
+0:?     't.f' (layout( location=0) in float)
+0:?     't.g' (layout( location=1) centroid in float)
+0:?     't.d' (layout( location=2) in float)
+0:?     't.normal' (layout( location=3) in 4-component vector of float)
 
 
 Linked fragment stage:
@@ -70,55 +95,80 @@
 0:15  Function Definition: main( ( temp void)
 0:15    Function Parameters: 
 0:?     Sequence
-0:15      move second child to first child ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
-0:?         't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
-0:?         't' (layout( location=0) in structure{ temp float f,  centroid temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15      Sequence
+0:15        move second child to first child ( temp float)
+0:15          f: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              0 (const int)
+0:?           't.f' (layout( location=0) in float)
+0:15        move second child to first child ( temp float)
+0:15          g: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              1 (const int)
+0:?           't.g' (layout( location=1) centroid in float)
+0:15        move second child to first child ( temp float)
+0:15          d: direct index for structure ( temp float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              2 (const int)
+0:?           't.d' (layout( location=2) in float)
+0:15        move second child to first child ( temp 4-component vector of float)
+0:15          normal: direct index for structure ( temp 4-component vector of float)
+0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
+0:15            Constant:
+0:15              3 (const int)
+0:?           't.normal' (layout( location=3) in 4-component vector of float)
 0:15      Sequence
 0:15        move second child to first child ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15          'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15          Function Call: @main(struct-T-f1-f1-f1-vf41; ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:?             't' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15        move second child to first child ( temp float)
-0:?           'f' (layout( location=0) out float)
+0:?           '@entryPointOutput.f' (layout( location=0) out float)
 0:15          f: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              0 (const int)
 0:15        move second child to first child ( temp float)
-0:?           'g' (layout( location=1) out float)
+0:?           '@entryPointOutput.g' (layout( location=1) out float)
 0:15          g: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              1 (const int)
 0:15        move second child to first child ( temp float)
-0:?           'd' ( out float FragDepth)
+0:?           '@entryPointOutput.d' ( out float FragDepth)
 0:15          d: direct index for structure ( temp float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              2 (const int)
 0:15        move second child to first child ( temp 4-component vector of float)
-0:?           'normal' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float)
 0:15          normal: direct index for structure ( temp 4-component vector of float)
 0:15            'flattenTemp' ( temp structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal})
 0:15            Constant:
 0:15              3 (const int)
 0:?   Linker Objects
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} s})
-0:?     'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} t})
-0:?     'f' (layout( location=0) out float)
-0:?     'g' (layout( location=1) out float)
-0:?     'd' ( out float FragDepth)
-0:?     'normal' (layout( location=2) out 4-component vector of float)
-0:?     't' (layout( location=0) in structure{ temp float f,  centroid temp float g,  temp float d,  temp 4-component vector of float normal})
+0:?     'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{layout( offset=68) temp float f,  temp float g,  temp float d,  temp 4-component vector of float normal} t})
+0:?     '@entryPointOutput.d' ( out float FragDepth)
+0:?     '@entryPointOutput.f' (layout( location=0) out float)
+0:?     '@entryPointOutput.g' (layout( location=1) out float)
+0:?     '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float)
+0:?     't.f' (layout( location=0) in float)
+0:?     't.g' (layout( location=1) centroid in float)
+0:?     't.d' (layout( location=2) in float)
+0:?     't.normal' (layout( location=3) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 64
+// Id's are bound by 65
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 21 43 46 49 53
+                              EntryPoint Fragment 4  "main" 22 27 31 36 45 48 51 55
                               ExecutionMode 4 OriginUpperLeft
                               ExecutionMode 4 DepthGreater
                               Source HLSL 500
@@ -132,54 +182,46 @@
                               Name 11  "t"
                               Name 14  "local"
                               Name 18  "t"
-                              Name 19  "T"
-                              MemberName 19(T) 0  "f"
-                              MemberName 19(T) 1  "g"
-                              MemberName 19(T) 2  "d"
-                              MemberName 19(T) 3  "normal"
-                              Name 21  "t"
-                              Name 38  "flattenTemp"
-                              Name 39  "param"
-                              Name 43  "f"
-                              Name 46  "g"
-                              Name 49  "d"
-                              Name 53  "normal"
-                              Name 56  "T"
-                              MemberName 56(T) 0  "f"
-                              MemberName 56(T) 1  "g"
-                              MemberName 56(T) 2  "d"
-                              MemberName 56(T) 3  "normal"
-                              Name 57  "$Global"
-                              MemberName 57($Global) 0  "s"
-                              Name 59  ""
-                              Name 60  "T"
-                              MemberName 60(T) 0  "f"
-                              MemberName 60(T) 1  "g"
-                              MemberName 60(T) 2  "d"
-                              MemberName 60(T) 3  "normal"
-                              Name 61  "buff"
-                              MemberName 61(buff) 0  "t"
-                              Name 63  ""
-                              MemberDecorate 19(T) 1 Centroid
-                              Decorate 21(t) Location 0
-                              Decorate 43(f) Location 0
-                              Decorate 46(g) Location 1
-                              Decorate 49(d) BuiltIn FragDepth
-                              Decorate 53(normal) Location 2
-                              MemberDecorate 56(T) 0 Offset 68
-                              MemberDecorate 56(T) 1 Offset 72
-                              MemberDecorate 56(T) 2 Offset 76
-                              MemberDecorate 56(T) 3 Offset 80
-                              MemberDecorate 57($Global) 0 Offset 0
-                              Decorate 57($Global) Block
-                              Decorate 59 DescriptorSet 0
-                              MemberDecorate 60(T) 0 Offset 0
-                              MemberDecorate 60(T) 1 Offset 4
-                              MemberDecorate 60(T) 2 Offset 8
-                              MemberDecorate 60(T) 3 Offset 16
-                              MemberDecorate 61(buff) 0 Offset 96
-                              Decorate 61(buff) Block
-                              Decorate 63 DescriptorSet 0
+                              Name 22  "t.f"
+                              Name 27  "t.g"
+                              Name 31  "t.d"
+                              Name 36  "t.normal"
+                              Name 40  "flattenTemp"
+                              Name 41  "param"
+                              Name 45  "@entryPointOutput.f"
+                              Name 48  "@entryPointOutput.g"
+                              Name 51  "@entryPointOutput.d"
+                              Name 55  "@entryPointOutput.normal"
+                              Name 58  "T"
+                              MemberName 58(T) 0  "f"
+                              MemberName 58(T) 1  "g"
+                              MemberName 58(T) 2  "d"
+                              MemberName 58(T) 3  "normal"
+                              Name 59  "$Global"
+                              MemberName 59($Global) 0  "s"
+                              Name 61  ""
+                              Name 62  "buff"
+                              MemberName 62(buff) 0  "t"
+                              Name 64  ""
+                              Decorate 22(t.f) Location 0
+                              Decorate 27(t.g) Centroid
+                              Decorate 27(t.g) Location 1
+                              Decorate 31(t.d) Location 2
+                              Decorate 36(t.normal) Location 3
+                              Decorate 45(@entryPointOutput.f) Location 0
+                              Decorate 48(@entryPointOutput.g) Location 1
+                              Decorate 51(@entryPointOutput.d) BuiltIn FragDepth
+                              Decorate 55(@entryPointOutput.normal) Location 2
+                              MemberDecorate 58(T) 0 Offset 68
+                              MemberDecorate 58(T) 1 Offset 72
+                              MemberDecorate 58(T) 2 Offset 76
+                              MemberDecorate 58(T) 3 Offset 80
+                              MemberDecorate 59($Global) 0 Offset 0
+                              Decorate 59($Global) Block
+                              Decorate 61 DescriptorSet 0
+                              MemberDecorate 62(buff) 0 Offset 96
+                              Decorate 62(buff) Block
+                              Decorate 64 DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -187,64 +229,65 @@
             8(T):             TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
                9:             TypePointer Function 8(T)
               10:             TypeFunction 8(T) 9(ptr)
-           19(T):             TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
-              20:             TypePointer Input 19(T)
-           21(t):     20(ptr) Variable Input
-              24:             TypeInt 32 1
-              25:     24(int) Constant 0
-              26:             TypePointer Function 6(float)
-              29:     24(int) Constant 1
-              32:     24(int) Constant 2
-              35:     24(int) Constant 3
-              36:             TypePointer Function 7(fvec4)
-              42:             TypePointer Output 6(float)
-           43(f):     42(ptr) Variable Output
-           46(g):     42(ptr) Variable Output
-           49(d):     42(ptr) Variable Output
-              52:             TypePointer Output 7(fvec4)
-      53(normal):     52(ptr) Variable Output
-           56(T):             TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
-     57($Global):             TypeStruct 56(T)
-              58:             TypePointer Uniform 57($Global)
-              59:     58(ptr) Variable Uniform
-           60(T):             TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
-        61(buff):             TypeStruct 60(T)
-              62:             TypePointer Uniform 61(buff)
-              63:     62(ptr) Variable Uniform
+              19:             TypeInt 32 1
+              20:     19(int) Constant 0
+              21:             TypePointer Input 6(float)
+         22(t.f):     21(ptr) Variable Input
+              24:             TypePointer Function 6(float)
+              26:     19(int) Constant 1
+         27(t.g):     21(ptr) Variable Input
+              30:     19(int) Constant 2
+         31(t.d):     21(ptr) Variable Input
+              34:     19(int) Constant 3
+              35:             TypePointer Input 7(fvec4)
+    36(t.normal):     35(ptr) Variable Input
+              38:             TypePointer Function 7(fvec4)
+              44:             TypePointer Output 6(float)
+45(@entryPointOutput.f):     44(ptr) Variable Output
+48(@entryPointOutput.g):     44(ptr) Variable Output
+51(@entryPointOutput.d):     44(ptr) Variable Output
+              54:             TypePointer Output 7(fvec4)
+55(@entryPointOutput.normal):     54(ptr) Variable Output
+           58(T):             TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
+     59($Global):             TypeStruct 58(T)
+              60:             TypePointer Uniform 59($Global)
+              61:     60(ptr) Variable Uniform
+        62(buff):             TypeStruct 58(T)
+              63:             TypePointer Uniform 62(buff)
+              64:     63(ptr) Variable Uniform
          4(main):           2 Function None 3
                5:             Label
            18(t):      9(ptr) Variable Function
- 38(flattenTemp):      9(ptr) Variable Function
-       39(param):      9(ptr) Variable Function
-              22:       19(T) Load 21(t)
-              23:    6(float) CompositeExtract 22 0
-              27:     26(ptr) AccessChain 18(t) 25
-                              Store 27 23
-              28:    6(float) CompositeExtract 22 1
-              30:     26(ptr) AccessChain 18(t) 29
-                              Store 30 28
-              31:    6(float) CompositeExtract 22 2
-              33:     26(ptr) AccessChain 18(t) 32
-                              Store 33 31
-              34:    7(fvec4) CompositeExtract 22 3
-              37:     36(ptr) AccessChain 18(t) 35
-                              Store 37 34
-              40:        8(T) Load 18(t)
-                              Store 39(param) 40
-              41:        8(T) FunctionCall 12(@main(struct-T-f1-f1-f1-vf41;) 39(param)
-                              Store 38(flattenTemp) 41
-              44:     26(ptr) AccessChain 38(flattenTemp) 25
-              45:    6(float) Load 44
-                              Store 43(f) 45
-              47:     26(ptr) AccessChain 38(flattenTemp) 29
-              48:    6(float) Load 47
-                              Store 46(g) 48
-              50:     26(ptr) AccessChain 38(flattenTemp) 32
-              51:    6(float) Load 50
-                              Store 49(d) 51
-              54:     36(ptr) AccessChain 38(flattenTemp) 35
-              55:    7(fvec4) Load 54
-                              Store 53(normal) 55
+ 40(flattenTemp):      9(ptr) Variable Function
+       41(param):      9(ptr) Variable Function
+              23:    6(float) Load 22(t.f)
+              25:     24(ptr) AccessChain 18(t) 20
+                              Store 25 23
+              28:    6(float) Load 27(t.g)
+              29:     24(ptr) AccessChain 18(t) 26
+                              Store 29 28
+              32:    6(float) Load 31(t.d)
+              33:     24(ptr) AccessChain 18(t) 30
+                              Store 33 32
+              37:    7(fvec4) Load 36(t.normal)
+              39:     38(ptr) AccessChain 18(t) 34
+                              Store 39 37
+              42:        8(T) Load 18(t)
+                              Store 41(param) 42
+              43:        8(T) FunctionCall 12(@main(struct-T-f1-f1-f1-vf41;) 41(param)
+                              Store 40(flattenTemp) 43
+              46:     24(ptr) AccessChain 40(flattenTemp) 20
+              47:    6(float) Load 46
+                              Store 45(@entryPointOutput.f) 47
+              49:     24(ptr) AccessChain 40(flattenTemp) 26
+              50:    6(float) Load 49
+                              Store 48(@entryPointOutput.g) 50
+              52:     24(ptr) AccessChain 40(flattenTemp) 30
+              53:    6(float) Load 52
+                              Store 51(@entryPointOutput.d) 53
+              56:     38(ptr) AccessChain 40(flattenTemp) 34
+              57:    7(fvec4) Load 56
+                              Store 55(@entryPointOutput.normal) 57
                               Return
                               FunctionEnd
 12(@main(struct-T-f1-f1-f1-vf41;):        8(T) Function None 10
diff --git a/Test/baseResults/hlsl.structarray.flatten.frag.out b/Test/baseResults/hlsl.structarray.flatten.frag.out
index d70af80..97ef7bb 100644
--- a/Test/baseResults/hlsl.structarray.flatten.frag.out
+++ b/Test/baseResults/hlsl.structarray.flatten.frag.out
@@ -15,8 +15,8 @@
 0:25          add ( temp 4-component vector of float)
 0:25            texture ( temp 4-component vector of float)
 0:25              Construct combined texture-sampler ( temp sampler1D)
-0:?                 'tex' ( uniform texture1D)
-0:?                 'samp' ( uniform sampler)
+0:?                 'g_texdata.tex' ( uniform texture1D)
+0:?                 'g_texdata.samp' ( uniform sampler)
 0:25              Constant:
 0:25                0.500000
 0:26            texture ( temp 4-component vector of float)
@@ -38,7 +38,7 @@
 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:23      Sequence
 0:23        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
 0:23          color: direct index for structure ( temp 4-component vector of float)
 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:23            Constant:
@@ -46,19 +46,34 @@
 0:?   Linker Objects
 0:?     'g_samp' ( uniform sampler)
 0:?     'g_tex' ( uniform texture1D)
+0:?     'g_texdata.samp' ( uniform sampler)
+0:?     'g_texdata.tex' ( uniform texture1D)
+0:?     'g_texdata.nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[0].samp' ( uniform sampler)
+0:?     'g_texdata_array[0].tex' ( uniform texture1D)
+0:?     'g_texdata_array[0].nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[1].samp' ( uniform sampler)
+0:?     'g_texdata_array[1].tex' ( uniform texture1D)
+0:?     'g_texdata_array[1].nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[2].samp' ( uniform sampler)
+0:?     'g_texdata_array[2].tex' ( uniform texture1D)
+0:?     'g_texdata_array[2].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[0].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[0].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[0].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[0].tex[1]' ( uniform texture1D)
+0:?     'g_texdata_array2[0].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[1].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[1].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[1].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[1].tex[1]' ( uniform texture1D)
+0:?     'g_texdata_array2[1].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[2].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[2].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[2].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[2].tex[1]' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     'g_texdata_array2[2].nonopaque_thing' ( uniform int)
+0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -80,8 +95,8 @@
 0:25          add ( temp 4-component vector of float)
 0:25            texture ( temp 4-component vector of float)
 0:25              Construct combined texture-sampler ( temp sampler1D)
-0:?                 'tex' ( uniform texture1D)
-0:?                 'samp' ( uniform sampler)
+0:?                 'g_texdata.tex' ( uniform texture1D)
+0:?                 'g_texdata.samp' ( uniform sampler)
 0:25              Constant:
 0:25                0.500000
 0:26            texture ( temp 4-component vector of float)
@@ -103,7 +118,7 @@
 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:23      Sequence
 0:23        move second child to first child ( temp 4-component vector of float)
-0:?           'color' (layout( location=0) out 4-component vector of float)
+0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
 0:23          color: direct index for structure ( temp 4-component vector of float)
 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
 0:23            Constant:
@@ -111,23 +126,38 @@
 0:?   Linker Objects
 0:?     'g_samp' ( uniform sampler)
 0:?     'g_tex' ( uniform texture1D)
+0:?     'g_texdata.samp' ( uniform sampler)
+0:?     'g_texdata.tex' ( uniform texture1D)
+0:?     'g_texdata.nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[0].samp' ( uniform sampler)
+0:?     'g_texdata_array[0].tex' ( uniform texture1D)
+0:?     'g_texdata_array[0].nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[1].samp' ( uniform sampler)
+0:?     'g_texdata_array[1].tex' ( uniform texture1D)
+0:?     'g_texdata_array[1].nonopaque_thing' ( uniform int)
+0:?     'g_texdata_array[2].samp' ( uniform sampler)
+0:?     'g_texdata_array[2].tex' ( uniform texture1D)
+0:?     'g_texdata_array[2].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[0].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[0].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[0].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[0].tex[1]' ( uniform texture1D)
+0:?     'g_texdata_array2[0].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[1].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[1].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[1].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[1].tex[1]' ( uniform texture1D)
+0:?     'g_texdata_array2[1].nonopaque_thing' ( uniform int)
 0:?     'g_texdata_array2[2].samp[0]' ( uniform sampler)
 0:?     'g_texdata_array2[2].samp[1]' ( uniform sampler)
 0:?     'g_texdata_array2[2].tex[0]' ( uniform texture1D)
 0:?     'g_texdata_array2[2].tex[1]' ( uniform texture1D)
-0:?     'color' (layout( location=0) out 4-component vector of float)
+0:?     'g_texdata_array2[2].nonopaque_thing' ( uniform int)
+0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 66
+// Id's are bound by 78
 
                               Capability Shader
                               Capability Sampled1D
@@ -141,46 +171,61 @@
                               MemberName 8(PS_OUTPUT) 0  "color"
                               Name 12  "@main(struct-PS_OUTPUT-vf41;"
                               Name 11  "ps_output"
-                              Name 18  "tex"
-                              Name 22  "samp"
+                              Name 18  "g_texdata.tex"
+                              Name 22  "g_texdata.samp"
                               Name 28  "g_texdata_array[1].tex"
                               Name 30  "g_texdata_array[1].samp"
                               Name 36  "g_texdata_array2[1].tex[0]"
                               Name 38  "g_texdata_array2[1].samp[0]"
                               Name 46  "ps_output"
                               Name 47  "param"
-                              Name 51  "color"
+                              Name 51  "ps_output.color"
                               Name 54  "g_samp"
                               Name 55  "g_tex"
-                              Name 56  "g_texdata_array2[0].samp[0]"
-                              Name 57  "g_texdata_array2[0].samp[1]"
-                              Name 58  "g_texdata_array2[0].tex[0]"
-                              Name 59  "g_texdata_array2[0].tex[1]"
-                              Name 60  "g_texdata_array2[1].samp[1]"
-                              Name 61  "g_texdata_array2[1].tex[1]"
-                              Name 62  "g_texdata_array2[2].samp[0]"
-                              Name 63  "g_texdata_array2[2].samp[1]"
-                              Name 64  "g_texdata_array2[2].tex[0]"
-                              Name 65  "g_texdata_array2[2].tex[1]"
-                              Decorate 18(tex) DescriptorSet 0
-                              Decorate 22(samp) DescriptorSet 0
+                              Name 57  "g_texdata.nonopaque_thing"
+                              Name 58  "g_texdata_array[0].samp"
+                              Name 59  "g_texdata_array[0].tex"
+                              Name 60  "g_texdata_array[0].nonopaque_thing"
+                              Name 61  "g_texdata_array[1].nonopaque_thing"
+                              Name 62  "g_texdata_array[2].samp"
+                              Name 63  "g_texdata_array[2].tex"
+                              Name 64  "g_texdata_array[2].nonopaque_thing"
+                              Name 65  "g_texdata_array2[0].samp[0]"
+                              Name 66  "g_texdata_array2[0].samp[1]"
+                              Name 67  "g_texdata_array2[0].tex[0]"
+                              Name 68  "g_texdata_array2[0].tex[1]"
+                              Name 69  "g_texdata_array2[0].nonopaque_thing"
+                              Name 70  "g_texdata_array2[1].samp[1]"
+                              Name 71  "g_texdata_array2[1].tex[1]"
+                              Name 72  "g_texdata_array2[1].nonopaque_thing"
+                              Name 73  "g_texdata_array2[2].samp[0]"
+                              Name 74  "g_texdata_array2[2].samp[1]"
+                              Name 75  "g_texdata_array2[2].tex[0]"
+                              Name 76  "g_texdata_array2[2].tex[1]"
+                              Name 77  "g_texdata_array2[2].nonopaque_thing"
+                              Decorate 18(g_texdata.tex) DescriptorSet 0
+                              Decorate 22(g_texdata.samp) DescriptorSet 0
                               Decorate 28(g_texdata_array[1].tex) DescriptorSet 0
                               Decorate 30(g_texdata_array[1].samp) DescriptorSet 0
                               Decorate 36(g_texdata_array2[1].tex[0]) DescriptorSet 0
                               Decorate 38(g_texdata_array2[1].samp[0]) DescriptorSet 0
-                              Decorate 51(color) Location 0
+                              Decorate 51(ps_output.color) Location 0
                               Decorate 54(g_samp) DescriptorSet 0
                               Decorate 55(g_tex) DescriptorSet 0
-                              Decorate 56(g_texdata_array2[0].samp[0]) DescriptorSet 0
-                              Decorate 57(g_texdata_array2[0].samp[1]) DescriptorSet 0
-                              Decorate 58(g_texdata_array2[0].tex[0]) DescriptorSet 0
-                              Decorate 59(g_texdata_array2[0].tex[1]) DescriptorSet 0
-                              Decorate 60(g_texdata_array2[1].samp[1]) DescriptorSet 0
-                              Decorate 61(g_texdata_array2[1].tex[1]) DescriptorSet 0
-                              Decorate 62(g_texdata_array2[2].samp[0]) DescriptorSet 0
-                              Decorate 63(g_texdata_array2[2].samp[1]) DescriptorSet 0
-                              Decorate 64(g_texdata_array2[2].tex[0]) DescriptorSet 0
-                              Decorate 65(g_texdata_array2[2].tex[1]) DescriptorSet 0
+                              Decorate 58(g_texdata_array[0].samp) DescriptorSet 0
+                              Decorate 59(g_texdata_array[0].tex) DescriptorSet 0
+                              Decorate 62(g_texdata_array[2].samp) DescriptorSet 0
+                              Decorate 63(g_texdata_array[2].tex) DescriptorSet 0
+                              Decorate 65(g_texdata_array2[0].samp[0]) DescriptorSet 0
+                              Decorate 66(g_texdata_array2[0].samp[1]) DescriptorSet 0
+                              Decorate 67(g_texdata_array2[0].tex[0]) DescriptorSet 0
+                              Decorate 68(g_texdata_array2[0].tex[1]) DescriptorSet 0
+                              Decorate 70(g_texdata_array2[1].samp[1]) DescriptorSet 0
+                              Decorate 71(g_texdata_array2[1].tex[1]) DescriptorSet 0
+                              Decorate 73(g_texdata_array2[2].samp[0]) DescriptorSet 0
+                              Decorate 74(g_texdata_array2[2].samp[1]) DescriptorSet 0
+                              Decorate 75(g_texdata_array2[2].tex[0]) DescriptorSet 0
+                              Decorate 76(g_texdata_array2[2].tex[1]) DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -192,10 +237,10 @@
               15:     14(int) Constant 0
               16:             TypeImage 6(float) 1D sampled format:Unknown
               17:             TypePointer UniformConstant 16
-         18(tex):     17(ptr) Variable UniformConstant
+18(g_texdata.tex):     17(ptr) Variable UniformConstant
               20:             TypeSampler
               21:             TypePointer UniformConstant 20
-        22(samp):     21(ptr) Variable UniformConstant
+22(g_texdata.samp):     21(ptr) Variable UniformConstant
               24:             TypeSampledImage 16
               26:    6(float) Constant 1056964608
 28(g_texdata_array[1].tex):     17(ptr) Variable UniformConstant
@@ -206,19 +251,31 @@
               41:    6(float) Constant 1050253722
               44:             TypePointer Function 7(fvec4)
               50:             TypePointer Output 7(fvec4)
-       51(color):     50(ptr) Variable Output
+51(ps_output.color):     50(ptr) Variable Output
       54(g_samp):     21(ptr) Variable UniformConstant
        55(g_tex):     17(ptr) Variable UniformConstant
-56(g_texdata_array2[0].samp[0]):     21(ptr) Variable UniformConstant
-57(g_texdata_array2[0].samp[1]):     21(ptr) Variable UniformConstant
-58(g_texdata_array2[0].tex[0]):     17(ptr) Variable UniformConstant
-59(g_texdata_array2[0].tex[1]):     17(ptr) Variable UniformConstant
-60(g_texdata_array2[1].samp[1]):     21(ptr) Variable UniformConstant
-61(g_texdata_array2[1].tex[1]):     17(ptr) Variable UniformConstant
-62(g_texdata_array2[2].samp[0]):     21(ptr) Variable UniformConstant
-63(g_texdata_array2[2].samp[1]):     21(ptr) Variable UniformConstant
-64(g_texdata_array2[2].tex[0]):     17(ptr) Variable UniformConstant
-65(g_texdata_array2[2].tex[1]):     17(ptr) Variable UniformConstant
+              56:             TypePointer UniformConstant 14(int)
+57(g_texdata.nonopaque_thing):     56(ptr) Variable UniformConstant
+58(g_texdata_array[0].samp):     21(ptr) Variable UniformConstant
+59(g_texdata_array[0].tex):     17(ptr) Variable UniformConstant
+60(g_texdata_array[0].nonopaque_thing):     56(ptr) Variable UniformConstant
+61(g_texdata_array[1].nonopaque_thing):     56(ptr) Variable UniformConstant
+62(g_texdata_array[2].samp):     21(ptr) Variable UniformConstant
+63(g_texdata_array[2].tex):     17(ptr) Variable UniformConstant
+64(g_texdata_array[2].nonopaque_thing):     56(ptr) Variable UniformConstant
+65(g_texdata_array2[0].samp[0]):     21(ptr) Variable UniformConstant
+66(g_texdata_array2[0].samp[1]):     21(ptr) Variable UniformConstant
+67(g_texdata_array2[0].tex[0]):     17(ptr) Variable UniformConstant
+68(g_texdata_array2[0].tex[1]):     17(ptr) Variable UniformConstant
+69(g_texdata_array2[0].nonopaque_thing):     56(ptr) Variable UniformConstant
+70(g_texdata_array2[1].samp[1]):     21(ptr) Variable UniformConstant
+71(g_texdata_array2[1].tex[1]):     17(ptr) Variable UniformConstant
+72(g_texdata_array2[1].nonopaque_thing):     56(ptr) Variable UniformConstant
+73(g_texdata_array2[2].samp[0]):     21(ptr) Variable UniformConstant
+74(g_texdata_array2[2].samp[1]):     21(ptr) Variable UniformConstant
+75(g_texdata_array2[2].tex[0]):     17(ptr) Variable UniformConstant
+76(g_texdata_array2[2].tex[1]):     17(ptr) Variable UniformConstant
+77(g_texdata_array2[2].nonopaque_thing):     56(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
    46(ps_output):      9(ptr) Variable Function
@@ -228,14 +285,14 @@
                               Store 46(ps_output) 49
               52:     44(ptr) AccessChain 46(ps_output) 15
               53:    7(fvec4) Load 52
-                              Store 51(color) 53
+                              Store 51(ps_output.color) 53
                               Return
                               FunctionEnd
 12(@main(struct-PS_OUTPUT-vf41;):           2 Function None 10
    11(ps_output):      9(ptr) FunctionParameter
               13:             Label
-              19:          16 Load 18(tex)
-              23:          20 Load 22(samp)
+              19:          16 Load 18(g_texdata.tex)
+              23:          20 Load 22(g_texdata.samp)
               25:          24 SampledImage 19 23
               27:    7(fvec4) ImageSampleImplicitLod 25 26
               29:          16 Load 28(g_texdata_array[1].tex)
diff --git a/Test/baseResults/hlsl.structarray.flatten.geom.out b/Test/baseResults/hlsl.structarray.flatten.geom.out
index 702f06e..c11857d 100644
--- a/Test/baseResults/hlsl.structarray.flatten.geom.out
+++ b/Test/baseResults/hlsl.structarray.flatten.geom.out
@@ -49,25 +49,19 @@
 0:22      Sequence
 0:22        Sequence
 0:22          move second child to first child ( temp 4-component vector of float)
-0:?             'outStream_position' ( out 4-component vector of float Position)
+0:?             'outStream.position' ( out 4-component vector of float Position)
 0:22            position: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                0 (const int)
 0:22          move second child to first child ( temp 4-component vector of float)
-0:22            color: direct index for structure ( temp 4-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                0 (const int)
+0:?             'outStream.color' (layout( location=0) out 4-component vector of float)
 0:22            color: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                1 (const int)
 0:22          move second child to first child ( temp 2-component vector of float)
-0:22            uv: direct index for structure ( temp 2-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                1 (const int)
+0:?             'outStream.uv' (layout( location=1) out 2-component vector of float)
 0:22            uv: direct index for structure ( temp 2-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
@@ -84,7 +78,9 @@
 0:?         'outStream' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:?   Linker Objects
 0:?     'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:?     'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
+0:?     'outStream.position' ( out 4-component vector of float Position)
+0:?     'outStream.color' (layout( location=0) out 4-component vector of float)
+0:?     'outStream.uv' (layout( location=1) out 2-component vector of float)
 
 
 Linked geometry stage:
@@ -140,25 +136,19 @@
 0:22      Sequence
 0:22        Sequence
 0:22          move second child to first child ( temp 4-component vector of float)
-0:?             'outStream_position' ( out 4-component vector of float Position)
+0:?             'outStream.position' ( out 4-component vector of float Position)
 0:22            position: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                0 (const int)
 0:22          move second child to first child ( temp 4-component vector of float)
-0:22            color: direct index for structure ( temp 4-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                0 (const int)
+0:?             'outStream.color' (layout( location=0) out 4-component vector of float)
 0:22            color: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                1 (const int)
 0:22          move second child to first child ( temp 2-component vector of float)
-0:22            uv: direct index for structure ( temp 2-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                1 (const int)
+0:?             'outStream.uv' (layout( location=1) out 2-component vector of float)
 0:22            uv: direct index for structure ( temp 2-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
@@ -175,16 +165,18 @@
 0:?         'outStream' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:?   Linker Objects
 0:?     'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:?     'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
+0:?     'outStream.position' ( out 4-component vector of float Position)
+0:?     'outStream.color' (layout( location=0) out 4-component vector of float)
+0:?     'outStream.uv' (layout( location=1) out 2-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 61
+// Id's are bound by 58
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 38 43 53
+                              EntryPoint Geometry 4  "main" 38 41 45 50
                               ExecutionMode 4 InputLines
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -203,19 +195,18 @@
                               Name 17  "vin"
                               Name 18  "outStream"
                               Name 21  "vout"
-                              Name 38  "outStream_position"
-                              Name 41  "PS_IN"
-                              MemberName 41(PS_IN) 0  "color"
-                              MemberName 41(PS_IN) 1  "uv"
-                              Name 43  "outStream"
-                              Name 51  "vin"
-                              Name 53  "vin"
-                              Name 55  "outStream"
-                              Name 56  "param"
-                              Name 58  "param"
-                              Decorate 38(outStream_position) BuiltIn Position
-                              Decorate 43(outStream) Location 0
-                              Decorate 53(vin) Location 0
+                              Name 38  "outStream.position"
+                              Name 41  "outStream.color"
+                              Name 45  "outStream.uv"
+                              Name 48  "vin"
+                              Name 50  "vin"
+                              Name 52  "outStream"
+                              Name 53  "param"
+                              Name 55  "param"
+                              Decorate 38(outStream.position) BuiltIn Position
+                              Decorate 41(outStream.color) Location 0
+                              Decorate 45(outStream.uv) Location 1
+                              Decorate 50(vin) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -236,26 +227,25 @@
               29:             TypePointer Function 8(fvec2)
               33:     22(int) Constant 0
               37:             TypePointer Output 7(fvec4)
-38(outStream_position):     37(ptr) Variable Output
-       41(PS_IN):             TypeStruct 7(fvec4) 8(fvec2)
-              42:             TypePointer Output 41(PS_IN)
-   43(outStream):     42(ptr) Variable Output
-              49:             TypePointer Output 8(fvec2)
-              52:             TypePointer Input 12
-         53(vin):     52(ptr) Variable Input
+38(outStream.position):     37(ptr) Variable Output
+41(outStream.color):     37(ptr) Variable Output
+              44:             TypePointer Output 8(fvec2)
+45(outStream.uv):     44(ptr) Variable Output
+              49:             TypePointer Input 12
+         50(vin):     49(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-         51(vin):     13(ptr) Variable Function
-   55(outStream):     15(ptr) Variable Function
-       56(param):     13(ptr) Variable Function
-       58(param):     15(ptr) Variable Function
-              54:          12 Load 53(vin)
-                              Store 51(vin) 54
-              57:          12 Load 51(vin)
-                              Store 56(param) 57
-              59:           2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 56(param) 58(param)
-              60:   14(PS_IN) Load 58(param)
-                              Store 55(outStream) 60
+         48(vin):     13(ptr) Variable Function
+   52(outStream):     15(ptr) Variable Function
+       53(param):     13(ptr) Variable Function
+       55(param):     15(ptr) Variable Function
+              51:          12 Load 50(vin)
+                              Store 48(vin) 51
+              54:          12 Load 48(vin)
+                              Store 53(param) 54
+              56:           2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 53(param) 55(param)
+              57:   14(PS_IN) Load 55(param)
+                              Store 52(outStream) 57
                               Return
                               FunctionEnd
 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;):           2 Function None 16
@@ -277,15 +267,13 @@
                               Store 36 35
               39:     24(ptr) AccessChain 21(vout) 33
               40:    7(fvec4) Load 39
-                              Store 38(outStream_position) 40
-              44:     24(ptr) AccessChain 21(vout) 23
-              45:    7(fvec4) Load 44
-              46:     37(ptr) AccessChain 43(outStream) 33
-                              Store 46 45
-              47:     29(ptr) AccessChain 21(vout) 28
-              48:    8(fvec2) Load 47
-              50:     49(ptr) AccessChain 43(outStream) 23
-                              Store 50 48
+                              Store 38(outStream.position) 40
+              42:     24(ptr) AccessChain 21(vout) 23
+              43:    7(fvec4) Load 42
+                              Store 41(outStream.color) 43
+              46:     29(ptr) AccessChain 21(vout) 28
+              47:    8(fvec2) Load 46
+                              Store 45(outStream.uv) 47
                               EmitVertex
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.structbuffer.fn2.comp.out b/Test/baseResults/hlsl.structbuffer.fn2.comp.out
index cb12ba5..efe5fe3 100644
--- a/Test/baseResults/hlsl.structbuffer.fn2.comp.out
+++ b/Test/baseResults/hlsl.structbuffer.fn2.comp.out
@@ -138,7 +138,7 @@
 // Id's are bound by 61
 
                               Capability Shader
-                              Capability SampledBuffer
+                              Capability ImageBuffer
                               Capability StorageImageExtendedFormats
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
diff --git a/Test/baseResults/hlsl.structin.vert.out b/Test/baseResults/hlsl.structin.vert.out
index ff6b37a..accd793 100755
--- a/Test/baseResults/hlsl.structin.vert.out
+++ b/Test/baseResults/hlsl.structin.vert.out
@@ -93,7 +93,7 @@
 0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
-0:?           'm[0]' (layout( location=1) in 4-component vector of float)
+0:?           'vi.m[0]' (layout( location=1) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          direct index ( temp 4-component vector of float)
 0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
@@ -102,19 +102,19 @@
 0:8                0 (const int)
 0:8            Constant:
 0:8              1 (const int)
-0:?           'm[1]' (layout( location=2) in 4-component vector of float)
+0:?           'vi.m[1]' (layout( location=2) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              1 (const int)
-0:?           'coord' (layout( location=3) in 4-component vector of float)
+0:?           'vi.coord' (layout( location=3) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
-0:?           'b' (layout( location=4) in 4-component vector of float)
+0:?           'vi.b' (layout( location=4) in 4-component vector of float)
 0:8      move second child to first child ( temp 4-component vector of float)
 0:?         'e' ( temp 4-component vector of float)
 0:?         'e' (layout( location=5) in 4-component vector of float)
@@ -125,39 +125,46 @@
 0:?             'd' ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:?             'e' ( temp 4-component vector of float)
-0:8        move second child to first child ( temp 2-element array of 4-component vector of float)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              0 (const int)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_coord' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
+0:8            Constant:
+0:8              1 (const int)
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.coord' ( out 4-component vector of float Position)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:8          b: direct index for structure ( smooth temp 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              1 (const int)
+0:?           '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:?     '@entryPointOutput.coord' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:?     '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:?     'd' (layout( location=0) in 4-component vector of float)
-0:?     'm[0]' (layout( location=1) in 4-component vector of float)
-0:?     'm[1]' (layout( location=2) in 4-component vector of float)
-0:?     'm[0]' (layout( location=1) in 4-component vector of float)
-0:?     'm[1]' (layout( location=2) in 4-component vector of float)
-0:?     'coord' (layout( location=3) in 4-component vector of float)
-0:?     'b' (layout( location=4) in 4-component vector of float)
+0:?     'vi.m[0]' (layout( location=1) in 4-component vector of float)
+0:?     'vi.m[1]' (layout( location=2) in 4-component vector of float)
+0:?     'vi.coord' (layout( location=3) in 4-component vector of float)
+0:?     'vi.b' (layout( location=4) in 4-component vector of float)
 0:?     'e' (layout( location=5) in 4-component vector of float)
 
 
@@ -258,7 +265,7 @@
 0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
-0:?           'm[0]' (layout( location=1) in 4-component vector of float)
+0:?           'vi.m[0]' (layout( location=1) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          direct index ( temp 4-component vector of float)
 0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
@@ -267,19 +274,19 @@
 0:8                0 (const int)
 0:8            Constant:
 0:8              1 (const int)
-0:?           'm[1]' (layout( location=2) in 4-component vector of float)
+0:?           'vi.m[1]' (layout( location=2) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              1 (const int)
-0:?           'coord' (layout( location=3) in 4-component vector of float)
+0:?           'vi.coord' (layout( location=3) in 4-component vector of float)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
-0:?           'b' (layout( location=4) in 4-component vector of float)
+0:?           'vi.b' (layout( location=4) in 4-component vector of float)
 0:8      move second child to first child ( temp 4-component vector of float)
 0:?         'e' ( temp 4-component vector of float)
 0:?         'e' (layout( location=5) in 4-component vector of float)
@@ -290,49 +297,56 @@
 0:?             'd' ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:?             'e' ( temp 4-component vector of float)
-0:8        move second child to first child ( temp 2-element array of 4-component vector of float)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              0 (const int)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:?           '@entryPointOutput_coord' ( out 4-component vector of float Position)
+0:?           '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
+0:8            Constant:
+0:8              1 (const int)
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.coord' ( out 4-component vector of float Position)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:8          b: direct index for structure ( smooth temp 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              1 (const int)
+0:?           '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:?     '@entryPointOutput.coord' ( out 4-component vector of float Position)
+0:?     '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:?     '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:?     'd' (layout( location=0) in 4-component vector of float)
-0:?     'm[0]' (layout( location=1) in 4-component vector of float)
-0:?     'm[1]' (layout( location=2) in 4-component vector of float)
-0:?     'm[0]' (layout( location=1) in 4-component vector of float)
-0:?     'm[1]' (layout( location=2) in 4-component vector of float)
-0:?     'coord' (layout( location=3) in 4-component vector of float)
-0:?     'b' (layout( location=4) in 4-component vector of float)
+0:?     'vi.m[0]' (layout( location=1) in 4-component vector of float)
+0:?     'vi.m[1]' (layout( location=2) in 4-component vector of float)
+0:?     'vi.coord' (layout( location=3) in 4-component vector of float)
+0:?     'vi.b' (layout( location=4) in 4-component vector of float)
 0:?     'e' (layout( location=5) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 96
+// Id's are bound by 94
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 55 58 61 64 67 71 83 90
+                              EntryPoint Vertex 4  "main" 55 58 61 64 67 71 82 85 88 91
                               Source HLSL 500
                               Name 4  "main"
                               Name 12  "VI"
@@ -347,29 +361,30 @@
                               Name 53  "d"
                               Name 55  "d"
                               Name 57  "vi"
-                              Name 58  "m[0]"
-                              Name 61  "m[1]"
-                              Name 64  "coord"
-                              Name 67  "b"
+                              Name 58  "vi.m[0]"
+                              Name 61  "vi.m[1]"
+                              Name 64  "vi.coord"
+                              Name 67  "vi.b"
                               Name 70  "e"
                               Name 71  "e"
                               Name 73  "flattenTemp"
                               Name 74  "param"
                               Name 76  "param"
                               Name 78  "param"
-                              Name 81  "VI"
-                              MemberName 81(VI) 0  "m"
-                              MemberName 81(VI) 1  "b"
-                              Name 83  "@entryPointOutput"
-                              Name 90  "@entryPointOutput_coord"
+                              Name 82  "@entryPointOutput.m[0]"
+                              Name 85  "@entryPointOutput.m[1]"
+                              Name 88  "@entryPointOutput.coord"
+                              Name 91  "@entryPointOutput.b"
                               Decorate 55(d) Location 0
-                              Decorate 58(m[0]) Location 1
-                              Decorate 61(m[1]) Location 2
-                              Decorate 64(coord) Location 3
-                              Decorate 67(b) Location 4
+                              Decorate 58(vi.m[0]) Location 1
+                              Decorate 61(vi.m[1]) Location 2
+                              Decorate 64(vi.coord) Location 3
+                              Decorate 67(vi.b) Location 4
                               Decorate 71(e) Location 5
-                              Decorate 83(@entryPointOutput) Location 0
-                              Decorate 90(@entryPointOutput_coord) BuiltIn Position
+                              Decorate 82(@entryPointOutput.m[0]) Location 0
+                              Decorate 85(@entryPointOutput.m[1]) Location 1
+                              Decorate 88(@entryPointOutput.coord) BuiltIn Position
+                              Decorate 91(@entryPointOutput.b) Location 2
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -395,18 +410,16 @@
               48:    7(fvec4) ConstantComposite 47 47 47 47
               54:             TypePointer Input 7(fvec4)
            55(d):     54(ptr) Variable Input
-        58(m[0]):     54(ptr) Variable Input
-        61(m[1]):     54(ptr) Variable Input
-       64(coord):     54(ptr) Variable Input
-           67(b):     54(ptr) Variable Input
+     58(vi.m[0]):     54(ptr) Variable Input
+     61(vi.m[1]):     54(ptr) Variable Input
+    64(vi.coord):     54(ptr) Variable Input
+        67(vi.b):     54(ptr) Variable Input
            71(e):     54(ptr) Variable Input
-          81(VI):             TypeStruct 11 7(fvec4)
-              82:             TypePointer Output 81(VI)
-83(@entryPointOutput):     82(ptr) Variable Output
-              84:             TypePointer Function 11
-              87:             TypePointer Output 11
-              89:             TypePointer Output 7(fvec4)
-90(@entryPointOutput_coord):     89(ptr) Variable Output
+              81:             TypePointer Output 7(fvec4)
+82(@entryPointOutput.m[0]):     81(ptr) Variable Output
+85(@entryPointOutput.m[1]):     81(ptr) Variable Output
+88(@entryPointOutput.coord):     81(ptr) Variable Output
+91(@entryPointOutput.b):     81(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            53(d):      8(ptr) Variable Function
@@ -418,16 +431,16 @@
        78(param):      8(ptr) Variable Function
               56:    7(fvec4) Load 55(d)
                               Store 53(d) 56
-              59:    7(fvec4) Load 58(m[0])
+              59:    7(fvec4) Load 58(vi.m[0])
               60:      8(ptr) AccessChain 57(vi) 23 23
                               Store 60 59
-              62:    7(fvec4) Load 61(m[1])
+              62:    7(fvec4) Load 61(vi.m[1])
               63:      8(ptr) AccessChain 57(vi) 23 24
                               Store 63 62
-              65:    7(fvec4) Load 64(coord)
+              65:    7(fvec4) Load 64(vi.coord)
               66:      8(ptr) AccessChain 57(vi) 24
                               Store 66 65
-              68:    7(fvec4) Load 67(b)
+              68:    7(fvec4) Load 67(vi.b)
               69:      8(ptr) AccessChain 57(vi) 22
                               Store 69 68
               72:    7(fvec4) Load 71(e)
@@ -440,17 +453,18 @@
                               Store 78(param) 79
               80:      12(VI) FunctionCall 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;) 74(param) 76(param) 78(param)
                               Store 73(flattenTemp) 80
-              85:     84(ptr) AccessChain 73(flattenTemp) 23
-              86:          11 Load 85
-              88:     87(ptr) AccessChain 83(@entryPointOutput) 23
-                              Store 88 86
-              91:      8(ptr) AccessChain 73(flattenTemp) 24
-              92:    7(fvec4) Load 91
-                              Store 90(@entryPointOutput_coord) 92
-              93:      8(ptr) AccessChain 73(flattenTemp) 22
-              94:    7(fvec4) Load 93
-              95:     89(ptr) AccessChain 83(@entryPointOutput) 24
-                              Store 95 94
+              83:      8(ptr) AccessChain 73(flattenTemp) 23 23
+              84:    7(fvec4) Load 83
+                              Store 82(@entryPointOutput.m[0]) 84
+              86:      8(ptr) AccessChain 73(flattenTemp) 23 24
+              87:    7(fvec4) Load 86
+                              Store 85(@entryPointOutput.m[1]) 87
+              89:      8(ptr) AccessChain 73(flattenTemp) 24
+              90:    7(fvec4) Load 89
+                              Store 88(@entryPointOutput.coord) 90
+              92:      8(ptr) AccessChain 73(flattenTemp) 22
+              93:    7(fvec4) Load 92
+                              Store 91(@entryPointOutput.b) 93
                               Return
                               FunctionEnd
 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;):      12(VI) Function None 14
diff --git a/Test/baseResults/hlsl.synthesizeInput.frag.out b/Test/baseResults/hlsl.synthesizeInput.frag.out
index aa77e25..ef58d39 100755
--- a/Test/baseResults/hlsl.synthesizeInput.frag.out
+++ b/Test/baseResults/hlsl.synthesizeInput.frag.out
@@ -24,16 +24,27 @@
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
-0:7      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:7      Sequence
+0:7        move second child to first child ( temp float)
+0:7          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:7        move second child to first child ( temp uint)
+0:7          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:7      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:7        Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float)
 0:?           'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 
 
 Linked fragment stage:
@@ -64,16 +75,27 @@
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
-0:7      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:7      Sequence
+0:7        move second child to first child ( temp float)
+0:7          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:7        move second child to first child ( temp uint)
+0:7          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:7      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:7        Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float)
 0:?           'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -82,7 +104,7 @@
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 33 40
+                              EntryPoint Fragment 4  "main" 32 36 40
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -92,14 +114,13 @@
                               Name 13  "@main(struct-PSInput-f1-u11;"
                               Name 12  "input"
                               Name 30  "input"
-                              Name 31  "PSInput"
-                              MemberName 31(PSInput) 0  "interp"
-                              MemberName 31(PSInput) 1  "no_interp"
-                              Name 33  "input"
+                              Name 32  "input.interp"
+                              Name 36  "input.no_interp"
                               Name 40  "@entryPointOutput"
                               Name 41  "param"
-                              MemberDecorate 31(PSInput) 1 Flat
-                              Decorate 33(input) Location 0
+                              Decorate 32(input.interp) Location 0
+                              Decorate 36(input.no_interp) Flat
+                              Decorate 36(input.no_interp) Location 1
                               Decorate 40(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -116,20 +137,20 @@
               22:             TypePointer Function 6(float)
               25:    6(float) Constant 0
               26:    6(float) Constant 1065353216
-     31(PSInput):             TypeStruct 6(float) 7(int)
-              32:             TypePointer Input 31(PSInput)
-       33(input):     32(ptr) Variable Input
+              31:             TypePointer Input 6(float)
+32(input.interp):     31(ptr) Variable Input
+              35:             TypePointer Input 7(int)
+36(input.no_interp):     35(ptr) Variable Input
               39:             TypePointer Output 10(fvec4)
 40(@entryPointOutput):     39(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
        30(input):      9(ptr) Variable Function
        41(param):      9(ptr) Variable Function
-              34: 31(PSInput) Load 33(input)
-              35:    6(float) CompositeExtract 34 0
-              36:     22(ptr) AccessChain 30(input) 21
-                              Store 36 35
-              37:      7(int) CompositeExtract 34 1
+              33:    6(float) Load 32(input.interp)
+              34:     22(ptr) AccessChain 30(input) 21
+                              Store 34 33
+              37:      7(int) Load 36(input.no_interp)
               38:     17(ptr) AccessChain 30(input) 16
                               Store 38 37
               42:  8(PSInput) Load 30(input)
diff --git a/Test/baseResults/hlsl.target.frag.out b/Test/baseResults/hlsl.target.frag.out
index a44931f..b80c284 100755
--- a/Test/baseResults/hlsl.target.frag.out
+++ b/Test/baseResults/hlsl.target.frag.out
@@ -25,9 +25,19 @@
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
-0:7      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:7      Sequence
+0:7        move second child to first child ( temp float)
+0:7          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:7        move second child to first child ( temp uint)
+0:7          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:7      Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void)
 0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?         'out1' ( temp 4-component vector of float)
@@ -39,7 +49,8 @@
 0:?         'out2' (layout( location=3) out 4-component vector of float)
 0:?         'out2' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'out1' (layout( location=1) out 4-component vector of float)
 0:?     'out2' (layout( location=3) out 4-component vector of float)
 
@@ -73,9 +84,19 @@
 0:7  Function Definition: main( ( temp void)
 0:7    Function Parameters: 
 0:?     Sequence
-0:7      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:7      Sequence
+0:7        move second child to first child ( temp float)
+0:7          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:7        move second child to first child ( temp uint)
+0:7          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:7            Constant:
+0:7              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:7      Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void)
 0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?         'out1' ( temp 4-component vector of float)
@@ -87,7 +108,8 @@
 0:?         'out2' (layout( location=3) out 4-component vector of float)
 0:?         'out2' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'out1' (layout( location=1) out 4-component vector of float)
 0:?     'out2' (layout( location=3) out 4-component vector of float)
 
@@ -98,7 +120,7 @@
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 25 46 48
+                              EntryPoint Fragment 4  "main" 26 32 46 48
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -110,10 +132,8 @@
                               Name 14  "out1"
                               Name 15  "out2"
                               Name 22  "input"
-                              Name 23  "PSInput"
-                              MemberName 23(PSInput) 0  "interp"
-                              MemberName 23(PSInput) 1  "no_interp"
-                              Name 25  "input"
+                              Name 26  "input.interp"
+                              Name 32  "input.no_interp"
                               Name 36  "out1"
                               Name 37  "out2"
                               Name 38  "param"
@@ -121,8 +141,9 @@
                               Name 41  "param"
                               Name 46  "out1"
                               Name 48  "out2"
-                              MemberDecorate 23(PSInput) 1 Flat
-                              Decorate 25(input) Location 0
+                              Decorate 26(input.interp) Location 0
+                              Decorate 32(input.no_interp) Flat
+                              Decorate 32(input.no_interp) Location 1
                               Decorate 46(out1) Location 1
                               Decorate 48(out2) Location 3
                2:             TypeVoid
@@ -138,13 +159,14 @@
               19:   10(fvec4) ConstantComposite 18 18 18 18
               20:    6(float) Constant 0
               21:   10(fvec4) ConstantComposite 20 20 20 20
-     23(PSInput):             TypeStruct 6(float) 7(int)
-              24:             TypePointer Input 23(PSInput)
-       25(input):     24(ptr) Variable Input
-              28:             TypeInt 32 1
-              29:     28(int) Constant 0
-              30:             TypePointer Function 6(float)
-              33:     28(int) Constant 1
+              23:             TypeInt 32 1
+              24:     23(int) Constant 0
+              25:             TypePointer Input 6(float)
+26(input.interp):     25(ptr) Variable Input
+              28:             TypePointer Function 6(float)
+              30:     23(int) Constant 1
+              31:             TypePointer Input 7(int)
+32(input.no_interp):     31(ptr) Variable Input
               34:             TypePointer Function 7(int)
               45:             TypePointer Output 10(fvec4)
         46(out1):     45(ptr) Variable Output
@@ -157,13 +179,12 @@
        38(param):      9(ptr) Variable Function
        40(param):     11(ptr) Variable Function
        41(param):     11(ptr) Variable Function
-              26: 23(PSInput) Load 25(input)
-              27:    6(float) CompositeExtract 26 0
-              31:     30(ptr) AccessChain 22(input) 29
-                              Store 31 27
-              32:      7(int) CompositeExtract 26 1
-              35:     34(ptr) AccessChain 22(input) 33
-                              Store 35 32
+              27:    6(float) Load 26(input.interp)
+              29:     28(ptr) AccessChain 22(input) 24
+                              Store 29 27
+              33:      7(int) Load 32(input.no_interp)
+              35:     34(ptr) AccessChain 22(input) 30
+                              Store 35 33
               39:  8(PSInput) Load 22(input)
                               Store 38(param) 39
               42:           2 FunctionCall 16(@main(struct-PSInput-f1-u11;vf4;vf4;) 38(param) 40(param) 41(param)
diff --git a/Test/baseResults/hlsl.targetStruct1.frag.out b/Test/baseResults/hlsl.targetStruct1.frag.out
index 48fee12..6cbd1b3 100755
--- a/Test/baseResults/hlsl.targetStruct1.frag.out
+++ b/Test/baseResults/hlsl.targetStruct1.frag.out
@@ -48,9 +48,19 @@
 0:12  Function Definition: main( ( temp void)
 0:12    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:12      Sequence
+0:12        move second child to first child ( temp float)
+0:12          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:12        move second child to first child ( temp uint)
+0:12          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:12      Sequence
 0:12        move second child to first child ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12          'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
@@ -58,13 +68,13 @@
 0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?             'po' ( temp 4-component vector of float)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o1' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
 0:12          o1: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
 0:12              0 (const int)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o2' (layout( location=1) out 4-component vector of float)
+0:?           '@entryPointOutput.o2' (layout( location=1) out 4-component vector of float)
 0:12          o2: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
@@ -73,9 +83,10 @@
 0:?         'po' (layout( location=0) out 4-component vector of float)
 0:?         'po' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'o1' (layout( location=2) out 4-component vector of float)
-0:?     'o2' (layout( location=1) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
+0:?     '@entryPointOutput.o2' (layout( location=1) out 4-component vector of float)
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'po' (layout( location=0) out 4-component vector of float)
 
 
@@ -131,9 +142,19 @@
 0:12  Function Definition: main( ( temp void)
 0:12    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:12      Sequence
+0:12        move second child to first child ( temp float)
+0:12          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:12        move second child to first child ( temp uint)
+0:12          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:12      Sequence
 0:12        move second child to first child ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12          'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
@@ -141,13 +162,13 @@
 0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?             'po' ( temp 4-component vector of float)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o1' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
 0:12          o1: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
 0:12              0 (const int)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o2' (layout( location=1) out 4-component vector of float)
+0:?           '@entryPointOutput.o2' (layout( location=1) out 4-component vector of float)
 0:12          o2: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
@@ -156,9 +177,10 @@
 0:?         'po' (layout( location=0) out 4-component vector of float)
 0:?         'po' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'o1' (layout( location=2) out 4-component vector of float)
-0:?     'o2' (layout( location=1) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
+0:?     '@entryPointOutput.o2' (layout( location=1) out 4-component vector of float)
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'po' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
@@ -168,7 +190,7 @@
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 43 57 60 63
+                              EntryPoint Fragment 4  "main" 42 46 57 60 63
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -183,21 +205,20 @@
                               Name 15  "po"
                               Name 19  "pso"
                               Name 40  "input"
-                              Name 41  "PSInput"
-                              MemberName 41(PSInput) 0  "interp"
-                              MemberName 41(PSInput) 1  "no_interp"
-                              Name 43  "input"
+                              Name 42  "input.interp"
+                              Name 46  "input.no_interp"
                               Name 49  "flattenTemp"
                               Name 50  "po"
                               Name 51  "param"
                               Name 53  "param"
-                              Name 57  "o1"
-                              Name 60  "o2"
+                              Name 57  "@entryPointOutput.o1"
+                              Name 60  "@entryPointOutput.o2"
                               Name 63  "po"
-                              MemberDecorate 41(PSInput) 1 Flat
-                              Decorate 43(input) Location 0
-                              Decorate 57(o1) Location 2
-                              Decorate 60(o2) Location 1
+                              Decorate 42(input.interp) Location 0
+                              Decorate 46(input.no_interp) Flat
+                              Decorate 46(input.no_interp) Location 1
+                              Decorate 57(@entryPointOutput.o1) Location 2
+                              Decorate 60(@entryPointOutput.o2) Location 1
                               Decorate 63(po) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -219,12 +240,13 @@
               31:    6(float) Constant 1065353216
               34:   10(fvec4) ConstantComposite 31 31 31 31
               36:   10(fvec4) ConstantComposite 30 30 30 30
-     41(PSInput):             TypeStruct 6(float) 7(int)
-              42:             TypePointer Input 41(PSInput)
-       43(input):     42(ptr) Variable Input
+              41:             TypePointer Input 6(float)
+42(input.interp):     41(ptr) Variable Input
+              45:             TypePointer Input 7(int)
+46(input.no_interp):     45(ptr) Variable Input
               56:             TypePointer Output 10(fvec4)
-          57(o1):     56(ptr) Variable Output
-          60(o2):     56(ptr) Variable Output
+57(@entryPointOutput.o1):     56(ptr) Variable Output
+60(@entryPointOutput.o2):     56(ptr) Variable Output
           63(po):     56(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
@@ -233,11 +255,10 @@
           50(po):     11(ptr) Variable Function
        51(param):      9(ptr) Variable Function
        53(param):     11(ptr) Variable Function
-              44: 41(PSInput) Load 43(input)
-              45:    6(float) CompositeExtract 44 0
-              46:     27(ptr) AccessChain 40(input) 21
-                              Store 46 45
-              47:      7(int) CompositeExtract 44 1
+              43:    6(float) Load 42(input.interp)
+              44:     27(ptr) AccessChain 40(input) 21
+                              Store 44 43
+              47:      7(int) Load 46(input.no_interp)
               48:     23(ptr) AccessChain 40(input) 22
                               Store 48 47
               52:  8(PSInput) Load 40(input)
@@ -248,10 +269,10 @@
                               Store 49(flattenTemp) 54
               58:     11(ptr) AccessChain 49(flattenTemp) 21
               59:   10(fvec4) Load 58
-                              Store 57(o1) 59
+                              Store 57(@entryPointOutput.o1) 59
               61:     11(ptr) AccessChain 49(flattenTemp) 22
               62:   10(fvec4) Load 61
-                              Store 60(o2) 62
+                              Store 60(@entryPointOutput.o2) 62
               64:   10(fvec4) Load 50(po)
                               Store 63(po) 64
                               Return
diff --git a/Test/baseResults/hlsl.targetStruct2.frag.out b/Test/baseResults/hlsl.targetStruct2.frag.out
index 0c2ac50..1fe2751 100755
--- a/Test/baseResults/hlsl.targetStruct2.frag.out
+++ b/Test/baseResults/hlsl.targetStruct2.frag.out
@@ -48,9 +48,19 @@
 0:12  Function Definition: main( ( temp void)
 0:12    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:12      Sequence
+0:12        move second child to first child ( temp float)
+0:12          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:12        move second child to first child ( temp uint)
+0:12          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:12      Sequence
 0:12        move second child to first child ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12          'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
@@ -58,13 +68,13 @@
 0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?             'po' ( temp 4-component vector of float)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o1' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
 0:12          o1: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
 0:12              0 (const int)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o2' (layout( location=3) out 4-component vector of float)
+0:?           '@entryPointOutput.o2' (layout( location=3) out 4-component vector of float)
 0:12          o2: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
@@ -73,9 +83,10 @@
 0:?         'po' (layout( location=0) out 4-component vector of float)
 0:?         'po' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'o1' (layout( location=2) out 4-component vector of float)
-0:?     'o2' (layout( location=3) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
+0:?     '@entryPointOutput.o2' (layout( location=3) out 4-component vector of float)
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'po' (layout( location=0) out 4-component vector of float)
 
 
@@ -131,9 +142,19 @@
 0:12  Function Definition: main( ( temp void)
 0:12    Function Parameters: 
 0:?     Sequence
-0:12      move second child to first child ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' ( temp structure{ temp float interp,  temp uint no_interp})
-0:?         'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:12      Sequence
+0:12        move second child to first child ( temp float)
+0:12          interp: direct index for structure ( temp float)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              0 (const int)
+0:?           'input.interp' (layout( location=0) in float)
+0:12        move second child to first child ( temp uint)
+0:12          no_interp: direct index for structure ( temp uint)
+0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
+0:12            Constant:
+0:12              1 (const int)
+0:?           'input.no_interp' (layout( location=1) flat in uint)
 0:12      Sequence
 0:12        move second child to first child ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12          'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
@@ -141,13 +162,13 @@
 0:?             'input' ( temp structure{ temp float interp,  temp uint no_interp})
 0:?             'po' ( temp 4-component vector of float)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o1' (layout( location=2) out 4-component vector of float)
+0:?           '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
 0:12          o1: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
 0:12              0 (const int)
 0:12        move second child to first child ( temp 4-component vector of float)
-0:?           'o2' (layout( location=3) out 4-component vector of float)
+0:?           '@entryPointOutput.o2' (layout( location=3) out 4-component vector of float)
 0:12          o2: direct index for structure ( temp 4-component vector of float)
 0:12            'flattenTemp' ( temp structure{ temp 4-component vector of float o1,  temp 4-component vector of float o2})
 0:12            Constant:
@@ -156,9 +177,10 @@
 0:?         'po' (layout( location=0) out 4-component vector of float)
 0:?         'po' ( temp 4-component vector of float)
 0:?   Linker Objects
-0:?     'o1' (layout( location=2) out 4-component vector of float)
-0:?     'o2' (layout( location=3) out 4-component vector of float)
-0:?     'input' (layout( location=0) in structure{ temp float interp,  flat temp uint no_interp})
+0:?     '@entryPointOutput.o1' (layout( location=2) out 4-component vector of float)
+0:?     '@entryPointOutput.o2' (layout( location=3) out 4-component vector of float)
+0:?     'input.interp' (layout( location=0) in float)
+0:?     'input.no_interp' (layout( location=1) flat in uint)
 0:?     'po' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
@@ -168,7 +190,7 @@
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 43 57 60 63
+                              EntryPoint Fragment 4  "main" 42 46 57 60 63
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -183,21 +205,20 @@
                               Name 15  "po"
                               Name 19  "pso"
                               Name 40  "input"
-                              Name 41  "PSInput"
-                              MemberName 41(PSInput) 0  "interp"
-                              MemberName 41(PSInput) 1  "no_interp"
-                              Name 43  "input"
+                              Name 42  "input.interp"
+                              Name 46  "input.no_interp"
                               Name 49  "flattenTemp"
                               Name 50  "po"
                               Name 51  "param"
                               Name 53  "param"
-                              Name 57  "o1"
-                              Name 60  "o2"
+                              Name 57  "@entryPointOutput.o1"
+                              Name 60  "@entryPointOutput.o2"
                               Name 63  "po"
-                              MemberDecorate 41(PSInput) 1 Flat
-                              Decorate 43(input) Location 0
-                              Decorate 57(o1) Location 2
-                              Decorate 60(o2) Location 3
+                              Decorate 42(input.interp) Location 0
+                              Decorate 46(input.no_interp) Flat
+                              Decorate 46(input.no_interp) Location 1
+                              Decorate 57(@entryPointOutput.o1) Location 2
+                              Decorate 60(@entryPointOutput.o2) Location 3
                               Decorate 63(po) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -219,12 +240,13 @@
               31:    6(float) Constant 1065353216
               34:   10(fvec4) ConstantComposite 31 31 31 31
               36:   10(fvec4) ConstantComposite 30 30 30 30
-     41(PSInput):             TypeStruct 6(float) 7(int)
-              42:             TypePointer Input 41(PSInput)
-       43(input):     42(ptr) Variable Input
+              41:             TypePointer Input 6(float)
+42(input.interp):     41(ptr) Variable Input
+              45:             TypePointer Input 7(int)
+46(input.no_interp):     45(ptr) Variable Input
               56:             TypePointer Output 10(fvec4)
-          57(o1):     56(ptr) Variable Output
-          60(o2):     56(ptr) Variable Output
+57(@entryPointOutput.o1):     56(ptr) Variable Output
+60(@entryPointOutput.o2):     56(ptr) Variable Output
           63(po):     56(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
@@ -233,11 +255,10 @@
           50(po):     11(ptr) Variable Function
        51(param):      9(ptr) Variable Function
        53(param):     11(ptr) Variable Function
-              44: 41(PSInput) Load 43(input)
-              45:    6(float) CompositeExtract 44 0
-              46:     27(ptr) AccessChain 40(input) 21
-                              Store 46 45
-              47:      7(int) CompositeExtract 44 1
+              43:    6(float) Load 42(input.interp)
+              44:     27(ptr) AccessChain 40(input) 21
+                              Store 44 43
+              47:      7(int) Load 46(input.no_interp)
               48:     23(ptr) AccessChain 40(input) 22
                               Store 48 47
               52:  8(PSInput) Load 40(input)
@@ -248,10 +269,10 @@
                               Store 49(flattenTemp) 54
               58:     11(ptr) AccessChain 49(flattenTemp) 21
               59:   10(fvec4) Load 58
-                              Store 57(o1) 59
+                              Store 57(@entryPointOutput.o1) 59
               61:     11(ptr) AccessChain 49(flattenTemp) 22
               62:   10(fvec4) Load 61
-                              Store 60(o2) 62
+                              Store 60(@entryPointOutput.o2) 62
               64:   10(fvec4) Load 50(po)
                               Store 63(po) 64
                               Return
diff --git a/Test/baseResults/hlsl.texture.struct.frag.out b/Test/baseResults/hlsl.texture.struct.frag.out
new file mode 100644
index 0000000..09af451
--- /dev/null
+++ b/Test/baseResults/hlsl.texture.struct.frag.out
@@ -0,0 +1,1184 @@
+hlsl.texture.struct.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:38  Function Definition: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38    Function Parameters: 
+0:38      't1' ( in texture2D)
+0:?     Sequence
+0:38      Branch: Return with expression
+0:38        Sequence
+0:38          move second child to first child ( temp 4-component vector of float)
+0:38            '@sampleResultShadow' ( temp 4-component vector of float)
+0:?             texture ( temp 4-component vector of float)
+0:38              Construct combined texture-sampler ( temp sampler2D)
+0:38                't1' ( in texture2D)
+0:38                'g_sSamp' ( uniform sampler)
+0:?               Constant:
+0:?                 0.600000
+0:?                 0.610000
+0:38          move second child to first child ( temp float)
+0:38            c0: direct index for structure ( temp float)
+0:38              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38              Constant:
+0:38                0 (const uint)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                0 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            direct index ( temp float)
+0:38              c1: direct index for structure ( temp 2-component vector of float)
+0:38                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38                Constant:
+0:38                  1 (const uint)
+0:38              Constant:
+0:38                0 (const int)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                1 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            direct index ( temp float)
+0:38              c1: direct index for structure ( temp 2-component vector of float)
+0:38                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38                Constant:
+0:38                  1 (const uint)
+0:38              Constant:
+0:38                1 (const int)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                2 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            c2: direct index for structure ( temp float)
+0:38              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38              Constant:
+0:38                2 (const uint)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                3 (const uint)
+0:38          '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:39  Function Definition: fn1(t2-tx-struct1-1; ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39    Function Parameters: 
+0:39      't2' ( in texture2D)
+0:?     Sequence
+0:39      Branch: Return with expression
+0:39        Sequence
+0:39          move second child to first child ( temp 4-component vector of float)
+0:39            '@sampleResultShadow' ( temp 4-component vector of float)
+0:?             texture ( temp 4-component vector of float)
+0:39              Construct combined texture-sampler ( temp sampler2D)
+0:39                't2' ( in texture2D)
+0:39                'g_sSamp' ( uniform sampler)
+0:?               Constant:
+0:?                 0.600000
+0:?                 0.610000
+0:39          move second child to first child ( temp float)
+0:39            c0: direct index for structure ( temp float)
+0:39              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39              Constant:
+0:39                0 (const uint)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                0 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                0 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                1 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                1 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                2 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                2 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                3 (const uint)
+0:39          '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:42  Function Definition: @main( ( temp 4-component vector of float)
+0:42    Function Parameters: 
+0:?     Sequence
+0:43      Sequence
+0:43        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43          's1' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43          Sequence
+0:43            move second child to first child ( temp 4-component vector of float)
+0:43              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:43                Construct combined texture-sampler ( temp sampler2D)
+0:43                  'g_tTex2s1' ( uniform texture2D)
+0:43                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.100000
+0:?                   0.110000
+0:43            move second child to first child ( temp float)
+0:43              c0: direct index for structure ( temp float)
+0:43                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                Constant:
+0:43                  0 (const uint)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  0 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              direct index ( temp float)
+0:43                c1: direct index for structure ( temp 2-component vector of float)
+0:43                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                  Constant:
+0:43                    1 (const uint)
+0:43                Constant:
+0:43                  0 (const int)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  1 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              direct index ( temp float)
+0:43                c1: direct index for structure ( temp 2-component vector of float)
+0:43                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                  Constant:
+0:43                    1 (const uint)
+0:43                Constant:
+0:43                  1 (const int)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  2 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              c2: direct index for structure ( temp float)
+0:43                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                Constant:
+0:43                  2 (const uint)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  3 (const uint)
+0:43            '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:44      Sequence
+0:44        move second child to first child ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44          's2' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44          Sequence
+0:44            move second child to first child ( temp 4-component vector of float)
+0:44              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:44                Construct combined texture-sampler ( temp sampler2D)
+0:44                  'g_tTex2s2' ( uniform texture2D)
+0:44                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.200000
+0:?                   0.210000
+0:44            move second child to first child ( temp float)
+0:44              c0: direct index for structure ( temp float)
+0:44                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                Constant:
+0:44                  0 (const uint)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  0 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  0 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  1 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  1 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  2 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  2 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  3 (const uint)
+0:44            '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:45      Sequence
+0:45        move second child to first child ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45          's3' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45          Sequence
+0:45            move second child to first child ( temp 4-component vector of float)
+0:45              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:45                Construct combined texture-sampler ( temp sampler2D)
+0:45                  'g_tTex2s3' ( uniform texture2D)
+0:45                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.300000
+0:?                   0.310000
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c0: direct index for structure ( temp 2-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    0 (const uint)
+0:45                Constant:
+0:45                  0 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  0 (const uint)
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c0: direct index for structure ( temp 2-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    0 (const uint)
+0:45                Constant:
+0:45                  1 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  1 (const uint)
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c1: direct index for structure ( temp 1-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    1 (const uint)
+0:45                Constant:
+0:45                  0 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  2 (const uint)
+0:45            '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:46      Sequence
+0:46        move second child to first child ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46          's4' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46          Sequence
+0:46            move second child to first child ( temp 4-component vector of int)
+0:46              '@sampleResultShadow' ( temp 4-component vector of int)
+0:?               texture ( temp 4-component vector of int)
+0:46                Construct combined texture-sampler ( temp isampler2D)
+0:46                  'g_tTex2s4' ( uniform itexture2D)
+0:46                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.400000
+0:?                   0.410000
+0:46            move second child to first child ( temp int)
+0:46              c0: direct index for structure ( temp int)
+0:46                '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                Constant:
+0:46                  0 (const uint)
+0:46              direct index ( temp int)
+0:46                '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                Constant:
+0:46                  0 (const uint)
+0:46            move second child to first child ( temp float)
+0:46              direct index ( temp float)
+0:46                c1: direct index for structure ( temp 2-component vector of int)
+0:46                  '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46                Constant:
+0:46                  0 (const int)
+0:46              Convert int to float ( temp float)
+0:46                direct index ( temp int)
+0:46                  '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46            move second child to first child ( temp float)
+0:46              direct index ( temp float)
+0:46                c1: direct index for structure ( temp 2-component vector of int)
+0:46                  '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46                Constant:
+0:46                  1 (const int)
+0:46              Convert int to float ( temp float)
+0:46                direct index ( temp int)
+0:46                  '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                  Constant:
+0:46                    2 (const uint)
+0:46            move second child to first child ( temp int)
+0:46              c2: direct index for structure ( temp int)
+0:46                '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                Constant:
+0:46                  2 (const uint)
+0:46              direct index ( temp int)
+0:46                '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                Constant:
+0:46                  3 (const uint)
+0:46            '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:47      Sequence
+0:47        move second child to first child ( temp structure{ temp uint c0,  temp uint c1})
+0:47          's5' ( temp structure{ temp uint c0,  temp uint c1})
+0:47          Sequence
+0:47            move second child to first child ( temp 4-component vector of uint)
+0:47              '@sampleResultShadow' ( temp 4-component vector of uint)
+0:?               texture ( temp 4-component vector of uint)
+0:47                Construct combined texture-sampler ( temp usampler2D)
+0:47                  'g_tTex2s5' ( uniform utexture2D)
+0:47                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.500000
+0:?                   0.510000
+0:47            move second child to first child ( temp uint)
+0:47              c0: direct index for structure ( temp uint)
+0:47                '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:47                Constant:
+0:47                  0 (const uint)
+0:47              direct index ( temp uint)
+0:47                '@sampleResultShadow' ( temp 4-component vector of uint)
+0:47                Constant:
+0:47                  0 (const uint)
+0:47            move second child to first child ( temp uint)
+0:47              c1: direct index for structure ( temp uint)
+0:47                '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:47                Constant:
+0:47                  1 (const uint)
+0:47              direct index ( temp uint)
+0:47                '@sampleResultShadow' ( temp 4-component vector of uint)
+0:47                Constant:
+0:47                  1 (const uint)
+0:47            '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:49      Sequence
+0:49        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49          'r0' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49          Function Call: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49            'g_tTex2s1' ( uniform texture2D)
+0:50      Sequence
+0:50        move second child to first child ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50          'r1' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50          Function Call: fn1(t2-tx-struct1-1; ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50            'g_tTex2s2' ( uniform texture2D)
+0:51      Sequence
+0:51        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51          'r2' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51          Function Call: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51            'g_tTex2s1a' ( uniform texture2D)
+0:53      Branch: Return with expression
+0:53        Constant:
+0:53          0.000000
+0:53          0.000000
+0:53          0.000000
+0:53          0.000000
+0:42  Function Definition: main( ( temp void)
+0:42    Function Parameters: 
+0:?     Sequence
+0:42      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:42        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'g_sSamp' ( uniform sampler)
+0:?     'g_tTex2s1' ( uniform texture2D)
+0:?     'g_tTex2s2' ( uniform texture2D)
+0:?     'g_tTex2s3' ( uniform texture2D)
+0:?     'g_tTex2s4' ( uniform itexture2D)
+0:?     'g_tTex2s5' ( uniform utexture2D)
+0:?     'g_tTex2s1a' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:38  Function Definition: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38    Function Parameters: 
+0:38      't1' ( in texture2D)
+0:?     Sequence
+0:38      Branch: Return with expression
+0:38        Sequence
+0:38          move second child to first child ( temp 4-component vector of float)
+0:38            '@sampleResultShadow' ( temp 4-component vector of float)
+0:?             texture ( temp 4-component vector of float)
+0:38              Construct combined texture-sampler ( temp sampler2D)
+0:38                't1' ( in texture2D)
+0:38                'g_sSamp' ( uniform sampler)
+0:?               Constant:
+0:?                 0.600000
+0:?                 0.610000
+0:38          move second child to first child ( temp float)
+0:38            c0: direct index for structure ( temp float)
+0:38              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38              Constant:
+0:38                0 (const uint)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                0 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            direct index ( temp float)
+0:38              c1: direct index for structure ( temp 2-component vector of float)
+0:38                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38                Constant:
+0:38                  1 (const uint)
+0:38              Constant:
+0:38                0 (const int)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                1 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            direct index ( temp float)
+0:38              c1: direct index for structure ( temp 2-component vector of float)
+0:38                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38                Constant:
+0:38                  1 (const uint)
+0:38              Constant:
+0:38                1 (const int)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                2 (const uint)
+0:38          move second child to first child ( temp float)
+0:38            c2: direct index for structure ( temp float)
+0:38              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:38              Constant:
+0:38                2 (const uint)
+0:38            direct index ( temp float)
+0:38              '@sampleResultShadow' ( temp 4-component vector of float)
+0:38              Constant:
+0:38                3 (const uint)
+0:38          '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:39  Function Definition: fn1(t2-tx-struct1-1; ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39    Function Parameters: 
+0:39      't2' ( in texture2D)
+0:?     Sequence
+0:39      Branch: Return with expression
+0:39        Sequence
+0:39          move second child to first child ( temp 4-component vector of float)
+0:39            '@sampleResultShadow' ( temp 4-component vector of float)
+0:?             texture ( temp 4-component vector of float)
+0:39              Construct combined texture-sampler ( temp sampler2D)
+0:39                't2' ( in texture2D)
+0:39                'g_sSamp' ( uniform sampler)
+0:?               Constant:
+0:?                 0.600000
+0:?                 0.610000
+0:39          move second child to first child ( temp float)
+0:39            c0: direct index for structure ( temp float)
+0:39              '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39              Constant:
+0:39                0 (const uint)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                0 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                0 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                1 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                1 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                2 (const uint)
+0:39          move second child to first child ( temp float)
+0:39            direct index ( temp float)
+0:39              c1: direct index for structure ( temp 3-component vector of float)
+0:39                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:39                Constant:
+0:39                  1 (const uint)
+0:39              Constant:
+0:39                2 (const int)
+0:39            direct index ( temp float)
+0:39              '@sampleResultShadow' ( temp 4-component vector of float)
+0:39              Constant:
+0:39                3 (const uint)
+0:39          '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:42  Function Definition: @main( ( temp 4-component vector of float)
+0:42    Function Parameters: 
+0:?     Sequence
+0:43      Sequence
+0:43        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43          's1' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43          Sequence
+0:43            move second child to first child ( temp 4-component vector of float)
+0:43              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:43                Construct combined texture-sampler ( temp sampler2D)
+0:43                  'g_tTex2s1' ( uniform texture2D)
+0:43                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.100000
+0:?                   0.110000
+0:43            move second child to first child ( temp float)
+0:43              c0: direct index for structure ( temp float)
+0:43                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                Constant:
+0:43                  0 (const uint)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  0 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              direct index ( temp float)
+0:43                c1: direct index for structure ( temp 2-component vector of float)
+0:43                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                  Constant:
+0:43                    1 (const uint)
+0:43                Constant:
+0:43                  0 (const int)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  1 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              direct index ( temp float)
+0:43                c1: direct index for structure ( temp 2-component vector of float)
+0:43                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                  Constant:
+0:43                    1 (const uint)
+0:43                Constant:
+0:43                  1 (const int)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  2 (const uint)
+0:43            move second child to first child ( temp float)
+0:43              c2: direct index for structure ( temp float)
+0:43                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:43                Constant:
+0:43                  2 (const uint)
+0:43              direct index ( temp float)
+0:43                '@sampleResultShadow' ( temp 4-component vector of float)
+0:43                Constant:
+0:43                  3 (const uint)
+0:43            '@sampleStructTemp' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:44      Sequence
+0:44        move second child to first child ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44          's2' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44          Sequence
+0:44            move second child to first child ( temp 4-component vector of float)
+0:44              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:44                Construct combined texture-sampler ( temp sampler2D)
+0:44                  'g_tTex2s2' ( uniform texture2D)
+0:44                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.200000
+0:?                   0.210000
+0:44            move second child to first child ( temp float)
+0:44              c0: direct index for structure ( temp float)
+0:44                '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                Constant:
+0:44                  0 (const uint)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  0 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  0 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  1 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  1 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  2 (const uint)
+0:44            move second child to first child ( temp float)
+0:44              direct index ( temp float)
+0:44                c1: direct index for structure ( temp 3-component vector of float)
+0:44                  '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:44                  Constant:
+0:44                    1 (const uint)
+0:44                Constant:
+0:44                  2 (const int)
+0:44              direct index ( temp float)
+0:44                '@sampleResultShadow' ( temp 4-component vector of float)
+0:44                Constant:
+0:44                  3 (const uint)
+0:44            '@sampleStructTemp' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:45      Sequence
+0:45        move second child to first child ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45          's3' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45          Sequence
+0:45            move second child to first child ( temp 4-component vector of float)
+0:45              '@sampleResultShadow' ( temp 4-component vector of float)
+0:?               texture ( temp 4-component vector of float)
+0:45                Construct combined texture-sampler ( temp sampler2D)
+0:45                  'g_tTex2s3' ( uniform texture2D)
+0:45                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.300000
+0:?                   0.310000
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c0: direct index for structure ( temp 2-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    0 (const uint)
+0:45                Constant:
+0:45                  0 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  0 (const uint)
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c0: direct index for structure ( temp 2-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    0 (const uint)
+0:45                Constant:
+0:45                  1 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  1 (const uint)
+0:45            move second child to first child ( temp float)
+0:45              direct index ( temp float)
+0:45                c1: direct index for structure ( temp 1-component vector of float)
+0:45                  '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:45                  Constant:
+0:45                    1 (const uint)
+0:45                Constant:
+0:45                  0 (const int)
+0:45              direct index ( temp float)
+0:45                '@sampleResultShadow' ( temp 4-component vector of float)
+0:45                Constant:
+0:45                  2 (const uint)
+0:45            '@sampleStructTemp' ( temp structure{ temp 2-component vector of float c0,  temp 1-component vector of float c1})
+0:46      Sequence
+0:46        move second child to first child ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46          's4' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46          Sequence
+0:46            move second child to first child ( temp 4-component vector of int)
+0:46              '@sampleResultShadow' ( temp 4-component vector of int)
+0:?               texture ( temp 4-component vector of int)
+0:46                Construct combined texture-sampler ( temp isampler2D)
+0:46                  'g_tTex2s4' ( uniform itexture2D)
+0:46                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.400000
+0:?                   0.410000
+0:46            move second child to first child ( temp int)
+0:46              c0: direct index for structure ( temp int)
+0:46                '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                Constant:
+0:46                  0 (const uint)
+0:46              direct index ( temp int)
+0:46                '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                Constant:
+0:46                  0 (const uint)
+0:46            move second child to first child ( temp float)
+0:46              direct index ( temp float)
+0:46                c1: direct index for structure ( temp 2-component vector of int)
+0:46                  '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46                Constant:
+0:46                  0 (const int)
+0:46              Convert int to float ( temp float)
+0:46                direct index ( temp int)
+0:46                  '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46            move second child to first child ( temp float)
+0:46              direct index ( temp float)
+0:46                c1: direct index for structure ( temp 2-component vector of int)
+0:46                  '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                  Constant:
+0:46                    1 (const uint)
+0:46                Constant:
+0:46                  1 (const int)
+0:46              Convert int to float ( temp float)
+0:46                direct index ( temp int)
+0:46                  '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                  Constant:
+0:46                    2 (const uint)
+0:46            move second child to first child ( temp int)
+0:46              c2: direct index for structure ( temp int)
+0:46                '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:46                Constant:
+0:46                  2 (const uint)
+0:46              direct index ( temp int)
+0:46                '@sampleResultShadow' ( temp 4-component vector of int)
+0:46                Constant:
+0:46                  3 (const uint)
+0:46            '@sampleStructTemp' ( temp structure{ temp int c0,  temp 2-component vector of int c1,  temp int c2})
+0:47      Sequence
+0:47        move second child to first child ( temp structure{ temp uint c0,  temp uint c1})
+0:47          's5' ( temp structure{ temp uint c0,  temp uint c1})
+0:47          Sequence
+0:47            move second child to first child ( temp 4-component vector of uint)
+0:47              '@sampleResultShadow' ( temp 4-component vector of uint)
+0:?               texture ( temp 4-component vector of uint)
+0:47                Construct combined texture-sampler ( temp usampler2D)
+0:47                  'g_tTex2s5' ( uniform utexture2D)
+0:47                  'g_sSamp' ( uniform sampler)
+0:?                 Constant:
+0:?                   0.500000
+0:?                   0.510000
+0:47            move second child to first child ( temp uint)
+0:47              c0: direct index for structure ( temp uint)
+0:47                '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:47                Constant:
+0:47                  0 (const uint)
+0:47              direct index ( temp uint)
+0:47                '@sampleResultShadow' ( temp 4-component vector of uint)
+0:47                Constant:
+0:47                  0 (const uint)
+0:47            move second child to first child ( temp uint)
+0:47              c1: direct index for structure ( temp uint)
+0:47                '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:47                Constant:
+0:47                  1 (const uint)
+0:47              direct index ( temp uint)
+0:47                '@sampleResultShadow' ( temp 4-component vector of uint)
+0:47                Constant:
+0:47                  1 (const uint)
+0:47            '@sampleStructTemp' ( temp structure{ temp uint c0,  temp uint c1})
+0:49      Sequence
+0:49        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49          'r0' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49          Function Call: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:49            'g_tTex2s1' ( uniform texture2D)
+0:50      Sequence
+0:50        move second child to first child ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50          'r1' ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50          Function Call: fn1(t2-tx-struct1-1; ( temp structure{ temp float c0,  temp 3-component vector of float c1})
+0:50            'g_tTex2s2' ( uniform texture2D)
+0:51      Sequence
+0:51        move second child to first child ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51          'r2' ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51          Function Call: fn1(t2-tx-struct0-1; ( temp structure{ temp float c0,  temp 2-component vector of float c1,  temp float c2})
+0:51            'g_tTex2s1a' ( uniform texture2D)
+0:53      Branch: Return with expression
+0:53        Constant:
+0:53          0.000000
+0:53          0.000000
+0:53          0.000000
+0:53          0.000000
+0:42  Function Definition: main( ( temp void)
+0:42    Function Parameters: 
+0:?     Sequence
+0:42      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:42        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'g_sSamp' ( uniform sampler)
+0:?     'g_tTex2s1' ( uniform texture2D)
+0:?     'g_tTex2s2' ( uniform texture2D)
+0:?     'g_tTex2s3' ( uniform texture2D)
+0:?     'g_tTex2s4' ( uniform itexture2D)
+0:?     'g_tTex2s5' ( uniform utexture2D)
+0:?     'g_tTex2s1a' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 233
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 231
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 10  "s1_t"
+                              MemberName 10(s1_t) 0  "c0"
+                              MemberName 10(s1_t) 1  "c1"
+                              MemberName 10(s1_t) 2  "c2"
+                              Name 13  "fn1(t2-tx-struct0-1;"
+                              Name 12  "t1"
+                              Name 16  "s2_t"
+                              MemberName 16(s2_t) 0  "c0"
+                              MemberName 16(s2_t) 1  "c1"
+                              Name 19  "fn1(t2-tx-struct1-1;"
+                              Name 18  "t2"
+                              Name 23  "@main("
+                              Name 26  "@sampleResultShadow"
+                              Name 30  "g_sSamp"
+                              Name 39  "@sampleStructTemp"
+                              Name 65  "@sampleResultShadow"
+                              Name 71  "@sampleStructTemp"
+                              Name 87  "s1"
+                              Name 88  "@sampleResultShadow"
+                              Name 89  "g_tTex2s1"
+                              Name 97  "@sampleStructTemp"
+                              Name 111  "s2"
+                              Name 112  "@sampleResultShadow"
+                              Name 113  "g_tTex2s2"
+                              Name 121  "@sampleStructTemp"
+                              Name 135  "s3_t"
+                              MemberName 135(s3_t) 0  "c0"
+                              MemberName 135(s3_t) 1  "c1"
+                              Name 137  "s3"
+                              Name 138  "@sampleResultShadow"
+                              Name 139  "g_tTex2s3"
+                              Name 147  "@sampleStructTemp"
+                              Name 159  "s4_t"
+                              MemberName 159(s4_t) 0  "c0"
+                              MemberName 159(s4_t) 1  "c1"
+                              MemberName 159(s4_t) 2  "c2"
+                              Name 161  "s4"
+                              Name 164  "@sampleResultShadow"
+                              Name 167  "g_tTex2s4"
+                              Name 176  "@sampleStructTemp"
+                              Name 193  "s5_t"
+                              MemberName 193(s5_t) 0  "c0"
+                              MemberName 193(s5_t) 1  "c1"
+                              Name 195  "s5"
+                              Name 198  "@sampleResultShadow"
+                              Name 201  "g_tTex2s5"
+                              Name 210  "@sampleStructTemp"
+                              Name 219  "r0"
+                              Name 221  "r1"
+                              Name 223  "r2"
+                              Name 224  "g_tTex2s1a"
+                              Name 231  "@entryPointOutput"
+                              Decorate 30(g_sSamp) DescriptorSet 0
+                              Decorate 89(g_tTex2s1) DescriptorSet 0
+                              Decorate 113(g_tTex2s2) DescriptorSet 0
+                              Decorate 139(g_tTex2s3) DescriptorSet 0
+                              Decorate 167(g_tTex2s4) DescriptorSet 0
+                              Decorate 201(g_tTex2s5) DescriptorSet 0
+                              Decorate 224(g_tTex2s1a) DescriptorSet 0
+                              Decorate 231(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeImage 6(float) 2D sampled format:Unknown
+               8:             TypePointer UniformConstant 7
+               9:             TypeVector 6(float) 2
+        10(s1_t):             TypeStruct 6(float) 9(fvec2) 6(float)
+              11:             TypeFunction 10(s1_t) 8(ptr)
+              15:             TypeVector 6(float) 3
+        16(s2_t):             TypeStruct 6(float) 15(fvec3)
+              17:             TypeFunction 16(s2_t) 8(ptr)
+              21:             TypeVector 6(float) 4
+              22:             TypeFunction 21(fvec4)
+              25:             TypePointer Function 21(fvec4)
+              28:             TypeSampler
+              29:             TypePointer UniformConstant 28
+     30(g_sSamp):     29(ptr) Variable UniformConstant
+              32:             TypeSampledImage 7
+              34:    6(float) Constant 1058642330
+              35:    6(float) Constant 1058810102
+              36:    9(fvec2) ConstantComposite 34 35
+              38:             TypePointer Function 10(s1_t)
+              40:             TypeInt 32 1
+              41:     40(int) Constant 0
+              42:             TypeInt 32 0
+              43:     42(int) Constant 0
+              44:             TypePointer Function 6(float)
+              48:     40(int) Constant 1
+              49:     42(int) Constant 1
+              53:     42(int) Constant 2
+              57:     40(int) Constant 2
+              58:     42(int) Constant 3
+              70:             TypePointer Function 16(s2_t)
+   89(g_tTex2s1):      8(ptr) Variable UniformConstant
+              93:    6(float) Constant 1036831949
+              94:    6(float) Constant 1038174126
+              95:    9(fvec2) ConstantComposite 93 94
+  113(g_tTex2s2):      8(ptr) Variable UniformConstant
+             117:    6(float) Constant 1045220557
+             118:    6(float) Constant 1045891645
+             119:    9(fvec2) ConstantComposite 117 118
+       135(s3_t):             TypeStruct 9(fvec2) 6(float)
+             136:             TypePointer Function 135(s3_t)
+  139(g_tTex2s3):      8(ptr) Variable UniformConstant
+             143:    6(float) Constant 1050253722
+             144:    6(float) Constant 1050589266
+             145:    9(fvec2) ConstantComposite 143 144
+             158:             TypeVector 40(int) 2
+       159(s4_t):             TypeStruct 40(int) 158(ivec2) 40(int)
+             160:             TypePointer Function 159(s4_t)
+             162:             TypeVector 40(int) 4
+             163:             TypePointer Function 162(ivec4)
+             165:             TypeImage 40(int) 2D sampled format:Unknown
+             166:             TypePointer UniformConstant 165
+  167(g_tTex2s4):    166(ptr) Variable UniformConstant
+             170:             TypeSampledImage 165
+             172:    6(float) Constant 1053609165
+             173:    6(float) Constant 1053944709
+             174:    9(fvec2) ConstantComposite 172 173
+             177:             TypePointer Function 40(int)
+       193(s5_t):             TypeStruct 42(int) 42(int)
+             194:             TypePointer Function 193(s5_t)
+             196:             TypeVector 42(int) 4
+             197:             TypePointer Function 196(ivec4)
+             199:             TypeImage 42(int) 2D sampled format:Unknown
+             200:             TypePointer UniformConstant 199
+  201(g_tTex2s5):    200(ptr) Variable UniformConstant
+             204:             TypeSampledImage 199
+             206:    6(float) Constant 1056964608
+             207:    6(float) Constant 1057132380
+             208:    9(fvec2) ConstantComposite 206 207
+             211:             TypePointer Function 42(int)
+ 224(g_tTex2s1a):      8(ptr) Variable UniformConstant
+             226:    6(float) Constant 0
+             227:   21(fvec4) ConstantComposite 226 226 226 226
+             230:             TypePointer Output 21(fvec4)
+231(@entryPointOutput):    230(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+             232:   21(fvec4) FunctionCall 23(@main()
+                              Store 231(@entryPointOutput) 232
+                              Return
+                              FunctionEnd
+13(fn1(t2-tx-struct0-1;):    10(s1_t) Function None 11
+          12(t1):      8(ptr) FunctionParameter
+              14:             Label
+26(@sampleResultShadow):     25(ptr) Variable Function
+39(@sampleStructTemp):     38(ptr) Variable Function
+              27:           7 Load 12(t1)
+              31:          28 Load 30(g_sSamp)
+              33:          32 SampledImage 27 31
+              37:   21(fvec4) ImageSampleImplicitLod 33 36
+                              Store 26(@sampleResultShadow) 37
+              45:     44(ptr) AccessChain 26(@sampleResultShadow) 43
+              46:    6(float) Load 45
+              47:     44(ptr) AccessChain 39(@sampleStructTemp) 41
+                              Store 47 46
+              50:     44(ptr) AccessChain 26(@sampleResultShadow) 49
+              51:    6(float) Load 50
+              52:     44(ptr) AccessChain 39(@sampleStructTemp) 48 43
+                              Store 52 51
+              54:     44(ptr) AccessChain 26(@sampleResultShadow) 53
+              55:    6(float) Load 54
+              56:     44(ptr) AccessChain 39(@sampleStructTemp) 48 49
+                              Store 56 55
+              59:     44(ptr) AccessChain 26(@sampleResultShadow) 58
+              60:    6(float) Load 59
+              61:     44(ptr) AccessChain 39(@sampleStructTemp) 57
+                              Store 61 60
+              62:    10(s1_t) Load 39(@sampleStructTemp)
+                              ReturnValue 62
+                              FunctionEnd
+19(fn1(t2-tx-struct1-1;):    16(s2_t) Function None 17
+          18(t2):      8(ptr) FunctionParameter
+              20:             Label
+65(@sampleResultShadow):     25(ptr) Variable Function
+71(@sampleStructTemp):     70(ptr) Variable Function
+              66:           7 Load 18(t2)
+              67:          28 Load 30(g_sSamp)
+              68:          32 SampledImage 66 67
+              69:   21(fvec4) ImageSampleImplicitLod 68 36
+                              Store 65(@sampleResultShadow) 69
+              72:     44(ptr) AccessChain 65(@sampleResultShadow) 43
+              73:    6(float) Load 72
+              74:     44(ptr) AccessChain 71(@sampleStructTemp) 41
+                              Store 74 73
+              75:     44(ptr) AccessChain 65(@sampleResultShadow) 49
+              76:    6(float) Load 75
+              77:     44(ptr) AccessChain 71(@sampleStructTemp) 48 43
+                              Store 77 76
+              78:     44(ptr) AccessChain 65(@sampleResultShadow) 53
+              79:    6(float) Load 78
+              80:     44(ptr) AccessChain 71(@sampleStructTemp) 48 49
+                              Store 80 79
+              81:     44(ptr) AccessChain 65(@sampleResultShadow) 58
+              82:    6(float) Load 81
+              83:     44(ptr) AccessChain 71(@sampleStructTemp) 48 53
+                              Store 83 82
+              84:    16(s2_t) Load 71(@sampleStructTemp)
+                              ReturnValue 84
+                              FunctionEnd
+      23(@main():   21(fvec4) Function None 22
+              24:             Label
+          87(s1):     38(ptr) Variable Function
+88(@sampleResultShadow):     25(ptr) Variable Function
+97(@sampleStructTemp):     38(ptr) Variable Function
+         111(s2):     70(ptr) Variable Function
+112(@sampleResultShadow):     25(ptr) Variable Function
+121(@sampleStructTemp):     70(ptr) Variable Function
+         137(s3):    136(ptr) Variable Function
+138(@sampleResultShadow):     25(ptr) Variable Function
+147(@sampleStructTemp):    136(ptr) Variable Function
+         161(s4):    160(ptr) Variable Function
+164(@sampleResultShadow):    163(ptr) Variable Function
+176(@sampleStructTemp):    160(ptr) Variable Function
+         195(s5):    194(ptr) Variable Function
+198(@sampleResultShadow):    197(ptr) Variable Function
+210(@sampleStructTemp):    194(ptr) Variable Function
+         219(r0):     38(ptr) Variable Function
+         221(r1):     70(ptr) Variable Function
+         223(r2):     38(ptr) Variable Function
+              90:           7 Load 89(g_tTex2s1)
+              91:          28 Load 30(g_sSamp)
+              92:          32 SampledImage 90 91
+              96:   21(fvec4) ImageSampleImplicitLod 92 95
+                              Store 88(@sampleResultShadow) 96
+              98:     44(ptr) AccessChain 88(@sampleResultShadow) 43
+              99:    6(float) Load 98
+             100:     44(ptr) AccessChain 97(@sampleStructTemp) 41
+                              Store 100 99
+             101:     44(ptr) AccessChain 88(@sampleResultShadow) 49
+             102:    6(float) Load 101
+             103:     44(ptr) AccessChain 97(@sampleStructTemp) 48 43
+                              Store 103 102
+             104:     44(ptr) AccessChain 88(@sampleResultShadow) 53
+             105:    6(float) Load 104
+             106:     44(ptr) AccessChain 97(@sampleStructTemp) 48 49
+                              Store 106 105
+             107:     44(ptr) AccessChain 88(@sampleResultShadow) 58
+             108:    6(float) Load 107
+             109:     44(ptr) AccessChain 97(@sampleStructTemp) 57
+                              Store 109 108
+             110:    10(s1_t) Load 97(@sampleStructTemp)
+                              Store 87(s1) 110
+             114:           7 Load 113(g_tTex2s2)
+             115:          28 Load 30(g_sSamp)
+             116:          32 SampledImage 114 115
+             120:   21(fvec4) ImageSampleImplicitLod 116 119
+                              Store 112(@sampleResultShadow) 120
+             122:     44(ptr) AccessChain 112(@sampleResultShadow) 43
+             123:    6(float) Load 122
+             124:     44(ptr) AccessChain 121(@sampleStructTemp) 41
+                              Store 124 123
+             125:     44(ptr) AccessChain 112(@sampleResultShadow) 49
+             126:    6(float) Load 125
+             127:     44(ptr) AccessChain 121(@sampleStructTemp) 48 43
+                              Store 127 126
+             128:     44(ptr) AccessChain 112(@sampleResultShadow) 53
+             129:    6(float) Load 128
+             130:     44(ptr) AccessChain 121(@sampleStructTemp) 48 49
+                              Store 130 129
+             131:     44(ptr) AccessChain 112(@sampleResultShadow) 58
+             132:    6(float) Load 131
+             133:     44(ptr) AccessChain 121(@sampleStructTemp) 48 53
+                              Store 133 132
+             134:    16(s2_t) Load 121(@sampleStructTemp)
+                              Store 111(s2) 134
+             140:           7 Load 139(g_tTex2s3)
+             141:          28 Load 30(g_sSamp)
+             142:          32 SampledImage 140 141
+             146:   21(fvec4) ImageSampleImplicitLod 142 145
+                              Store 138(@sampleResultShadow) 146
+             148:     44(ptr) AccessChain 138(@sampleResultShadow) 43
+             149:    6(float) Load 148
+             150:     44(ptr) AccessChain 147(@sampleStructTemp) 41 43
+                              Store 150 149
+             151:     44(ptr) AccessChain 138(@sampleResultShadow) 49
+             152:    6(float) Load 151
+             153:     44(ptr) AccessChain 147(@sampleStructTemp) 41 49
+                              Store 153 152
+             154:     44(ptr) AccessChain 138(@sampleResultShadow) 53
+             155:    6(float) Load 154
+             156:     44(ptr) AccessChain 147(@sampleStructTemp) 48
+                              Store 156 155
+             157:   135(s3_t) Load 147(@sampleStructTemp)
+                              Store 137(s3) 157
+             168:         165 Load 167(g_tTex2s4)
+             169:          28 Load 30(g_sSamp)
+             171:         170 SampledImage 168 169
+             175:  162(ivec4) ImageSampleImplicitLod 171 174
+                              Store 164(@sampleResultShadow) 175
+             178:    177(ptr) AccessChain 164(@sampleResultShadow) 43
+             179:     40(int) Load 178
+             180:    177(ptr) AccessChain 176(@sampleStructTemp) 41
+                              Store 180 179
+             181:    177(ptr) AccessChain 164(@sampleResultShadow) 49
+             182:     40(int) Load 181
+             183:    6(float) ConvertSToF 182
+             184:    177(ptr) AccessChain 176(@sampleStructTemp) 48 43
+                              Store 184 183
+             185:    177(ptr) AccessChain 164(@sampleResultShadow) 53
+             186:     40(int) Load 185
+             187:    6(float) ConvertSToF 186
+             188:    177(ptr) AccessChain 176(@sampleStructTemp) 48 49
+                              Store 188 187
+             189:    177(ptr) AccessChain 164(@sampleResultShadow) 58
+             190:     40(int) Load 189
+             191:    177(ptr) AccessChain 176(@sampleStructTemp) 57
+                              Store 191 190
+             192:   159(s4_t) Load 176(@sampleStructTemp)
+                              Store 161(s4) 192
+             202:         199 Load 201(g_tTex2s5)
+             203:          28 Load 30(g_sSamp)
+             205:         204 SampledImage 202 203
+             209:  196(ivec4) ImageSampleImplicitLod 205 208
+                              Store 198(@sampleResultShadow) 209
+             212:    211(ptr) AccessChain 198(@sampleResultShadow) 43
+             213:     42(int) Load 212
+             214:    211(ptr) AccessChain 210(@sampleStructTemp) 41
+                              Store 214 213
+             215:    211(ptr) AccessChain 198(@sampleResultShadow) 49
+             216:     42(int) Load 215
+             217:    211(ptr) AccessChain 210(@sampleStructTemp) 48
+                              Store 217 216
+             218:   193(s5_t) Load 210(@sampleStructTemp)
+                              Store 195(s5) 218
+             220:    10(s1_t) FunctionCall 13(fn1(t2-tx-struct0-1;) 89(g_tTex2s1)
+                              Store 219(r0) 220
+             222:    16(s2_t) FunctionCall 19(fn1(t2-tx-struct1-1;) 113(g_tTex2s2)
+                              Store 221(r1) 222
+             225:    10(s1_t) FunctionCall 13(fn1(t2-tx-struct0-1;) 224(g_tTex2s1a)
+                              Store 223(r2) 225
+                              ReturnValue 227
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.tx.bracket.frag.out b/Test/baseResults/hlsl.tx.bracket.frag.out
index 12d5f17..31f516c 100644
--- a/Test/baseResults/hlsl.tx.bracket.frag.out
+++ b/Test/baseResults/hlsl.tx.bracket.frag.out
@@ -183,7 +183,7 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:45          Color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:45            Constant:
@@ -206,7 +206,7 @@
 0:?     'g_tTex2di4a' ( uniform itexture2DArray)
 0:?     'g_tTex2du4a' ( uniform utexture2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -396,7 +396,7 @@
 0:?     Sequence
 0:45      Sequence
 0:45        move second child to first child ( temp 4-component vector of float)
-0:?           'Color' (layout( location=0) out 4-component vector of float)
+0:?           '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 0:45          Color: direct index for structure ( temp 4-component vector of float)
 0:45            Function Call: @main( ( temp structure{ temp 4-component vector of float Color})
 0:45            Constant:
@@ -419,7 +419,7 @@
 0:?     'g_tTex2di4a' ( uniform itexture2DArray)
 0:?     'g_tTex2du4a' ( uniform utexture2DArray)
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform int c1,  uniform 2-component vector of int c2,  uniform 3-component vector of int c3,  uniform 4-component vector of int c4,  uniform int o1,  uniform 2-component vector of int o2,  uniform 3-component vector of int o3,  uniform 4-component vector of int o4})
-0:?     'Color' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -475,7 +475,7 @@
                               Name 147  "param"
                               Name 153  "param"
                               Name 156  "psout"
-                              Name 164  "Color"
+                              Name 164  "@entryPointOutput.Color"
                               Name 169  "g_sSamp"
                               Name 172  "g_tTex1df4a"
                               Name 175  "g_tTex1di4a"
@@ -503,7 +503,7 @@
                               Decorate 114(g_tTex3df4) DescriptorSet 0
                               Decorate 124(g_tTex3di4) DescriptorSet 0
                               Decorate 132(g_tTex3du4) DescriptorSet 0
-                              Decorate 164(Color) Location 0
+                              Decorate 164(@entryPointOutput.Color) Location 0
                               Decorate 169(g_sSamp) DescriptorSet 0
                               Decorate 169(g_sSamp) Binding 0
                               Decorate 172(g_tTex1df4a) DescriptorSet 0
@@ -573,7 +573,7 @@
              157:   20(float) Constant 1065353216
              158:   21(fvec4) ConstantComposite 157 157 157 157
              163:             TypePointer Output 21(fvec4)
-      164(Color):    163(ptr) Variable Output
+164(@entryPointOutput.Color):    163(ptr) Variable Output
              167:             TypeSampler
              168:             TypePointer UniformConstant 167
     169(g_sSamp):    168(ptr) Variable UniformConstant
@@ -599,7 +599,7 @@
                5:             Label
              165:30(PS_OUTPUT) FunctionCall 32(@main()
              166:   21(fvec4) CompositeExtract 165 0
-                              Store 164(Color) 166
+                              Store 164(@entryPointOutput.Color) 166
                               Return
                               FunctionEnd
     11(Fn1(vi4;):    7(ivec4) Function None 9
diff --git a/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out b/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out
index 4fc2987..11b2acf 100644
--- a/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out
+++ b/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out
@@ -9,7 +9,7 @@
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 5663  "main" 4656 4112
+                              EntryPoint Fragment 5663  "main" 4253 3709
                               ExecutionMode 5663 OriginUpperLeft
                               Decorate 4727 DescriptorSet 0
                               Decorate 4727 Binding 0
@@ -26,8 +26,8 @@
                               Decorate 3789 DescriptorSet 0
                               Decorate 3805 DescriptorSet 0
                               Decorate 3869 DescriptorSet 0
-                              Decorate 4656 Location 0
-                              Decorate 4112 BuiltIn FragDepth
+                              Decorate 4253 Location 0
+                              Decorate 3709 BuiltIn FragDepth
                8:             TypeVoid
             1282:             TypeFunction 8
               13:             TypeFloat 32
@@ -127,9 +127,9 @@
             1284:   29(fvec4) ConstantComposite 138 138 138 138
              650:             TypePointer Function 13(float)
              667:             TypePointer Output 29(fvec4)
-            4656:    667(ptr) Variable Output
+            4253:    667(ptr) Variable Output
              651:             TypePointer Output 13(float)
-            4112:    651(ptr) Variable Output
+            3709:    651(ptr) Variable Output
             5663:           8 Function None 1282
            24877:             Label
             4104:   1669(ptr) Variable Function
@@ -137,10 +137,10 @@
                               Store 4104 18803
            13396:    666(ptr) AccessChain 4104 2571
             7967:   29(fvec4) Load 13396
-                              Store 4656 7967
+                              Store 4253 7967
            16622:    650(ptr) AccessChain 4104 2574
            11539:   13(float) Load 16622
-                              Store 4112 11539
+                              Store 3709 11539
                               Return
                               FunctionEnd
             3317:1032(struct) Function None 319
diff --git a/Test/baseResults/remap.hlsl.sample.basic.none.frag.out b/Test/baseResults/remap.hlsl.sample.basic.none.frag.out
index af309a1..37a2c90 100644
--- a/Test/baseResults/remap.hlsl.sample.basic.none.frag.out
+++ b/Test/baseResults/remap.hlsl.sample.basic.none.frag.out
@@ -58,8 +58,8 @@
                               Name 169  "g_tTexcdu4"
                               Name 176  "psout"
                               Name 185  "flattenTemp"
-                              Name 188  "Color"
-                              Name 192  "Depth"
+                              Name 188  "@entryPointOutput.Color"
+                              Name 192  "@entryPointOutput.Depth"
                               Name 195  "g_sSamp2d"
                               Name 196  "g_sSamp2D_b"
                               Name 197  "g_tTex1df4a"
@@ -78,8 +78,8 @@
                               Decorate 151(g_tTexcdf4) DescriptorSet 0
                               Decorate 160(g_tTexcdi4) DescriptorSet 0
                               Decorate 169(g_tTexcdu4) DescriptorSet 0
-                              Decorate 188(Color) Location 0
-                              Decorate 192(Depth) BuiltIn FragDepth
+                              Decorate 188(@entryPointOutput.Color) Location 0
+                              Decorate 192(@entryPointOutput.Depth) BuiltIn FragDepth
                               Decorate 195(g_sSamp2d) DescriptorSet 0
                               Decorate 196(g_sSamp2D_b) DescriptorSet 0
                               Decorate 197(g_tTex1df4a) DescriptorSet 0
@@ -185,9 +185,9 @@
              178:    7(fvec4) ConstantComposite 177 177 177 177
              180:             TypePointer Function 6(float)
              187:             TypePointer Output 7(fvec4)
-      188(Color):    187(ptr) Variable Output
+188(@entryPointOutput.Color):    187(ptr) Variable Output
              191:             TypePointer Output 6(float)
-      192(Depth):    191(ptr) Variable Output
+192(@entryPointOutput.Depth):    191(ptr) Variable Output
   195(g_sSamp2d):     48(ptr) Variable UniformConstant
 196(g_sSamp2D_b):     48(ptr) Variable UniformConstant
 197(g_tTex1df4a):     44(ptr) Variable UniformConstant
@@ -198,10 +198,10 @@
                               Store 185(flattenTemp) 186
              189:     41(ptr) AccessChain 185(flattenTemp) 29
              190:    7(fvec4) Load 189
-                              Store 188(Color) 190
+                              Store 188(@entryPointOutput.Color) 190
              193:    180(ptr) AccessChain 185(flattenTemp) 16
              194:    6(float) Load 193
-                              Store 192(Depth) 194
+                              Store 192(@entryPointOutput.Depth) 194
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/spv.450.geom.out b/Test/baseResults/spv.450.geom.out
index 4d012c4..9c851c3 100755
--- a/Test/baseResults/spv.450.geom.out
+++ b/Test/baseResults/spv.450.geom.out
@@ -1,13 +1,14 @@
 spv.450.geom
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 26
+// Id's are bound by 31
 
                               Capability Geometry
                               Capability GeometryPointSize
+                              Capability MultiViewport
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 13 20
+                              EntryPoint Geometry 4  "main" 13 20 27 29
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 4
                               ExecutionMode 4 OutputLineStrip
@@ -26,6 +27,8 @@
                               MemberName 16(gl_PerVertex) 2  "gl_ClipDistance"
                               MemberName 16(gl_PerVertex) 3  "gl_CullDistance"
                               Name 20  "gl_in"
+                              Name 27  "gl_Layer"
+                              Name 29  "gl_ViewportIndex"
                               MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
                               MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
                               MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
@@ -36,6 +39,8 @@
                               MemberDecorate 16(gl_PerVertex) 2 BuiltIn ClipDistance
                               MemberDecorate 16(gl_PerVertex) 3 BuiltIn CullDistance
                               Decorate 16(gl_PerVertex) Block
+                              Decorate 27(gl_Layer) BuiltIn Layer
+                              Decorate 29(gl_ViewportIndex) BuiltIn ViewportIndex
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -55,11 +60,18 @@
        20(gl_in):     19(ptr) Variable Input
               21:             TypePointer Input 6(float)
               24:             TypePointer Output 6(float)
+              26:             TypePointer Output 14(int)
+    27(gl_Layer):     26(ptr) Variable Output
+              28:     14(int) Constant 2
+29(gl_ViewportIndex):     26(ptr) Variable Output
+              30:     14(int) Constant 3
          4(main):           2 Function None 3
                5:             Label
               22:     21(ptr) AccessChain 20(gl_in) 15 15
               23:    6(float) Load 22
               25:     24(ptr) AccessChain 13 15
                               Store 25 23
+                              Store 27(gl_Layer) 28
+                              Store 29(gl_ViewportIndex) 30
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/spv.450.tesc.out b/Test/baseResults/spv.450.tesc.out
index 6b4325b..5ccea06 100755
--- a/Test/baseResults/spv.450.tesc.out
+++ b/Test/baseResults/spv.450.tesc.out
@@ -1,72 +1,120 @@
 spv.450.tesc
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 23
+// Id's are bound by 45
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationControl 4  "main" 9 16 19 22
+                              EntryPoint TessellationControl 4  "main" 15 18 25 32 38 41 44
                               ExecutionMode 4 OutputVertices 4
                               Source GLSL 450
                               Name 4  "main"
-                              Name 9  "patchOut"
-                              Name 10  "S"
-                              MemberName 10(S) 0  "sMem1"
-                              MemberName 10(S) 1  "sMem2"
-                              Name 11  "TheBlock"
-                              MemberName 11(TheBlock) 0  "bMem1"
-                              MemberName 11(TheBlock) 1  "bMem2"
-                              MemberName 11(TheBlock) 2  "s"
-                              Name 16  "tcBlock"
-                              Name 17  "SingleBlock"
-                              MemberName 17(SingleBlock) 0  "bMem1"
-                              MemberName 17(SingleBlock) 1  "bMem2"
-                              MemberName 17(SingleBlock) 2  "s"
-                              Name 19  "singleBlock"
-                              Name 20  "bn"
-                              MemberName 20(bn) 0  "v1"
-                              MemberName 20(bn) 1  "v2"
-                              MemberName 20(bn) 2  "v3"
-                              Name 22  ""
-                              Decorate 9(patchOut) Patch
-                              MemberDecorate 11(TheBlock) 0 Patch
-                              MemberDecorate 11(TheBlock) 1 Patch
-                              MemberDecorate 11(TheBlock) 2 Patch
-                              Decorate 11(TheBlock) Block
-                              Decorate 16(tcBlock) Location 12
-                              MemberDecorate 17(SingleBlock) 0 Patch
-                              MemberDecorate 17(SingleBlock) 1 Patch
-                              MemberDecorate 17(SingleBlock) 2 Patch
-                              Decorate 17(SingleBlock) Block
-                              Decorate 19(singleBlock) Location 2
-                              MemberDecorate 20(bn) 0 Patch
-                              MemberDecorate 20(bn) 0 Location 20
-                              MemberDecorate 20(bn) 1 Patch
-                              MemberDecorate 20(bn) 1 Location 24
-                              MemberDecorate 20(bn) 2 Patch
-                              MemberDecorate 20(bn) 2 Location 25
-                              Decorate 20(bn) Block
+                              Name 11  "gl_PerVertex"
+                              MemberName 11(gl_PerVertex) 0  "gl_Position"
+                              MemberName 11(gl_PerVertex) 1  "gl_PointSize"
+                              MemberName 11(gl_PerVertex) 2  "gl_ClipDistance"
+                              MemberName 11(gl_PerVertex) 3  "gl_CullDistance"
+                              Name 15  "gl_out"
+                              Name 18  "gl_InvocationID"
+                              Name 21  "gl_PerVertex"
+                              MemberName 21(gl_PerVertex) 0  "gl_Position"
+                              MemberName 21(gl_PerVertex) 1  "gl_PointSize"
+                              MemberName 21(gl_PerVertex) 2  "gl_ClipDistance"
+                              MemberName 21(gl_PerVertex) 3  "gl_CullDistance"
+                              Name 25  "gl_in"
+                              Name 32  "patchOut"
+                              Name 33  "S"
+                              MemberName 33(S) 0  "sMem1"
+                              MemberName 33(S) 1  "sMem2"
+                              Name 34  "TheBlock"
+                              MemberName 34(TheBlock) 0  "bMem1"
+                              MemberName 34(TheBlock) 1  "bMem2"
+                              MemberName 34(TheBlock) 2  "s"
+                              Name 38  "tcBlock"
+                              Name 39  "SingleBlock"
+                              MemberName 39(SingleBlock) 0  "bMem1"
+                              MemberName 39(SingleBlock) 1  "bMem2"
+                              MemberName 39(SingleBlock) 2  "s"
+                              Name 41  "singleBlock"
+                              Name 42  "bn"
+                              MemberName 42(bn) 0  "v1"
+                              MemberName 42(bn) 1  "v2"
+                              MemberName 42(bn) 2  "v3"
+                              Name 44  ""
+                              MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
+                              MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
+                              MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
+                              MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance
+                              Decorate 11(gl_PerVertex) Block
+                              Decorate 18(gl_InvocationID) BuiltIn InvocationId
+                              MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position
+                              MemberDecorate 21(gl_PerVertex) 1 BuiltIn PointSize
+                              MemberDecorate 21(gl_PerVertex) 2 BuiltIn ClipDistance
+                              MemberDecorate 21(gl_PerVertex) 3 BuiltIn CullDistance
+                              Decorate 21(gl_PerVertex) Block
+                              Decorate 32(patchOut) Patch
+                              Decorate 32(patchOut) Location 1
+                              MemberDecorate 34(TheBlock) 0 Patch
+                              MemberDecorate 34(TheBlock) 1 Patch
+                              MemberDecorate 34(TheBlock) 2 Patch
+                              Decorate 34(TheBlock) Block
+                              Decorate 38(tcBlock) Location 12
+                              MemberDecorate 39(SingleBlock) 0 Patch
+                              MemberDecorate 39(SingleBlock) 1 Patch
+                              MemberDecorate 39(SingleBlock) 2 Patch
+                              Decorate 39(SingleBlock) Block
+                              Decorate 41(singleBlock) Location 2
+                              MemberDecorate 42(bn) 0 Patch
+                              MemberDecorate 42(bn) 0 Location 20
+                              MemberDecorate 42(bn) 1 Patch
+                              MemberDecorate 42(bn) 1 Location 24
+                              MemberDecorate 42(bn) 2 Patch
+                              MemberDecorate 42(bn) 2 Location 25
+                              Decorate 42(bn) Block
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
                7:             TypeVector 6(float) 4
-               8:             TypePointer Output 7(fvec4)
-     9(patchOut):      8(ptr) Variable Output
-           10(S):             TypeStruct 6(float) 6(float)
-    11(TheBlock):             TypeStruct 6(float) 6(float) 10(S)
-              12:             TypeInt 32 0
-              13:     12(int) Constant 2
-              14:             TypeArray 11(TheBlock) 13
-              15:             TypePointer Output 14
-     16(tcBlock):     15(ptr) Variable Output
- 17(SingleBlock):             TypeStruct 6(float) 6(float) 10(S)
-              18:             TypePointer Output 17(SingleBlock)
- 19(singleBlock):     18(ptr) Variable Output
-          20(bn):             TypeStruct 7(fvec4) 7(fvec4) 7(fvec4)
-              21:             TypePointer Output 20(bn)
-              22:     21(ptr) Variable Output
+               8:             TypeInt 32 0
+               9:      8(int) Constant 1
+              10:             TypeArray 6(float) 9
+11(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 10 10
+              12:      8(int) Constant 4
+              13:             TypeArray 11(gl_PerVertex) 12
+              14:             TypePointer Output 13
+      15(gl_out):     14(ptr) Variable Output
+              16:             TypeInt 32 1
+              17:             TypePointer Input 16(int)
+18(gl_InvocationID):     17(ptr) Variable Input
+              20:     16(int) Constant 0
+21(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 10 10
+              22:      8(int) Constant 32
+              23:             TypeArray 21(gl_PerVertex) 22
+              24:             TypePointer Input 23
+       25(gl_in):     24(ptr) Variable Input
+              27:             TypePointer Input 7(fvec4)
+              30:             TypePointer Output 7(fvec4)
+    32(patchOut):     30(ptr) Variable Output
+           33(S):             TypeStruct 6(float) 6(float)
+    34(TheBlock):             TypeStruct 6(float) 6(float) 33(S)
+              35:      8(int) Constant 2
+              36:             TypeArray 34(TheBlock) 35
+              37:             TypePointer Output 36
+     38(tcBlock):     37(ptr) Variable Output
+ 39(SingleBlock):             TypeStruct 6(float) 6(float) 33(S)
+              40:             TypePointer Output 39(SingleBlock)
+ 41(singleBlock):     40(ptr) Variable Output
+          42(bn):             TypeStruct 7(fvec4) 7(fvec4) 7(fvec4)
+              43:             TypePointer Output 42(bn)
+              44:     43(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
+              19:     16(int) Load 18(gl_InvocationID)
+              26:     16(int) Load 18(gl_InvocationID)
+              28:     27(ptr) AccessChain 25(gl_in) 26 20
+              29:    7(fvec4) Load 28
+              31:     30(ptr) AccessChain 15(gl_out) 19 20
+                              Store 31 29
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/spv.460.comp.out b/Test/baseResults/spv.460.comp.out
new file mode 100755
index 0000000..b9037b9
--- /dev/null
+++ b/Test/baseResults/spv.460.comp.out
@@ -0,0 +1,33 @@
+spv.460.comp
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 15
+
+                              Capability Shader
+                              Capability SubgroupVoteKHR
+                              Extension  "SPV_KHR_subgroup_vote"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint GLCompute 4  "main"
+                              ExecutionMode 4 LocalSize 1 1 1
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "b1"
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeBool
+               7:             TypePointer Function 6(bool)
+         4(main):           2 Function None 3
+               5:             Label
+           8(b1):      7(ptr) Variable Function
+               9:     6(bool) Load 8(b1)
+              10:     6(bool) SubgroupAnyKHR 9
+                              Store 8(b1) 10
+              11:     6(bool) Load 8(b1)
+              12:     6(bool) SubgroupAllKHR 11
+                              Store 8(b1) 12
+              13:     6(bool) Load 8(b1)
+              14:     6(bool) SubgroupAllEqualKHR 13
+                              Store 8(b1) 14
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.460.frag.out b/Test/baseResults/spv.460.frag.out
new file mode 100755
index 0000000..4e827a0
--- /dev/null
+++ b/Test/baseResults/spv.460.frag.out
@@ -0,0 +1,51 @@
+spv.460.frag
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 32
+
+                              Capability Shader
+                              Capability AtomicStorage
+                              Capability AtomicStorageOps
+                              Extension  "SPV_KHR_shader_atomic_counter_ops"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main"
+                              ExecutionMode 4 OriginLowerLeft
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "aui"
+                              Name 10  "ui"
+                              Decorate 8(aui) Offset 0
+                              Decorate 8(aui) Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 0
+               7:             TypePointer AtomicCounter 6(int)
+          8(aui):      7(ptr) Variable AtomicCounter
+               9:             TypePointer Private 6(int)
+          10(ui):      9(ptr) Variable Private
+              12:      6(int) Constant 1
+              13:      6(int) Constant 0
+         4(main):           2 Function None 3
+               5:             Label
+              11:      6(int) Load 10(ui)
+              14:      6(int) AtomicIAdd 8(aui) 12 13 11
+              15:      6(int) Load 10(ui)
+              16:      6(int) AtomicISub 8(aui) 12 13 15
+              17:      6(int) Load 10(ui)
+              18:      6(int) AtomicUMin 8(aui) 12 13 17
+              19:      6(int) Load 10(ui)
+              20:      6(int) AtomicUMax 8(aui) 12 13 19
+              21:      6(int) Load 10(ui)
+              22:      6(int) AtomicAnd 8(aui) 12 13 21
+              23:      6(int) Load 10(ui)
+              24:      6(int) AtomicOr 8(aui) 12 13 23
+              25:      6(int) Load 10(ui)
+              26:      6(int) AtomicXor 8(aui) 12 13 25
+              27:      6(int) Load 10(ui)
+              28:      6(int) AtomicExchange 8(aui) 12 13 27
+              29:      6(int) Load 10(ui)
+              30:      6(int) Load 10(ui)
+              31:      6(int) AtomicCompareExchange 8(aui) 12 13 13 30 29
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.460.vert.out b/Test/baseResults/spv.460.vert.out
new file mode 100755
index 0000000..6d57d07
--- /dev/null
+++ b/Test/baseResults/spv.460.vert.out
@@ -0,0 +1,45 @@
+spv.460.vert
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 20
+
+                              Capability Shader
+                              Capability DrawParameters
+                              Extension  "SPV_KHR_shader_draw_parameters"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 10 12 15 18 19
+                              Source GLSL 460
+                              Name 4  "main"
+                              Name 8  "a"
+                              Name 10  "gl_BaseVertex"
+                              Name 12  "gl_BaseInstance"
+                              Name 15  "gl_DrawID"
+                              Name 18  "gl_VertexID"
+                              Name 19  "gl_InstanceID"
+                              Decorate 10(gl_BaseVertex) BuiltIn BaseVertex
+                              Decorate 12(gl_BaseInstance) BuiltIn BaseInstance
+                              Decorate 15(gl_DrawID) BuiltIn DrawIndex
+                              Decorate 18(gl_VertexID) BuiltIn VertexId
+                              Decorate 19(gl_InstanceID) BuiltIn InstanceId
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 1
+               7:             TypePointer Function 6(int)
+               9:             TypePointer Input 6(int)
+10(gl_BaseVertex):      9(ptr) Variable Input
+12(gl_BaseInstance):      9(ptr) Variable Input
+   15(gl_DrawID):      9(ptr) Variable Input
+ 18(gl_VertexID):      9(ptr) Variable Input
+19(gl_InstanceID):      9(ptr) Variable Input
+         4(main):           2 Function None 3
+               5:             Label
+            8(a):      7(ptr) Variable Function
+              11:      6(int) Load 10(gl_BaseVertex)
+              13:      6(int) Load 12(gl_BaseInstance)
+              14:      6(int) IAdd 11 13
+              16:      6(int) Load 15(gl_DrawID)
+              17:      6(int) IAdd 14 16
+                              Store 8(a) 17
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.buffer.autoassign.frag.out b/Test/baseResults/spv.buffer.autoassign.frag.out
index 2a316ee..643b333 100644
--- a/Test/baseResults/spv.buffer.autoassign.frag.out
+++ b/Test/baseResults/spv.buffer.autoassign.frag.out
@@ -24,7 +24,7 @@
                               Name 34  "MyUB3"
                               MemberName 34(MyUB3) 0  "g_d"
                               Name 36  ""
-                              Name 47  "Color"
+                              Name 47  "@entryPointOutput.Color"
                               MemberDecorate 16(MyUB1) 0 Offset 0
                               MemberDecorate 16(MyUB1) 1 Offset 4
                               Decorate 16(MyUB1) Block
@@ -38,7 +38,7 @@
                               Decorate 34(MyUB3) Block
                               Decorate 36 DescriptorSet 0
                               Decorate 36 Binding 16
-                              Decorate 47(Color) Location 0
+                              Decorate 47(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -62,12 +62,12 @@
               36:     35(ptr) Variable Uniform
               41:             TypePointer Function 7(fvec4)
               46:             TypePointer Output 7(fvec4)
-       47(Color):     46(ptr) Variable Output
+47(@entryPointOutput.Color):     46(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               48:8(PS_OUTPUT) FunctionCall 10(@main()
               49:    7(fvec4) CompositeExtract 48 0
-                              Store 47(Color) 49
+                              Store 47(@entryPointOutput.Color) 49
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/spv.debugInfo.frag.out b/Test/baseResults/spv.debugInfo.frag.out
index f501528..2e0d1b3 100644
--- a/Test/baseResults/spv.debugInfo.frag.out
+++ b/Test/baseResults/spv.debugInfo.frag.out
@@ -7,9 +7,19 @@
                2:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 5  "main" 24 52
-                              ExecutionMode 5 OriginUpperLeft
+                              ExecutionMode 5 OriginLowerLeft
                1:             String  "spv.debugInfo.frag"
-                              Source GLSL 450 1  "#version 450
+                              Source GLSL 450 1  "// OpModuleProcessed no-storage-format
+// OpModuleProcessed resource-set-binding 3
+// OpModuleProcessed auto-map-locations
+// OpModuleProcessed client opengl100
+// OpModuleProcessed target-env opengl
+// OpModuleProcessed relaxed-errors
+// OpModuleProcessed suppress-warnings
+// OpModuleProcessed hlsl-offsets
+// OpModuleProcessed entry-point main
+#line 1
+#version 450
 
 struct S {
     int a;
@@ -84,8 +94,8 @@
                               MemberDecorate 53(S) 0 Offset 0
                               MemberDecorate 54(ubuf) 0 Offset 0
                               Decorate 54(ubuf) Block
-                              Decorate 56 DescriptorSet 0
-                              Decorate 69(s2d) DescriptorSet 0
+                              Decorate 56 DescriptorSet 3
+                              Decorate 69(s2d) DescriptorSet 3
                3:             TypeVoid
                4:             TypeFunction 3
                7:             TypeInt 32 1
diff --git a/Test/baseResults/spv.hlslDebugInfo.frag.out b/Test/baseResults/spv.hlslDebugInfo.frag.out
new file mode 100644
index 0000000..571e594
--- /dev/null
+++ b/Test/baseResults/spv.hlslDebugInfo.frag.out
@@ -0,0 +1,58 @@
+spv.hlslDebugInfo.vert
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 19
+
+                              Capability Shader
+               2:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 5  "newMain" 17
+               1:             String  "spv.hlslDebugInfo.vert"
+                              Source HLSL 500 1  "// OpModuleProcessed entry-point newMain
+// OpModuleProcessed shift-sampler-binding 2
+// OpModuleProcessed shift-texture-binding 4
+// OpModuleProcessed shift-image-binding 1
+// OpModuleProcessed shift-UBO-binding 6
+// OpModuleProcessed shift-ssbo-binding 3
+// OpModuleProcessed shift-uav-binding 5
+// OpModuleProcessed flatten-uniform-arrays
+// OpModuleProcessed no-storage-format
+// OpModuleProcessed resource-set-binding t0 0 0
+// OpModuleProcessed hlsl-iomap
+// OpModuleProcessed auto-map-bindings
+// OpModuleProcessed auto-map-locations
+// OpModuleProcessed client vulkan100
+// OpModuleProcessed target-env vulkan1.0
+// OpModuleProcessed source-entrypoint origMain
+// OpModuleProcessed hlsl-offsets
+#line 1
+float4 origMain() : SV_Position
+{
+    return (float4)0;
+}
+"
+                              Name 5  "newMain"
+                              Name 10  "@newMain("
+                              Name 17  "@entryPointOutput"
+                              Decorate 17(@entryPointOutput) BuiltIn Position
+               3:             TypeVoid
+               4:             TypeFunction 3
+               7:             TypeFloat 32
+               8:             TypeVector 7(float) 4
+               9:             TypeFunction 8(fvec4)
+              12:    7(float) Constant 0
+              13:    8(fvec4) ConstantComposite 12 12 12 12
+              16:             TypePointer Output 8(fvec4)
+17(@entryPointOutput):     16(ptr) Variable Output
+      5(newMain):           3 Function None 4
+               6:             Label
+                              Line 1 2 0
+              18:    8(fvec4) FunctionCall 10(@newMain()
+                              Store 17(@entryPointOutput) 18
+                              Return
+                              FunctionEnd
+   10(@newMain():    8(fvec4) Function None 9
+              11:             Label
+                              Line 1 3 0
+                              ReturnValue 13
+                              FunctionEnd
diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out
index c21f9bf..d645f2a 100644
--- a/Test/baseResults/spv.image.frag.out
+++ b/Test/baseResults/spv.image.frag.out
@@ -4,10 +4,11 @@
 // Id's are bound by 376
 
                               Capability Shader
-                              Capability SampledRect
-                              Capability Sampled1D
-                              Capability SampledCubeArray
-                              Capability SampledBuffer
+                              Capability StorageImageMultisample
+                              Capability ImageCubeArray
+                              Capability ImageRect
+                              Capability Image1D
+                              Capability ImageBuffer
                               Capability ImageMSArray
                               Capability StorageImageExtendedFormats
                               Capability ImageQuery
diff --git a/Test/baseResults/spv.imageLoadStoreLod.frag.out b/Test/baseResults/spv.imageLoadStoreLod.frag.out
new file mode 100644
index 0000000..0f16430
--- /dev/null
+++ b/Test/baseResults/spv.imageLoadStoreLod.frag.out
@@ -0,0 +1,135 @@
+spv.imageLoadStoreLod.frag
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 82
+
+                              Capability Shader
+                              Capability ImageCubeArray
+                              Capability SparseResidency
+                              Capability Image1D
+                              Capability ImageReadWriteLodAMD
+                              Extension  "SPV_AMD_shader_image_load_store_lod"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 77
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 450
+                              SourceExtension  "GL_AMD_shader_image_load_store_lod"
+                              Name 4  "main"
+                              Name 9  "f4"
+                              Name 14  "i1D"
+                              Name 24  "i2D"
+                              Name 34  "i3D"
+                              Name 46  "iiCube"
+                              Name 53  "ii1DArray"
+                              Name 60  "ui2DArray"
+                              Name 64  "u4"
+                              Name 65  "ResType"
+                              Name 71  "uiCubeArray"
+                              Name 77  "fragColor"
+                              Decorate 14(i1D) DescriptorSet 0
+                              Decorate 14(i1D) Binding 0
+                              Decorate 24(i2D) DescriptorSet 0
+                              Decorate 24(i2D) Binding 1
+                              Decorate 34(i3D) DescriptorSet 0
+                              Decorate 34(i3D) Binding 2
+                              Decorate 46(iiCube) DescriptorSet 0
+                              Decorate 46(iiCube) Binding 3
+                              Decorate 53(ii1DArray) DescriptorSet 0
+                              Decorate 53(ii1DArray) Binding 4
+                              Decorate 60(ui2DArray) DescriptorSet 0
+                              Decorate 60(ui2DArray) Binding 5
+                              Decorate 71(uiCubeArray) DescriptorSet 0
+                              Decorate 71(uiCubeArray) Binding 6
+                              Decorate 77(fragColor) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+              10:    6(float) Constant 0
+              11:    7(fvec4) ConstantComposite 10 10 10 10
+              12:             TypeImage 6(float) 1D nonsampled format:Rgba32f
+              13:             TypePointer UniformConstant 12
+         14(i1D):     13(ptr) Variable UniformConstant
+              16:             TypeInt 32 1
+              17:     16(int) Constant 1
+              18:     16(int) Constant 3
+              22:             TypeImage 6(float) 2D nonsampled format:Rgba32f
+              23:             TypePointer UniformConstant 22
+         24(i2D):     23(ptr) Variable UniformConstant
+              26:             TypeVector 16(int) 2
+              27:     16(int) Constant 2
+              28:   26(ivec2) ConstantComposite 27 18
+              32:             TypeImage 6(float) 3D nonsampled format:Rgba32f
+              33:             TypePointer UniformConstant 32
+         34(i3D):     33(ptr) Variable UniformConstant
+              36:             TypeVector 16(int) 3
+              37:     16(int) Constant 4
+              38:     16(int) Constant 5
+              39:     16(int) Constant 6
+              40:   36(ivec3) ConstantComposite 37 38 39
+              44:             TypeImage 16(int) Cube nonsampled format:Rgba32i
+              45:             TypePointer UniformConstant 44
+      46(iiCube):     45(ptr) Variable UniformConstant
+              49:             TypeVector 16(int) 4
+              51:             TypeImage 16(int) 1D array nonsampled format:Rgba32i
+              52:             TypePointer UniformConstant 51
+   53(ii1DArray):     52(ptr) Variable UniformConstant
+              57:             TypeInt 32 0
+              58:             TypeImage 57(int) 2D array nonsampled format:Rgba32ui
+              59:             TypePointer UniformConstant 58
+   60(ui2DArray):     59(ptr) Variable UniformConstant
+              62:             TypeVector 57(int) 4
+              63:             TypePointer Function 62(ivec4)
+     65(ResType):             TypeStruct 16(int) 62(ivec4)
+              69:             TypeImage 57(int) Cube array nonsampled format:Rgba32ui
+              70:             TypePointer UniformConstant 69
+ 71(uiCubeArray):     70(ptr) Variable UniformConstant
+              76:             TypePointer Output 7(fvec4)
+   77(fragColor):     76(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           9(f4):      8(ptr) Variable Function
+          64(u4):     63(ptr) Variable Function
+                              Store 9(f4) 11
+              15:          12 Load 14(i1D)
+              19:    7(fvec4) ImageRead 15 17 Lod 18
+              20:    7(fvec4) Load 9(f4)
+              21:    7(fvec4) FAdd 20 19
+                              Store 9(f4) 21
+              25:          22 Load 24(i2D)
+              29:    7(fvec4) ImageRead 25 28 Lod 18
+              30:    7(fvec4) Load 9(f4)
+              31:    7(fvec4) FAdd 30 29
+                              Store 9(f4) 31
+              35:          32 Load 34(i3D)
+              41:    7(fvec4) ImageRead 35 40 Lod 18
+              42:    7(fvec4) Load 9(f4)
+              43:    7(fvec4) FAdd 42 41
+                              Store 9(f4) 43
+              47:          44 Load 46(iiCube)
+              48:    7(fvec4) Load 9(f4)
+              50:   49(ivec4) ConvertFToS 48
+                              ImageWrite 47 40 50 Lod 18
+              54:          51 Load 53(ii1DArray)
+              55:    7(fvec4) Load 9(f4)
+              56:   49(ivec4) ConvertFToS 55
+                              ImageWrite 54 28 56 Lod 18
+              61:          58 Load 60(ui2DArray)
+              66: 65(ResType) ImageSparseRead 61 40 Lod 18
+              67:   62(ivec4) CompositeExtract 66 1
+                              Store 64(u4) 67
+              68:     16(int) CompositeExtract 66 0
+              72:          69 Load 71(uiCubeArray)
+              73: 65(ResType) ImageSparseRead 72 40 Lod 18
+              74:   62(ivec4) CompositeExtract 73 1
+                              Store 64(u4) 74
+              75:     16(int) CompositeExtract 73 0
+              78:    7(fvec4) Load 9(f4)
+              79:   62(ivec4) Load 64(u4)
+              80:    7(fvec4) ConvertUToF 79
+              81:    7(fvec4) FAdd 78 80
+                              Store 77(fragColor) 81
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/spv.looseUniformNoLoc.vert.out b/Test/baseResults/spv.looseUniformNoLoc.vert.out
new file mode 100644
index 0000000..55d1639
--- /dev/null
+++ b/Test/baseResults/spv.looseUniformNoLoc.vert.out
@@ -0,0 +1,8 @@
+spv.looseUniformNoLoc.vert
+ERROR: spv.looseUniformNoLoc.vert:9: 'uv' : non-opaque uniform variables need a layout(location=L) 
+ERROR: 1 compilation errors.  No code generated.
+
+
+ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point
+
+SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/spv.memoryQualifier.frag.out b/Test/baseResults/spv.memoryQualifier.frag.out
index 0060868..c041a52 100644
--- a/Test/baseResults/spv.memoryQualifier.frag.out
+++ b/Test/baseResults/spv.memoryQualifier.frag.out
@@ -4,8 +4,8 @@
 // Id's are bound by 97
 
                               Capability Shader
-                              Capability SampledRect
-                              Capability Sampled1D
+                              Capability ImageRect
+                              Capability Image1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main"
diff --git a/Test/baseResults/spv.noBuiltInLoc.vert.out b/Test/baseResults/spv.noBuiltInLoc.vert.out
index 3d980bf..d6cbeaa 100644
--- a/Test/baseResults/spv.noBuiltInLoc.vert.out
+++ b/Test/baseResults/spv.noBuiltInLoc.vert.out
@@ -1,12 +1,12 @@
 spv.noBuiltInLoc.vert
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 23
+// Id's are bound by 33
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 9 11 18
+                              EntryPoint Vertex 4  "main" 9 11 18 31 32
                               Source GLSL 450
                               Name 4  "main"
                               Name 9  "bar"
@@ -17,6 +17,11 @@
                               MemberName 16(gl_PerVertex) 2  "gl_ClipDistance"
                               MemberName 16(gl_PerVertex) 3  "gl_CullDistance"
                               Name 18  ""
+                              Name 24  "uv1"
+                              Name 26  "uv2"
+                              Name 29  "uv3"
+                              Name 31  "gl_VertexID"
+                              Name 32  "gl_InstanceID"
                               Decorate 9(bar) Location 0
                               Decorate 11(foo) Location 0
                               MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position
@@ -24,6 +29,14 @@
                               MemberDecorate 16(gl_PerVertex) 2 BuiltIn ClipDistance
                               MemberDecorate 16(gl_PerVertex) 3 BuiltIn CullDistance
                               Decorate 16(gl_PerVertex) Block
+                              Decorate 24(uv1) Location 0
+                              Decorate 24(uv1) DescriptorSet 0
+                              Decorate 26(uv2) Location 1
+                              Decorate 26(uv2) DescriptorSet 0
+                              Decorate 29(uv3) Location 2
+                              Decorate 29(uv3) DescriptorSet 0
+                              Decorate 31(gl_VertexID) BuiltIn VertexId
+                              Decorate 32(gl_InstanceID) BuiltIn InstanceId
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -40,6 +53,16 @@
               18:     17(ptr) Variable Output
               19:             TypeInt 32 1
               20:     19(int) Constant 0
+              23:             TypePointer UniformConstant 7(fvec4)
+         24(uv1):     23(ptr) Variable UniformConstant
+              25:             TypePointer UniformConstant 6(float)
+         26(uv2):     25(ptr) Variable UniformConstant
+              27:             TypeVector 6(float) 3
+              28:             TypePointer UniformConstant 27(fvec3)
+         29(uv3):     28(ptr) Variable UniformConstant
+              30:             TypePointer Input 19(int)
+ 31(gl_VertexID):     30(ptr) Variable Input
+32(gl_InstanceID):     30(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
               12:    7(fvec4) Load 11(foo)
diff --git a/Test/baseResults/spv.register.autoassign-2.frag.out b/Test/baseResults/spv.register.autoassign-2.frag.out
index f09a468..988cd0c 100644
--- a/Test/baseResults/spv.register.autoassign-2.frag.out
+++ b/Test/baseResults/spv.register.autoassign-2.frag.out
@@ -19,14 +19,14 @@
                               Name 31  "g_tScene[1]"
                               Name 39  "psout"
                               Name 40  "param"
-                              Name 44  "Color"
+                              Name 44  "psout.Color"
                               Decorate 18(g_tScene[0]) DescriptorSet 0
                               Decorate 18(g_tScene[0]) Binding 10
                               Decorate 22(g_tSamp) DescriptorSet 0
                               Decorate 22(g_tSamp) Binding 5
                               Decorate 31(g_tScene[1]) DescriptorSet 0
                               Decorate 31(g_tScene[1]) Binding 11
-                              Decorate 44(Color) Location 0
+                              Decorate 44(psout.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -50,7 +50,7 @@
  31(g_tScene[1]):     17(ptr) Variable UniformConstant
               37:             TypePointer Function 7(fvec4)
               43:             TypePointer Output 7(fvec4)
-       44(Color):     43(ptr) Variable Output
+ 44(psout.Color):     43(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
        39(psout):      9(ptr) Variable Function
@@ -60,7 +60,7 @@
                               Store 39(psout) 42
               45:     37(ptr) AccessChain 39(psout) 15
               46:    7(fvec4) Load 45
-                              Store 44(Color) 46
+                              Store 44(psout.Color) 46
                               Return
                               FunctionEnd
 12(@main(struct-PS_OUTPUT-vf41;):           2 Function None 10
diff --git a/Test/baseResults/spv.register.autoassign.frag.out b/Test/baseResults/spv.register.autoassign.frag.out
index 4874d90..6516d4f 100644
--- a/Test/baseResults/spv.register.autoassign.frag.out
+++ b/Test/baseResults/spv.register.autoassign.frag.out
@@ -42,7 +42,7 @@
                               Name 130  "g_tTex_unused2"
                               Name 132  "g_sSamp_unused2"
                               Name 141  "psout"
-                              Name 151  "Color"
+                              Name 151  "@entryPointOutput.Color"
                               Name 154  "g_tTex_unused3"
                               Decorate 21(g_tTex1) DescriptorSet 0
                               Decorate 21(g_tTex1) Binding 11
@@ -80,7 +80,7 @@
                               Decorate 130(g_tTex_unused2) DescriptorSet 0
                               Decorate 130(g_tTex_unused2) Binding 12
                               Decorate 132(g_sSamp_unused2) DescriptorSet 0
-                              Decorate 151(Color) Location 0
+                              Decorate 151(@entryPointOutput.Color) Location 0
                               Decorate 154(g_tTex_unused3) DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -141,13 +141,13 @@
              140:             TypePointer Function 15(PS_OUTPUT)
              145:             TypePointer Function 7(fvec4)
              150:             TypePointer Output 7(fvec4)
-      151(Color):    150(ptr) Variable Output
+151(@entryPointOutput.Color):    150(ptr) Variable Output
 154(g_tTex_unused3):     20(ptr) Variable UniformConstant
       4(main_ep):           2 Function None 3
                5:             Label
              152:15(PS_OUTPUT) FunctionCall 17(@main_ep()
              153:    7(fvec4) CompositeExtract 152 0
-                              Store 151(Color) 153
+                              Store 151(@entryPointOutput.Color) 153
                               Return
                               FunctionEnd
        9(Func1():    7(fvec4) Function None 8
diff --git a/Test/baseResults/spv.register.noautoassign.frag.out b/Test/baseResults/spv.register.noautoassign.frag.out
index 71c0b37..482e558 100644
--- a/Test/baseResults/spv.register.noautoassign.frag.out
+++ b/Test/baseResults/spv.register.noautoassign.frag.out
@@ -42,7 +42,7 @@
                               Name 130  "g_tTex_unused2"
                               Name 132  "g_sSamp_unused2"
                               Name 141  "psout"
-                              Name 151  "Color"
+                              Name 151  "@entryPointOutput.Color"
                               Name 154  "g_tTex_unused3"
                               Decorate 21(g_tTex1) DescriptorSet 0
                               Decorate 21(g_tTex1) Binding 11
@@ -73,7 +73,7 @@
                               Decorate 130(g_tTex_unused2) DescriptorSet 0
                               Decorate 130(g_tTex_unused2) Binding 12
                               Decorate 132(g_sSamp_unused2) DescriptorSet 0
-                              Decorate 151(Color) Location 0
+                              Decorate 151(@entryPointOutput.Color) Location 0
                               Decorate 154(g_tTex_unused3) DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
@@ -134,13 +134,13 @@
              140:             TypePointer Function 15(PS_OUTPUT)
              145:             TypePointer Function 7(fvec4)
              150:             TypePointer Output 7(fvec4)
-      151(Color):    150(ptr) Variable Output
+151(@entryPointOutput.Color):    150(ptr) Variable Output
 154(g_tTex_unused3):     20(ptr) Variable UniformConstant
       4(main_ep):           2 Function None 3
                5:             Label
              152:15(PS_OUTPUT) FunctionCall 17(@main_ep()
              153:    7(fvec4) CompositeExtract 152 0
-                              Store 151(Color) 153
+                              Store 151(@entryPointOutput.Color) 153
                               Return
                               FunctionEnd
        9(Func1():    7(fvec4) Function None 8
diff --git a/Test/baseResults/spv.rw.autoassign.frag.out b/Test/baseResults/spv.rw.autoassign.frag.out
index 9069666..6121b9b 100644
--- a/Test/baseResults/spv.rw.autoassign.frag.out
+++ b/Test/baseResults/spv.rw.autoassign.frag.out
@@ -4,8 +4,8 @@
 // Id's are bound by 42
 
                               Capability Shader
-                              Capability Sampled1D
-                              Capability SampledBuffer
+                              Capability Image1D
+                              Capability ImageBuffer
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 39
@@ -20,12 +20,12 @@
                               Name 23  "r01"
                               Name 26  "g_tBuf1du1"
                               Name 30  "psout"
-                              Name 39  "Color"
+                              Name 39  "@entryPointOutput.Color"
                               Decorate 16(g_tTex1df1) DescriptorSet 0
                               Decorate 16(g_tTex1df1) Binding 20
                               Decorate 26(g_tBuf1du1) DescriptorSet 0
                               Decorate 26(g_tBuf1du1) Binding 21
-                              Decorate 39(Color) Location 0
+                              Decorate 39(@entryPointOutput.Color) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -48,12 +48,12 @@
               32:    7(fvec4) ConstantComposite 31 31 31 31
               33:             TypePointer Function 7(fvec4)
               38:             TypePointer Output 7(fvec4)
-       39(Color):     38(ptr) Variable Output
+39(@entryPointOutput.Color):     38(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
               40:8(PS_OUTPUT) FunctionCall 10(@main()
               41:    7(fvec4) CompositeExtract 40 0
-                              Store 39(Color) 41
+                              Store 39(@entryPointOutput.Color) 41
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
diff --git a/Test/baseResults/spv.separate.frag.out b/Test/baseResults/spv.separate.frag.out
index 5b078af..3807242 100644
--- a/Test/baseResults/spv.separate.frag.out
+++ b/Test/baseResults/spv.separate.frag.out
@@ -8,7 +8,6 @@
                               Capability Sampled1D
                               Capability SampledCubeArray
                               Capability SampledBuffer
-                              Capability ImageMSArray
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 11 34
diff --git a/Test/baseResults/spv.shaderStencilExport.frag.out b/Test/baseResults/spv.shaderStencilExport.frag.out
index c0c7209..b0774de 100644
--- a/Test/baseResults/spv.shaderStencilExport.frag.out
+++ b/Test/baseResults/spv.shaderStencilExport.frag.out
@@ -1,10 +1,11 @@
 spv.shaderStencilExport.frag
-Missing functionality: shader stencil export
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 10
 
                               Capability Shader
+                              Capability StencilExportEXT
+                              Extension  "SPV_EXT_shader_stencil_export"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
                               EntryPoint Fragment 4  "main" 8
@@ -13,6 +14,7 @@
                               SourceExtension  "GL_ARB_shader_stencil_export"
                               Name 4  "main"
                               Name 8  "gl_FragStencilRefARB"
+                              Decorate 8(gl_FragStencilRefARB) BuiltIn FragStencilRefEXT
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out
index af3b63e..b57b87c 100644
--- a/Test/baseResults/spv.sparseTexture.frag.out
+++ b/Test/baseResults/spv.sparseTexture.frag.out
@@ -4,6 +4,7 @@
 // Id's are bound by 438
 
                               Capability Shader
+                              Capability StorageImageMultisample
                               Capability SampledRect
                               Capability SparseResidency
                               Capability SampledCubeArray
diff --git a/Test/baseResults/spv.stereoViewRendering.vert.out b/Test/baseResults/spv.stereoViewRendering.vert.out
index 2452c31..fbbdf17 100644
--- a/Test/baseResults/spv.stereoViewRendering.vert.out
+++ b/Test/baseResults/spv.stereoViewRendering.vert.out
@@ -8,6 +8,7 @@
                               Capability ShaderViewportIndexLayerNV
                               Capability ShaderViewportMaskNV
                               Capability ShaderStereoViewNV
+                              Extension  "SPV_EXT_shader_viewport_index_layer"
                               Extension  "SPV_NV_stereo_view_rendering"
                               Extension  "SPV_NV_viewport_array2"
                1:             ExtInstImport  "GLSL.std.450"
diff --git a/Test/baseResults/spv.subpass.frag.out b/Test/baseResults/spv.subpass.frag.out
index 661ebba..7db9e39 100644
--- a/Test/baseResults/spv.subpass.frag.out
+++ b/Test/baseResults/spv.subpass.frag.out
@@ -4,6 +4,7 @@
 // Id's are bound by 67
 
                               Capability Shader
+                              Capability StorageImageMultisample
                               Capability InputAttachment
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
diff --git a/Test/baseResults/spv.viewportArray2.tesc.out b/Test/baseResults/spv.viewportArray2.tesc.out
index 814f013..a8c7dc6 100644
--- a/Test/baseResults/spv.viewportArray2.tesc.out
+++ b/Test/baseResults/spv.viewportArray2.tesc.out
@@ -7,6 +7,7 @@
                               Capability MultiViewport
                               Capability ShaderViewportIndexLayerNV
                               Capability ShaderViewportMaskNV
+                              Extension  "SPV_EXT_shader_viewport_index_layer"
                               Extension  "SPV_NV_viewport_array2"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
diff --git a/Test/baseResults/spv.viewportArray2.vert.out b/Test/baseResults/spv.viewportArray2.vert.out
index 3b3e847..cc52905 100644
--- a/Test/baseResults/spv.viewportArray2.vert.out
+++ b/Test/baseResults/spv.viewportArray2.vert.out
@@ -8,6 +8,7 @@
                               Capability MultiViewport
                               Capability ShaderViewportIndexLayerNV
                               Capability ShaderViewportMaskNV
+                              Extension  "SPV_EXT_shader_viewport_index_layer"
                               Extension  "SPV_NV_viewport_array2"
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
diff --git a/Test/hlsl.clipdistance-1.frag b/Test/hlsl.clipdistance-1.frag
new file mode 100644
index 0000000..10813b3
--- /dev/null
+++ b/Test/hlsl.clipdistance-1.frag
@@ -0,0 +1,6 @@
+float4 main(in float4 pos : SV_Position, 
+            in float clip : SV_ClipDistance,
+            in float cull : SV_CullDistance) : SV_Target0
+{
+    return pos + clip + cull;
+}
diff --git a/Test/hlsl.clipdistance-1.geom b/Test/hlsl.clipdistance-1.geom
new file mode 100644
index 0000000..76c34b3
--- /dev/null
+++ b/Test/hlsl.clipdistance-1.geom
@@ -0,0 +1,19 @@
+struct S {
+    float4 pos     : SV_Position;
+    float2 clip    : SV_ClipDistance0;
+};
+
+[maxvertexcount(3)]
+void main(triangle in float4 pos[3] : SV_Position, 
+          triangle in uint VertexID[3] : VertexID,
+          inout LineStream<S> OutputStream,
+          triangle in float4 clip[3] : SV_ClipDistance)   // externally: an array 3 of array 4 (not vec4!) of float.
+{
+    S s;
+
+    s.pos = pos[0];
+    s.clip = clip[0].xy;
+
+    OutputStream.Append(s);
+}
+
diff --git a/Test/hlsl.clipdistance-2.frag b/Test/hlsl.clipdistance-2.frag
new file mode 100644
index 0000000..b6f88d5
--- /dev/null
+++ b/Test/hlsl.clipdistance-2.frag
@@ -0,0 +1,7 @@
+float4 main(in float4 pos : SV_Position,
+            in float2 clip[2] : SV_ClipDistance,               // array of vector float
+            in float2 cull[2] : SV_CullDistance)  : SV_Target0 // array of vector float
+{
+
+    return pos + clip[0][0] + cull[0][0];
+}
diff --git a/Test/hlsl.clipdistance-2.geom b/Test/hlsl.clipdistance-2.geom
new file mode 100644
index 0000000..90f047f
--- /dev/null
+++ b/Test/hlsl.clipdistance-2.geom
@@ -0,0 +1,19 @@
+struct S {
+    float4 pos     : SV_Position;
+    float2 clip[2] : SV_ClipDistance0;
+};
+
+[maxvertexcount(3)]
+void main(triangle in float4 pos[3] : SV_Position, 
+          triangle in uint VertexID[3] : VertexID,
+          inout LineStream<S> OutputStream,
+          triangle in float2 clip[3][2] : SV_ClipDistance) // externally: an array 3 of array 4 of float.
+{
+    S s;
+
+    s.pos = pos[0];
+    s.clip[0] = clip[0][0];
+    s.clip[1] = clip[0][1];
+
+    OutputStream.Append(s);
+}
diff --git a/Test/hlsl.clipdistance-3.frag b/Test/hlsl.clipdistance-3.frag
new file mode 100644
index 0000000..e2b6b86
--- /dev/null
+++ b/Test/hlsl.clipdistance-3.frag
@@ -0,0 +1,6 @@
+float4 main(in float4 pos : SV_Position,
+            in float clip[2] : SV_ClipDistance,              // array of scalar float
+            in float cull[2] : SV_CullDistance) : SV_Target0 // array of scalar float
+{
+    return pos + clip[0] + cull[0];
+}
diff --git a/Test/hlsl.clipdistance-3.geom b/Test/hlsl.clipdistance-3.geom
new file mode 100644
index 0000000..2aa4cd4
--- /dev/null
+++ b/Test/hlsl.clipdistance-3.geom
@@ -0,0 +1,20 @@
+struct S {
+    float4 pos     : SV_Position;
+    float2 clip0   : SV_ClipDistance0;  // clip0 and clip1 form an array of float[4] externally.
+    float2 clip1   : SV_ClipDistance1;
+};
+
+[maxvertexcount(3)]
+void main(triangle in float4 pos[3] : SV_Position, 
+          triangle in uint VertexID[3] : VertexID,
+          inout LineStream<S> OutputStream,
+          triangle in float4 clip[3] : SV_ClipDistance)   // externally: an array 3 of array 4 (not vec4!) of float.
+{
+    S s;
+
+    s.pos = pos[0];
+    s.clip0 = clip[0].xy;
+    s.clip1 = clip[0].zw;
+
+    OutputStream.Append(s);
+}
diff --git a/Test/hlsl.clipdistance-4.frag b/Test/hlsl.clipdistance-4.frag
new file mode 100644
index 0000000..6144160
--- /dev/null
+++ b/Test/hlsl.clipdistance-4.frag
@@ -0,0 +1,9 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float4 ClipRect             : SV_ClipDistance0;  // vector in split struct
+};
+
+float4 main(const VS_OUTPUT v) : SV_Target0
+{
+    return v.Position + v.ClipRect;
+}
diff --git a/Test/hlsl.clipdistance-4.geom b/Test/hlsl.clipdistance-4.geom
new file mode 100644
index 0000000..ff296a8
--- /dev/null
+++ b/Test/hlsl.clipdistance-4.geom
@@ -0,0 +1,21 @@
+struct S {
+    float4 pos     : SV_Position;
+    float2 clip0   : SV_ClipDistance0;  // clip0 and clip1 form an array of float[4] externally.
+    float2 clip1   : SV_ClipDistance1;
+};
+
+[maxvertexcount(3)]
+void main(triangle in float4 pos[3] : SV_Position, 
+          triangle in uint VertexID[3] : VertexID,
+          inout LineStream<S> OutputStream,
+          triangle in float2 clip0[3] : SV_ClipDistance0,  // test input arrayed semantic vars
+          triangle in float2 clip1[3] : SV_ClipDistance1)
+{
+    S s;
+
+    s.pos = pos[0];
+    s.clip0 = clip0[0];
+    s.clip1 = clip1[0];
+
+    OutputStream.Append(s);
+}
diff --git a/Test/hlsl.clipdistance-5.frag b/Test/hlsl.clipdistance-5.frag
new file mode 100644
index 0000000..4722999
--- /dev/null
+++ b/Test/hlsl.clipdistance-5.frag
@@ -0,0 +1,9 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float2 ClipRect[2]          : SV_ClipDistance0;  // array of float2 in split struct
+};
+
+float4 main(const VS_OUTPUT v) : SV_Target0
+{
+    return v.Position + v.ClipRect[0].x + v.ClipRect[1].x;
+}
diff --git a/Test/hlsl.clipdistance-6.frag b/Test/hlsl.clipdistance-6.frag
new file mode 100644
index 0000000..646197b
--- /dev/null
+++ b/Test/hlsl.clipdistance-6.frag
@@ -0,0 +1,10 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float4 clip0                : SV_ClipDistance0;  // multiple semantic IDs, two vec4s (no extra packing)
+    float4 clip1                : SV_ClipDistance1;  // ...
+};
+
+float4 main(VS_OUTPUT v) : SV_Target0
+{
+    return v.Position + v.clip0 + v.clip1;
+}
diff --git a/Test/hlsl.clipdistance-7.frag b/Test/hlsl.clipdistance-7.frag
new file mode 100644
index 0000000..1a26df8
--- /dev/null
+++ b/Test/hlsl.clipdistance-7.frag
@@ -0,0 +1,10 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float3 clip0                : SV_ClipDistance0;  // multiple semantic IDs, vec3+vec4 (skip)
+    float4 clip1                : SV_ClipDistance1;  // ...
+};
+
+float4 main(VS_OUTPUT v) : SV_Target0
+{
+    return v.Position + v.clip0.x + v.clip1.x;
+}
diff --git a/Test/hlsl.clipdistance-8.frag b/Test/hlsl.clipdistance-8.frag
new file mode 100644
index 0000000..2edf194
--- /dev/null
+++ b/Test/hlsl.clipdistance-8.frag
@@ -0,0 +1,10 @@
+struct VS_OUTPUT        {
+    float4 Position             : SV_Position;
+    float3 clip0                : SV_ClipDistance0;  // multiple semantic IDs, vec3+float (pack)
+    float  clip1                : SV_ClipDistance1;  // ...
+};
+
+float4 main(VS_OUTPUT v) : SV_Target0
+{
+    return v.Position + v.clip0.x + v.clip1;
+}
diff --git a/Test/hlsl.clipdistance-9.frag b/Test/hlsl.clipdistance-9.frag
new file mode 100644
index 0000000..cbe940a
--- /dev/null
+++ b/Test/hlsl.clipdistance-9.frag
@@ -0,0 +1,8 @@
+
+// Test packing 0 and 1 semantics into single array[4], from in fn params.
+float4 main(in float4 Position : SV_Position,
+            in float3 clip0 : SV_ClipDistance0,
+            in float clip1 : SV_ClipDistance1) : SV_Target0
+{
+    return Position + clip0.x + clip1;
+}
diff --git a/Test/hlsl.domain.1.tese b/Test/hlsl.domain.1.tese
index 5039410..7366e9b 100644
--- a/Test/hlsl.domain.1.tese
+++ b/Test/hlsl.domain.1.tese
@@ -18,11 +18,11 @@
 }; 
 
 [domain ( "tri" )] 
-gs_in_t main (const OutputPatch <ds_in_t, 3> i, float3 tesscoord : SV_DomainLocation, pcf_in_t pcf_data ) 
+gs_in_t main (const OutputPatch <ds_in_t, 3> i, float f : msem, float3 tesscoord : SV_DomainLocation, pcf_in_t pcf_data ) 
 { 
     gs_in_t o; 
 
-    o.pos  = i[0].pos + tesscoord.x;
+    o.pos  = i[0].pos + tesscoord.x * f;
     o.norm = i[0].norm + tesscoord.y;
 
     tesscoord.z;
diff --git a/Test/hlsl.flattenOpaqueInit.vert b/Test/hlsl.flattenOpaqueInit.vert
index 5efb02e..75d28a9 100644
--- a/Test/hlsl.flattenOpaqueInit.vert
+++ b/Test/hlsl.flattenOpaqueInit.vert
@@ -6,8 +6,17 @@
     return tex.tex.Sample(tex.smpl, float2(0.3, 0.4));

 }

 

+FxaaTex fillOpaque()

+{

+    FxaaTex t;

+    t.smpl = g_tInputTexture_sampler;

+    t.tex = g_tInputTexture;

+    return t;

+}

+

 float4 main() : SV_TARGET0

 {

-    FxaaTex tex = { g_tInputTexture_sampler, g_tInputTexture };

-    return lookUp(tex);

+    FxaaTex tex1 = { g_tInputTexture_sampler, g_tInputTexture };

+    FxaaTex tex2 = fillOpaque();

+    return lookUp(tex1);

 }
\ No newline at end of file
diff --git a/Test/hlsl.function.frag b/Test/hlsl.function.frag
index 4d11678..5834b31 100644
--- a/Test/hlsl.function.frag
+++ b/Test/hlsl.function.frag
@@ -8,7 +8,7 @@
     return 7;

 }

 

-float4 fun4(uint id1, uint id2)

+float4 fun4(uint id1, uniform uint id2)

 {

     return id1 * id2;

 }

diff --git a/Test/hlsl.matpack-1.frag b/Test/hlsl.matpack-1.frag
new file mode 100644
index 0000000..5d02a3e
--- /dev/null
+++ b/Test/hlsl.matpack-1.frag
@@ -0,0 +1,27 @@
+struct MyBuffer1
+{
+    column_major float4x4 mat1;
+    row_major    float4x4 mat2;
+    float4 vec1;
+    float  foo;
+};
+
+struct MyBuffer2
+{
+    row_major float4x4 mat1;
+    float4 vec1;
+};
+
+cbuffer Example
+{
+    MyBuffer1 g_MyBuffer1;
+    MyBuffer2 g_MyBuffer2;
+    column_major float4x4 mat1a;
+};
+
+float4 main() : SV_Target0
+{
+    return mul(g_MyBuffer1.mat1, g_MyBuffer1.vec1) +
+           mul(g_MyBuffer2.mat1, g_MyBuffer2.vec1);
+}
+
diff --git a/Test/hlsl.matpack-pragma.frag b/Test/hlsl.matpack-pragma.frag
new file mode 100644
index 0000000..a9a2833
--- /dev/null
+++ b/Test/hlsl.matpack-pragma.frag
@@ -0,0 +1,33 @@
+#pragma pack_matrix(row_major)
+
+struct MyBuffer1
+{
+    column_major float4x4 mat1;
+    row_major    float4x4 mat2;
+    /*floating*/ float4x4 mat3;
+};
+
+#pragma pack_matrix(column_major)
+
+struct MyBuffer2
+{
+    column_major float4x4 mat1;
+    row_major    float4x4 mat2;
+    /*floating*/ float4x4 mat3;
+};
+
+#pragma pack_matrix(random_string_foo)
+
+cbuffer Example
+{
+    MyBuffer1 g_MyBuffer1;
+    MyBuffer2 g_MyBuffer2;
+    column_major float4x4 mat1a;
+};
+
+float4 main() : SV_Target0
+{
+    return 
+        g_MyBuffer1.mat1[0] + g_MyBuffer1.mat2[0] + g_MyBuffer1.mat3[0] +
+        g_MyBuffer2.mat1[0] + g_MyBuffer2.mat2[0] + g_MyBuffer2.mat3[0];
+}
diff --git a/Test/hlsl.preprocessor.frag b/Test/hlsl.preprocessor.frag
new file mode 100644
index 0000000..dba341e
--- /dev/null
+++ b/Test/hlsl.preprocessor.frag
@@ -0,0 +1,13 @@
+#define DEFINE_TEXTURE(name) Texture2D name; SamplerState name##_ss;
+#define SAMPLE_TEXTURE(name, uv) name.Sample(name##_ss, (uv).xy)
+
+#define test_texture2 test_texture
+
+DEFINE_TEXTURE(test_texture)
+
+float4 main(float4 input : TEXCOORD0) : SV_TARGET
+{
+    float4 tex = SAMPLE_TEXTURE(test_texture2, input.xy);
+    return tex;
+}
+
diff --git a/Test/hlsl.semantic-1.vert b/Test/hlsl.semantic-1.vert
new file mode 100644
index 0000000..ec92428
--- /dev/null
+++ b/Test/hlsl.semantic-1.vert
@@ -0,0 +1,24 @@
+#define DLAYER 3
+
+#define DMACRO1 TEXCOORD1
+#define DMACRO(num) TEXCOORD##num
+
+struct S {
+	float4 pos	: POSITION;
+	float2 UV0    	: TEXCOORD0;
+	float2 UV1	: DMACRO1;
+	float2 UV2	: DMACRO(2);
+	float2 UV3	: DMACRO(DLAYER);
+};
+
+
+S main(float4 v : POSITION)
+{
+    S s;
+    s.pos = v;
+    s.UV0 = float2(v.x,v.x);
+    s.UV1 = float2(v.y,v.y);
+    s.UV2 = float2(v.z,v.z);
+    s.UV3 = float2(v.w,v.w);
+    return s;
+}
diff --git a/Test/hlsl.semantic.geom b/Test/hlsl.semantic.geom
index c4d7aba..fc6a53a 100644
--- a/Test/hlsl.semantic.geom
+++ b/Test/hlsl.semantic.geom
@@ -1,4 +1,5 @@
 struct S {
+    float clip0 : SV_Position;
     float clip0 : SV_ClipDistance0;
     float cull0 : SV_CullDistance0;
     uint vpai   : SV_ViewportArrayIndex;
@@ -7,9 +8,9 @@
 };
 
 [maxvertexcount(4)]
-S main(triangle in uint VertexID[3] : VertexID,
+void main(triangle in uint VertexID[3] : VertexID,
        inout LineStream<S> OutputStream)
 {
     S s;
-    return s;
+    OutputStream.Append(s);
 }
diff --git a/Test/hlsl.struct.split.assign.frag b/Test/hlsl.struct.split.assign.frag
index e7fe028..d9921f3 100644
--- a/Test/hlsl.struct.split.assign.frag
+++ b/Test/hlsl.struct.split.assign.frag
@@ -8,5 +8,5 @@
     S a[3];
     input = a;
 
-    return float3(1.0);
+    return a[1].pos;
 }
diff --git a/Test/hlsl.texture.struct.frag b/Test/hlsl.texture.struct.frag
new file mode 100644
index 0000000..461469c
--- /dev/null
+++ b/Test/hlsl.texture.struct.frag
@@ -0,0 +1,55 @@
+struct s1_t {
+    float  c0;
+    float2 c1;
+    float  c2;
+};
+
+struct s2_t {
+    float  c0;
+    float3 c1;
+};
+
+struct s3_t {
+    float2  c0;
+    float1  c1;
+};
+
+struct s4_t {
+    int  c0;
+    int2 c1;
+    int  c2;
+};
+
+struct s5_t {
+    uint c0;
+    uint c1;
+};
+
+SamplerState g_sSamp;
+Texture2D <s1_t>   g_tTex2s1;
+Texture2D <s2_t>   g_tTex2s2;
+Texture2D <s3_t>   g_tTex2s3;
+Texture2D <s4_t>   g_tTex2s4;
+Texture2D <s5_t>   g_tTex2s5;
+
+Texture2D <s1_t>   g_tTex2s1a; // same type as g_tTex2s1, to test fn signature matching.
+
+// function overloading to test name mangling with textures templatized on structs
+s1_t fn1(Texture2D <s1_t> t1) { return t1 . Sample(g_sSamp, float2(0.6, 0.61)); }
+s2_t fn1(Texture2D <s2_t> t2) { return t2 . Sample(g_sSamp, float2(0.6, 0.61)); }
+
+float4 main() : SV_Target0
+{
+    s1_t s1 = g_tTex2s1 . Sample(g_sSamp, float2(0.1, 0.11));
+    s2_t s2 = g_tTex2s2 . Sample(g_sSamp, float2(0.2, 0.21));
+    s3_t s3 = g_tTex2s3 . Sample(g_sSamp, float2(0.3, 0.31));
+    s4_t s4 = g_tTex2s4 . Sample(g_sSamp, float2(0.4, 0.41));
+    s5_t s5 = g_tTex2s5 . Sample(g_sSamp, float2(0.5, 0.51));
+
+    s1_t r0 = fn1(g_tTex2s1);
+    s2_t r1 = fn1(g_tTex2s2);
+    s1_t r2 = fn1(g_tTex2s1a);
+
+    return 0;
+}
+
diff --git a/Test/hlsl.texture.subvec4.frag b/Test/hlsl.texture.subvec4.frag
index 9e057d5..56fd410 100644
--- a/Test/hlsl.texture.subvec4.frag
+++ b/Test/hlsl.texture.subvec4.frag
@@ -11,7 +11,7 @@
 
 SamplerState g_sSamp;
 
-float4 main()
+float4 main() : SV_Target0
 {
     uint MipLevel;
     uint WidthU;
diff --git a/Test/runtests b/Test/runtests
index c5a9337..f0da75f 100755
--- a/Test/runtests
+++ b/Test/runtests
@@ -109,15 +109,21 @@
 echo Testing SPV no location
 $EXE -V -C spv.noLocation.vert > $TARGETDIR/spv.noLocation.vert.out
 diff -b $BASEDIR/spv.noLocation.vert.out $TARGETDIR/spv.noLocation.vert.out || HASERROR=1
-$EXE -H --aml spv.noBuiltInLoc.vert > $TARGETDIR/spv.noBuiltInLoc.vert.out
+$EXE -G -H --aml spv.noBuiltInLoc.vert > $TARGETDIR/spv.noBuiltInLoc.vert.out
 diff -b $BASEDIR/spv.noBuiltInLoc.vert.out $TARGETDIR/spv.noBuiltInLoc.vert.out || HASERROR=1
+$EXE -G spv.looseUniformNoLoc.vert > $TARGETDIR/spv.looseUniformNoLoc.vert.out
+diff -b $BASEDIR/spv.looseUniformNoLoc.vert.out $TARGETDIR/spv.looseUniformNoLoc.vert.out || HASERROR=1
 
 #
 # Testing debug information
 #
 echo Testing SPV Debug Information
-$EXE -g -H spv.debugInfo.frag > $TARGETDIR/spv.debugInfo.frag.out
+$EXE -g --relaxed-errors --suppress-warnings --aml --hlsl-offsets --nsf \
+     -G -H spv.debugInfo.frag --rsb frag 3 > $TARGETDIR/spv.debugInfo.frag.out
 diff -b $BASEDIR/spv.debugInfo.frag.out $TARGETDIR/spv.debugInfo.frag.out || HASERROR=1
+$EXE -g -D -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \
+     --sep origMain -H spv.hlslDebugInfo.vert --rsb vert t0 0 0 > $TARGETDIR/spv.hlslDebugInfo.frag.out
+diff -b $BASEDIR/spv.hlslDebugInfo.frag.out $TARGETDIR/spv.hlslDebugInfo.frag.out || HASERROR=1
 
 #
 # Testing Includer
diff --git a/Test/spv.450.geom b/Test/spv.450.geom
index 8aefe50..3489a88 100644
--- a/Test/spv.450.geom
+++ b/Test/spv.450.geom
@@ -9,4 +9,6 @@
 void main()

 {

     gl_PointSize = gl_in[1].gl_PointSize;

+    gl_Layer = 2;

+    gl_ViewportIndex = 3;

 }

diff --git a/Test/spv.450.tesc b/Test/spv.450.tesc
index c3719f9..47b9a40 100644
--- a/Test/spv.450.tesc
+++ b/Test/spv.450.tesc
@@ -2,7 +2,7 @@
 

 layout(vertices = 4) out;

 

-patch out vec4 patchOut;

+layout(location=1) patch out vec4 patchOut;

 

 struct S {

     float sMem1;  // should not see a patch decoration

@@ -17,6 +17,7 @@
 

 void main()

 {

+    gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
 }

 

 layout(location = 2) patch out SingleBlock {

diff --git a/Test/spv.460.comp b/Test/spv.460.comp
new file mode 100644
index 0000000..eb671a3
--- /dev/null
+++ b/Test/spv.460.comp
@@ -0,0 +1,9 @@
+#version 460

+

+void main()

+{

+    bool b1;

+    b1 = anyInvocation(b1);

+    b1 = allInvocations(b1);

+    b1 = allInvocationsEqual(b1);

+}

diff --git a/Test/spv.460.frag b/Test/spv.460.frag
new file mode 100644
index 0000000..9eb8bf4
--- /dev/null
+++ b/Test/spv.460.frag
@@ -0,0 +1,17 @@
+#version 460 core

+

+layout(binding = 0) uniform atomic_uint aui;

+uint ui;

+

+void main()

+{

+    atomicCounterAdd(aui, ui);

+    atomicCounterSubtract(aui, ui);

+    atomicCounterMin(aui, ui);

+    atomicCounterMax(aui, ui);

+    atomicCounterAnd(aui, ui);

+    atomicCounterOr(aui, ui);

+    atomicCounterXor(aui, ui);

+    atomicCounterExchange(aui, ui);

+    atomicCounterCompSwap(aui, ui, ui);

+}

diff --git a/Test/spv.460.vert b/Test/spv.460.vert
new file mode 100644
index 0000000..72d4e77
--- /dev/null
+++ b/Test/spv.460.vert
@@ -0,0 +1,6 @@
+#version 460

+

+void main()

+{

+    int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID;

+}

diff --git a/Test/spv.hlslDebugInfo.vert b/Test/spv.hlslDebugInfo.vert
new file mode 100644
index 0000000..b2bc187
--- /dev/null
+++ b/Test/spv.hlslDebugInfo.vert
@@ -0,0 +1,4 @@
+float4 origMain() : SV_Position

+{

+    return (float4)0;

+}

diff --git a/Test/spv.imageLoadStoreLod.frag b/Test/spv.imageLoadStoreLod.frag
new file mode 100644
index 0000000..0da1da1
--- /dev/null
+++ b/Test/spv.imageLoadStoreLod.frag
@@ -0,0 +1,36 @@
+#version 450 core

+

+#extension GL_AMD_shader_image_load_store_lod: enable

+

+layout(rgba32f,  binding = 0) uniform image1D         i1D;

+layout(rgba32f,  binding = 1) uniform image2D         i2D;

+layout(rgba32f,  binding = 2) uniform image3D         i3D;

+layout(rgba32i,  binding = 3) uniform iimageCube      iiCube;

+layout(rgba32i,  binding = 4) uniform iimage1DArray   ii1DArray;

+layout(rgba32ui, binding = 5) uniform uimage2DArray   ui2DArray;

+layout(rgba32ui, binding = 6) uniform uimageCubeArray uiCubeArray;

+

+layout(location = 0) out vec4 fragColor;

+

+void main()

+{

+    const int c1 = 1;

+    const ivec2 c2 = ivec2(2, 3);

+    const ivec3 c3 = ivec3(4, 5, 6);

+

+    const int lod = 3;

+

+    vec4 f4 = vec4(0.0);

+    f4 += imageLoadLodAMD(i1D, c1, lod);

+    f4 += imageLoadLodAMD(i2D, c2, lod);

+    f4 += imageLoadLodAMD(i3D, c3, lod);

+

+    imageStoreLodAMD(iiCube, c3, lod, ivec4(f4));

+    imageStoreLodAMD(ii1DArray, c2, lod, ivec4(f4));

+

+    uvec4 u4;

+    sparseImageLoadLodAMD(ui2DArray, c3, lod, u4);

+    sparseImageLoadLodAMD(uiCubeArray, c3, lod, u4);

+

+    fragColor = f4 + vec4(u4);

+}
\ No newline at end of file
diff --git a/Test/spv.looseUniformNoLoc.vert b/Test/spv.looseUniformNoLoc.vert
new file mode 100644
index 0000000..e887359
--- /dev/null
+++ b/Test/spv.looseUniformNoLoc.vert
@@ -0,0 +1,15 @@
+#version 450 core

+

+layout(location = 0)

+in  vec4 foo;

+

+layout(location = 0)

+out vec4 bar;

+

+uniform vec4 uv;

+

+void main()

+{

+    bar = foo;

+    gl_Position = foo;

+}
\ No newline at end of file
diff --git a/Test/spv.noBuiltInLoc.vert b/Test/spv.noBuiltInLoc.vert
index e754892..5fbe252 100644
--- a/Test/spv.noBuiltInLoc.vert
+++ b/Test/spv.noBuiltInLoc.vert
@@ -6,6 +6,10 @@
 layout(location = 0)

 out vec4 bar;

 

+uniform vec4 uv1;

+uniform float uv2;

+uniform vec3 uv3;

+

 void main()

 {

     bar = foo;

diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h
index 0f2c908..0820154 100644
--- a/glslang/Include/Common.h
+++ b/glslang/Include/Common.h
@@ -63,7 +63,7 @@
 }
 #endif
 
-#if defined(_MSC_VER) && _MSC_VER < 1700
+#if defined(_MSC_VER) && _MSC_VER < 1800
 inline long long int strtoll (const char* str, char** endptr, int base)
 {
   return _strtoi64(str, endptr, base);
diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h
index 72c1388..b5b91f5 100644
--- a/glslang/Include/Types.h
+++ b/glslang/Include/Types.h
@@ -80,7 +80,19 @@
     bool   combined : 1;  // true means texture is combined with a sampler, false means texture with no sampler
     bool    sampler : 1;  // true means a pure sampler, other fields should be clear()
     bool   external : 1;  // GL_OES_EGL_image_external
-    unsigned int vectorSize : 3;  // return vector size.  TODO: support arbitrary types.
+    unsigned int vectorSize : 3;  // vector return type size.
+
+    // Some languages support structures as sample results.  Storing the whole structure in the
+    // TSampler is too large, so there is an index to a separate table.
+    static const unsigned structReturnIndexBits = 4;                        // number of index bits to use.
+    static const unsigned structReturnSlots = (1<<structReturnIndexBits)-1; // number of valid values
+    static const unsigned noReturnStruct = structReturnSlots;               // value if no return struct type.
+
+    // Index into a language specific table of texture return structures.
+    unsigned int structReturnIndex : structReturnIndexBits;
+
+    // Encapsulate getting members' vector sizes packed into the vectorSize bitfield.
+    unsigned int getVectorSize() const { return vectorSize; }
 
     bool isImage()       const { return image && dim != EsdSubpass; }
     bool isSubpass()     const { return dim == EsdSubpass; }
@@ -90,6 +102,7 @@
     bool isShadow()      const { return shadow; }
     bool isArrayed()     const { return arrayed; }
     bool isMultiSample() const { return ms; }
+    bool hasReturnStruct() const { return structReturnIndex != noReturnStruct; }
 
     void clear()
     {
@@ -102,6 +115,9 @@
         combined = false;
         sampler = false;
         external = false;
+        structReturnIndex = noReturnStruct;
+
+        // by default, returns a single vec4;
         vectorSize = 4;
     }
 
@@ -160,16 +176,17 @@
 
     bool operator==(const TSampler& right) const
     {
-        return type == right.type &&
-                dim == right.dim &&
-            arrayed == right.arrayed &&
-             shadow == right.shadow &&
-                 ms == right.ms &&
-              image == right.image &&
-           combined == right.combined &&
-            sampler == right.sampler &&
-           external == right.external &&
-         vectorSize == right.vectorSize;
+        return      type == right.type &&
+                     dim == right.dim &&
+                 arrayed == right.arrayed &&
+                  shadow == right.shadow &&
+                      ms == right.ms &&
+                   image == right.image &&
+                combined == right.combined &&
+                 sampler == right.sampler &&
+                external == right.external &&
+              vectorSize == right.vectorSize &&
+       structReturnIndex == right.structReturnIndex;            
     }
 
     bool operator!=(const TSampler& right) const
@@ -1365,51 +1382,12 @@
         return false;
     }
     virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; }
+    virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
 
     // "Image" is a superset of "Subpass"
     virtual bool isImage() const   { return basicType == EbtSampler && getSampler().isImage(); }
     virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
 
-    virtual bool isBuiltInInterstageIO(EShLanguage language) const
-    {
-        return isPerVertexAndBuiltIn(language) || isLooseAndBuiltIn(language);
-    }
-
-    // Return true if this is an interstage IO builtin
-    virtual bool isPerVertexAndBuiltIn(EShLanguage language) const
-    {
-        if (language == EShLangFragment)
-            return false;
-
-        // Any non-fragment stage
-        switch (getQualifier().builtIn) {
-        case EbvPosition:
-        case EbvPointSize:
-        case EbvClipDistance:
-        case EbvCullDistance:
-#ifdef NV_EXTENSIONS
-        case EbvLayer:
-        case EbvViewportMaskNV:
-        case EbvSecondaryPositionNV:
-        case EbvSecondaryViewportMaskNV:
-        case EbvPositionPerViewNV:
-        case EbvViewportMaskPerViewNV:
-#endif
-            return true;
-        default:
-            return false;
-        }
-    }
-
-    // Return true if this is a loose builtin
-    virtual bool isLooseAndBuiltIn(EShLanguage language) const
-    {
-        if (getQualifier().builtIn == EbvNone)
-            return false;
-
-        return !isPerVertexAndBuiltIn(language);
-    }
-    
     // return true if this type contains any subtype which satisfies the given predicate.
     template <typename P> 
     bool contains(P predicate) const
@@ -1451,10 +1429,10 @@
         return contains([](const TType* t) { return t->isOpaque(); } );
     }
 
-    // Recursively checks if the type contains an interstage IO builtin
-    virtual bool containsBuiltInInterstageIO(EShLanguage language) const
+    // Recursively checks if the type contains a built-in variable
+    virtual bool containsBuiltIn() const
     {
-        return contains([language](const TType* t) { return t->isBuiltInInterstageIO(language); } );
+        return contains([](const TType* t) { return t->isBuiltIn(); } );
     }
 
     virtual bool containsNonOpaque() const
diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h
index 0922d12..6149b19 100644
--- a/glslang/Include/intermediate.h
+++ b/glslang/Include/intermediate.h
@@ -420,6 +420,15 @@
     EOpAtomicCounterIncrement,
     EOpAtomicCounterDecrement,
     EOpAtomicCounter,
+    EOpAtomicCounterAdd,
+    EOpAtomicCounterSubtract,
+    EOpAtomicCounterMin,
+    EOpAtomicCounterMax,
+    EOpAtomicCounterAnd,
+    EOpAtomicCounterOr,
+    EOpAtomicCounterXor,
+    EOpAtomicCounterExchange,
+    EOpAtomicCounterCompSwap,
 
     EOpAny,
     EOpAll,
@@ -584,6 +593,10 @@
     EOpImageQuerySamples,
     EOpImageLoad,
     EOpImageStore,
+#ifdef AMD_EXTENSIONS
+    EOpImageLoadLod,
+    EOpImageStoreLod,
+#endif
     EOpImageAtomicAdd,
     EOpImageAtomicMin,
     EOpImageAtomicMax,
@@ -596,6 +609,9 @@
     EOpSubpassLoad,
     EOpSubpassLoadMS,
     EOpSparseImageLoad,
+#ifdef AMD_EXTENSIONS
+    EOpSparseImageLoadLod,
+#endif
 
     EOpImageGuardEnd,
 
@@ -1189,6 +1205,11 @@
             cracked.offsets = true;
             cracked.lod     = true;
             break;
+        case EOpImageLoadLod:
+        case EOpImageStoreLod:
+        case EOpSparseImageLoadLod:
+            cracked.lod = true;
+            break;
 #endif
         case EOpSubpassLoad:
         case EOpSubpassLoadMS:
diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp
index 5cd167e..e71ec5e 100644
--- a/glslang/MachineIndependent/Initialize.cpp
+++ b/glslang/MachineIndependent/Initialize.cpp
@@ -1375,9 +1375,23 @@
         if ((profile != EEsProfile && version >= 300) ||
             (profile == EEsProfile && version >= 310)) {
             commonBuiltins.append(
-                "uint atomicCounterIncrement(atomic_uint x);"
-                "uint atomicCounterDecrement(atomic_uint x);"
-                "uint atomicCounter(atomic_uint x);"
+                "uint atomicCounterIncrement(atomic_uint);"
+                "uint atomicCounterDecrement(atomic_uint);"
+                "uint atomicCounter(atomic_uint);"
+
+                "\n");
+        }
+        if (profile != EEsProfile && version >= 460) {
+            commonBuiltins.append(
+                "uint atomicCounterAdd(atomic_uint, uint);"
+                "uint atomicCounterSubtract(atomic_uint, uint);"
+                "uint atomicCounterMin(atomic_uint, uint);"
+                "uint atomicCounterMax(atomic_uint, uint);"
+                "uint atomicCounterAnd(atomic_uint, uint);"
+                "uint atomicCounterOr(atomic_uint, uint);"
+                "uint atomicCounterXor(atomic_uint, uint);"
+                "uint atomicCounterExchange(atomic_uint, uint);"
+                "uint atomicCounterCompSwap(atomic_uint, uint, uint);"
 
                 "\n");
         }
@@ -1562,7 +1576,7 @@
             "\n");
     }
 
-        // GL_ARB_shader_group_vote
+    // GL_ARB_shader_group_vote
     if (profile != EEsProfile && version >= 430) {
         commonBuiltins.append(
             "bool anyInvocationARB(bool);"
@@ -1572,6 +1586,15 @@
             "\n");
     }
 
+    if (profile != EEsProfile && version >= 460) {
+        commonBuiltins.append(
+            "bool anyInvocation(bool);"
+            "bool allInvocations(bool);"
+            "bool allInvocationsEqual(bool);"
+
+            "\n");
+    }
+
 #ifdef AMD_EXTENSIONS
     // GL_AMD_shader_ballot
     if (profile != EEsProfile && version >= 450) {
@@ -3402,12 +3425,23 @@
                 "in int gl_DrawIDARB;"
                 );
         }
+        if (version >= 450) {
+            stageBuiltins[EShLangVertex].append(
+                "out int gl_ViewportIndex;"
+                "out int gl_Layer;"
+                );
+        }
+        if (version >= 460) {
+            stageBuiltins[EShLangVertex].append(
+                "in int gl_BaseVertex;"
+                "in int gl_BaseInstance;"
+                "in int gl_DrawID;"
+                );
+        }
 
 #ifdef NV_EXTENSIONS
         if (version >= 450)
             stageBuiltins[EShLangVertex].append(
-                "out int gl_ViewportIndex;"
-                "out int gl_Layer;"
                 "out int gl_ViewportMask[];"             // GL_NV_viewport_array2
                 "out int gl_SecondaryViewportMaskNV[];"  // GL_NV_stereo_view_rendering
                 "out vec4 gl_SecondaryPositionNV;"       // GL_NV_stereo_view_rendering
@@ -3700,11 +3734,15 @@
             "};"
             "\n");
 
+        if (version >= 450)
+            stageBuiltins[EShLangTessEvaluation].append(
+                "out int gl_ViewportIndex;"
+                "out int gl_Layer;"
+                );
+
 #ifdef NV_EXTENSIONS
         if (version >= 450)
             stageBuiltins[EShLangTessEvaluation].append(
-                "out int  gl_ViewportIndex;"
-                "out int  gl_Layer;"
                 "out int  gl_ViewportMask[];"             // GL_NV_viewport_array2
                 "out vec4 gl_SecondaryPositionNV;"        // GL_NV_stereo_view_rendering
                 "out int  gl_SecondaryViewportMaskNV[];"  // GL_NV_stereo_view_rendering
@@ -4208,6 +4246,43 @@
             }
         }
     }
+
+#ifdef AMD_EXTENSIONS
+    if (sampler.dim == EsdRect || sampler.dim == EsdBuffer || sampler.shadow || sampler.ms)
+        return;
+
+    if (profile == EEsProfile || version < 450)
+        return;
+
+    TString imageLodParams = typeName;
+    if (dims == 1)
+        imageLodParams.append(", int");
+    else {
+        imageLodParams.append(", ivec");
+        imageLodParams.append(postfixes[dims]);
+    }
+    imageLodParams.append(", int");
+
+    commonBuiltins.append(prefixes[sampler.type]);
+    commonBuiltins.append("vec4 imageLoadLodAMD(readonly volatile coherent ");
+    commonBuiltins.append(imageLodParams);
+    commonBuiltins.append(");\n");
+
+    commonBuiltins.append("void imageStoreLodAMD(writeonly volatile coherent ");
+    commonBuiltins.append(imageLodParams);
+    commonBuiltins.append(", ");
+    commonBuiltins.append(prefixes[sampler.type]);
+    commonBuiltins.append("vec4);\n");
+
+    if (sampler.dim != Esd1D) {
+        commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent ");
+        commonBuiltins.append(imageLodParams);
+        commonBuiltins.append(", out ");
+        commonBuiltins.append(prefixes[sampler.type]);
+        commonBuiltins.append("vec4");
+        commonBuiltins.append(");\n");
+    }
+#endif
 }
 
 //
@@ -5216,16 +5291,19 @@
     switch(language) {
     case EShLangVertex:
         if (profile != EEsProfile) {
-            symbolTable.setVariableExtensions("gl_BaseVertexARB",   1, &E_GL_ARB_shader_draw_parameters);
-            symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters);
-            symbolTable.setVariableExtensions("gl_DrawIDARB",       1, &E_GL_ARB_shader_draw_parameters);
-
-            BuiltInVariable("gl_BaseVertexARB",   EbvBaseVertex,   symbolTable);
-            BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable);
-            BuiltInVariable("gl_DrawIDARB",       EbvDrawId,       symbolTable);
-        }
-
-        if (profile != EEsProfile) {
+            if (version >= 440) {
+                symbolTable.setVariableExtensions("gl_BaseVertexARB",   1, &E_GL_ARB_shader_draw_parameters);
+                symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters);
+                symbolTable.setVariableExtensions("gl_DrawIDARB",       1, &E_GL_ARB_shader_draw_parameters);
+                BuiltInVariable("gl_BaseVertexARB",   EbvBaseVertex,   symbolTable);
+                BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable);
+                BuiltInVariable("gl_DrawIDARB",       EbvDrawId,       symbolTable);
+            }
+            if (version >= 460) {
+                BuiltInVariable("gl_BaseVertex",   EbvBaseVertex,   symbolTable);
+                BuiltInVariable("gl_BaseInstance", EbvBaseInstance, symbolTable);
+                BuiltInVariable("gl_DrawID",       EbvDrawId,       symbolTable);
+            }
             symbolTable.setVariableExtensions("gl_SubGroupSizeARB",       1, &E_GL_ARB_shader_ballot);
             symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot);
             symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB",     1, &E_GL_ARB_shader_ballot);
@@ -5249,9 +5327,11 @@
                 // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan
                 SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable);
 
-            symbolTable.setFunctionExtensions("anyInvocationARB",       1, &E_GL_ARB_shader_group_vote);
-            symbolTable.setFunctionExtensions("allInvocationsARB",      1, &E_GL_ARB_shader_group_vote);
-            symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote);
+            if (version >= 430) {
+                symbolTable.setFunctionExtensions("anyInvocationARB",       1, &E_GL_ARB_shader_group_vote);
+                symbolTable.setFunctionExtensions("allInvocationsARB",      1, &E_GL_ARB_shader_group_vote);
+                symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote);
+            }
         }
 
 #ifdef AMD_EXTENSIONS
@@ -5395,6 +5475,14 @@
             symbolTable.setVariableExtensions("gl_Layer",         Num_viewportEXTs, viewportEXTs);
             symbolTable.setVariableExtensions("gl_ViewportIndex", Num_viewportEXTs, viewportEXTs);
         }
+#else
+        if (language == EShLangVertex || language == EShLangTessEvaluation) {
+            symbolTable.setVariableExtensions("gl_Layer",         1, &E_GL_ARB_shader_viewport_layer_array);
+            symbolTable.setVariableExtensions("gl_ViewportIndex", 1, &E_GL_ARB_shader_viewport_layer_array);
+        }
+#endif
+
+#ifdef NV_EXTENSIONS
         symbolTable.setVariableExtensions("gl_ViewportMask",            1, &E_GL_NV_viewport_array2);
         symbolTable.setVariableExtensions("gl_SecondaryPositionNV",     1, &E_GL_NV_stereo_view_rendering);
         symbolTable.setVariableExtensions("gl_SecondaryViewportMaskNV", 1, &E_GL_NV_stereo_view_rendering);
@@ -5675,6 +5763,13 @@
             symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetAMD",    1, &E_GL_AMD_texture_gather_bias_lod);
             symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetsAMD",   1, &E_GL_AMD_texture_gather_bias_lod);
         }
+
+        // E_GL_AMD_shader_image_load_store_lod
+        if (profile != EEsProfile) {
+            symbolTable.setFunctionExtensions("imageLoadLodAMD",        1, &E_GL_AMD_shader_image_load_store_lod);
+            symbolTable.setFunctionExtensions("imageStoreLodAMD",       1, &E_GL_AMD_shader_image_load_store_lod);
+            symbolTable.setFunctionExtensions("sparseImageLoadLodAMD",  1, &E_GL_AMD_shader_image_load_store_lod);
+        }
 #endif
 
         symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
@@ -5909,6 +6004,18 @@
     symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
     symbolTable.relateToOperator("atomicCounter",          EOpAtomicCounter);
 
+    if (profile != EEsProfile && version >= 460) {
+        symbolTable.relateToOperator("atomicCounterAdd",      EOpAtomicCounterAdd);
+        symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
+        symbolTable.relateToOperator("atomicCounterMin",      EOpAtomicCounterMin);
+        symbolTable.relateToOperator("atomicCounterMax",      EOpAtomicCounterMax);
+        symbolTable.relateToOperator("atomicCounterAnd",      EOpAtomicCounterAnd);
+        symbolTable.relateToOperator("atomicCounterOr",       EOpAtomicCounterOr);
+        symbolTable.relateToOperator("atomicCounterXor",      EOpAtomicCounterXor);
+        symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicCounterExchange);
+        symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
+    }
+
     symbolTable.relateToOperator("fma",               EOpFma);
     symbolTable.relateToOperator("frexp",             EOpFrexp);
     symbolTable.relateToOperator("ldexp",             EOpLdexp);
@@ -6051,10 +6158,16 @@
             symbolTable.relateToOperator("readInvocationARB",               EOpReadInvocation);
             symbolTable.relateToOperator("readFirstInvocationARB",          EOpReadFirstInvocation);
 
-            symbolTable.relateToOperator("anyInvocationARB",                EOpAnyInvocation);
-            symbolTable.relateToOperator("allInvocationsARB",               EOpAllInvocations);
-            symbolTable.relateToOperator("allInvocationsEqualARB",          EOpAllInvocationsEqual);
-
+            if (version >= 430) {
+                symbolTable.relateToOperator("anyInvocationARB",            EOpAnyInvocation);
+                symbolTable.relateToOperator("allInvocationsARB",           EOpAllInvocations);
+                symbolTable.relateToOperator("allInvocationsEqualARB",      EOpAllInvocationsEqual);
+            }
+            if (version >= 460) {
+                symbolTable.relateToOperator("anyInvocation",               EOpAnyInvocation);
+                symbolTable.relateToOperator("allInvocations",              EOpAllInvocations);
+                symbolTable.relateToOperator("allInvocationsEqual",         EOpAllInvocationsEqual);
+            }
 #ifdef AMD_EXTENSIONS
             symbolTable.relateToOperator("minInvocationsAMD",                           EOpMinInvocations);
             symbolTable.relateToOperator("maxInvocationsAMD",                           EOpMaxInvocations);
@@ -6093,6 +6206,10 @@
             symbolTable.relateToOperator("sparseTextureGatherLodAMD",           EOpSparseTextureGatherLod);
             symbolTable.relateToOperator("sparseTextureGatherLodOffsetAMD",     EOpSparseTextureGatherLodOffset);
             symbolTable.relateToOperator("sparseTextureGatherLodOffsetsAMD",    EOpSparseTextureGatherLodOffsets);
+
+            symbolTable.relateToOperator("imageLoadLodAMD",                     EOpImageLoadLod);
+            symbolTable.relateToOperator("imageStoreLodAMD",                    EOpImageStoreLod);
+            symbolTable.relateToOperator("sparseImageLoadLodAMD",               EOpSparseImageLoadLod);
 #endif
         }
         if (profile == EEsProfile) {
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index 687c211..6decfea 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -1144,7 +1144,13 @@
             operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision);
         }
         // compute the result precision
+#ifdef AMD_EXTENSIONS
+        if (agg->isSampling() ||
+            agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore ||
+            agg->getOp() == EOpImageLoadLod || agg->getOp() == EOpImageStoreLod)
+#else
         if (agg->isSampling() || agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore)
+#endif
             resultPrecision = sequence[0]->getAsTyped()->getQualifier().precision;
         else if (function.getType().getBasicType() != EbtBool)
             resultPrecision = function.getType().getQualifier().precision == EpqNone ?
@@ -2487,8 +2493,8 @@
         // Vulkan doesn't allow transparent uniforms outside of blocks
         if (spvVersion.vulkan > 0)
             vulkanRemoved(loc, "non-opaque uniforms outside a block");
-        // OpenGL wants locations on these
-        if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation())
+        // OpenGL wants locations on these (unless they are getting automapped)
+        if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations())
             error(loc, "non-opaque uniform variables need a layout(location=L)", identifier.c_str(), "");
     }
 }
diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h
index 73f2470..d04607a 100644
--- a/glslang/MachineIndependent/ParseHelper.h
+++ b/glslang/MachineIndependent/ParseHelper.h
@@ -76,6 +76,7 @@
                       EProfile profile, const SpvVersion& spvVersion, EShLanguage language,
                       TInfoSink& infoSink, bool forwardCompatible, EShMessages messages)
           : TParseVersions(interm, version, profile, spvVersion, language, infoSink, forwardCompatible, messages),
+            scopeMangler("::"),
             symbolTable(symbolTable),
             statementNestingLevel(0), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0),
             postEntryPointReturn(false),
@@ -143,7 +144,7 @@
     virtual bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*);
     virtual void rValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*);
 
-    const char* const scopeMangler = "::";
+    const char* const scopeMangler;
 
     // Basic parsing state, easily accessible to the grammar
 
diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp
index 2d8ac48..2a904f4 100644
--- a/glslang/MachineIndependent/ShaderLang.cpp
+++ b/glslang/MachineIndependent/ShaderLang.cpp
@@ -116,7 +116,7 @@
 
 // Local mapping functions for making arrays of symbol tables....
 
-const int VersionCount = 16;  // index range in MapVersionToIndex
+const int VersionCount = 17;  // index range in MapVersionToIndex
 
 int MapVersionToIndex(int version)
 {
@@ -140,6 +140,7 @@
     case 450: index = 14; break;
     case 500: index =  0; break; // HLSL
     case 320: index = 15; break;
+    case 460: index = 16; break;
     default:  assert(0);  break;
     }
 
@@ -516,6 +517,7 @@
     case 430: break;
     case 440: break;
     case 450: break;
+    case 460: break;
 
     // unknown version
     default:
@@ -673,6 +675,22 @@
     }
 }
 
+// Most processes are recorded when set in the intermediate representation,
+// These are the few that are not.
+void RecordProcesses(TIntermediate& intermediate, EShMessages messages, const std::string& sourceEntryPointName)
+{
+    if ((messages & EShMsgRelaxedErrors) != 0)
+        intermediate.addProcess("relaxed-errors");
+    if ((messages & EShMsgSuppressWarnings) != 0)
+        intermediate.addProcess("suppress-warnings");
+    if ((messages & EShMsgKeepUncalled) != 0)
+        intermediate.addProcess("keep-uncalled");
+    if (sourceEntryPointName.size() > 0) {
+        intermediate.addProcess("source-entrypoint");
+        intermediate.addProcessArgument(sourceEntryPointName);
+    }
+}
+
 // This is the common setup and cleanup code for PreprocessDeferred and
 // CompileDeferred.
 // It takes any callable with a signature of
@@ -796,6 +814,7 @@
     intermediate.setVersion(version);
     intermediate.setProfile(profile);
     intermediate.setSpv(spvVersion);
+    RecordProcesses(intermediate, messages, sourceEntryPointName);
     if (spvVersion.vulkan >= 100)
         intermediate.setOriginUpperLeft();
     if ((messages & EShMsgHlslOffsets) || source == EShSourceHlsl)
@@ -1639,6 +1658,11 @@
     sourceEntryPointName = name;
 }
 
+void TShader::addProcesses(const std::vector<std::string>& p)
+{
+    intermediate->addProcesses(p);
+}
+
 // Set binding base for sampler types
 void TShader::setShiftSamplerBinding(unsigned int base) { intermediate->setShiftSamplerBinding(base); }
 // Set binding base for texture types (SRV)
@@ -1656,7 +1680,7 @@
 // Enables binding automapping using TIoMapper
 void TShader::setAutoMapBindings(bool map)              { intermediate->setAutoMapBindings(map); }
 // Fragile: currently within one stage: simple auto-assignment of location
-void TShader::setAutoMapLocations(bool map)              { intermediate->setAutoMapLocations(map); }
+void TShader::setAutoMapLocations(bool map)             { intermediate->setAutoMapLocations(map); }
 // See comment above TDefaultHlslIoMapper in iomapper.cpp:
 void TShader::setHlslIoMapping(bool hlslIoMap)          { intermediate->setHlslIoMapping(hlslIoMap); }
 void TShader::setFlattenUniformArrays(bool flatten)     { intermediate->setFlattenUniformArrays(flatten); }
diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp
index d7f9e1d..233033e 100644
--- a/glslang/MachineIndependent/SymbolTable.cpp
+++ b/glslang/MachineIndependent/SymbolTable.cpp
@@ -104,11 +104,20 @@
         default: break; // some compilers want this
         }
 
-        switch (sampler.vectorSize) {
-        case 1: mangledName += "1"; break;
-        case 2: mangledName += "2"; break;
-        case 3: mangledName += "3"; break;
-        case 4: break; // default to prior name mangle behavior
+        if (sampler.hasReturnStruct()) {
+            // Name mangle for sampler return struct uses struct table index.
+            mangledName += "-tx-struct";
+
+            char text[16]; // plenty enough space for the small integers.
+            snprintf(text, sizeof(text), "%d-", sampler.structReturnIndex);
+            mangledName += text;
+        } else {
+            switch (sampler.getVectorSize()) {
+            case 1: mangledName += "1"; break;
+            case 2: mangledName += "2"; break;
+            case 3: mangledName += "3"; break;
+            case 4: break; // default to prior name mangle behavior
+            }
         }
 
         if (sampler.ms)
diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp
index 413a1b9..531aa15 100644
--- a/glslang/MachineIndependent/Versions.cpp
+++ b/glslang/MachineIndependent/Versions.cpp
@@ -182,6 +182,7 @@
     extensionBehavior[E_GL_ARB_shader_stencil_export]        = EBhDisable;
 //    extensionBehavior[E_GL_ARB_cull_distance]                = EBhDisable;    // present for 4.5, but need extension control over block members
     extensionBehavior[E_GL_ARB_post_depth_coverage]          = EBhDisable;
+    extensionBehavior[E_GL_ARB_shader_viewport_layer_array]  = EBhDisable;
 
     extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable;
     extensionBehavior[E_GL_EXT_shader_image_load_formatted]             = EBhDisable;
@@ -199,12 +200,12 @@
     extensionBehavior[E_GL_AMD_gpu_shader_half_float]                = EBhDisable;
     extensionBehavior[E_GL_AMD_texture_gather_bias_lod]              = EBhDisable;
     extensionBehavior[E_GL_AMD_gpu_shader_int16]                     = EBhDisable;
+    extensionBehavior[E_GL_AMD_shader_image_load_store_lod]          = EBhDisable;
 #endif
 
 #ifdef NV_EXTENSIONS
     extensionBehavior[E_GL_NV_sample_mask_override_coverage]         = EBhDisable;
     extensionBehavior[E_SPV_NV_geometry_shader_passthrough]          = EBhDisable;
-    extensionBehavior[E_GL_ARB_shader_viewport_layer_array]          = EBhDisable;
     extensionBehavior[E_GL_NV_viewport_array2]                       = EBhDisable;
     extensionBehavior[E_GL_NV_stereo_view_rendering]                 = EBhDisable;
     extensionBehavior[E_GL_NVX_multiview_per_view_attributes]        = EBhDisable;
@@ -331,6 +332,7 @@
             "#define GL_AMD_gpu_shader_half_float 1\n"
             "#define GL_AMD_texture_gather_bias_lod 1\n"
             "#define GL_AMD_gpu_shader_int16 1\n"
+            "#define GL_AMD_shader_image_load_store_lod 1\n"
 #endif
 
 #ifdef NV_EXTENSIONS
diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h
index a7c6009..78a9b28 100644
--- a/glslang/MachineIndependent/Versions.h
+++ b/glslang/MachineIndependent/Versions.h
@@ -136,6 +136,7 @@
 const char* const E_GL_ARB_shader_stencil_export        = "GL_ARB_shader_stencil_export";
 // const char* const E_GL_ARB_cull_distance            = "GL_ARB_cull_distance";  // present for 4.5, but need extension control over block members
 const char* const E_GL_ARB_post_depth_coverage          = "GL_ARB_post_depth_coverage";
+const char* const E_GL_ARB_shader_viewport_layer_array  = "GL_ARB_shader_viewport_layer_array";
 
 const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers";
 const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted";
@@ -169,13 +170,13 @@
 const char* const E_GL_AMD_gpu_shader_half_float                = "GL_AMD_gpu_shader_half_float";
 const char* const E_GL_AMD_texture_gather_bias_lod              = "GL_AMD_texture_gather_bias_lod";
 const char* const E_GL_AMD_gpu_shader_int16                     = "GL_AMD_gpu_shader_int16";
+const char* const E_GL_AMD_shader_image_load_store_lod          = "GL_AMD_shader_image_load_store_lod";
 #endif
 
 #ifdef NV_EXTENSIONS
 
 const char* const E_GL_NV_sample_mask_override_coverage         = "GL_NV_sample_mask_override_coverage";
 const char* const E_SPV_NV_geometry_shader_passthrough          = "GL_NV_geometry_shader_passthrough";
-const char* const E_GL_ARB_shader_viewport_layer_array          = "GL_ARB_shader_viewport_layer_array";
 const char* const E_GL_NV_viewport_array2                       = "GL_NV_viewport_array2";
 const char* const E_GL_NV_stereo_view_rendering                 = "GL_NV_stereo_view_rendering";
 const char* const E_GL_NVX_multiview_per_view_attributes        = "GL_NVX_multiview_per_view_attributes";
diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y
index fd1566f..cd6df7b 100644
--- a/glslang/MachineIndependent/glslang.y
+++ b/glslang/MachineIndependent/glslang.y
@@ -2872,8 +2872,10 @@
         parseContext.intermediate.setTreeRoot($$);
     }
     | translation_unit external_declaration {
-        $$ = parseContext.intermediate.growAggregate($1, $2);
-        parseContext.intermediate.setTreeRoot($$);
+        if ($2 != nullptr) {
+            $$ = parseContext.intermediate.growAggregate($1, $2);
+            parseContext.intermediate.setTreeRoot($$);
+        }
     }
     ;
 
@@ -2884,6 +2886,11 @@
     | declaration {
         $$ = $1;
     }
+    | SEMICOLON {
+        parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon");
+        parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
+        $$ = nullptr;
+    }
     ;
 
 function_definition
diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp
index 54a927c..c6bae9f 100644
--- a/glslang/MachineIndependent/glslang_tab.cpp
+++ b/glslang/MachineIndependent/glslang_tab.cpp
@@ -730,18 +730,18 @@
 #endif /* !YYCOPY_NEEDED */
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  273
+#define YYFINAL  274
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   6608
+#define YYLAST   6614
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  298
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  100
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  449
+#define YYNRULES  450
 /* YYNSTATES -- Number of states.  */
-#define YYNSTATES  581
+#define YYNSTATES  582
 
 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
    by yylex, with out-of-bounds checking.  */
@@ -861,7 +861,8 @@
     2636,  2639,  2647,  2655,  2666,  2667,  2671,  2678,  2682,  2690,
     2694,  2707,  2707,  2727,  2730,  2736,  2748,  2760,  2760,  2775,
     2775,  2791,  2791,  2812,  2815,  2821,  2824,  2830,  2834,  2841,
-    2846,  2851,  2858,  2861,  2870,  2874,  2881,  2884,  2890,  2890
+    2846,  2851,  2858,  2861,  2870,  2874,  2883,  2886,  2889,  2897,
+    2897
 };
 #endif
 
@@ -1003,10 +1004,10 @@
 };
 # endif
 
-#define YYPACT_NINF -522
+#define YYPACT_NINF -525
 
 #define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-522)))
+  (!!((Yystate) == (-525)))
 
 #define YYTABLE_NINF -407
 
@@ -1017,65 +1018,65 @@
      STATE-NUM.  */
 static const yytype_int16 yypact[] =
 {
-    2618,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -224,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -217,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -214,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -261,  -522,  -215,  -213,  -184,  -182,
-    4254,  -196,  -522,  -122,  -522,  -522,  -522,  -522,  3177,  -522,
-    -522,  -522,  -129,  -522,  -522,   574,  -522,  -522,   -90,   -48,
-    -125,  -522,  6375,  -232,  -522,  -522,  -117,  -522,  4254,  -522,
-    -522,  -522,  4254,   -75,   -74,  -522,  -240,  -183,  -522,  -522,
-    -522,  4759,  -108,  -522,  -522,  -522,  -179,  -522,  -114,  -175,
-    -522,  -522,  4254,  -113,  -522,  -216,   866,  -522,  -522,  -522,
-    -522,  -129,  -222,  -522,  5033,  -193,  -522,   -71,  -522,  -158,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  5855,  5855,  5855,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -227,  -522,  -522,  -522,  -102,  -164,  6115,  -100,  -522,
-    5855,  -145,  -199,  -195,  -226,  -128,  -124,  -120,  -116,   -82,
-     -83,  -225,   -96,  -522,  5307,  -522,   -59,  5855,  -522,   -48,
-    4254,  4254,   -58,  3450,  -522,  -522,  -522,   -99,   -98,  -522,
-     -87,   -86,   -95,  5581,   -84,  5855,   -88,   -79,   -80,  -522,
-    -522,  -191,  -522,  -522,  -156,  -522,  -213,   -78,  -522,  -522,
-    -522,  -522,  1158,  -522,  -522,  -522,  -522,  -522,  -522,  -108,
-    5033,  -190,  5033,  -522,  -522,  5033,  4254,  -522,   -57,  -522,
-    -522,  -522,  -163,  -522,  -522,  5855,   -41,  -522,  -522,  5855,
-     -73,  -522,  -522,  -522,  5855,  5855,  5855,  5855,  5855,  5855,
-    5855,  5855,  5855,  5855,  5855,  5855,  5855,  5855,  5855,  5855,
-    5855,  5855,  5855,  -522,  -522,  -522,   -76,  -522,  -522,  -522,
-    -522,  3718,   -58,  -129,  -143,  -522,  -522,  -522,  -522,  -522,
-    1450,  -522,  5855,  -522,  -522,  -142,  5855,  -178,  -522,  -522,
-    -522,  1450,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  5855,  5855,  -522,  -522,  -522,  -522,  5033,
-    -522,  -131,  -522,  3986,  -522,  -522,   -72,   -77,  -522,  -522,
-    -522,  -522,  -522,  -145,  -145,  -199,  -199,  -195,  -195,  -195,
-    -195,  -226,  -226,  -128,  -124,  -120,  -116,   -82,   -83,  5855,
-    -522,  -522,  -141,  -108,   -58,  -522,   -37,  2326,  -161,  -522,
-    -160,  -522,  2886,  1450,  -522,  -522,  -522,  -522,  4485,  -522,
-    -522,  -127,  -522,  -522,   -68,  -522,  -522,  2886,   -70,  -522,
-     -77,   -30,  4254,   -63,   -66,  -522,  -522,  5855,  5855,  -522,
-     -69,   -61,   188,   -55,  2034,  -522,   -54,   -64,  1742,  -522,
-    -522,  -159,  5855,  1742,   -70,  -522,  -522,  1450,  5033,  -522,
-    -522,  -522,   -56,   -77,  -522,  -522,  1450,   -53,  -522,  -522,
-    -522
+    2619,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -243,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -228,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -215,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -157,  -525,  -216,  -218,  -205,
+    -141,  4260,  -165,  -525,   -94,  -525,  -525,  -525,  -525,  3183,
+    -525,  -525,  -525,  -117,  -525,  -525,   575,  -525,  -525,   -80,
+     -48,  -114,  -525,  6381,  -242,  -525,  -525,  -113,  -525,  4260,
+    -525,  -525,  -525,  4260,   -75,   -74,  -525,  -235,  -190,  -525,
+    -525,  -525,  4765,  -108,  -525,  -525,  -525,  -186,  -525,  -112,
+    -178,  -525,  -525,  4260,  -115,  -525,  -226,   867,  -525,  -525,
+    -525,  -525,  -117,  -229,  -525,  5039,  -224,  -525,   -71,  -525,
+    -158,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  5861,  5861,  5861,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -223,  -525,  -525,  -525,  -102,  -177,  6121,  -100,
+    -525,  5861,  -204,  -171,  -132,  -221,  -199,  -124,  -120,  -111,
+     -84,   -83,  -233,   -98,  -525,  5313,  -525,   -60,  5861,  -525,
+     -48,  4260,  4260,   -59,  3456,  -525,  -525,  -525,   -99,   -97,
+    -525,   -90,   -88,   -96,  5587,   -85,  5861,   -92,   -79,   -81,
+    -525,  -525,  -191,  -525,  -525,  -153,  -525,  -218,   -78,  -525,
+    -525,  -525,  -525,  1159,  -525,  -525,  -525,  -525,  -525,  -525,
+    -108,  5039,  -193,  5039,  -525,  -525,  5039,  4260,  -525,   -47,
+    -525,  -525,  -525,  -176,  -525,  -525,  5861,   -42,  -525,  -525,
+    5861,   -73,  -525,  -525,  -525,  5861,  5861,  5861,  5861,  5861,
+    5861,  5861,  5861,  5861,  5861,  5861,  5861,  5861,  5861,  5861,
+    5861,  5861,  5861,  5861,  -525,  -525,  -525,   -76,  -525,  -525,
+    -525,  -525,  3724,   -59,  -117,  -152,  -525,  -525,  -525,  -525,
+    -525,  1451,  -525,  5861,  -525,  -525,  -143,  5861,  -180,  -525,
+    -525,  -525,  1451,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  5861,  5861,  -525,  -525,  -525,  -525,
+    5039,  -525,  -133,  -525,  3992,  -525,  -525,   -72,   -77,  -525,
+    -525,  -525,  -525,  -525,  -204,  -204,  -171,  -171,  -132,  -132,
+    -132,  -132,  -221,  -221,  -199,  -124,  -120,  -111,   -84,   -83,
+    5861,  -525,  -525,  -142,  -108,   -59,  -525,   -37,  2327,  -175,
+    -525,  -163,  -525,  2892,  1451,  -525,  -525,  -525,  -525,  4491,
+    -525,  -525,  -129,  -525,  -525,   -68,  -525,  -525,  2892,   -70,
+    -525,   -77,   -32,  4260,   -63,   -66,  -525,  -525,  5861,  5861,
+    -525,   -69,   -61,   188,   -58,  2035,  -525,   -56,   -57,  1743,
+    -525,  -525,  -161,  5861,  1743,   -70,  -525,  -525,  1451,  5039,
+    -525,  -525,  -525,   -67,   -77,  -525,  -525,  1451,   -54,  -525,
+    -525,  -525
 };
 
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1104,74 +1105,74 @@
      365,   366,   367,   328,   329,   330,   331,   332,   333,   334,
      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
-     355,   356,   357,   358,   359,   360,     0,   175,   369,   128,
-     139,   370,   371,   372,     0,   447,     0,   448,     0,   105,
-     104,     0,   116,   121,   146,   145,   143,   147,     0,   140,
-     142,   126,   169,   144,   368,     0,   444,   446,     0,     0,
-       0,   375,     0,     0,    93,    90,     0,   103,     0,   112,
-     106,   114,     0,   115,     0,    91,   122,     0,    96,   141,
-     127,     0,   170,     1,   445,   167,     0,   138,   136,     0,
-     134,   373,     0,     0,    94,     0,     0,   449,   107,   111,
-     113,   109,   117,   108,     0,   123,    99,     0,    97,     0,
-       2,    10,    11,     4,     5,     6,     7,     8,     9,    13,
-      12,     0,     0,     0,   171,    39,    38,    40,    37,     3,
-      15,    33,    17,    22,    23,     0,     0,    27,     0,    41,
-       0,    45,    48,    51,    56,    59,    61,    63,    65,    67,
-      69,    71,     0,    31,     0,   166,     0,     0,   133,     0,
-       0,     0,     0,     0,   377,    92,    95,     0,     0,   429,
-       0,     0,     0,     0,     0,     0,     0,     0,   401,   410,
-     414,    41,    74,    87,     0,   390,     0,   126,   393,   412,
-     392,   391,     0,   394,   395,   396,   397,   398,   399,   110,
-       0,   118,     0,   385,   125,     0,     0,   101,     0,    98,
-      34,    35,     0,    19,    20,     0,     0,    25,    24,     0,
-     175,    28,    30,    36,     0,     0,     0,     0,     0,     0,
+     355,   356,   357,   358,   359,   360,     0,   175,   369,   448,
+     128,   139,   370,   371,   372,     0,   447,     0,   449,     0,
+     105,   104,     0,   116,   121,   146,   145,   143,   147,     0,
+     140,   142,   126,   169,   144,   368,     0,   444,   446,     0,
+       0,     0,   375,     0,     0,    93,    90,     0,   103,     0,
+     112,   106,   114,     0,   115,     0,    91,   122,     0,    96,
+     141,   127,     0,   170,     1,   445,   167,     0,   138,   136,
+       0,   134,   373,     0,     0,    94,     0,     0,   450,   107,
+     111,   113,   109,   117,   108,     0,   123,    99,     0,    97,
+       0,     2,    10,    11,     4,     5,     6,     7,     8,     9,
+      13,    12,     0,     0,     0,   171,    39,    38,    40,    37,
+       3,    15,    33,    17,    22,    23,     0,     0,    27,     0,
+      41,     0,    45,    48,    51,    56,    59,    61,    63,    65,
+      67,    69,    71,     0,    31,     0,   166,     0,     0,   133,
+       0,     0,     0,     0,     0,   377,    92,    95,     0,     0,
+     429,     0,     0,     0,     0,     0,     0,     0,     0,   401,
+     410,   414,    41,    74,    87,     0,   390,     0,   126,   393,
+     412,   392,   391,     0,   394,   395,   396,   397,   398,   399,
+     110,     0,   118,     0,   385,   125,     0,     0,   101,     0,
+      98,    34,    35,     0,    19,    20,     0,     0,    25,    24,
+       0,   175,    28,    30,    36,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    72,   172,   173,     0,   168,    89,   137,
-     135,     0,     0,   383,     0,   381,   376,   378,   440,   439,
-       0,   431,     0,   443,   441,     0,     0,     0,   426,   427,
-     400,     0,    77,    78,    80,    79,    82,    83,    84,    85,
-      86,    81,    76,     0,     0,   415,   411,   413,   120,     0,
-     388,     0,   124,     0,   102,    14,     0,    21,    18,    29,
-      42,    43,    44,    47,    46,    49,    50,    54,    55,    52,
-      53,    57,    58,    60,    62,    64,    66,    68,    70,     0,
-     174,   374,     0,   384,     0,   379,     0,     0,     0,   442,
-       0,   425,     0,   402,    75,    88,   119,   386,     0,   100,
-      16,     0,   380,   382,     0,   434,   433,   436,   408,   421,
-     419,     0,     0,     0,     0,   387,   389,     0,     0,   435,
-       0,     0,   418,     0,     0,   416,     0,     0,     0,   403,
-      73,     0,   437,     0,   408,   407,   409,   423,     0,   405,
-     428,   404,     0,   438,   432,   417,   424,     0,   420,   430,
-     422
+       0,     0,     0,     0,    72,   172,   173,     0,   168,    89,
+     137,   135,     0,     0,   383,     0,   381,   376,   378,   440,
+     439,     0,   431,     0,   443,   441,     0,     0,     0,   426,
+     427,   400,     0,    77,    78,    80,    79,    82,    83,    84,
+      85,    86,    81,    76,     0,     0,   415,   411,   413,   120,
+       0,   388,     0,   124,     0,   102,    14,     0,    21,    18,
+      29,    42,    43,    44,    47,    46,    49,    50,    54,    55,
+      52,    53,    57,    58,    60,    62,    64,    66,    68,    70,
+       0,   174,   374,     0,   384,     0,   379,     0,     0,     0,
+     442,     0,   425,     0,   402,    75,    88,   119,   386,     0,
+     100,    16,     0,   380,   382,     0,   434,   433,   436,   408,
+     421,   419,     0,     0,     0,     0,   387,   389,     0,     0,
+     435,     0,     0,   418,     0,     0,   416,     0,     0,     0,
+     403,    73,     0,   437,     0,   408,   407,   409,   423,     0,
+     405,   428,   404,     0,   438,   432,   417,   424,     0,   420,
+     430,   422
 };
 
   /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -103,  -522,  -267,  -266,  -296,  -270,  -211,  -210,
-    -218,  -209,  -208,  -212,  -522,  -259,  -522,  -291,  -522,  -309,
-    -522,     5,  -522,  -522,  -522,     6,  -522,  -522,  -522,   -40,
-     -34,   -36,  -522,  -522,  -498,  -522,  -522,  -522,  -522,  -118,
-    -522,  -229,  -236,  -522,  -522,     0,  -245,  -522,     1,  -522,
-    -522,  -522,  -335,  -343,  -207,  -285,  -379,  -522,  -284,  -375,
-    -521,  -321,  -522,  -522,  -329,  -328,  -522,  -522,   -16,  -447,
-    -275,  -522,  -522,  -294,  -522,  -522,  -522,  -522,  -522,  -522,
-    -522,  -522,  -522,  -522,  -522,  -522,  -522,     2,  -522,  -522
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -103,  -525,  -278,  -274,  -297,  -273,  -214,  -211,
+    -210,  -212,  -209,  -208,  -525,  -261,  -525,  -292,  -525,  -308,
+    -525,     4,  -525,  -525,  -525,     5,  -525,  -525,  -525,   -41,
+     -38,   -39,  -525,  -525,  -504,  -525,  -525,  -525,  -525,  -123,
+    -525,  -230,  -237,  -525,  -525,     0,  -246,  -525,     1,  -525,
+    -525,  -525,  -337,  -342,  -207,  -286,  -378,  -525,  -285,  -376,
+    -524,  -322,  -525,  -525,  -330,  -327,  -525,  -525,   -22,  -452,
+    -275,  -525,  -525,  -298,  -525,  -525,  -525,  -525,  -525,  -525,
+    -525,  -525,  -525,  -525,  -525,  -525,  -525,    -2,  -525,  -525
 };
 
   /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,   319,   320,   321,   486,   322,   323,   324,   325,   326,
-     327,   328,   371,   330,   331,   332,   333,   334,   335,   336,
-     337,   338,   339,   340,   341,   372,   509,   373,   473,   374,
-     439,   375,   226,   396,   299,   376,   228,   229,   230,   259,
-     260,   261,   231,   232,   233,   234,   235,   236,   279,   280,
-     237,   238,   239,   240,   276,   343,   272,   242,   243,   244,
-     350,   282,   353,   354,   444,   445,   394,   481,   378,   379,
-     380,   381,   461,   544,   570,   552,   553,   554,   571,   382,
-     383,   384,   555,   543,   385,   556,   577,   386,   387,   522,
-     450,   517,   537,   550,   551,   388,   245,   246,   247,   256
+      -1,   320,   321,   322,   487,   323,   324,   325,   326,   327,
+     328,   329,   372,   331,   332,   333,   334,   335,   336,   337,
+     338,   339,   340,   341,   342,   373,   510,   374,   474,   375,
+     440,   376,   227,   397,   300,   377,   229,   230,   231,   260,
+     261,   262,   232,   233,   234,   235,   236,   237,   280,   281,
+     238,   239,   240,   241,   277,   344,   273,   243,   244,   245,
+     351,   283,   354,   355,   445,   446,   395,   482,   379,   380,
+     381,   382,   462,   545,   571,   553,   554,   555,   572,   383,
+     384,   385,   556,   544,   386,   557,   578,   387,   388,   523,
+     451,   518,   538,   551,   552,   389,   246,   247,   248,   257
 };
 
   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
@@ -1179,324 +1180,239 @@
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int16 yytable[] =
 {
-     241,   262,   269,   393,   402,   225,   227,   477,   285,   277,
-     447,   478,   342,   480,   523,   441,   482,   253,   250,   403,
-     404,   295,   421,   422,   541,   293,   269,   271,   432,   262,
-     221,   222,   223,   566,   294,   271,   411,   569,   -32,   541,
-     405,   248,   569,   284,   406,   271,   389,   391,   249,   419,
-     420,   344,   390,   351,   455,   251,   457,   423,   424,   356,
-     254,   483,   255,   433,   462,   463,   464,   465,   466,   467,
-     468,   469,   470,   471,   344,   516,   264,   344,   417,   265,
-     418,   395,   257,   472,   479,   436,   296,   345,   438,   297,
-     258,   348,   298,   346,   474,   521,   487,   349,   447,   393,
-     526,   393,   408,   485,   393,   538,   539,   572,   409,   474,
-     266,   474,   474,   474,   398,   269,   474,   399,   489,   475,
-     576,   351,   425,   426,   351,   497,   498,   499,   500,   514,
-     474,   514,   515,   519,   532,   414,   415,   416,   271,   527,
-     447,   528,   275,   518,   281,   474,   547,   520,   477,   546,
-     493,   494,   286,   495,   496,   501,   502,   291,   292,   344,
-     347,   397,   355,   427,   407,   412,   428,   351,   329,   429,
-     430,   431,   434,   437,   443,   484,   448,   449,   451,   452,
-     453,   456,   524,   525,   278,   458,   459,   -31,   393,   578,
-     460,   488,   510,   -26,   534,   474,   530,   548,   513,  -406,
-     531,   477,   557,   558,   559,   563,   562,   564,   400,   401,
-     568,   505,   351,   540,   368,   567,   503,   580,   504,   579,
-     508,   506,   289,   507,   288,   252,   290,   413,   540,   533,
-     263,   440,   565,   535,   574,   512,   575,   393,   270,   561,
-     287,   329,   536,   549,   329,   241,     0,   274,     0,     0,
-     225,   227,   283,   573,   351,     0,   560,     0,   263,     0,
-       0,     0,   263,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   393,     0,     0,
-       0,     0,   352,     0,     0,     0,   377,     0,     0,     0,
-       0,     0,     0,   542,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   269,     0,   542,     0,
-       0,   490,   491,   492,   329,   329,   329,   329,   329,   329,
-     329,   329,   329,   329,   329,   329,   329,   329,   329,   329,
+     242,   263,   270,   394,   226,   228,   403,   478,   286,   278,
+     524,   343,   448,   479,   442,   481,   254,   251,   483,   542,
+     433,   296,   249,   404,   405,   272,   270,   422,   423,   263,
+     294,   567,   272,   285,   542,   570,   412,   250,   272,   295,
+     570,   345,   -32,   345,   406,   391,   390,   392,   407,   357,
+     396,   426,   427,   352,   252,   434,   456,   256,   458,   255,
+     484,   258,   424,   425,   463,   464,   465,   466,   467,   468,
+     469,   470,   471,   472,   345,   517,   415,   416,   417,   297,
+     346,   480,   298,   473,   437,   299,   347,   439,   349,   409,
+     486,   539,   475,   522,   350,   410,   475,   475,   488,   394,
+     448,   394,   527,   540,   394,   573,   418,   265,   419,   475,
+     266,   475,   420,   421,   399,   270,   577,   400,   490,   475,
+     515,   352,   476,   516,   352,   498,   499,   500,   501,   475,
+     515,   259,   520,   533,   222,   223,   224,   528,   267,   529,
+     494,   495,   448,   475,   548,   519,   496,   497,   478,   521,
+     272,   547,   276,   502,   503,   282,   287,   292,   293,   345,
+     356,   398,   348,   428,   408,   413,   429,   352,   431,   330,
+     435,   432,   438,   444,   430,   452,   449,   453,   450,   454,
+     457,   459,   525,   526,   279,   485,   460,   -31,   394,   461,
+     489,   579,   511,   -26,   535,   475,   531,   549,   514,  -406,
+     558,   478,   532,   559,   560,   564,   563,   565,   580,   401,
+     402,   369,   352,   568,   504,   541,   581,   569,   505,   507,
+     506,   289,   290,   508,   291,   509,   253,   441,   414,   534,
+     541,   264,   566,   536,   575,   288,   513,   394,   576,   271,
+     550,   562,   330,   537,   275,   330,   242,     0,     0,     0,
+     226,   228,     0,   284,   352,   574,   561,     0,     0,   264,
+       0,     0,     0,   264,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   394,     0,     0,
+       0,     0,     0,   353,     0,     0,     0,   378,     0,     0,
+       0,     0,     0,   543,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   270,     0,   543,     0,
+       0,     0,   491,   492,   493,   330,   330,   330,   330,   330,
+     330,   330,   330,   330,   330,   330,   330,   330,   330,   330,
+     330,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   353,   443,     0,   353,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     352,   442,     0,   352,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   377,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   352,     0,     0,     0,
+       0,     0,     0,   378,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   353,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   352,     0,     0,     0,     0,     0,     0,     0,     0,
-     377,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   377,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   353,     0,     0,     0,     0,     0,     0,     0,
+       0,   378,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   378,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   352,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   353,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   377,     0,     0,
-       0,     0,   377,   377,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   377,     0,     0,
-       0,     0,   270,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   377,     0,     0,     0,   377,     0,
-       0,     0,     0,   377,     0,     0,     0,   377,     0,     0,
-       0,     0,     0,     0,   273,     0,   377,     1,     2,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
-     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-     143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
-     183,   184,   185,   186,   187,   188,   189,   190,   191,   192,
-     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
-     203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
-     213,   214,   215,   216,   217,     0,     0,   218,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   378,     0,
+       0,     0,     0,   378,   378,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   378,     0,
+       0,     0,     0,   271,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   378,     0,     0,     0,   378,
+       0,     0,     0,     0,   378,     0,     0,     0,   378,     0,
+       0,     0,     0,     0,     0,   274,     0,   378,     1,     2,
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
+     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
+     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
+     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,     0,     0,   218,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     219,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   220,   221,   222,   223,   224,   225,
+       1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,   358,   359,   360,     0,   361,   362,   363,
+     364,   365,   366,   367,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
+     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
+     130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+     140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,   176,   177,   178,   179,
+     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   368,   301,
+     218,   302,   303,   304,   305,   306,   307,   308,   309,   310,
+     311,     0,     0,   312,   313,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   219,   220,   221,   222,   223,   224,     1,
-       2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,   357,   358,   359,     0,   360,   361,   362,   363,
-     364,   365,   366,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
-     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
-     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
-     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
-     211,   212,   213,   214,   215,   216,   217,   367,   300,   218,
-     301,   302,   303,   304,   305,   306,   307,   308,   309,   310,
-       0,     0,   311,   312,     0,     0,     0,     0,     0,     0,
+       0,     0,   314,     0,     0,     0,   369,   370,     0,     0,
+       0,     0,   371,   316,   317,   318,   319,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   220,   221,   222,   223,
+     224,   225,     1,     2,     3,     4,     5,     6,     7,     8,
+       9,    10,    11,    12,    13,   358,   359,   360,     0,   361,
+     362,   363,   364,   365,   366,   367,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     368,   301,   218,   302,   303,   304,   305,   306,   307,   308,
+     309,   310,   311,     0,     0,   312,   313,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   313,     0,     0,     0,   368,   369,     0,     0,     0,
-       0,   370,   315,   316,   317,   318,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   219,   220,   221,   222,   223,
-     224,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    13,   357,   358,   359,     0,   360,   361,
-     362,   363,   364,   365,   366,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
-      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
-     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
-     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
-     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
-     209,   210,   211,   212,   213,   214,   215,   216,   217,   367,
-     300,   218,   301,   302,   303,   304,   305,   306,   307,   308,
-     309,   310,     0,     0,   311,   312,     0,     0,     0,     0,
+       0,     0,     0,     0,   314,     0,     0,     0,   369,   477,
+       0,     0,     0,     0,   371,   316,   317,   318,   319,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   220,   221,
+     222,   223,   224,   225,     1,     2,     3,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,   358,   359,   360,
+       0,   361,   362,   363,   364,   365,   366,   367,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
+     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
+     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   368,   301,   218,   302,   303,   304,   305,   306,
+     307,   308,   309,   310,   311,     0,     0,   312,   313,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   313,     0,     0,     0,   368,   476,     0,
-       0,     0,     0,   370,   315,   316,   317,   318,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   219,   220,   221,
-     222,   223,   224,     1,     2,     3,     4,     5,     6,     7,
-       8,     9,    10,    11,    12,    13,   357,   358,   359,     0,
-     360,   361,   362,   363,   364,   365,   366,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
-     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
-     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
-     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
-     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
-     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
-     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
-     207,   208,   209,   210,   211,   212,   213,   214,   215,   216,
-     217,   367,   300,   218,   301,   302,   303,   304,   305,   306,
-     307,   308,   309,   310,     0,     0,   311,   312,     0,     0,
+       0,     0,     0,     0,     0,     0,   314,     0,     0,     0,
+     369,     0,     0,     0,     0,     0,   371,   316,   317,   318,
+     319,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     220,   221,   222,   223,   224,   225,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,   358,
+     359,   360,     0,   361,   362,   363,   364,   365,   366,   367,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
+     134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
+     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
+     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   368,   301,   218,   302,   303,   304,
+     305,   306,   307,   308,   309,   310,   311,     0,     0,   312,
+     313,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   314,     0,
+       0,     0,   287,     0,     0,     0,     0,     0,   371,   316,
+     317,   318,   319,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   220,   221,   222,   223,   224,   225,     1,     2,
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,   358,   359,   360,     0,   361,   362,   363,   364,   365,
+     366,   367,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
+     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
+     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
+     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   368,   301,   218,   302,
+     303,   304,   305,   306,   307,   308,   309,   310,   311,     0,
+       0,   312,   313,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   313,     0,     0,     0,   368,
-       0,     0,     0,     0,     0,   370,   315,   316,   317,   318,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   219,
-     220,   221,   222,   223,   224,     1,     2,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,   357,   358,
-     359,     0,   360,   361,   362,   363,   364,   365,   366,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
-     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
-     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
-     215,   216,   217,   367,   300,   218,   301,   302,   303,   304,
-     305,   306,   307,   308,   309,   310,     0,     0,   311,   312,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   313,     0,     0,
-       0,   286,     0,     0,     0,     0,     0,   370,   315,   316,
-     317,   318,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   219,   220,   221,   222,   223,   224,     1,     2,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-     357,   358,   359,     0,   360,   361,   362,   363,   364,   365,
-     366,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
-     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-     143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
-     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
-     183,   184,   185,   186,   187,   188,   189,   190,   191,   192,
-     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
-     203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
-     213,   214,   215,   216,   217,   367,   300,   218,   301,   302,
-     303,   304,   305,   306,   307,   308,   309,   310,     0,     0,
-     311,   312,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   313,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   370,
-     315,   316,   317,   318,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   219,   220,   221,   222,   223,   224,     1,
-       2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
-     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
-     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
-     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
-     211,   212,   213,   214,   215,   216,   217,     0,   300,   218,
-     301,   302,   303,   304,   305,   306,   307,   308,   309,   310,
-       0,     0,   311,   312,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   313,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   370,   315,   316,   317,   318,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   219,   220,   221,   222,   223,
-     224,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    13,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
-      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
-     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
-     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
-     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
-     209,   210,   211,   212,   213,   214,   215,   216,   217,     0,
-       0,   218,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     1,
-       2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,     0,     0,     0,     0,     0,   219,   220,   221,
-     222,   223,   224,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
-     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
-     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
-     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
-     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
-     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
-     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
-     211,   212,   213,   214,   215,   216,   217,     0,   300,   218,
-     301,   302,   303,   304,   305,   306,   307,   308,   309,   310,
-       0,     0,   311,   312,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   313,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   315,   316,   317,   318,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   219,   220,   221,   222,   223,
+     314,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     371,   316,   317,   318,   319,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   220,   221,   222,   223,   224,   225,
        1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
       11,    12,    13,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,    14,    15,    16,    17,    18,    19,
@@ -1519,68 +1435,100 @@
      180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
      190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
      200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
-     210,   211,   212,   213,   214,   215,   216,   217,     0,   267,
-     218,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     210,   211,   212,   213,   214,   215,   216,   217,     0,   301,
+     218,   302,   303,   304,   305,   306,   307,   308,   309,   310,
+     311,     0,     0,   312,   313,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   314,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   371,   316,   317,   318,   319,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   220,   221,   222,   223,
+     224,   225,     1,     2,     3,     4,     5,     6,     7,     8,
+       9,    10,    11,    12,    13,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+       0,     0,   218,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   268,     1,     2,     3,     4,     5,     6,     7,
-       8,     9,    10,    11,    12,    13,   219,   220,   221,   222,
-     223,     0,     0,     0,     0,     0,     0,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
-     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
-     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
-     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
-     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
-     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
-     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
-     207,   208,   209,   210,   211,   212,   213,   214,   215,   216,
-     217,     0,     0,   218,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   219,     1,     2,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,   220,   221,
+     222,   223,   224,   225,     0,     0,     0,     0,     0,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
+     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
+     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
+     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
+     215,   216,   217,     0,   301,   218,   302,   303,   304,   305,
+     306,   307,   308,   309,   310,   311,     0,     0,   312,   313,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   314,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   316,   317,
+     318,   319,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   220,   221,   222,   223,   224,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
+     134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
+     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
+     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
+     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
+     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,     0,   268,   218,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     446,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    13,     0,     0,     0,     0,     0,   219,
-     220,   221,   222,   223,     0,    14,    15,    16,    17,    18,
-      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
-      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
-     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
-     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
-     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
-     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
-     209,   210,   211,   212,   213,   214,   215,   216,   217,     0,
-       0,   218,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   511,     1,
+       0,     0,     0,     0,     0,     0,     0,     0,   269,     1,
        2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,     0,     0,     0,     0,     0,   219,   220,   221,
-     222,   223,     0,    14,    15,    16,    17,    18,    19,    20,
+      12,    13,   220,   221,   222,   223,   224,     0,     0,     0,
+       0,     0,     0,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
       41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
@@ -1604,9 +1552,9 @@
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   529,     1,     2,     3,
+       0,     0,     0,     0,     0,     0,   447,     1,     2,     3,
        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-       0,     0,     0,     0,     0,   219,   220,   221,   222,   223,
+       0,     0,     0,     0,     0,   220,   221,   222,   223,   224,
        0,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
@@ -1628,12 +1576,93 @@
      193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
      213,   214,   215,   216,   217,     0,     0,   218,     0,     0,
-       0,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   512,     1,     2,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,     0,     0,
+       0,     0,     0,   220,   221,   222,   223,   224,     0,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
+     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
+     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
+     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
+     215,   216,   217,     0,     0,   218,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   530,     1,     2,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,     0,     0,     0,     0,
+       0,   220,   221,   222,   223,   224,     0,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
+     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
+     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
+     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
+     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
+     207,   208,   209,   210,   211,   212,   213,   214,   215,   216,
+     217,     0,     0,   218,     0,     0,     0,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   220,
+     221,   222,   223,   224,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,     0,     0,     0,     0,     0,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
+     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
+     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,     0,   301,   218,   302,   303,   304,   305,   306,
+     307,   308,   309,   310,   311,     0,     0,   312,   313,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   314,     0,     0,     0,
+     393,   546,     0,     0,     0,     0,     0,   316,   317,   318,
+     319,     4,     5,     6,     7,     8,     9,    10,    11,    12,
       13,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,    15,    16,    17,    18,    19,    20,    21,
       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
       32,    33,    34,    35,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   219,   220,   221,   222,   223,    50,    51,
+       0,     0,     0,     0,     0,     0,     0,     0,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,    65,    66,    67,     0,     0,     0,     0,
        0,    73,    74,    75,    76,    77,    78,    79,    80,    81,
@@ -1650,12 +1679,12 @@
      182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
      192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
      202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,     0,   300,   218,   301,
-     302,   303,   304,   305,   306,   307,   308,   309,   310,     0,
-       0,   311,   312,     0,     0,     0,     0,     0,     0,     0,
+     212,   213,   214,   215,   216,   217,     0,   301,   218,   302,
+     303,   304,   305,   306,   307,   308,   309,   310,   311,     0,
+       0,   312,   313,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     313,     0,     0,     0,   392,   545,     0,     0,     0,     0,
-       0,   315,   316,   317,   318,     4,     5,     6,     7,     8,
+     314,     0,     0,   315,     0,     0,     0,     0,     0,     0,
+       0,   316,   317,   318,   319,     4,     5,     6,     7,     8,
        9,    10,    11,    12,    13,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
@@ -1678,11 +1707,11 @@
      188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
      198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
      208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
-       0,   300,   218,   301,   302,   303,   304,   305,   306,   307,
-     308,   309,   310,     0,     0,   311,   312,     0,     0,     0,
+       0,   301,   218,   302,   303,   304,   305,   306,   307,   308,
+     309,   310,   311,     0,     0,   312,   313,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   313,     0,     0,   314,     0,     0,
-       0,     0,     0,     0,     0,   315,   316,   317,   318,     4,
+       0,     0,     0,     0,   314,     0,     0,     0,   393,     0,
+       0,     0,     0,     0,     0,   316,   317,   318,   319,     4,
        5,     6,     7,     8,     9,    10,    11,    12,    13,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    15,    16,    17,    18,    19,    20,    21,    22,    23,
@@ -1705,12 +1734,12 @@
      184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
      194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
      204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
-     214,   215,   216,   217,     0,   300,   218,   301,   302,   303,
-     304,   305,   306,   307,   308,   309,   310,     0,     0,   311,
-     312,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   313,     0,
-       0,     0,   392,     0,     0,     0,     0,     0,     0,   315,
-     316,   317,   318,     4,     5,     6,     7,     8,     9,    10,
+     214,   215,   216,   217,     0,   301,   218,   302,   303,   304,
+     305,   306,   307,   308,   309,   310,   311,     0,     0,   312,
+     313,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   314,     0,
+       0,   436,     0,     0,     0,     0,     0,     0,     0,   316,
+     317,   318,   319,     4,     5,     6,     7,     8,     9,    10,
       11,    12,    13,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
@@ -1732,12 +1761,12 @@
      180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
      190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
      200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
-     210,   211,   212,   213,   214,   215,   216,   217,     0,   300,
-     218,   301,   302,   303,   304,   305,   306,   307,   308,   309,
-     310,     0,     0,   311,   312,     0,     0,     0,     0,     0,
+     210,   211,   212,   213,   214,   215,   216,   217,     0,   301,
+     218,   302,   303,   304,   305,   306,   307,   308,   309,   310,
+     311,     0,     0,   312,   313,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   313,     0,     0,   435,     0,     0,     0,     0,
-       0,     0,     0,   315,   316,   317,   318,     4,     5,     6,
+       0,     0,   314,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   455,   316,   317,   318,   319,     4,     5,     6,
        7,     8,     9,    10,    11,    12,    13,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
@@ -1760,408 +1789,296 @@
      186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
      196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
      206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
-     216,   217,     0,   300,   218,   301,   302,   303,   304,   305,
-     306,   307,   308,   309,   310,     0,     0,   311,   312,     0,
+     216,   217,     0,   301,   218,   302,   303,   304,   305,   306,
+     307,   308,   309,   310,   311,     0,     0,   312,   313,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   313,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   454,   315,   316,   317,
-     318,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,     0,     0,     0,     0,
-       0,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,     0,   300,   218,   301,
-     302,   303,   304,   305,   306,   307,   308,   309,   310,     0,
-       0,   311,   312,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   314,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,   316,   317,   318,
+     319,     0,     0,     0,     0,     0,     0,     0,     0,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     313,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,   315,   316,   317,   318,     0,     0,     0,     0,     0,
-       0,     0,     0,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,     0,     0,     0,     0,
-       0,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   410,     0,   300,   218,   301,
-     302,   303,   304,   305,   306,   307,   308,   309,   310,     0,
-       0,   311,   312,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,     0,     0,     0,     0,     0,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
+     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
+     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   411,     0,   301,   218,   302,   303,   304,   305,   306,
+     307,   308,   309,   310,   311,     0,     0,   312,   313,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     313,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,   315,   316,   317,   318,     0,     0,     0,     0,     0,
-       0,     0,     0,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,     0,     0,     0,     0,
-       0,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,     0,     0,   218
+       0,     0,     0,     0,     0,     0,   314,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,   316,   317,   318,
+     319,     0,     0,     0,     0,     0,     0,     0,     0,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,     0,     0,     0,     0,     0,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
+     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
+     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
+     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
+     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
+     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,     0,     0,   218
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,   230,   238,   294,   313,     0,     0,   382,   253,    57,
-     353,   390,   271,   392,   461,   350,   395,   232,   232,   246,
-     247,   266,   248,   249,   522,   265,   262,   267,   253,   258,
-     291,   292,   293,   554,   274,   267,   327,   558,   265,   537,
-     267,   265,   563,   275,   271,   267,   291,   292,   265,   244,
-     245,   267,   274,   282,   363,   269,   365,   283,   284,   275,
-     275,   396,   275,   288,   255,   256,   257,   258,   259,   260,
-     261,   262,   263,   264,   267,   450,   272,   267,   277,   275,
-     279,   274,   266,   274,   274,   344,   269,   266,   347,   272,
-     272,   266,   275,   272,   272,   273,   405,   272,   441,   390,
-     479,   392,   266,   266,   395,   266,   266,   266,   272,   272,
-     232,   272,   272,   272,   272,   351,   272,   275,   409,   275,
-     567,   350,   250,   251,   353,   421,   422,   423,   424,   272,
-     272,   272,   275,   275,   275,   280,   281,   282,   267,   270,
-     483,   272,   232,   452,   269,   272,   273,   456,   523,   528,
-     417,   418,   269,   419,   420,   425,   426,   232,   232,   267,
-     274,   232,   275,   287,   266,   265,   286,   396,   271,   285,
-     252,   254,   268,   232,   232,   232,   275,   275,   265,   265,
-     275,   265,   473,   474,   232,   273,   265,   265,   479,   568,
-     270,   232,   268,   266,   231,   272,   268,   265,   443,   269,
-     509,   576,   232,   266,   270,   266,   275,    19,   311,   312,
-     274,   429,   441,   522,   269,   269,   427,   270,   428,   275,
-     432,   430,   262,   431,   258,   224,   262,   330,   537,   514,
-     230,   349,   553,   517,   563,   442,   564,   528,   238,   548,
-     256,   344,   517,   537,   347,   245,    -1,   245,    -1,    -1,
-     245,   245,   252,   562,   483,    -1,   547,    -1,   258,    -1,
-      -1,    -1,   262,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   568,    -1,    -1,
-      -1,    -1,   282,    -1,    -1,    -1,   286,    -1,    -1,    -1,
-      -1,    -1,    -1,   522,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   542,    -1,   537,    -1,
-      -1,   414,   415,   416,   417,   418,   419,   420,   421,   422,
+       0,   231,   239,   295,     0,     0,   314,   383,   254,    57,
+     462,   272,   354,   391,   351,   393,   232,   232,   396,   523,
+     253,   267,   265,   246,   247,   267,   263,   248,   249,   259,
+     265,   555,   267,   275,   538,   559,   328,   265,   267,   274,
+     564,   267,   265,   267,   267,   274,   292,   293,   271,   275,
+     274,   250,   251,   283,   269,   288,   364,   275,   366,   275,
+     397,   266,   283,   284,   255,   256,   257,   258,   259,   260,
+     261,   262,   263,   264,   267,   451,   280,   281,   282,   269,
+     266,   274,   272,   274,   345,   275,   272,   348,   266,   266,
+     266,   266,   272,   273,   272,   272,   272,   272,   406,   391,
+     442,   393,   480,   266,   396,   266,   277,   272,   279,   272,
+     275,   272,   244,   245,   272,   352,   568,   275,   410,   272,
+     272,   351,   275,   275,   354,   422,   423,   424,   425,   272,
+     272,   272,   275,   275,   291,   292,   293,   270,   232,   272,
+     418,   419,   484,   272,   273,   453,   420,   421,   524,   457,
+     267,   529,   232,   426,   427,   269,   269,   232,   232,   267,
+     275,   232,   274,   287,   266,   265,   286,   397,   252,   272,
+     268,   254,   232,   232,   285,   265,   275,   265,   275,   275,
+     265,   273,   474,   475,   232,   232,   265,   265,   480,   270,
+     232,   569,   268,   266,   231,   272,   268,   265,   444,   269,
+     232,   577,   510,   266,   270,   266,   275,    19,   275,   312,
+     313,   269,   442,   269,   428,   523,   270,   274,   429,   431,
+     430,   259,   263,   432,   263,   433,   225,   350,   331,   515,
+     538,   231,   554,   518,   564,   257,   443,   529,   565,   239,
+     538,   549,   345,   518,   246,   348,   246,    -1,    -1,    -1,
+     246,   246,    -1,   253,   484,   563,   548,    -1,    -1,   259,
+      -1,    -1,    -1,   263,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   569,    -1,    -1,
+      -1,    -1,    -1,   283,    -1,    -1,    -1,   287,    -1,    -1,
+      -1,    -1,    -1,   523,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   543,    -1,   538,    -1,
+      -1,    -1,   415,   416,   417,   418,   419,   420,   421,   422,
      423,   424,   425,   426,   427,   428,   429,   430,   431,   432,
+     433,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   351,   352,    -1,   354,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     350,   351,    -1,   353,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   382,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   396,    -1,    -1,    -1,
+      -1,    -1,    -1,   383,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   397,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   441,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     450,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   461,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   442,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   451,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   462,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   483,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   484,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   517,    -1,    -1,
-      -1,    -1,   522,   523,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   537,    -1,    -1,
-      -1,    -1,   542,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   554,    -1,    -1,    -1,   558,    -1,
-      -1,    -1,    -1,   563,    -1,    -1,    -1,   567,    -1,    -1,
-      -1,    -1,    -1,    -1,     0,    -1,   576,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
-     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
-     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
-     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
-     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
-     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
-     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
-     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
-     226,   227,   228,   229,   230,    -1,    -1,   233,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   518,    -1,
+      -1,    -1,    -1,   523,   524,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   538,    -1,
+      -1,    -1,    -1,   543,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   555,    -1,    -1,    -1,   559,
+      -1,    -1,    -1,    -1,   564,    -1,    -1,    -1,   568,    -1,
+      -1,    -1,    -1,    -1,    -1,     0,    -1,   577,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
+     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
+     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
+     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
+     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,
+     225,   226,   227,   228,   229,   230,    -1,    -1,   233,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     275,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   289,   290,   291,   292,   293,   294,
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    -1,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
+      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
+     143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
+     183,   184,   185,   186,   187,   188,   189,   190,   191,   192,
+     193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
+     203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
+     213,   214,   215,   216,   217,   218,   219,   220,   221,   222,
+     223,   224,   225,   226,   227,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
+     243,    -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   289,   290,   291,   292,   293,   294,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    16,    17,    18,    -1,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
-      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
-     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
-     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
-     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
-     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
-     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
-     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
-     224,   225,   226,   227,   228,   229,   230,   231,   232,   233,
-     234,   235,   236,   237,   238,   239,   240,   241,   242,   243,
-      -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   265,    -1,    -1,    -1,   269,   270,    -1,    -1,
+      -1,    -1,   275,   276,   277,   278,   279,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   289,   290,   291,   292,
+     293,   294,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    -1,    20,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
+      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
+     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
+     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
+     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
+     211,   212,   213,   214,   215,   216,   217,   218,   219,   220,
+     221,   222,   223,   224,   225,   226,   227,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,   239,   240,
+     241,   242,   243,    -1,    -1,   246,   247,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   265,    -1,    -1,    -1,   269,   270,    -1,    -1,    -1,
-      -1,   275,   276,   277,   278,   279,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   289,   290,   291,   292,   293,
-     294,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    -1,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
-     222,   223,   224,   225,   226,   227,   228,   229,   230,   231,
-     232,   233,   234,   235,   236,   237,   238,   239,   240,   241,
-     242,   243,    -1,    -1,   246,   247,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,   269,   270,
+      -1,    -1,    -1,    -1,   275,   276,   277,   278,   279,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   289,   290,
+     291,   292,   293,   294,     3,     4,     5,     6,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+      -1,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
+     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,   212,   213,   214,   215,   216,   217,   218,
+     219,   220,   221,   222,   223,   224,   225,   226,   227,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+     239,   240,   241,   242,   243,    -1,    -1,   246,   247,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   265,    -1,    -1,    -1,   269,   270,    -1,
-      -1,    -1,    -1,   275,   276,   277,   278,   279,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   289,   290,   291,
-     292,   293,   294,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    13,    14,    15,    16,    17,    18,    -1,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-     130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,   175,   176,   177,   178,   179,
-     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
-     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
-     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
-     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
-     220,   221,   222,   223,   224,   225,   226,   227,   228,   229,
-     230,   231,   232,   233,   234,   235,   236,   237,   238,   239,
-     240,   241,   242,   243,    -1,    -1,   246,   247,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,
+     269,    -1,    -1,    -1,    -1,    -1,   275,   276,   277,   278,
+     279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     289,   290,   291,   292,   293,   294,     3,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    -1,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
+     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
+     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
+     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
+     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
+     207,   208,   209,   210,   211,   212,   213,   214,   215,   216,
+     217,   218,   219,   220,   221,   222,   223,   224,   225,   226,
+     227,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,   239,   240,   241,   242,   243,    -1,    -1,   246,
+     247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,
+      -1,    -1,   269,    -1,    -1,    -1,    -1,    -1,   275,   276,
+     277,   278,   279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   289,   290,   291,   292,   293,   294,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    -1,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
+     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
+     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
+     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
+     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,
+     225,   226,   227,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,   239,   240,   241,   242,   243,    -1,
+      -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,   269,
-      -1,    -1,    -1,    -1,    -1,   275,   276,   277,   278,   279,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   289,
-     290,   291,   292,   293,   294,     3,     4,     5,     6,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    -1,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
-      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
-      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
-     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
-     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
-     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
-     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
-     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
-     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
-     188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
-     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
-     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
-     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
-     228,   229,   230,   231,   232,   233,   234,   235,   236,   237,
-     238,   239,   240,   241,   242,   243,    -1,    -1,   246,   247,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,
-      -1,   269,    -1,    -1,    -1,    -1,    -1,   275,   276,   277,
-     278,   279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   289,   290,   291,   292,   293,   294,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    -1,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
-     126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
-     136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   159,   160,   161,   162,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
-     176,   177,   178,   179,   180,   181,   182,   183,   184,   185,
-     186,   187,   188,   189,   190,   191,   192,   193,   194,   195,
-     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
-     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
-     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
-     226,   227,   228,   229,   230,   231,   232,   233,   234,   235,
-     236,   237,   238,   239,   240,   241,   242,   243,    -1,    -1,
-     246,   247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   265,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   275,
-     276,   277,   278,   279,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   289,   290,   291,   292,   293,   294,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
-      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
-     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
-     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
-     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
-     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
-     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
-     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
-     224,   225,   226,   227,   228,   229,   230,    -1,   232,   233,
-     234,   235,   236,   237,   238,   239,   240,   241,   242,   243,
-      -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   275,   276,   277,   278,   279,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   289,   290,   291,   292,   293,
-     294,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
-     222,   223,   224,   225,   226,   227,   228,   229,   230,    -1,
-      -1,   233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
-       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    -1,    -1,    -1,    -1,    -1,   289,   290,   291,
-     292,   293,   294,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
-      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
-     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
-     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
-     154,   155,   156,   157,   158,   159,   160,   161,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
-     174,   175,   176,   177,   178,   179,   180,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
-     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
-     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
-     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
-     224,   225,   226,   227,   228,   229,   230,    -1,   232,   233,
-     234,   235,   236,   237,   238,   239,   240,   241,   242,   243,
-      -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   276,   277,   278,   279,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   289,   290,   291,   292,   293,
+     265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     275,   276,   277,   278,   279,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   289,   290,   291,   292,   293,   294,
        3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    27,    28,    29,    30,    31,    32,
@@ -2185,67 +2102,99 @@
      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
      213,   214,   215,   216,   217,   218,   219,   220,   221,   222,
      223,   224,   225,   226,   227,   228,   229,   230,    -1,   232,
-     233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
+     243,    -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   275,   276,   277,   278,   279,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   289,   290,   291,   292,
+     293,   294,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
+      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
+     181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
+     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
+     201,   202,   203,   204,   205,   206,   207,   208,   209,   210,
+     211,   212,   213,   214,   215,   216,   217,   218,   219,   220,
+     221,   222,   223,   224,   225,   226,   227,   228,   229,   230,
+      -1,    -1,   233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   275,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    12,    13,    14,    15,   289,   290,   291,   292,
-     293,    -1,    -1,    -1,    -1,    -1,    -1,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
-     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
-     130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
-     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
-     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,   175,   176,   177,   178,   179,
-     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
-     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
-     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
-     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
-     220,   221,   222,   223,   224,   225,   226,   227,   228,   229,
-     230,    -1,    -1,   233,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   275,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,   289,   290,
+     291,   292,   293,   294,    -1,    -1,    -1,    -1,    -1,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
+     228,   229,   230,    -1,   232,   233,   234,   235,   236,   237,
+     238,   239,   240,   241,   242,   243,    -1,    -1,   246,   247,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   276,   277,
+     278,   279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   289,   290,   291,   292,   293,     3,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
+     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
+     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,   179,   180,   181,   182,   183,   184,   185,   186,
+     187,   188,   189,   190,   191,   192,   193,   194,   195,   196,
+     197,   198,   199,   200,   201,   202,   203,   204,   205,   206,
+     207,   208,   209,   210,   211,   212,   213,   214,   215,   216,
+     217,   218,   219,   220,   221,   222,   223,   224,   225,   226,
+     227,   228,   229,   230,    -1,   232,   233,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     270,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    -1,    -1,    -1,    -1,    -1,   289,
-     290,   291,   292,   293,    -1,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
-     122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   147,   148,   149,   150,   151,
-     152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,   173,   174,   175,   176,   177,   178,   179,   180,   181,
-     182,   183,   184,   185,   186,   187,   188,   189,   190,   191,
-     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
-     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
-     222,   223,   224,   225,   226,   227,   228,   229,   230,    -1,
-      -1,   233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   270,     3,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   275,     3,
        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    -1,    -1,    -1,    -1,    -1,   289,   290,   291,
-     292,   293,    -1,    27,    28,    29,    30,    31,    32,    33,
+      14,    15,   289,   290,   291,   292,   293,    -1,    -1,    -1,
+      -1,    -1,    -1,    27,    28,    29,    30,    31,    32,    33,
       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
@@ -2293,12 +2242,93 @@
      206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
      216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
      226,   227,   228,   229,   230,    -1,    -1,   233,    -1,    -1,
-      -1,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   270,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    -1,    -1,
+      -1,    -1,    -1,   289,   290,   291,   292,   293,    -1,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
+     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
+     228,   229,   230,    -1,    -1,   233,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   270,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    -1,    -1,    -1,    -1,
+      -1,   289,   290,   291,   292,   293,    -1,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
+     120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
+     130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+     140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
+     170,   171,   172,   173,   174,   175,   176,   177,   178,   179,
+     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,   225,   226,   227,   228,   229,
+     230,    -1,    -1,   233,    -1,    -1,    -1,     6,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   289,
+     290,   291,   292,   293,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    -1,    -1,    -1,    -1,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
+     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,   212,   213,   214,   215,   216,   217,   218,
+     219,   220,   221,   222,   223,   224,   225,   226,   227,   228,
+     229,   230,    -1,   232,   233,   234,   235,   236,   237,   238,
+     239,   240,   241,   242,   243,    -1,    -1,   246,   247,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,
+     269,   270,    -1,    -1,    -1,    -1,    -1,   276,   277,   278,
+     279,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   289,   290,   291,   292,   293,    63,    64,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,
       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
       -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
@@ -2319,7 +2349,7 @@
      235,   236,   237,   238,   239,   240,   241,   242,   243,    -1,
       -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     265,    -1,    -1,    -1,   269,   270,    -1,    -1,    -1,    -1,
+     265,    -1,    -1,   268,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   276,   277,   278,   279,     6,     7,     8,     9,    10,
       11,    12,    13,    14,    15,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,    29,    30,
@@ -2346,7 +2376,7 @@
       -1,   232,   233,   234,   235,   236,   237,   238,   239,   240,
      241,   242,   243,    -1,    -1,   246,   247,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   265,    -1,    -1,   268,    -1,    -1,
+      -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,   269,    -1,
       -1,    -1,    -1,    -1,    -1,   276,   277,   278,   279,     6,
        7,     8,     9,    10,    11,    12,    13,    14,    15,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -2374,7 +2404,7 @@
      237,   238,   239,   240,   241,   242,   243,    -1,    -1,   246,
      247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,
-      -1,    -1,   269,    -1,    -1,    -1,    -1,    -1,    -1,   276,
+      -1,   268,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   276,
      277,   278,   279,     6,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    28,    29,    30,    31,    32,
@@ -2401,8 +2431,8 @@
      233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
      243,    -1,    -1,   246,   247,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   265,    -1,    -1,   268,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   276,   277,   278,   279,     6,     7,     8,
+      -1,    -1,   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   275,   276,   277,   278,   279,     6,     7,     8,
        9,    10,    11,    12,    13,    14,    15,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
@@ -2428,83 +2458,56 @@
      229,   230,    -1,   232,   233,   234,   235,   236,   237,   238,
      239,   240,   241,   242,   243,    -1,    -1,   246,   247,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   265,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   275,   276,   277,   278,
-     279,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
-      -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
-     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
-     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
-     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,
-     225,   226,   227,   228,   229,   230,    -1,   232,   233,   234,
-     235,   236,   237,   238,   239,   240,   241,   242,   243,    -1,
-      -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   265,     6,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,   276,   277,   278,
+     279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     265,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,   276,   277,   278,   279,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
-      -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
-     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
-     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
-     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,
-     225,   226,   227,   228,   229,   230,    -1,   232,   233,   234,
-     235,   236,   237,   238,   239,   240,   241,   242,   243,    -1,
-      -1,   246,   247,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    -1,    -1,    -1,    -1,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
+     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,   212,   213,   214,   215,   216,   217,   218,
+     219,   220,   221,   222,   223,   224,   225,   226,   227,   228,
+     229,   230,    -1,   232,   233,   234,   235,   236,   237,   238,
+     239,   240,   241,   242,   243,    -1,    -1,   246,   247,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     265,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,   276,   277,   278,   279,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
-      -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
-     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
-     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
-     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
-     205,   206,   207,   208,   209,   210,   211,   212,   213,   214,
-     215,   216,   217,   218,   219,   220,   221,   222,   223,   224,
-     225,   226,   227,   228,   229,   230,    -1,    -1,   233
+      -1,    -1,    -1,    -1,    -1,    -1,   265,     6,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,   276,   277,   278,
+     279,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    63,    64,    65,    66,    67,    68,
+      69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    -1,    -1,    -1,    -1,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
+     139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+     179,   180,   181,   182,   183,   184,   185,   186,   187,   188,
+     189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
+     199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
+     209,   210,   211,   212,   213,   214,   215,   216,   217,   218,
+     219,   220,   221,   222,   223,   224,   225,   226,   227,   228,
+     229,   230,    -1,    -1,   233
 };
 
   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -2532,44 +2535,44 @@
      193,   194,   195,   196,   197,   198,   199,   200,   201,   202,
      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
      213,   214,   215,   216,   217,   218,   219,   220,   221,   222,
-     223,   224,   225,   226,   227,   228,   229,   230,   233,   289,
-     290,   291,   292,   293,   294,   329,   330,   333,   334,   335,
-     336,   340,   341,   342,   343,   344,   345,   348,   349,   350,
-     351,   353,   355,   356,   357,   394,   395,   396,   265,   265,
-     232,   269,   356,   232,   275,   275,   397,   266,   272,   337,
-     338,   339,   349,   353,   272,   275,   232,   232,   275,   350,
-     353,   267,   354,     0,   395,   232,   352,    57,   232,   346,
-     347,   269,   359,   353,   275,   354,   269,   376,   338,   337,
-     339,   232,   232,   265,   274,   354,   269,   272,   275,   332,
-     232,   234,   235,   236,   237,   238,   239,   240,   241,   242,
-     243,   246,   247,   265,   268,   276,   277,   278,   279,   299,
-     300,   301,   303,   304,   305,   306,   307,   308,   309,   310,
-     311,   312,   313,   314,   315,   316,   317,   318,   319,   320,
-     321,   322,   323,   353,   267,   266,   272,   274,   266,   272,
-     358,   349,   353,   360,   361,   275,   275,    16,    17,    18,
-      20,    21,    22,    23,    24,    25,    26,   231,   269,   270,
-     275,   310,   323,   325,   327,   329,   333,   353,   366,   367,
-     368,   369,   377,   378,   379,   382,   385,   386,   393,   354,
-     274,   354,   269,   325,   364,   274,   331,   232,   272,   275,
-     310,   310,   327,   246,   247,   267,   271,   266,   266,   272,
-     230,   325,   265,   310,   280,   281,   282,   277,   279,   244,
-     245,   248,   249,   283,   284,   250,   251,   287,   286,   285,
-     252,   254,   253,   288,   268,   268,   323,   232,   323,   328,
-     347,   360,   353,   232,   362,   363,   270,   361,   275,   275,
-     388,   265,   265,   275,   275,   327,   265,   327,   273,   265,
-     270,   370,   255,   256,   257,   258,   259,   260,   261,   262,
-     263,   264,   274,   326,   272,   275,   270,   367,   364,   274,
-     364,   365,   364,   360,   232,   266,   302,   327,   232,   325,
-     310,   310,   310,   312,   312,   313,   313,   314,   314,   314,
-     314,   315,   315,   316,   317,   318,   319,   320,   321,   324,
-     268,   270,   362,   354,   272,   275,   367,   389,   327,   275,
-     327,   273,   387,   377,   325,   325,   364,   270,   272,   270,
-     268,   327,   275,   363,   231,   366,   378,   390,   266,   266,
-     327,   342,   349,   381,   371,   270,   364,   273,   265,   381,
-     391,   392,   373,   374,   375,   380,   383,   232,   266,   270,
-     325,   327,   275,   266,    19,   369,   368,   269,   274,   368,
-     372,   376,   266,   327,   372,   373,   377,   384,   364,   275,
-     270
+     223,   224,   225,   226,   227,   228,   229,   230,   233,   275,
+     289,   290,   291,   292,   293,   294,   329,   330,   333,   334,
+     335,   336,   340,   341,   342,   343,   344,   345,   348,   349,
+     350,   351,   353,   355,   356,   357,   394,   395,   396,   265,
+     265,   232,   269,   356,   232,   275,   275,   397,   266,   272,
+     337,   338,   339,   349,   353,   272,   275,   232,   232,   275,
+     350,   353,   267,   354,     0,   395,   232,   352,    57,   232,
+     346,   347,   269,   359,   353,   275,   354,   269,   376,   338,
+     337,   339,   232,   232,   265,   274,   354,   269,   272,   275,
+     332,   232,   234,   235,   236,   237,   238,   239,   240,   241,
+     242,   243,   246,   247,   265,   268,   276,   277,   278,   279,
+     299,   300,   301,   303,   304,   305,   306,   307,   308,   309,
+     310,   311,   312,   313,   314,   315,   316,   317,   318,   319,
+     320,   321,   322,   323,   353,   267,   266,   272,   274,   266,
+     272,   358,   349,   353,   360,   361,   275,   275,    16,    17,
+      18,    20,    21,    22,    23,    24,    25,    26,   231,   269,
+     270,   275,   310,   323,   325,   327,   329,   333,   353,   366,
+     367,   368,   369,   377,   378,   379,   382,   385,   386,   393,
+     354,   274,   354,   269,   325,   364,   274,   331,   232,   272,
+     275,   310,   310,   327,   246,   247,   267,   271,   266,   266,
+     272,   230,   325,   265,   310,   280,   281,   282,   277,   279,
+     244,   245,   248,   249,   283,   284,   250,   251,   287,   286,
+     285,   252,   254,   253,   288,   268,   268,   323,   232,   323,
+     328,   347,   360,   353,   232,   362,   363,   270,   361,   275,
+     275,   388,   265,   265,   275,   275,   327,   265,   327,   273,
+     265,   270,   370,   255,   256,   257,   258,   259,   260,   261,
+     262,   263,   264,   274,   326,   272,   275,   270,   367,   364,
+     274,   364,   365,   364,   360,   232,   266,   302,   327,   232,
+     325,   310,   310,   310,   312,   312,   313,   313,   314,   314,
+     314,   314,   315,   315,   316,   317,   318,   319,   320,   321,
+     324,   268,   270,   362,   354,   272,   275,   367,   389,   327,
+     275,   327,   273,   387,   377,   325,   325,   364,   270,   272,
+     270,   268,   327,   275,   363,   231,   366,   378,   390,   266,
+     266,   327,   342,   349,   381,   371,   270,   364,   273,   265,
+     381,   391,   392,   373,   374,   375,   380,   383,   232,   266,
+     270,   325,   327,   275,   266,    19,   369,   368,   269,   274,
+     368,   372,   376,   266,   327,   372,   373,   377,   384,   364,
+     275,   270
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
@@ -2619,7 +2622,8 @@
      376,   376,   377,   377,   378,   378,   379,   380,   380,   381,
      381,   383,   382,   384,   384,   385,   385,   387,   386,   388,
      386,   389,   386,   390,   390,   391,   391,   392,   392,   393,
-     393,   393,   393,   393,   394,   394,   395,   395,   397,   396
+     393,   393,   393,   393,   394,   394,   395,   395,   395,   397,
+     396
 };
 
   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
@@ -2669,7 +2673,8 @@
        2,     3,     1,     2,     1,     2,     5,     3,     1,     1,
        4,     0,     8,     0,     1,     3,     2,     0,     6,     0,
        8,     0,     7,     1,     1,     1,     0,     2,     3,     2,
-       2,     2,     3,     2,     1,     2,     1,     1,     0,     3
+       2,     2,     3,     2,     1,     2,     1,     1,     1,     0,
+       3
 };
 
 
@@ -3356,7 +3361,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string);
     }
-#line 3360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 3:
@@ -3364,7 +3369,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 3368 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3373 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 4:
@@ -3372,7 +3377,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
     }
-#line 3376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 5:
@@ -3381,7 +3386,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal");
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
     }
-#line 3385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3390 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 6:
@@ -3390,7 +3395,7 @@
         parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal");
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true);
     }
-#line 3394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 7:
@@ -3399,7 +3404,7 @@
         parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal");
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true);
     }
-#line 3403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3408 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 8:
@@ -3410,7 +3415,7 @@
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
 #endif
     }
-#line 3414 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 9:
@@ -3421,7 +3426,7 @@
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
 #endif
     }
-#line 3425 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3430 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 10:
@@ -3429,7 +3434,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
     }
-#line 3433 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3438 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 11:
@@ -3438,7 +3443,7 @@
         parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
     }
-#line 3442 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 12:
@@ -3449,7 +3454,7 @@
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true);
 #endif
     }
-#line 3453 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3458 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 13:
@@ -3457,7 +3462,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
     }
-#line 3461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 14:
@@ -3467,7 +3472,7 @@
         if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
             (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
     }
-#line 3471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 15:
@@ -3475,7 +3480,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 3479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3484 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 16:
@@ -3483,7 +3488,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode));
     }
-#line 3487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3492 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 17:
@@ -3491,7 +3496,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 3495 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 18:
@@ -3499,7 +3504,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string);
     }
-#line 3503 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 19:
@@ -3509,7 +3514,7 @@
         parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode));
         (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode));
     }
-#line 3513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3518 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 20:
@@ -3519,7 +3524,7 @@
         parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode));
         (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode));
     }
-#line 3523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 21:
@@ -3528,7 +3533,7 @@
         parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]");
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 3532 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 22:
@@ -3537,7 +3542,7 @@
         (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode);
         delete (yyvsp[0].interm).function;
     }
-#line 3541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 23:
@@ -3545,7 +3550,7 @@
     {
         (yyval.interm) = (yyvsp[0].interm);
     }
-#line 3549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3554 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 24:
@@ -3554,7 +3559,7 @@
         (yyval.interm) = (yyvsp[-1].interm);
         (yyval.interm).loc = (yyvsp[0].lex).loc;
     }
-#line 3558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 25:
@@ -3563,7 +3568,7 @@
         (yyval.interm) = (yyvsp[-1].interm);
         (yyval.interm).loc = (yyvsp[0].lex).loc;
     }
-#line 3567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 26:
@@ -3571,7 +3576,7 @@
     {
         (yyval.interm) = (yyvsp[-1].interm);
     }
-#line 3575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 27:
@@ -3579,7 +3584,7 @@
     {
         (yyval.interm) = (yyvsp[0].interm);
     }
-#line 3583 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3588 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 28:
@@ -3591,7 +3596,7 @@
         (yyval.interm).function = (yyvsp[-1].interm).function;
         (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
     }
-#line 3595 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 29:
@@ -3603,7 +3608,7 @@
         (yyval.interm).function = (yyvsp[-2].interm).function;
         (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
     }
-#line 3607 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 30:
@@ -3611,7 +3616,7 @@
     {
         (yyval.interm) = (yyvsp[-1].interm);
     }
-#line 3615 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 31:
@@ -3621,7 +3626,7 @@
         (yyval.interm).intermNode = 0;
         (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
     }
-#line 3625 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 32:
@@ -3653,7 +3658,7 @@
             (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull);
         }
     }
-#line 3657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 33:
@@ -3664,7 +3669,7 @@
         if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode())
             parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), "");
     }
-#line 3668 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 34:
@@ -3673,7 +3678,7 @@
         parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode));
         (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode));
     }
-#line 3677 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 35:
@@ -3682,7 +3687,7 @@
         parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode));
         (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode));
     }
-#line 3686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 36:
@@ -3703,38 +3708,38 @@
                 (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
         }
     }
-#line 3707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3712 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 37:
 #line 472 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; }
-#line 3713 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3718 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 38:
 #line 473 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; }
-#line 3719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3724 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 39:
 #line 474 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; }
-#line 3725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 40:
 #line 475 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot;
               parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); }
-#line 3732 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 41:
 #line 481 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3743 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 42:
@@ -3744,7 +3749,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3748 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3753 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 43:
@@ -3754,7 +3759,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3763 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 44:
@@ -3765,13 +3770,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 45:
 #line 501 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3775 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 46:
@@ -3781,7 +3786,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3785 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 47:
@@ -3791,13 +3796,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 48:
 #line 515 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 49:
@@ -3808,7 +3813,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3812 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3817 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 50:
@@ -3819,13 +3824,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3828 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 51:
 #line 531 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3834 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 52:
@@ -3835,7 +3840,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3839 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3844 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 53:
@@ -3845,7 +3850,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3849 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 54:
@@ -3855,7 +3860,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3859 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 55:
@@ -3865,13 +3870,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3869 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 56:
 #line 555 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 57:
@@ -3884,7 +3889,7 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3888 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3893 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 58:
@@ -3897,13 +3902,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3901 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 59:
 #line 575 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3907 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3912 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 60:
@@ -3914,13 +3919,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3923 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 61:
 #line 585 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 62:
@@ -3931,13 +3936,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 63:
 #line 595 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 64:
@@ -3948,13 +3953,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 3952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 65:
 #line 605 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3963 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 66:
@@ -3964,13 +3969,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 67:
 #line 614 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 68:
@@ -3980,13 +3985,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 3984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3989 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 69:
 #line 623 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 3990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 3995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 70:
@@ -3996,13 +4001,13 @@
         if ((yyval.interm.intermTypedNode) == 0)
             (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
     }
-#line 4000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 71:
 #line 632 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4011 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 72:
@@ -4010,7 +4015,7 @@
     {
         ++parseContext.controlFlowNestingLevel;
     }
-#line 4014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4019 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 73:
@@ -4027,13 +4032,13 @@
             (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
         }
     }
-#line 4031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 74:
 #line 651 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 4037 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4042 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 75:
@@ -4050,7 +4055,7 @@
             (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
         }
     }
-#line 4054 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 76:
@@ -4059,7 +4064,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpAssign;
     }
-#line 4063 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 77:
@@ -4068,7 +4073,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpMulAssign;
     }
-#line 4072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 78:
@@ -4077,7 +4082,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpDivAssign;
     }
-#line 4081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 79:
@@ -4087,7 +4092,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpModAssign;
     }
-#line 4091 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4096 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 80:
@@ -4096,7 +4101,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpAddAssign;
     }
-#line 4100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4105 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 81:
@@ -4105,7 +4110,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).op = EOpSubAssign;
     }
-#line 4109 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4114 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 82:
@@ -4114,7 +4119,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign");
         (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign;
     }
-#line 4118 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 83:
@@ -4123,7 +4128,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign");
         (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign;
     }
-#line 4127 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 84:
@@ -4132,7 +4137,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign");
         (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign;
     }
-#line 4136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 85:
@@ -4141,7 +4146,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign");
         (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign;
     }
-#line 4145 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 86:
@@ -4150,7 +4155,7 @@
         parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign");
         (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign;
     }
-#line 4154 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 87:
@@ -4158,7 +4163,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 4162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 88:
@@ -4171,7 +4176,7 @@
             (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
         }
     }
-#line 4175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 89:
@@ -4180,7 +4185,7 @@
         parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), "");
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 4184 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4189 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 90:
@@ -4190,7 +4195,7 @@
         (yyval.interm.intermNode) = 0;
         // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
     }
-#line 4194 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 91:
@@ -4200,7 +4205,7 @@
             (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence);
         (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode;
     }
-#line 4204 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 92:
@@ -4213,7 +4218,7 @@
         parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision);
         (yyval.interm.intermNode) = 0;
     }
-#line 4217 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 93:
@@ -4222,7 +4227,7 @@
         parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList);
         (yyval.interm.intermNode) = 0;
     }
-#line 4226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 94:
@@ -4231,7 +4236,7 @@
         parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string);
         (yyval.interm.intermNode) = 0;
     }
-#line 4235 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 95:
@@ -4240,7 +4245,7 @@
         parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes);
         (yyval.interm.intermNode) = 0;
     }
-#line 4244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 96:
@@ -4250,7 +4255,7 @@
         parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type));
         (yyval.interm.intermNode) = 0;
     }
-#line 4254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 97:
@@ -4260,7 +4265,7 @@
         parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string);
         (yyval.interm.intermNode) = 0;
     }
-#line 4264 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 98:
@@ -4271,13 +4276,13 @@
         parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList));
         (yyval.interm.intermNode) = 0;
     }
-#line 4275 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 99:
 #line 785 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); }
-#line 4281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 100:
@@ -4291,7 +4296,7 @@
         (yyval.interm).loc = (yyvsp[-5].interm.type).loc;
         (yyval.interm).typeList = (yyvsp[-1].interm.typeList);
     }
-#line 4295 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 101:
@@ -4300,7 +4305,7 @@
         (yyval.interm.identifierList) = new TIdentifierList;
         (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
     }
-#line 4304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 102:
@@ -4309,7 +4314,7 @@
         (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList);
         (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
     }
-#line 4313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4318 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 103:
@@ -4318,7 +4323,7 @@
         (yyval.interm).function = (yyvsp[-1].interm.function);
         (yyval.interm).loc = (yyvsp[0].lex).loc;
     }
-#line 4322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4327 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 104:
@@ -4326,7 +4331,7 @@
     {
         (yyval.interm.function) = (yyvsp[0].interm.function);
     }
-#line 4330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4335 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 105:
@@ -4334,7 +4339,7 @@
     {
         (yyval.interm.function) = (yyvsp[0].interm.function);
     }
-#line 4338 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 106:
@@ -4347,7 +4352,7 @@
         else
             delete (yyvsp[0].interm).param.type;
     }
-#line 4351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 107:
@@ -4369,7 +4374,7 @@
             (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
         }
     }
-#line 4373 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 108:
@@ -4388,7 +4393,7 @@
         function = new TFunction((yyvsp[-1].lex).string, type);
         (yyval.interm.function) = function;
     }
-#line 4392 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4397 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 109:
@@ -4408,7 +4413,7 @@
         (yyval.interm).loc = (yyvsp[0].lex).loc;
         (yyval.interm).param = param;
     }
-#line 4412 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 110:
@@ -4430,7 +4435,7 @@
         (yyval.interm).loc = (yyvsp[-1].lex).loc;
         (yyval.interm).param = param;
     }
-#line 4434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 111:
@@ -4446,7 +4451,7 @@
         parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
 
     }
-#line 4450 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4455 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 112:
@@ -4458,7 +4463,7 @@
         parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
         parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
     }
-#line 4462 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 113:
@@ -4473,7 +4478,7 @@
         parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type);
         parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
     }
-#line 4477 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4482 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 114:
@@ -4485,7 +4490,7 @@
         parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
         parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
     }
-#line 4489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 115:
@@ -4496,7 +4501,7 @@
         if ((yyvsp[0].interm.type).arraySizes)
             parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes);
     }
-#line 4500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 116:
@@ -4504,7 +4509,7 @@
     {
         (yyval.interm) = (yyvsp[0].interm);
     }
-#line 4508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 117:
@@ -4513,7 +4518,7 @@
         (yyval.interm) = (yyvsp[-2].interm);
         parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type);
     }
-#line 4517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4522 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 118:
@@ -4522,7 +4527,7 @@
         (yyval.interm) = (yyvsp[-3].interm);
         parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes);
     }
-#line 4526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4531 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 119:
@@ -4532,7 +4537,7 @@
         TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
         (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
     }
-#line 4536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 120:
@@ -4542,7 +4547,7 @@
         TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode));
         (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
     }
-#line 4546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4551 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 121:
@@ -4552,7 +4557,7 @@
         (yyval.interm).intermNode = 0;
         parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type);
     }
-#line 4556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4561 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 122:
@@ -4562,7 +4567,7 @@
         (yyval.interm).intermNode = 0;
         parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type));
     }
-#line 4566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4571 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 123:
@@ -4572,7 +4577,7 @@
         (yyval.interm).intermNode = 0;
         parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes);
     }
-#line 4576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4581 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 124:
@@ -4582,7 +4587,7 @@
         TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
         (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
     }
-#line 4586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4591 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 125:
@@ -4592,7 +4597,7 @@
         TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode));
         (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
     }
-#line 4596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4601 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 126:
@@ -4608,7 +4613,7 @@
 
         parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier);
     }
-#line 4612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 127:
@@ -4637,7 +4642,7 @@
              (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn)))
             (yyval.interm.type).qualifier.smooth = true;
     }
-#line 4641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 128:
@@ -4648,7 +4653,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.invariant = true;
     }
-#line 4652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 129:
@@ -4660,7 +4665,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.smooth = true;
     }
-#line 4664 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 130:
@@ -4672,7 +4677,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.flat = true;
     }
-#line 4676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4681 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 131:
@@ -4684,7 +4689,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.nopersp = true;
     }
-#line 4688 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 132:
@@ -4698,7 +4703,7 @@
         (yyval.interm.type).qualifier.explicitInterp = true;
 #endif
     }
-#line 4702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 133:
@@ -4706,7 +4711,7 @@
     {
         (yyval.interm.type) = (yyvsp[-1].interm.type);
     }
-#line 4710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4715 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 134:
@@ -4714,7 +4719,7 @@
     {
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4718 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 135:
@@ -4724,7 +4729,7 @@
         (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
         parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
     }
-#line 4728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4733 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 136:
@@ -4733,7 +4738,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string);
     }
-#line 4737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 137:
@@ -4742,7 +4747,7 @@
         (yyval.interm.type).init((yyvsp[-2].lex).loc);
         parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode));
     }
-#line 4746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 138:
@@ -4752,7 +4757,7 @@
         TString strShared("shared");
         parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared);
     }
-#line 4756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 139:
@@ -4763,7 +4768,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.noContraction = true;
     }
-#line 4767 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 140:
@@ -4771,7 +4776,7 @@
     {
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4775 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 141:
@@ -4784,7 +4789,7 @@
         (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
         parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
     }
-#line 4788 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4793 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 142:
@@ -4792,7 +4797,7 @@
     {
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 143:
@@ -4800,7 +4805,7 @@
     {
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4804 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4809 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 144:
@@ -4809,7 +4814,7 @@
         parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision);
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 145:
@@ -4818,7 +4823,7 @@
         // allow inheritance of storage qualifier from block declaration
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4822 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4827 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 146:
@@ -4827,7 +4832,7 @@
         // allow inheritance of storage qualifier from block declaration
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 147:
@@ -4836,7 +4841,7 @@
         // allow inheritance of storage qualifier from block declaration
         (yyval.interm.type) = (yyvsp[0].interm.type);
     }
-#line 4840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4845 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 148:
@@ -4845,7 +4850,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqConst;  // will later turn into EvqConstReadOnly, if the initializer is not constant
     }
-#line 4849 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4854 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 149:
@@ -4862,7 +4867,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqVaryingIn;
     }
-#line 4866 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4871 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 150:
@@ -4881,7 +4886,7 @@
         else
             (yyval.interm.type).qualifier.storage = EvqVaryingIn;
     }
-#line 4885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4890 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 151:
@@ -4891,7 +4896,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqInOut;
     }
-#line 4895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 152:
@@ -4902,7 +4907,7 @@
         // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
         (yyval.interm.type).qualifier.storage = EvqIn;
     }
-#line 4906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 153:
@@ -4913,7 +4918,7 @@
         // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
         (yyval.interm.type).qualifier.storage = EvqOut;
     }
-#line 4917 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 154:
@@ -4925,7 +4930,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.centroid = true;
     }
-#line 4929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4934 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 155:
@@ -4936,7 +4941,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.patch = true;
     }
-#line 4940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4945 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 156:
@@ -4946,7 +4951,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.sample = true;
     }
-#line 4950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 157:
@@ -4956,7 +4961,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqUniform;
     }
-#line 4960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 158:
@@ -4966,7 +4971,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqBuffer;
     }
-#line 4970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4975 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 159:
@@ -4979,7 +4984,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.storage = EvqShared;
     }
-#line 4983 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4988 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 160:
@@ -4988,7 +4993,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.coherent = true;
     }
-#line 4992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 4997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 161:
@@ -4997,7 +5002,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.volatil = true;
     }
-#line 5001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 162:
@@ -5006,7 +5011,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.restrict = true;
     }
-#line 5010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 163:
@@ -5015,7 +5020,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.readonly = true;
     }
-#line 5019 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 164:
@@ -5024,7 +5029,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc);
         (yyval.interm.type).qualifier.writeonly = true;
     }
-#line 5028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5033 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 165:
@@ -5035,7 +5040,7 @@
         parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine");
         (yyval.interm.type).init((yyvsp[0].lex).loc);
     }
-#line 5039 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5044 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 166:
@@ -5046,7 +5051,7 @@
         parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine");
         (yyval.interm.type).init((yyvsp[-3].lex).loc);
     }
-#line 5050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 167:
@@ -5054,7 +5059,7 @@
     {
         // TODO
     }
-#line 5058 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5063 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 168:
@@ -5064,7 +5069,7 @@
         // 1) make sure each identifier is a type declared earlier with SUBROUTINE
         // 2) save all of the identifiers for future comparison with the declared function
     }
-#line 5068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5073 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 169:
@@ -5073,7 +5078,7 @@
         (yyval.interm.type) = (yyvsp[0].interm.type);
         (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
     }
-#line 5077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5082 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 170:
@@ -5084,7 +5089,7 @@
         (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
         (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
     }
-#line 5088 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 171:
@@ -5094,7 +5099,7 @@
         (yyval.interm).arraySizes = new TArraySizes;
         (yyval.interm).arraySizes->addInnerSize();
     }
-#line 5098 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 172:
@@ -5107,7 +5112,7 @@
         parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size);
         (yyval.interm).arraySizes->addInnerSize(size);
     }
-#line 5111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 173:
@@ -5116,7 +5121,7 @@
         (yyval.interm) = (yyvsp[-2].interm);
         (yyval.interm).arraySizes->addInnerSize();
     }
-#line 5120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5125 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 174:
@@ -5128,7 +5133,7 @@
         parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size);
         (yyval.interm).arraySizes->addInnerSize(size);
     }
-#line 5132 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5137 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 175:
@@ -5137,7 +5142,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtVoid;
     }
-#line 5141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 176:
@@ -5146,7 +5151,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtFloat;
     }
-#line 5150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 177:
@@ -5156,7 +5161,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtDouble;
     }
-#line 5160 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5165 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 178:
@@ -5168,7 +5173,7 @@
         (yyval.interm.type).basicType = EbtFloat16;
 #endif
     }
-#line 5172 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 179:
@@ -5177,7 +5182,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtInt;
     }
-#line 5181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 180:
@@ -5187,7 +5192,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtUint;
     }
-#line 5191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 181:
@@ -5197,7 +5202,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtInt64;
     }
-#line 5201 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 182:
@@ -5207,7 +5212,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtUint64;
     }
-#line 5211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 183:
@@ -5219,7 +5224,7 @@
         (yyval.interm.type).basicType = EbtInt16;
 #endif
     }
-#line 5223 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5228 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 184:
@@ -5231,7 +5236,7 @@
         (yyval.interm.type).basicType = EbtUint16;
 #endif
     }
-#line 5235 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 185:
@@ -5240,7 +5245,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtBool;
     }
-#line 5244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 186:
@@ -5250,7 +5255,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setVector(2);
     }
-#line 5254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 187:
@@ -5260,7 +5265,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setVector(3);
     }
-#line 5264 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 188:
@@ -5270,7 +5275,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setVector(4);
     }
-#line 5274 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 189:
@@ -5281,7 +5286,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setVector(2);
     }
-#line 5285 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5290 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 190:
@@ -5292,7 +5297,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setVector(3);
     }
-#line 5296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5301 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 191:
@@ -5303,7 +5308,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setVector(4);
     }
-#line 5307 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5312 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 192:
@@ -5316,7 +5321,7 @@
         (yyval.interm.type).setVector(2);
 #endif
     }
-#line 5320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5325 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 193:
@@ -5329,7 +5334,7 @@
         (yyval.interm.type).setVector(3);
 #endif
     }
-#line 5333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5338 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 194:
@@ -5342,7 +5347,7 @@
         (yyval.interm.type).setVector(4);
 #endif
     }
-#line 5346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 195:
@@ -5352,7 +5357,7 @@
         (yyval.interm.type).basicType = EbtBool;
         (yyval.interm.type).setVector(2);
     }
-#line 5356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 196:
@@ -5362,7 +5367,7 @@
         (yyval.interm.type).basicType = EbtBool;
         (yyval.interm.type).setVector(3);
     }
-#line 5366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5371 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 197:
@@ -5372,7 +5377,7 @@
         (yyval.interm.type).basicType = EbtBool;
         (yyval.interm.type).setVector(4);
     }
-#line 5376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 198:
@@ -5382,7 +5387,7 @@
         (yyval.interm.type).basicType = EbtInt;
         (yyval.interm.type).setVector(2);
     }
-#line 5386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 199:
@@ -5392,7 +5397,7 @@
         (yyval.interm.type).basicType = EbtInt;
         (yyval.interm.type).setVector(3);
     }
-#line 5396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 200:
@@ -5402,7 +5407,7 @@
         (yyval.interm.type).basicType = EbtInt;
         (yyval.interm.type).setVector(4);
     }
-#line 5406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 201:
@@ -5413,7 +5418,7 @@
         (yyval.interm.type).basicType = EbtInt64;
         (yyval.interm.type).setVector(2);
     }
-#line 5417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5422 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 202:
@@ -5424,7 +5429,7 @@
         (yyval.interm.type).basicType = EbtInt64;
         (yyval.interm.type).setVector(3);
     }
-#line 5428 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5433 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 203:
@@ -5435,7 +5440,7 @@
         (yyval.interm.type).basicType = EbtInt64;
         (yyval.interm.type).setVector(4);
     }
-#line 5439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 204:
@@ -5448,7 +5453,7 @@
         (yyval.interm.type).setVector(2);
 #endif
     }
-#line 5452 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 205:
@@ -5461,7 +5466,7 @@
         (yyval.interm.type).setVector(3);
 #endif
     }
-#line 5465 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5470 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 206:
@@ -5474,7 +5479,7 @@
         (yyval.interm.type).setVector(4);
 #endif
     }
-#line 5478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5483 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 207:
@@ -5485,7 +5490,7 @@
         (yyval.interm.type).basicType = EbtUint;
         (yyval.interm.type).setVector(2);
     }
-#line 5489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 208:
@@ -5496,7 +5501,7 @@
         (yyval.interm.type).basicType = EbtUint;
         (yyval.interm.type).setVector(3);
     }
-#line 5500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5505 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 209:
@@ -5507,7 +5512,7 @@
         (yyval.interm.type).basicType = EbtUint;
         (yyval.interm.type).setVector(4);
     }
-#line 5511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 210:
@@ -5518,7 +5523,7 @@
         (yyval.interm.type).basicType = EbtUint64;
         (yyval.interm.type).setVector(2);
     }
-#line 5522 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5527 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 211:
@@ -5529,7 +5534,7 @@
         (yyval.interm.type).basicType = EbtUint64;
         (yyval.interm.type).setVector(3);
     }
-#line 5533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5538 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 212:
@@ -5540,7 +5545,7 @@
         (yyval.interm.type).basicType = EbtUint64;
         (yyval.interm.type).setVector(4);
     }
-#line 5544 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5549 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 213:
@@ -5553,7 +5558,7 @@
         (yyval.interm.type).setVector(2);
 #endif
     }
-#line 5557 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5562 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 214:
@@ -5566,7 +5571,7 @@
         (yyval.interm.type).setVector(3);
 #endif
     }
-#line 5570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 215:
@@ -5579,7 +5584,7 @@
         (yyval.interm.type).setVector(4);
 #endif
     }
-#line 5583 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5588 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 216:
@@ -5589,7 +5594,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(2, 2);
     }
-#line 5593 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5598 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 217:
@@ -5599,7 +5604,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(3, 3);
     }
-#line 5603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 218:
@@ -5609,7 +5614,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(4, 4);
     }
-#line 5613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5618 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 219:
@@ -5619,7 +5624,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(2, 2);
     }
-#line 5623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 220:
@@ -5629,7 +5634,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(2, 3);
     }
-#line 5633 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5638 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 221:
@@ -5639,7 +5644,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(2, 4);
     }
-#line 5643 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5648 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 222:
@@ -5649,7 +5654,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(3, 2);
     }
-#line 5653 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5658 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 223:
@@ -5659,7 +5664,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(3, 3);
     }
-#line 5663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5668 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 224:
@@ -5669,7 +5674,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(3, 4);
     }
-#line 5673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 225:
@@ -5679,7 +5684,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(4, 2);
     }
-#line 5683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5688 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 226:
@@ -5689,7 +5694,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(4, 3);
     }
-#line 5693 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 227:
@@ -5699,7 +5704,7 @@
         (yyval.interm.type).basicType = EbtFloat;
         (yyval.interm.type).setMatrix(4, 4);
     }
-#line 5703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5708 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 228:
@@ -5710,7 +5715,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(2, 2);
     }
-#line 5714 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 229:
@@ -5721,7 +5726,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(3, 3);
     }
-#line 5725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 230:
@@ -5732,7 +5737,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(4, 4);
     }
-#line 5736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 231:
@@ -5743,7 +5748,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(2, 2);
     }
-#line 5747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5752 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 232:
@@ -5754,7 +5759,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(2, 3);
     }
-#line 5758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5763 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 233:
@@ -5765,7 +5770,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(2, 4);
     }
-#line 5769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 234:
@@ -5776,7 +5781,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(3, 2);
     }
-#line 5780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5785 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 235:
@@ -5787,7 +5792,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(3, 3);
     }
-#line 5791 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 236:
@@ -5798,7 +5803,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(3, 4);
     }
-#line 5802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5807 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 237:
@@ -5809,7 +5814,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(4, 2);
     }
-#line 5813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 238:
@@ -5820,7 +5825,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(4, 3);
     }
-#line 5824 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 239:
@@ -5831,7 +5836,7 @@
         (yyval.interm.type).basicType = EbtDouble;
         (yyval.interm.type).setMatrix(4, 4);
     }
-#line 5835 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 240:
@@ -5844,7 +5849,7 @@
         (yyval.interm.type).setMatrix(2, 2);
 #endif
     }
-#line 5848 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 241:
@@ -5857,7 +5862,7 @@
         (yyval.interm.type).setMatrix(3, 3);
 #endif
     }
-#line 5861 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5866 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 242:
@@ -5870,7 +5875,7 @@
         (yyval.interm.type).setMatrix(4, 4);
 #endif
     }
-#line 5874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 243:
@@ -5883,7 +5888,7 @@
         (yyval.interm.type).setMatrix(2, 2);
 #endif
     }
-#line 5887 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 244:
@@ -5896,7 +5901,7 @@
         (yyval.interm.type).setMatrix(2, 3);
 #endif
     }
-#line 5900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 245:
@@ -5909,7 +5914,7 @@
         (yyval.interm.type).setMatrix(2, 4);
 #endif
     }
-#line 5913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 246:
@@ -5922,7 +5927,7 @@
         (yyval.interm.type).setMatrix(3, 2);
 #endif
     }
-#line 5926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5931 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 247:
@@ -5935,7 +5940,7 @@
         (yyval.interm.type).setMatrix(3, 3);
 #endif
     }
-#line 5939 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5944 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 248:
@@ -5948,7 +5953,7 @@
         (yyval.interm.type).setMatrix(3, 4);
 #endif
     }
-#line 5952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5957 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 249:
@@ -5961,7 +5966,7 @@
         (yyval.interm.type).setMatrix(4, 2);
 #endif
     }
-#line 5965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 250:
@@ -5974,7 +5979,7 @@
         (yyval.interm.type).setMatrix(4, 3);
 #endif
     }
-#line 5978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5983 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 251:
@@ -5987,7 +5992,7 @@
         (yyval.interm.type).setMatrix(4, 4);
 #endif
     }
-#line 5991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 5996 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 252:
@@ -5997,7 +6002,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         (yyval.interm.type).basicType = EbtAtomicUint;
     }
-#line 6001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 253:
@@ -6007,7 +6012,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd1D);
     }
-#line 6011 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 254:
@@ -6017,7 +6022,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D);
     }
-#line 6021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 255:
@@ -6027,7 +6032,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd3D);
     }
-#line 6031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 256:
@@ -6037,7 +6042,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdCube);
     }
-#line 6041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6046 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 257:
@@ -6047,7 +6052,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true);
     }
-#line 6051 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 258:
@@ -6057,7 +6062,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true);
     }
-#line 6061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 259:
@@ -6067,7 +6072,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true);
     }
-#line 6071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6076 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 260:
@@ -6077,7 +6082,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
     }
-#line 6081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 261:
@@ -6087,7 +6092,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
     }
-#line 6091 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6096 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 262:
@@ -6097,7 +6102,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true);
     }
-#line 6101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 263:
@@ -6107,7 +6112,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true);
     }
-#line 6111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 264:
@@ -6117,7 +6122,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true);
     }
-#line 6121 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6126 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 265:
@@ -6127,7 +6132,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true);
     }
-#line 6131 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 266:
@@ -6137,7 +6142,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd1D);
     }
-#line 6141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 267:
@@ -6147,7 +6152,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd2D);
     }
-#line 6151 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 268:
@@ -6157,7 +6162,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd3D);
     }
-#line 6161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 269:
@@ -6167,7 +6172,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, EsdCube);
     }
-#line 6171 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 270:
@@ -6177,7 +6182,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
     }
-#line 6181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 271:
@@ -6187,7 +6192,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
     }
-#line 6191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 272:
@@ -6197,7 +6202,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
     }
-#line 6201 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 273:
@@ -6207,7 +6212,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd1D);
     }
-#line 6211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 274:
@@ -6217,7 +6222,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd2D);
     }
-#line 6221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 275:
@@ -6227,7 +6232,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd3D);
     }
-#line 6231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6236 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 276:
@@ -6237,7 +6242,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, EsdCube);
     }
-#line 6241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6246 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 277:
@@ -6247,7 +6252,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd1D, true);
     }
-#line 6251 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6256 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 278:
@@ -6257,7 +6262,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
     }
-#line 6261 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6266 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 279:
@@ -6267,7 +6272,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
     }
-#line 6271 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 280:
@@ -6277,7 +6282,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdRect);
     }
-#line 6281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 281:
@@ -6287,7 +6292,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true);
     }
-#line 6291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 282:
@@ -6297,7 +6302,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, EsdRect);
     }
-#line 6301 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 283:
@@ -6307,7 +6312,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, EsdRect);
     }
-#line 6311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6316 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 284:
@@ -6317,7 +6322,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
     }
-#line 6321 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 285:
@@ -6327,7 +6332,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
     }
-#line 6331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 286:
@@ -6337,7 +6342,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
     }
-#line 6341 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 287:
@@ -6347,7 +6352,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true);
     }
-#line 6351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 288:
@@ -6357,7 +6362,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true);
     }
-#line 6361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 289:
@@ -6367,7 +6372,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true);
     }
-#line 6371 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 290:
@@ -6377,7 +6382,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true);
     }
-#line 6381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 291:
@@ -6387,7 +6392,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true);
     }
-#line 6391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 292:
@@ -6397,7 +6402,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true);
     }
-#line 6401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 293:
@@ -6407,7 +6412,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setPureSampler(false);
     }
-#line 6411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 294:
@@ -6417,7 +6422,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setPureSampler(true);
     }
-#line 6421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 295:
@@ -6427,7 +6432,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D);
     }
-#line 6431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 296:
@@ -6437,7 +6442,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
     }
-#line 6441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 297:
@@ -6447,7 +6452,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D);
     }
-#line 6451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 298:
@@ -6457,7 +6462,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
     }
-#line 6461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 299:
@@ -6467,7 +6472,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true);
     }
-#line 6471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 300:
@@ -6477,7 +6482,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
     }
-#line 6481 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 301:
@@ -6487,7 +6492,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true);
     }
-#line 6491 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 302:
@@ -6497,7 +6502,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
     }
-#line 6501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 303:
@@ -6507,7 +6512,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
     }
-#line 6511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 304:
@@ -6517,7 +6522,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D);
     }
-#line 6521 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 305:
@@ -6527,7 +6532,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube);
     }
-#line 6531 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 306:
@@ -6537,7 +6542,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true);
     }
-#line 6541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 307:
@@ -6547,7 +6552,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true);
     }
-#line 6551 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 308:
@@ -6557,7 +6562,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
     }
-#line 6561 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 309:
@@ -6567,7 +6572,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D);
     }
-#line 6571 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 310:
@@ -6577,7 +6582,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D);
     }
-#line 6581 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 311:
@@ -6587,7 +6592,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D);
     }
-#line 6591 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 312:
@@ -6597,7 +6602,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
     }
-#line 6601 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 313:
@@ -6607,7 +6612,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
     }
-#line 6611 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 314:
@@ -6617,7 +6622,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
     }
-#line 6621 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 315:
@@ -6627,7 +6632,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
     }
-#line 6631 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 316:
@@ -6637,7 +6642,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect);
     }
-#line 6641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 317:
@@ -6647,7 +6652,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect);
     }
-#line 6651 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6656 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 318:
@@ -6657,7 +6662,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect);
     }
-#line 6661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6666 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 319:
@@ -6667,7 +6672,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer);
     }
-#line 6671 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 320:
@@ -6677,7 +6682,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer);
     }
-#line 6681 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 321:
@@ -6687,7 +6692,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer);
     }
-#line 6691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 322:
@@ -6697,7 +6702,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true);
     }
-#line 6701 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6706 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 323:
@@ -6707,7 +6712,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true);
     }
-#line 6711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 324:
@@ -6717,7 +6722,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true);
     }
-#line 6721 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 325:
@@ -6727,7 +6732,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true);
     }
-#line 6731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 326:
@@ -6737,7 +6742,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true);
     }
-#line 6741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 327:
@@ -6747,7 +6752,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true);
     }
-#line 6751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 328:
@@ -6757,7 +6762,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D);
     }
-#line 6761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6766 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 329:
@@ -6767,7 +6772,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd1D);
     }
-#line 6771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6776 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 330:
@@ -6777,7 +6782,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd1D);
     }
-#line 6781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6786 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 331:
@@ -6787,7 +6792,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D);
     }
-#line 6791 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 332:
@@ -6797,7 +6802,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd2D);
     }
-#line 6801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 333:
@@ -6807,7 +6812,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd2D);
     }
-#line 6811 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6816 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 334:
@@ -6817,7 +6822,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D);
     }
-#line 6821 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 335:
@@ -6827,7 +6832,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd3D);
     }
-#line 6831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 336:
@@ -6837,7 +6842,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd3D);
     }
-#line 6841 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6846 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 337:
@@ -6847,7 +6852,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect);
     }
-#line 6851 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6856 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 338:
@@ -6857,7 +6862,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, EsdRect);
     }
-#line 6861 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6866 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 339:
@@ -6867,7 +6872,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, EsdRect);
     }
-#line 6871 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6876 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 340:
@@ -6877,7 +6882,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube);
     }
-#line 6881 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 341:
@@ -6887,7 +6892,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, EsdCube);
     }
-#line 6891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 342:
@@ -6897,7 +6902,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, EsdCube);
     }
-#line 6901 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 343:
@@ -6907,7 +6912,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer);
     }
-#line 6911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6916 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 344:
@@ -6917,7 +6922,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer);
     }
-#line 6921 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 345:
@@ -6927,7 +6932,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer);
     }
-#line 6931 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6936 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 346:
@@ -6937,7 +6942,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true);
     }
-#line 6941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 347:
@@ -6947,7 +6952,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true);
     }
-#line 6951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 348:
@@ -6957,7 +6962,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true);
     }
-#line 6961 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 349:
@@ -6967,7 +6972,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true);
     }
-#line 6971 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6976 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 350:
@@ -6977,7 +6982,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true);
     }
-#line 6981 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 351:
@@ -6987,7 +6992,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true);
     }
-#line 6991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 6996 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 352:
@@ -6997,7 +7002,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true);
     }
-#line 7001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 353:
@@ -7007,7 +7012,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true);
     }
-#line 7011 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 354:
@@ -7017,7 +7022,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true);
     }
-#line 7021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 355:
@@ -7027,7 +7032,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true);
     }
-#line 7031 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 356:
@@ -7037,7 +7042,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true);
     }
-#line 7041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7046 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 357:
@@ -7047,7 +7052,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true);
     }
-#line 7051 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 358:
@@ -7057,7 +7062,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true);
     }
-#line 7061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 359:
@@ -7067,7 +7072,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true);
     }
-#line 7071 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7076 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 360:
@@ -7077,7 +7082,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true);
     }
-#line 7081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 361:
@@ -7088,7 +7093,7 @@
         (yyval.interm.type).sampler.set(EbtFloat, Esd2D);
         (yyval.interm.type).sampler.external = true;
     }
-#line 7092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7097 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 362:
@@ -7099,7 +7104,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtFloat);
     }
-#line 7103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7108 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 363:
@@ -7110,7 +7115,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtFloat, true);
     }
-#line 7114 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 364:
@@ -7121,7 +7126,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtInt);
     }
-#line 7125 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7130 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 365:
@@ -7132,7 +7137,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtInt, true);
     }
-#line 7136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 366:
@@ -7143,7 +7148,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtUint);
     }
-#line 7147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7152 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 367:
@@ -7154,7 +7159,7 @@
         (yyval.interm.type).basicType = EbtSampler;
         (yyval.interm.type).sampler.setSubpass(EbtUint, true);
     }
-#line 7158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7163 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 368:
@@ -7164,7 +7169,7 @@
         (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
         parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type));
     }
-#line 7168 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 369:
@@ -7182,7 +7187,7 @@
         } else
             parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), "");
     }
-#line 7186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 370:
@@ -7192,7 +7197,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh);
     }
-#line 7196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7201 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 371:
@@ -7202,7 +7207,7 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium);
     }
-#line 7206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 372:
@@ -7212,13 +7217,13 @@
         (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
         parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow);
     }
-#line 7216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 373:
 #line 2440 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); }
-#line 7222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7227 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 374:
@@ -7234,13 +7239,13 @@
         (yyval.interm.type).userDef = structure;
         --parseContext.structNestingLevel;
     }
-#line 7238 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 375:
 #line 2451 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); }
-#line 7244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 376:
@@ -7252,7 +7257,7 @@
         (yyval.interm.type).userDef = structure;
         --parseContext.structNestingLevel;
     }
-#line 7256 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7261 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 377:
@@ -7260,7 +7265,7 @@
     {
         (yyval.interm.typeList) = (yyvsp[0].interm.typeList);
     }
-#line 7264 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 378:
@@ -7275,7 +7280,7 @@
             (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]);
         }
     }
-#line 7279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7284 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 379:
@@ -7298,7 +7303,7 @@
             (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type));
         }
     }
-#line 7302 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7307 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 380:
@@ -7324,7 +7329,7 @@
             (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type));
         }
     }
-#line 7328 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7333 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 381:
@@ -7333,7 +7338,7 @@
         (yyval.interm.typeList) = new TTypeList;
         (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
     }
-#line 7337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 382:
@@ -7341,7 +7346,7 @@
     {
         (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
     }
-#line 7345 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7350 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 383:
@@ -7351,7 +7356,7 @@
         (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc;
         (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string);
     }
-#line 7355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 384:
@@ -7364,7 +7369,7 @@
         (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string);
         (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[0].interm).arraySizes);
     }
-#line 7368 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7373 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 385:
@@ -7372,7 +7377,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 7376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 386:
@@ -7383,7 +7388,7 @@
         parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
         (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
     }
-#line 7387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7392 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 387:
@@ -7394,7 +7399,7 @@
         parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
         (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
     }
-#line 7398 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 388:
@@ -7402,7 +7407,7 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc());
     }
-#line 7406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7411 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 389:
@@ -7410,73 +7415,73 @@
     {
         (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
     }
-#line 7414 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7419 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 390:
 #line 2572 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7420 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7425 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 391:
 #line 2576 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7431 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 392:
 #line 2577 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7432 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7437 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 393:
 #line 2583 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7438 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7443 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 394:
 #line 2584 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 395:
 #line 2585 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7450 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7455 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 396:
 #line 2586 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 397:
 #line 2587 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7462 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 398:
 #line 2588 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7468 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7473 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 399:
 #line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 400:
 #line 2593 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = 0; }
-#line 7480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 401:
@@ -7485,7 +7490,7 @@
         parseContext.symbolTable.push();
         ++parseContext.statementNestingLevel;
     }
-#line 7489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 402:
@@ -7494,7 +7499,7 @@
         parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
         --parseContext.statementNestingLevel;
     }
-#line 7498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7503 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 403:
@@ -7504,19 +7509,19 @@
             (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
         (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode);
     }
-#line 7508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 404:
 #line 2610 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7514 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7519 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 405:
 #line 2611 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 7520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7525 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 406:
@@ -7524,7 +7529,7 @@
     {
         ++parseContext.controlFlowNestingLevel;
     }
-#line 7528 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 407:
@@ -7533,7 +7538,7 @@
         --parseContext.controlFlowNestingLevel;
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7542 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 408:
@@ -7543,7 +7548,7 @@
         ++parseContext.statementNestingLevel;
         ++parseContext.controlFlowNestingLevel;
     }
-#line 7547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7552 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 409:
@@ -7554,7 +7559,7 @@
         --parseContext.controlFlowNestingLevel;
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 410:
@@ -7562,7 +7567,7 @@
     {
         (yyval.interm.intermNode) = 0;
     }
-#line 7566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7571 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 411:
@@ -7572,7 +7577,7 @@
             (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
         (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode);
     }
-#line 7576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7581 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 412:
@@ -7585,7 +7590,7 @@
             (yyval.interm.intermNode) = 0;  // start a fresh subsequence for what's after this case
         }
     }
-#line 7589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7594 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 413:
@@ -7598,19 +7603,19 @@
         } else
             (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
     }
-#line 7602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7607 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 414:
 #line 2666 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = 0; }
-#line 7608 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 415:
 #line 2667 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
-#line 7614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 416:
@@ -7619,7 +7624,7 @@
         parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode));
         (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc);
     }
-#line 7623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 417:
@@ -7628,7 +7633,7 @@
         (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
         (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
     }
-#line 7632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7637 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 418:
@@ -7637,7 +7642,7 @@
         (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
         (yyval.interm.nodePair).node2 = 0;
     }
-#line 7641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 419:
@@ -7646,7 +7651,7 @@
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
         parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode));
     }
-#line 7650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7655 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 420:
@@ -7661,7 +7666,7 @@
         else
             (yyval.interm.intermTypedNode) = 0;
     }
-#line 7665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 421:
@@ -7674,7 +7679,7 @@
         parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
         parseContext.symbolTable.push();
     }
-#line 7678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7683 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 422:
@@ -7688,7 +7693,7 @@
         --parseContext.statementNestingLevel;
         --parseContext.controlFlowNestingLevel;
     }
-#line 7692 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 423:
@@ -7696,7 +7701,7 @@
     {
         (yyval.interm.intermNode) = 0;
     }
-#line 7700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7705 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 424:
@@ -7704,7 +7709,7 @@
     {
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7708 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7713 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 425:
@@ -7721,7 +7726,7 @@
             (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
         }
     }
-#line 7725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 426:
@@ -7735,7 +7740,7 @@
         else
             (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc);
     }
-#line 7739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7744 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 427:
@@ -7748,7 +7753,7 @@
         ++parseContext.statementNestingLevel;
         ++parseContext.controlFlowNestingLevel;
     }
-#line 7752 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7757 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 428:
@@ -7760,7 +7765,7 @@
         --parseContext.statementNestingLevel;
         --parseContext.controlFlowNestingLevel;
     }
-#line 7764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 429:
@@ -7770,7 +7775,7 @@
         ++parseContext.statementNestingLevel;
         ++parseContext.controlFlowNestingLevel;
     }
-#line 7774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 430:
@@ -7786,7 +7791,7 @@
         --parseContext.statementNestingLevel;
         --parseContext.controlFlowNestingLevel;
     }
-#line 7790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 431:
@@ -7797,7 +7802,7 @@
         ++parseContext.statementNestingLevel;
         ++parseContext.controlFlowNestingLevel;
     }
-#line 7801 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 432:
@@ -7814,7 +7819,7 @@
         --parseContext.statementNestingLevel;
         --parseContext.controlFlowNestingLevel;
     }
-#line 7818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 433:
@@ -7822,7 +7827,7 @@
     {
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 434:
@@ -7830,7 +7835,7 @@
     {
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7834 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7839 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 435:
@@ -7838,7 +7843,7 @@
     {
         (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
     }
-#line 7842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7847 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 436:
@@ -7846,7 +7851,7 @@
     {
         (yyval.interm.intermTypedNode) = 0;
     }
-#line 7850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7855 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 437:
@@ -7855,7 +7860,7 @@
         (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
         (yyval.interm.nodePair).node2 = 0;
     }
-#line 7859 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 438:
@@ -7864,7 +7869,7 @@
         (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
         (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
     }
-#line 7868 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7873 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 439:
@@ -7874,7 +7879,7 @@
             parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", "");
         (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc);
     }
-#line 7878 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7883 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 440:
@@ -7884,7 +7889,7 @@
             parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", "");
         (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc);
     }
-#line 7888 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7893 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 441:
@@ -7896,7 +7901,7 @@
         if (parseContext.inMain)
             parseContext.postEntryPointReturn = true;
     }
-#line 7900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 442:
@@ -7904,7 +7909,7 @@
     {
         (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode));
     }
-#line 7908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 443:
@@ -7913,7 +7918,7 @@
         parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard");
         (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc);
     }
-#line 7917 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 444:
@@ -7922,45 +7927,57 @@
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
         parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
     }
-#line 7926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7931 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 445:
 #line 2874 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     {
-        (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
-        parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
+        if ((yyvsp[0].interm.intermNode) != nullptr) {
+            (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
+            parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
+        }
     }
-#line 7935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 446:
-#line 2881 "MachineIndependent/glslang.y" /* yacc.c:1646  */
+#line 2883 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     {
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7943 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 447:
-#line 2884 "MachineIndependent/glslang.y" /* yacc.c:1646  */
+#line 2886 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     {
         (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
     }
-#line 7951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
   case 448:
-#line 2890 "MachineIndependent/glslang.y" /* yacc.c:1646  */
+#line 2889 "MachineIndependent/glslang.y" /* yacc.c:1646  */
+    {
+        parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon");
+        parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
+        (yyval.interm.intermNode) = nullptr;
+    }
+#line 7968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+    break;
+
+  case 449:
+#line 2897 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     {
         (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */);
         (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function);
     }
-#line 7960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
-  case 449:
-#line 2894 "MachineIndependent/glslang.y" /* yacc.c:1646  */
+  case 450:
+#line 2901 "MachineIndependent/glslang.y" /* yacc.c:1646  */
     {
         //   May be best done as post process phase on intermediate code
         if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
@@ -7976,11 +7993,11 @@
         (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
         (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
     }
-#line 7980 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 7997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
     break;
 
 
-#line 7984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
+#line 8001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -8208,5 +8225,5 @@
 #endif
   return yyresult;
 }
-#line 2911 "MachineIndependent/glslang.y" /* yacc.c:1906  */
+#line 2918 "MachineIndependent/glslang.y" /* yacc.c:1906  */
 
diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp
index ba7e0f5..30240fc 100644
--- a/glslang/MachineIndependent/intermOut.cpp
+++ b/glslang/MachineIndependent/intermOut.cpp
@@ -682,6 +682,16 @@
     case EOpAtomicExchange:             out.debug << "AtomicExchange";        break;
     case EOpAtomicCompSwap:             out.debug << "AtomicCompSwap";        break;
 
+    case EOpAtomicCounterAdd:           out.debug << "AtomicCounterAdd";      break;
+    case EOpAtomicCounterSubtract:      out.debug << "AtomicCounterSubtract"; break;
+    case EOpAtomicCounterMin:           out.debug << "AtomicCounterMin";      break;
+    case EOpAtomicCounterMax:           out.debug << "AtomicCounterMax";      break;
+    case EOpAtomicCounterAnd:           out.debug << "AtomicCounterAnd";      break;
+    case EOpAtomicCounterOr:            out.debug << "AtomicCounterOr";       break;
+    case EOpAtomicCounterXor:           out.debug << "AtomicCounterXor";      break;
+    case EOpAtomicCounterExchange:      out.debug << "AtomicCounterExchange"; break;
+    case EOpAtomicCounterCompSwap:      out.debug << "AtomicCounterCompSwap"; break;
+
     case EOpImageQuerySize:             out.debug << "imageQuerySize";        break;
     case EOpImageQuerySamples:          out.debug << "imageQuerySamples";     break;
     case EOpImageLoad:                  out.debug << "imageLoad";             break;
@@ -694,6 +704,10 @@
     case EOpImageAtomicXor:             out.debug << "imageAtomicXor";        break;
     case EOpImageAtomicExchange:        out.debug << "imageAtomicExchange";   break;
     case EOpImageAtomicCompSwap:        out.debug << "imageAtomicCompSwap";   break;
+#ifdef AMD_EXTENSIONS
+    case EOpImageLoadLod:               out.debug << "imageLoadLod";          break;
+    case EOpImageStoreLod:              out.debug << "imageStoreLod";         break;
+#endif
 
     case EOpTextureQuerySize:           out.debug << "textureSize";           break;
     case EOpTextureQueryLod:            out.debug << "textureQueryLod";       break;
@@ -746,6 +760,7 @@
     case EOpSparseTextureGatherLod:         out.debug << "sparseTextureGatherLod";          break;
     case EOpSparseTextureGatherLodOffset:   out.debug << "sparseTextureGatherLodOffset";    break;
     case EOpSparseTextureGatherLodOffsets:  out.debug << "sparseTextureGatherLodOffsets";   break;
+    case EOpSparseImageLoadLod:             out.debug << "sparseImageLoadLod";              break;
 #endif
 
     case EOpAddCarry:                   out.debug << "addCarry";              break;
diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp
index 9585627..1758d00 100644
--- a/glslang/MachineIndependent/iomapper.cpp
+++ b/glslang/MachineIndependent/iomapper.cpp
@@ -253,10 +253,14 @@
         ent.newBinding = -1;
         ent.newSet = -1;
         ent.newIndex = -1;
-        const bool isValid = resolver.validateBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
+        const bool isValid = resolver.validateBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(),
+                                                             ent.live);
         if (isValid) {
-            ent.newBinding = resolver.resolveBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
+            ent.newBinding = resolver.resolveBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(),
+                                                            ent.live);
             ent.newSet = resolver.resolveSet(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live);
+            ent.newLocation = resolver.resolveUniformLocation(stage, ent.symbol->getName().c_str(),
+                                                                     ent.symbol->getType(), ent.live);
 
             if (ent.newBinding != -1) {
                 if (ent.newBinding >= int(TQualifier::layoutBindingEnd)) {
@@ -356,6 +360,7 @@
     std::vector<std::string> baseResourceSetBinding;
     bool doAutoBindingMapping;
     bool doAutoLocationMapping;
+    int nextUniformLocation;
     typedef std::vector<int> TSlotSet;
     typedef std::unordered_map<int, TSlotSet> TSlotSetMap;
     TSlotSetMap slots;
@@ -411,7 +416,27 @@
 
         return 0;
     }
+    int resolveUniformLocation(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override
+    {
+        // kick out of not doing this
+        if (!doAutoLocationMapping)
+            return -1;
 
+        // no locations added if already present, a built-in variable, a block, or an opaque
+        if (type.getQualifier().hasLocation() || type.isBuiltIn() ||
+            type.getBasicType() == EbtBlock || type.containsOpaque())
+            return -1;
+
+        // no locations on blocks of built-in variables
+        if (type.isStruct()) {
+            if (type.getStruct()->size() < 1)
+                return -1;
+            if ((*type.getStruct())[0].type->isBuiltIn())
+                return -1;
+        }
+
+        return nextUniformLocation++;
+    }
     bool validateInOut(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
     {
         return true;
@@ -423,14 +448,14 @@
             return -1;
 
         // no locations added if already present, or a built-in variable
-        if (type.getQualifier().hasLocation() || type.getQualifier().builtIn != EbvNone)
+        if (type.getQualifier().hasLocation() || type.isBuiltIn())
             return -1;
 
         // no locations on blocks of built-in variables
         if (type.isStruct()) {
             if (type.getStruct()->size() < 1)
                 return -1;
-            if ((*type.getStruct())[0].type->getQualifier().builtIn != EbvNone)
+            if ((*type.getStruct())[0].type->isBuiltIn())
                 return -1;
         }
 
@@ -700,6 +725,7 @@
         resolverBase->baseResourceSetBinding = intermediate.getResourceSetBinding();
         resolverBase->doAutoBindingMapping = intermediate.getAutoMapBindings();
         resolverBase->doAutoLocationMapping = intermediate.getAutoMapLocations();
+        resolverBase->nextUniformLocation = 0;
 
         resolver = resolverBase;
     }
diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h
index c1daf1b..9f6e3da 100644
--- a/glslang/MachineIndependent/localintermediate.h
+++ b/glslang/MachineIndependent/localintermediate.h
@@ -150,6 +150,54 @@
     bool containsDouble;
 };
 
+// Track a set of strings describing how the module was processed.
+// Using the form:
+//   process arg0 arg1 arg2 ...
+//   process arg0 arg1 arg2 ...
+// where everything is textual, and there can be zero or more arguments
+class TProcesses {
+public:
+    TProcesses() {}
+    ~TProcesses() {}
+
+    void addProcess(const char* process)
+    {
+        processes.push_back(process);
+    }
+    void addProcess(const std::string& process)
+    {
+        processes.push_back(process);
+    }
+    void addArgument(int arg)
+    {
+        processes.back().append(" ");
+        std::string argString = std::to_string(arg);
+        processes.back().append(argString);
+    }
+    void addArgument(const char* arg)
+    {
+        processes.back().append(" ");
+        processes.back().append(arg);
+    }
+    void addArgument(const std::string& arg)
+    {
+        processes.back().append(" ");
+        processes.back().append(arg);
+    }
+    void addIfNonZero(const char* process, int value)
+    {
+        if (value != 0) {
+            addProcess(process);
+            addArgument(value);
+        }
+    }
+
+    const std::vector<std::string>& getProcesses() const { return processes; }
+
+private:
+    std::vector<std::string> processes;
+};
+
 class TSymbolTable;
 class TSymbol;
 class TVariable;
@@ -160,11 +208,14 @@
 class TIntermediate {
 public:
     explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
+        implicitThisName("@this"),
         language(l), source(EShSourceNone), profile(p), version(v), treeRoot(0),
         numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
-        invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone),
+        invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet),
+        inputPrimitive(ElgNone), outputPrimitive(ElgNone),
         pixelCenterInteger(false), originUpperLeft(false),
-        vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), postDepthCoverage(false), depthLayout(EldNone), depthReplacing(false),
+        vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false),
+        postDepthCoverage(false), depthLayout(EldNone), depthReplacing(false),
         blendEquations(0), xfbMode(false), multiStream(false),
 #ifdef NV_EXTENSIONS
         layoutOverrideCoverage(false),
@@ -201,46 +252,135 @@
 
     void setSource(EShSource s) { source = s; }
     EShSource getSource() const { return source; }
-    void setEntryPointName(const char* ep) { entryPointName = ep; }
+    void setEntryPointName(const char* ep)
+    {
+        entryPointName = ep;
+        processes.addProcess("entry-point");
+        processes.addArgument(entryPointName);
+    }
     void setEntryPointMangledName(const char* ep) { entryPointMangledName = ep; }
     const std::string& getEntryPointName() const { return entryPointName; }
     const std::string& getEntryPointMangledName() const { return entryPointMangledName; }
 
-    void setShiftSamplerBinding(unsigned int shift) { shiftSamplerBinding = shift; }
+    void setShiftSamplerBinding(unsigned int shift)
+    {
+        shiftSamplerBinding = shift;
+        processes.addIfNonZero("shift-sampler-binding", shift);
+    }
     unsigned int getShiftSamplerBinding() const { return shiftSamplerBinding; }
-    void setShiftTextureBinding(unsigned int shift) { shiftTextureBinding = shift; }
+    void setShiftTextureBinding(unsigned int shift)
+    {
+        shiftTextureBinding = shift;
+        processes.addIfNonZero("shift-texture-binding", shift);
+    }
     unsigned int getShiftTextureBinding() const { return shiftTextureBinding; }
-    void setShiftImageBinding(unsigned int shift) { shiftImageBinding = shift; }
+    void setShiftImageBinding(unsigned int shift)
+    {
+        shiftImageBinding = shift;
+        processes.addIfNonZero("shift-image-binding", shift);
+    }
     unsigned int getShiftImageBinding() const { return shiftImageBinding; }
-    void setShiftUboBinding(unsigned int shift)     { shiftUboBinding = shift; }
-    unsigned int getShiftUboBinding()     const { return shiftUboBinding; }
-    void setShiftSsboBinding(unsigned int shift)     { shiftSsboBinding = shift; }
-    unsigned int getShiftSsboBinding()  const { return shiftSsboBinding; }
-    void setShiftUavBinding(unsigned int shift) { shiftUavBinding = shift; }
-    unsigned int getShiftUavBinding()  const { return shiftUavBinding; }
-    void setResourceSetBinding(const std::vector<std::string>& shift) { resourceSetBinding = shift; }
+    void setShiftUboBinding(unsigned int shift)
+    {
+        shiftUboBinding = shift;
+        processes.addIfNonZero("shift-UBO-binding", shift);
+    }
+    unsigned int getShiftUboBinding() const { return shiftUboBinding; }
+    void setShiftSsboBinding(unsigned int shift)
+    {
+        shiftSsboBinding = shift;
+        processes.addIfNonZero("shift-ssbo-binding", shift);
+    }
+    unsigned int getShiftSsboBinding() const { return shiftSsboBinding; }
+    void setShiftUavBinding(unsigned int shift)
+    {
+        shiftUavBinding = shift;
+        processes.addIfNonZero("shift-uav-binding", shift);
+    }
+    unsigned int getShiftUavBinding() const { return shiftUavBinding; }
+    void setResourceSetBinding(const std::vector<std::string>& shift)
+    {
+        resourceSetBinding = shift;
+        if (shift.size() > 0) {
+            processes.addProcess("resource-set-binding");
+            for (int s = 0; s < (int)shift.size(); ++s)
+                processes.addArgument(shift[s]);
+        }
+    }
     const std::vector<std::string>& getResourceSetBinding() const { return resourceSetBinding; }
-    void setAutoMapBindings(bool map)           { autoMapBindings = map; }
-    bool getAutoMapBindings()             const { return autoMapBindings; }
-    void setAutoMapLocations(bool map)          { autoMapLocations = map; }
-    bool getAutoMapLocations()            const { return autoMapLocations; }
-    void setFlattenUniformArrays(bool flatten)  { flattenUniformArrays = flatten; }
-    bool getFlattenUniformArrays()        const { return flattenUniformArrays; }
-    void setNoStorageFormat(bool b)             { useUnknownFormat = b; }
-    bool getNoStorageFormat()             const { return useUnknownFormat; }
-    void setHlslOffsets()         { hlslOffsets = true; }
+    void setAutoMapBindings(bool map)
+    {
+        autoMapBindings = map;
+        if (autoMapBindings)
+            processes.addProcess("auto-map-bindings");
+    }
+    bool getAutoMapBindings() const { return autoMapBindings; }
+    void setAutoMapLocations(bool map)
+    {
+        autoMapLocations = map;
+        if (autoMapLocations)
+            processes.addProcess("auto-map-locations");
+    }
+    bool getAutoMapLocations() const { return autoMapLocations; }
+    void setFlattenUniformArrays(bool flatten)
+    {
+        flattenUniformArrays = flatten;
+        if (flattenUniformArrays)
+            processes.addProcess("flatten-uniform-arrays");
+    }
+    bool getFlattenUniformArrays() const { return flattenUniformArrays; }
+    void setNoStorageFormat(bool b)
+    {
+        useUnknownFormat = b;
+        if (useUnknownFormat)
+            processes.addProcess("no-storage-format");
+    }
+    bool getNoStorageFormat() const { return useUnknownFormat; }
+    void setHlslOffsets()
+    {
+        hlslOffsets = true;
+        if (hlslOffsets)
+            processes.addProcess("hlsl-offsets");
+    }
     bool usingHlslOFfsets() const { return hlslOffsets; }
-    void setUseStorageBuffer() { useStorageBuffer = true; }
+    void setUseStorageBuffer()
+    {
+        useStorageBuffer = true;
+        processes.addProcess("use-storage-buffer");
+    }
     bool usingStorageBuffer() const { return useStorageBuffer; }
-    void setHlslIoMapping(bool b) { hlslIoMapping = b; }
-    bool usingHlslIoMapping()     { return hlslIoMapping; }
+    void setHlslIoMapping(bool b)
+    {
+        hlslIoMapping = b;
+        if (hlslIoMapping)
+            processes.addProcess("hlsl-iomap");
+    }
+    bool usingHlslIoMapping() { return hlslIoMapping; }
+
     void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
 
     void setVersion(int v) { version = v; }
     int getVersion() const { return version; }
     void setProfile(EProfile p) { profile = p; }
     EProfile getProfile() const { return profile; }
-    void setSpv(const SpvVersion& s) { spvVersion = s; }
+    void setSpv(const SpvVersion& s)
+    {
+        spvVersion = s;
+
+        // client processes
+        if (spvVersion.vulkan > 0)
+            processes.addProcess("client vulkan100");
+        if (spvVersion.openGl > 0)
+            processes.addProcess("client opengl100");
+
+        // target-environment processes
+        if (spvVersion.vulkan == 100)
+            processes.addProcess("target-env vulkan1.0");
+        else if (spvVersion.vulkan > 0)
+            processes.addProcess("target-env vulkanUnknown");
+        if (spvVersion.openGl > 0)
+            processes.addProcess("target-env opengl");
+    }
     const SpvVersion& getSpv() const { return spvVersion; }
     EShLanguage getStage() const { return language; }
     void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); }
@@ -462,8 +602,15 @@
     const std::string& getSourceFile() const { return sourceFile; }
     void addSourceText(const char* text) { sourceText = sourceText + text; }
     const std::string& getSourceText() const { return sourceText; }
+    void addProcesses(const std::vector<std::string>& p) {
+        for (int i = 0; i < (int)p.size(); ++i)
+            processes.addProcess(p[i]);
+    }
+    void addProcess(const std::string& process) { processes.addProcess(process); }
+    void addProcessArgument(const std::string& arg) { processes.addArgument(arg); }
+    const std::vector<std::string>& getProcesses() const { return processes.getProcesses(); }
 
-    const char* const implicitThisName = "@this";
+    const char* const implicitThisName;
 
 protected:
     TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
@@ -558,6 +705,9 @@
     std::string sourceFile;
     std::string sourceText;
 
+    // for OpModuleProcessed, or equivalent
+    TProcesses processes;
+
 private:
     void operator=(TIntermediate&); // prevent assignments
 };
diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp
index 9242350..ecda34c 100644
--- a/glslang/MachineIndependent/preprocessor/Pp.cpp
+++ b/glslang/MachineIndependent/preprocessor/Pp.cpp
@@ -1068,6 +1068,10 @@
         pasting = true;
     }
 
+    // HLSL does expand macros before concatenation
+    if (pasting && pp->parseContext.isReadingHLSL())
+        pasting = false;
+
     // TODO: preprocessor:  properly handle whitespace (or lack of it) between tokens when expanding
     if (token == PpAtomIdentifier) {
         int i;
diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h
index 12672ee..b36e384 100644
--- a/glslang/Public/ShaderLang.h
+++ b/glslang/Public/ShaderLang.h
@@ -346,6 +346,7 @@
     void setPreamble(const char* s) { preamble = s; }
     void setEntryPoint(const char* entryPoint);
     void setSourceEntryPoint(const char* sourceEntryPointName);
+    void addProcesses(const std::vector<std::string>&);
     void setShiftSamplerBinding(unsigned int base);
     void setShiftTextureBinding(unsigned int base);
     void setShiftImageBinding(unsigned int base);
@@ -532,9 +533,10 @@
 
 // Allows to customize the binding layout after linking.
 // All used uniform variables will invoke at least validateBinding.
-// If validateBinding returned true then the other resolveBinding
-// and resolveSet are invoked to resolve the binding and descriptor
-// set index respectively.
+// If validateBinding returned true then the other resolveBinding,
+// resolveSet, and resolveLocation are invoked to resolve the binding
+// and descriptor set index respectively.
+//
 // Invocations happen in a particular order:
 // 1) all shader inputs
 // 2) all shader outputs
@@ -566,6 +568,9 @@
   // Should return a value >= 0 if the current set should be overridden.
   // Return -1 if the current set (including no set) should be kept.
   virtual int resolveSet(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0;
+  // Should return a value >= 0 if the current location should be overridden.
+  // Return -1 if the current location (including no location) should be kept.
+  virtual int resolveUniformLocation(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0;
   // Should return true if the resulting/current setup would be okay.
   // Basic idea is to do aliasing checks and reject invalid semantic names.
   virtual bool validateInOut(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0;
diff --git a/gtests/AST.FromFile.cpp b/gtests/AST.FromFile.cpp
index 5e30613..ed6a13e 100644
--- a/gtests/AST.FromFile.cpp
+++ b/gtests/AST.FromFile.cpp
@@ -151,6 +151,8 @@
         "450.tese",
         "450.frag",
         "450.comp",
+        "460.frag",
+        "460.vert",
         "dce.frag",
         "atomic_uint.frag",
         "aggOps.frag",
diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp
index 46d8cdd..4079d83 100644
--- a/gtests/Hlsl.FromFile.cpp
+++ b/gtests/Hlsl.FromFile.cpp
@@ -97,14 +97,27 @@
         {"hlsl.cast.frag", "PixelShaderFunction"},
         {"hlsl.charLit.vert", "main"},
         {"hlsl.clip.frag", "main"},
+        {"hlsl.clipdistance-1.frag", "main"},
+        {"hlsl.clipdistance-1.geom", "main"},
         {"hlsl.clipdistance-1.vert", "main"},
+        {"hlsl.clipdistance-2.frag", "main"},
+        {"hlsl.clipdistance-2.geom", "main"},
         {"hlsl.clipdistance-2.vert", "main"},
+        {"hlsl.clipdistance-3.frag", "main"},
+        {"hlsl.clipdistance-3.geom", "main"},
         {"hlsl.clipdistance-3.vert", "main"},
+        {"hlsl.clipdistance-4.frag", "main"},
+        {"hlsl.clipdistance-4.geom", "main"},
         {"hlsl.clipdistance-4.vert", "main"},
+        {"hlsl.clipdistance-5.frag", "main"},
         {"hlsl.clipdistance-5.vert", "main"},
+        {"hlsl.clipdistance-6.frag", "main"},
         {"hlsl.clipdistance-6.vert", "main"},
+        {"hlsl.clipdistance-7.frag", "main"},
         {"hlsl.clipdistance-7.vert", "main"},
+        {"hlsl.clipdistance-8.frag", "main"},
         {"hlsl.clipdistance-8.vert", "main"},
+        {"hlsl.clipdistance-9.frag", "main"},
         {"hlsl.clipdistance-9.vert", "main"},
         {"hlsl.comparison.vec.frag", "main"},
         {"hlsl.conditional.frag", "PixelShaderFunction"},
@@ -195,12 +208,14 @@
         {"hlsl.logicalConvert.frag", "main"},
         {"hlsl.logical.unary.frag", "main"},
         {"hlsl.loopattr.frag", "main"},
+        {"hlsl.matpack-pragma.frag", "main"},
         {"hlsl.mip.operator.frag", "main"},
         {"hlsl.mip.negative.frag", "main"},
         {"hlsl.mip.negative2.frag", "main"},
         {"hlsl.namespace.frag", "main"},
         {"hlsl.nonint-index.frag", "main"},
         {"hlsl.matNx1.frag", "main"},
+        {"hlsl.matpack-1.frag", "main"},
         {"hlsl.matrixSwizzle.vert", "ShaderFunction"},
         {"hlsl.memberFunCall.frag", "main"},
         {"hlsl.mintypes.frag", "main"},
@@ -289,6 +304,7 @@
         {"hlsl.structIoFourWay.frag", "main"},
         {"hlsl.structStructName.frag", "main"},
         {"hlsl.synthesizeInput.frag", "main"},
+        {"hlsl.texture.struct.frag", "main"},
         {"hlsl.texture.subvec4.frag", "main"},
         {"hlsl.this.frag", "main"},
         {"hlsl.intrinsics.vert", "VertexShaderFunction"},
@@ -297,11 +313,13 @@
         {"hlsl.matType.bool.frag", "main"},
         {"hlsl.matType.int.frag", "main"},
         {"hlsl.max.frag", "PixelShaderFunction"},
+        {"hlsl.preprocessor.frag", "main"},
         {"hlsl.precedence.frag", "PixelShaderFunction"},
         {"hlsl.precedence2.frag", "PixelShaderFunction"},
         {"hlsl.scalar2matrix.frag", "main"},
         {"hlsl.semantic.geom", "main"},
         {"hlsl.semantic.vert", "main"},
+        {"hlsl.semantic-1.vert", "main"},
         {"hlsl.scope.frag", "PixelShaderFunction"},
         {"hlsl.sin.frag", "PixelShaderFunction"},
         {"hlsl.struct.frag", "PixelShaderFunction"},
diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp
index dfad30c..ef2ef34 100644
--- a/gtests/Spv.FromFile.cpp
+++ b/gtests/Spv.FromFile.cpp
@@ -360,6 +360,9 @@
 INSTANTIATE_TEST_CASE_P(
     Glsl, CompileOpenGLToSpirvTest,
     ::testing::ValuesIn(std::vector<std::string>({
+        "spv.460.frag",
+        "spv.460.vert",
+        "spv.460.comp",
         "spv.atomic.comp",
         "spv.glFragColor.frag",
         "spv.specConst.vert",
@@ -403,6 +406,7 @@
     Glsl, CompileVulkanToSpirvTestAMD,
     ::testing::ValuesIn(std::vector<std::string>({
         "spv.float16.frag",
+        "spv.imageLoadStoreLod.frag",
         "spv.int16.frag",
         "spv.shaderBallotAMD.comp",
         "spv.textureGatherBiasLod.frag"
diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp
index 05c95d3..2f687c5 100755
--- a/hlsl/hlslGrammar.cpp
+++ b/hlsl/hlslGrammar.cpp
@@ -616,7 +616,7 @@
             qualifier.readonly     = type.getQualifier().readonly;
         }
 
-        if (type.getQualifier().builtIn != EbvNone)
+        if (type.isBuiltIn())
             qualifier.builtIn = type.getQualifier().builtIn;
 
         type.getQualifier()    = qualifier;
@@ -1189,7 +1189,13 @@
 
         const TBasicType basicRetType = txType.getBasicType() ;
 
-        if (basicRetType != EbtFloat && basicRetType != EbtUint && basicRetType != EbtInt) {
+        switch (basicRetType) {
+        case EbtFloat:
+        case EbtUint:
+        case EbtInt:
+        case EbtStruct:
+            break;
+        default:
             unimplemented("basic type in texture");
             return false;
         }
@@ -1206,8 +1212,8 @@
             return false;
         }
 
-        if (!txType.isScalar() && !txType.isVector()) {
-            expected("scalar or vector type");
+        if (!txType.isScalar() && !txType.isVector() && !txType.isStruct()) {
+            expected("scalar, vector, or struct type");
             return false;
         }
 
@@ -1244,20 +1250,24 @@
     if (image || dim == EsdBuffer)
         format = parseContext.getLayoutFromTxType(token.loc, txType);
 
+    const TBasicType txBasicType = txType.isStruct() ? (*txType.getStruct())[0].type->getBasicType()
+        : txType.getBasicType();
+
     // Non-image Buffers are combined
     if (dim == EsdBuffer && !image) {
         sampler.set(txType.getBasicType(), dim, array);
     } else {
         // DX10 textures are separated.  TODO: DX9.
         if (image) {
-            sampler.setImage(txType.getBasicType(), dim, array, shadow, ms);
+            sampler.setImage(txBasicType, dim, array, shadow, ms);
         } else {
-            sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms);
+            sampler.setTexture(txBasicType, dim, array, shadow, ms);
         }
     }
 
-    // Remember the declared vector size.
-    sampler.vectorSize = txType.getVectorSize();
+    // Remember the declared return type.  Function returns false on error.
+    if (!parseContext.setTextureReturnType(sampler, txType, token.loc))
+        return false;
 
     // Force uncombined, if necessary
     if (!combined)
diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp
index 272c494..346a117 100755
--- a/hlsl/hlslParseHelper.cpp
+++ b/hlsl/hlslParseHelper.cpp
@@ -66,6 +66,8 @@
     entryPointFunction(nullptr),
     entryPointFunctionBody(nullptr),
     gsStreamOutput(nullptr),
+    clipDistanceInput(nullptr),
+    cullDistanceInput(nullptr),
     clipDistanceOutput(nullptr),
     cullDistanceOutput(nullptr)
 {
@@ -80,8 +82,10 @@
     globalInputDefaults.clear();
     globalOutputDefaults.clear();
 
-    clipSemanticNSize.fill(0);
-    cullSemanticNSize.fill(0);
+    clipSemanticNSizeIn.fill(0);
+    cullSemanticNSizeIn.fill(0);
+    clipSemanticNSizeOut.fill(0);
+    cullSemanticNSizeOut.fill(0);
 
     // "Shaders in the transform
     // feedback capturing mode have an initial global default of
@@ -189,7 +193,14 @@
 //
 TLayoutFormat HlslParseContext::getLayoutFromTxType(const TSourceLoc& loc, const TType& txType)
 {
+    if (txType.isStruct()) {
+        // TODO: implement.
+        error(loc, "unimplemented: structure type in image or buffer", "", "");
+        return ElfNone;
+    }
+
     const int components = txType.getVectorSize();
+    const TBasicType txBasicType = txType.getBasicType();
 
     const auto selectFormat = [this,&components](TLayoutFormat v1, TLayoutFormat v2, TLayoutFormat v4) -> TLayoutFormat {
         if (intermediate.getNoStorageFormat())
@@ -199,7 +210,7 @@
                components == 2 ? v2 : v4;
     };
 
-    switch (txType.getBasicType()) {
+    switch (txBasicType) {
     case EbtFloat: return selectFormat(ElfR32f,  ElfRg32f,  ElfRgba32f);
     case EbtInt:   return selectFormat(ElfR32i,  ElfRg32i,  ElfRgba32i);
     case EbtUint:  return selectFormat(ElfR32ui, ElfRg32ui, ElfRgba32ui);
@@ -370,7 +381,8 @@
 
     const TSampler& texSampler = object->getType().getSampler();
 
-    const TType objDerefType(texSampler.type, EvqTemporary, texSampler.vectorSize);
+    TType objDerefType;
+    getTextureReturnType(texSampler, objDerefType);
 
     if (nodeAsBinary) {
         TIntermTyped* rhs = nodeAsBinary->getRight();
@@ -572,6 +584,28 @@
 
     if (tokens.size() == 0)
         return;
+
+    // These pragmas are case insensitive in HLSL, so we'll compare in lower case.
+    TVector<TString> lowerTokens = tokens;
+
+    for (auto it = lowerTokens.begin(); it != lowerTokens.end(); ++it)
+        std::transform(it->begin(), it->end(), it->begin(), ::tolower);
+
+    // Handle pack_matrix
+    if (tokens.size() == 4 && lowerTokens[0] == "pack_matrix" && tokens[1] == "(" && tokens[3] == ")") {
+        // Note that HLSL semantic order is Mrc, not Mcr like SPIR-V, so we reverse the sense.
+        // Row major becomes column major and vice versa.
+
+        if (lowerTokens[2] == "row_major") {
+            globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmColumnMajor;
+        } else if (lowerTokens[2] == "column_major") {
+            globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmRowMajor;
+        } else {
+            // unknown majorness strings are treated as (HLSL column major)==(SPIR-V row major)
+            warn(loc, "unknown pack_matrix pragma value", tokens[2].c_str(), "");
+            globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmRowMajor;
+        }
+    }
 }
 
 //
@@ -749,7 +783,10 @@
             } else {
                 TIntermAggregate* load = new TIntermAggregate(sampler.isImage() ? EOpImageLoad : EOpTextureFetch);
 
-                load->setType(TType(sampler.type, EvqTemporary, sampler.vectorSize));
+                TType sampReturnType;
+                getTextureReturnType(sampler, sampReturnType);
+
+                load->setType(sampReturnType);
                 load->setLoc(loc);
                 load->getSequence().push_back(base);
                 load->getSequence().push_back(index);
@@ -1099,66 +1136,69 @@
         return false;
 }
 
+// Independently establish a built-in that is a member of a structure.
+// 'arraySizes' are what's desired for the independent built-in, whatever
+// the higher-level source/expression of them was.
+void HlslParseContext::splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes* arraySizes,
+                                    const TQualifier& outerQualifier)
+{
+    // Because of arrays of structs, we might be asked more than once,
+    // but the arraySizes passed in should have captured the whole thing
+    // the first time.
+    // However, clip/cull rely on multiple updates.
+    if (!isClipOrCullDistance(memberType))
+        if (splitBuiltIns.find(tInterstageIoData(memberType.getQualifier().builtIn, outerQualifier.storage)) !=
+            splitBuiltIns.end())
+            return;
+
+    TVariable* ioVar = makeInternalVariable(baseName + "." + memberType.getFieldName(), memberType);
+
+    if (arraySizes != nullptr && !memberType.isArray())
+        ioVar->getWritableType().newArraySizes(*arraySizes);
+
+    splitBuiltIns[tInterstageIoData(memberType.getQualifier().builtIn, outerQualifier.storage)] = ioVar;
+    if (!isClipOrCullDistance(ioVar->getType()))
+        trackLinkage(*ioVar);
+
+    // Merge qualifier from the user structure
+    mergeQualifiers(ioVar->getWritableType().getQualifier(), outerQualifier);
+
+    // Fix the builtin type if needed (e.g, some types require fixed array sizes, no matter how the
+    // shader declared them).  This is done after mergeQualifiers(), in case fixBuiltInIoType looks
+    // at the qualifier to determine e.g, in or out qualifications.
+    fixBuiltInIoType(ioVar->getWritableType());
+
+    // But, not location, we're losing that
+    ioVar->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
+}
+
 // Split a type into
 //   1. a struct of non-I/O members
-//   2. a collection of flattened I/O variables
+//   2. a collection of independent I/O variables
 void HlslParseContext::split(const TVariable& variable)
 {
     // Create a new variable:
-    TType& splitType = split(*variable.getType().clone(), variable.getName());
-    splitIoVars[variable.getUniqueId()] = makeInternalVariable(variable.getName(), splitType);
+    const TType& clonedType = *variable.getType().clone();
+    const TType& splitType = split(clonedType, variable.getName(), clonedType.getQualifier());
+    splitNonIoVars[variable.getUniqueId()] = makeInternalVariable(variable.getName(), splitType);
 }
 
 // Recursive implementation of split().
 // Returns reference to the modified type.
-TType& HlslParseContext::split(TType& type, TString name, const TType* outerStructType)
+const TType& HlslParseContext::split(const TType& type, const TString& name, const TQualifier& outerQualifier)
 {
-    const TArraySizes* arraySizes = nullptr;
-
-    // At the outer-most scope, remember the struct type so we can examine its storage class
-    // at deeper levels.
-    if (outerStructType == nullptr)
-        outerStructType = &type;
-
-    if (type.isArray())
-        arraySizes = &type.getArraySizes();
-
-    // We can ignore arrayness: it's uninvolved.
     if (type.isStruct()) {
         TTypeList* userStructure = type.getWritableStruct();
-
-        // Get iterator to (now at end) set of built-in interstage IO members
-        const auto firstIo = std::stable_partition(userStructure->begin(), userStructure->end(),
-                                                   [this](const TTypeLoc& t) {
-            return !t.type->isBuiltInInterstageIO(language);
-        });
-
-        // Move those to the built-in IO.  However, we also propagate arrayness (just one level is handled
-        // now) to this variable.
-        for (auto ioType = firstIo; ioType != userStructure->end(); ++ioType) {
-            const TType& memberType = *ioType->type;
-            TVariable* ioVar = makeInternalVariable(name + (name.empty() ? "" : "_") + memberType.getFieldName(),
-                                                    memberType);
-
-            if (arraySizes)
-                ioVar->getWritableType().newArraySizes(*arraySizes);
-
-            fixBuiltInIoType(ioVar->getWritableType());
-
-            interstageBuiltInIo[tInterstageIoData(memberType, *outerStructType)] = ioVar;
-
-            // Merge qualifier from the user structure
-            mergeQualifiers(ioVar->getWritableType().getQualifier(), outerStructType->getQualifier());
+        for (auto ioType = userStructure->begin(); ioType != userStructure->end(); ) {
+            if (ioType->type->isBuiltIn()) {
+                // move out the built-in
+                splitBuiltIn(name, *ioType->type, type.getArraySizes(), outerQualifier);
+                ioType = userStructure->erase(ioType);
+            } else {
+                split(*ioType->type, name + "." + ioType->type->getFieldName(), outerQualifier);
+                ++ioType;
+            }
         }
-
-        // Erase the IO vars from the user structure.
-        userStructure->erase(firstIo, userStructure->end());
-
-        // Recurse further into the members.
-        for (unsigned int i = 0; i < userStructure->size(); ++i)
-            split(*(*userStructure)[i].type,
-                  name + (name.empty() ? "" : "_") + (*userStructure)[i].type->getFieldName(),
-                  outerStructType);
     }
 
     return type;
@@ -1174,16 +1214,20 @@
 }
 
 // Top level variable flattening: construct data
-void HlslParseContext::flatten(const TVariable& variable)
+void HlslParseContext::flatten(const TVariable& variable, bool linkage)
 {
     const TType& type = variable.getType();
 
+    // If it's a standalone built-in, there is nothing to flatten
+    if (type.isBuiltIn() && !type.isStruct())
+        return;
+
     auto entry = flattenMap.insert(std::make_pair(variable.getUniqueId(),
                                                   TFlattenData(type.getQualifier().layoutBinding,
                                                                type.getQualifier().layoutLocation)));
 
     // the item is a map pair, so first->second is the TFlattenData itself.
-    flatten(variable, type, entry.first->second, "");
+    flatten(variable, type, entry.first->second, variable.getName(), linkage, type.getQualifier(), nullptr);
 }
 
 // Recursively flatten the given variable at the provided type, building the flattenData as we go.
@@ -1214,14 +1258,16 @@
 // so the 4th flattened member in traversal order is ours.
 //
 int HlslParseContext::flatten(const TVariable& variable, const TType& type,
-                              TFlattenData& flattenData, TString name)
+                              TFlattenData& flattenData, TString name, bool linkage,
+                              const TQualifier& outerQualifier,
+                              const TArraySizes* builtInArraySizes)
 {
     // If something is an arrayed struct, the array flattener will recursively call flatten()
     // to then flatten the struct, so this is an "if else": we don't do both.
     if (type.isArray())
-        return flattenArray(variable, type, flattenData, name);
+        return flattenArray(variable, type, flattenData, name, linkage, outerQualifier);
     else if (type.isStruct())
-        return flattenStruct(variable, type, flattenData, name);
+        return flattenStruct(variable, type, flattenData, name, linkage, outerQualifier, builtInArraySizes);
     else {
         assert(0); // should never happen
         return -1;
@@ -1231,7 +1277,9 @@
 // Add a single flattened member to the flattened data being tracked for the composite
 // Returns true for the final flattening level.
 int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& type, TFlattenData& flattenData,
-                                         const TString& memberName, bool track)
+                                         const TString& memberName, bool linkage,
+                                         const TQualifier& outerQualifier,
+                                         const TArraySizes* builtInArraySizes)
 {
     if (isFinalFlattening(type)) {
         // This is as far as we flatten.  Insert the variable.
@@ -1241,29 +1289,28 @@
         if (flattenData.nextBinding != TQualifier::layoutBindingEnd)
             memberVariable->getWritableType().getQualifier().layoutBinding = flattenData.nextBinding++;
 
-        if (memberVariable->getType().getQualifier().builtIn == EbvNone) {
+        if (memberVariable->getType().isBuiltIn()) {
+            // inherited locations are nonsensical for built-ins (TODO: what if semantic had a number)
+            memberVariable->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
+        } else {
             // inherited locations must be auto bumped, not replicated
-            if (flattenData.nextLocation != TQualifier::layoutLocationEnd &&
-                memberVariable->getType().getQualifier().builtIn == EbvNone) {
+            if (flattenData.nextLocation != TQualifier::layoutLocationEnd) {
                 memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation;
                 flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType());
                 nextOutLocation = std::max(nextOutLocation, flattenData.nextLocation);
             }
-        } else {
-            // inherited locations are nonsensical for built-ins
-            memberVariable->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
         }
 
         flattenData.offsets.push_back(static_cast<int>(flattenData.members.size()));
         flattenData.members.push_back(memberVariable);
 
-        if (track)
+        if (linkage)
             trackLinkage(*memberVariable);
 
-        return static_cast<int>(flattenData.offsets.size())-1; // location of the member reference
+        return static_cast<int>(flattenData.offsets.size()) - 1; // location of the member reference
     } else {
         // Further recursion required
-        return flatten(variable, type, flattenData, memberName);
+        return flatten(variable, type, flattenData, memberName, linkage, outerQualifier, builtInArraySizes);
     }
 }
 
@@ -1272,7 +1319,9 @@
 //
 // Assumes shouldFlatten() or equivalent was called first.
 int HlslParseContext::flattenStruct(const TVariable& variable, const TType& type,
-                                    TFlattenData& flattenData, TString name)
+                                    TFlattenData& flattenData, TString name, bool linkage,
+                                    const TQualifier& outerQualifier,
+                                    const TArraySizes* builtInArraySizes)
 {
     assert(type.isStruct());
 
@@ -1280,15 +1329,22 @@
 
     // Reserve space for this tree level.
     int start = static_cast<int>(flattenData.offsets.size());
-    int pos   = start;
+    int pos = start;
     flattenData.offsets.resize(int(pos + members.size()), -1);
 
     for (int member = 0; member < (int)members.size(); ++member) {
         TType& dereferencedType = *members[member].type;
-        const TString memberName = name + (name.empty() ? "" : ".") + dereferencedType.getFieldName();
-
-        const int mpos = addFlattenedMember(variable, dereferencedType, flattenData, memberName, false);
-        flattenData.offsets[pos++] = mpos;
+        if (dereferencedType.isBuiltIn())
+            splitBuiltIn(variable.getName(), dereferencedType, builtInArraySizes, outerQualifier);
+        else {
+            const int mpos = addFlattenedMember(variable, dereferencedType, flattenData,
+                                                name + "." + dereferencedType.getFieldName(),
+                                                linkage, outerQualifier,
+                                                builtInArraySizes == nullptr && dereferencedType.isArray()
+                                                                       ? &dereferencedType.getArraySizes()
+                                                                       : builtInArraySizes);
+            flattenData.offsets[pos++] = mpos;
+        }
     }
 
     return start;
@@ -1299,7 +1355,8 @@
 //
 // Assumes shouldFlatten() or equivalent was called first.
 int HlslParseContext::flattenArray(const TVariable& variable, const TType& type,
-                                   TFlattenData& flattenData, TString name)
+                                   TFlattenData& flattenData, TString name, bool linkage,
+                                   const TQualifier& outerQualifier)
 {
     assert(type.isArray() && !type.isImplicitlySizedArray());
 
@@ -1318,7 +1375,8 @@
         char elementNumBuf[20];  // sufficient for MAXINT
         snprintf(elementNumBuf, sizeof(elementNumBuf)-1, "[%d]", element);
         const int mpos = addFlattenedMember(variable, dereferencedType, flattenData,
-                                            name + elementNumBuf, true);
+                                            name + elementNumBuf, linkage, outerQualifier,
+                                            type.getArraySizes());
 
         flattenData.offsets[pos++] = mpos;
     }
@@ -1380,13 +1438,13 @@
 }
 
 // Find and return the split IO TVariable for id, or nullptr if none.
-TVariable* HlslParseContext::getSplitIoVar(int id) const
+TVariable* HlslParseContext::getSplitNonIoVar(int id) const
 {
-    const auto splitIoVar = splitIoVars.find(id);
-    if (splitIoVar == splitIoVars.end())
+    const auto splitNonIoVar = splitNonIoVars.find(id);
+    if (splitNonIoVar == splitNonIoVars.end())
         return nullptr;
 
-    return splitIoVar->second;
+    return splitNonIoVar->second;
 }
 
 // Pass through to base class after remembering built-in mappings.
@@ -1395,7 +1453,7 @@
     TBuiltInVariable biType = symbol.getType().getQualifier().builtIn;
 
     if (biType != EbvNone)
-        builtInLinkageSymbols[biType] = symbol.clone();
+        builtInTessLinkageSymbols[biType] = symbol.clone();
 
     TParseContextBase::trackLinkage(symbol);
 }
@@ -1433,10 +1491,18 @@
         }
     default:
         if (isClipOrCullDistance(type)) {
+            const int loc = type.getQualifier().layoutLocation;
+
             if (type.getQualifier().builtIn == EbvClipDistance) {
-                clipSemanticNSize[type.getQualifier().layoutLocation] = type.getVectorSize();
+                if (type.getQualifier().storage == EvqVaryingIn)
+                    clipSemanticNSizeIn[loc] = type.getVectorSize();
+                else
+                    clipSemanticNSizeOut[loc] = type.getVectorSize();
             } else {
-                cullSemanticNSize[type.getQualifier().layoutLocation] = type.getVectorSize();
+                if (type.getQualifier().storage == EvqVaryingIn)
+                    cullSemanticNSizeIn[loc] = type.getVectorSize();
+                else
+                    cullSemanticNSizeOut[loc] = type.getVectorSize();
             }
         }
 
@@ -1445,11 +1511,7 @@
 
     // Alter or set array size as needed.
     if (requiredArraySize > 0) {
-        if (type.isArray()) {
-            // Already an array.  Fix the size.
-            type.changeOuterArraySize(requiredArraySize);
-        } else {
-            // it wasn't an array, but needs to be.
+        if (!type.isArray() || type.getOuterArraySize() != requiredArraySize) {
             TArraySizes arraySizes;
             arraySizes.addInnerSize(requiredArraySize);
             type.newArraySizes(arraySizes);
@@ -1466,26 +1528,28 @@
 {
     const auto assignLocation = [&](TVariable& variable) {
         TType& type = variable.getWritableType();
-        TQualifier& qualifier = type.getQualifier();
-        if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) {
-            if (qualifier.builtIn == EbvNone && !qualifier.hasLocation()) {
-                // Strip off the outer array dimension for those having an extra one.
-                int size;
-                if (type.isArray() && qualifier.isArrayedIo(language)) {
-                    TType elementType(type, 0);
-                    size = intermediate.computeTypeLocationSize(elementType);
-                } else
-                    size = intermediate.computeTypeLocationSize(type);
+        if (!type.isStruct() || type.getStruct()->size() > 0) {
+            TQualifier& qualifier = type.getQualifier();
+            if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) {
+                if (qualifier.builtIn == EbvNone && !qualifier.hasLocation()) {
+                    // Strip off the outer array dimension for those having an extra one.
+                    int size;
+                    if (type.isArray() && qualifier.isArrayedIo(language)) {
+                        TType elementType(type, 0);
+                        size = intermediate.computeTypeLocationSize(elementType);
+                    } else
+                        size = intermediate.computeTypeLocationSize(type);
 
-                if (qualifier.storage == EvqVaryingIn) {
-                    variable.getWritableType().getQualifier().layoutLocation = nextInLocation;
-                    nextInLocation += size;
-                } else {
-                    variable.getWritableType().getQualifier().layoutLocation = nextOutLocation;
-                    nextOutLocation += size;
+                    if (qualifier.storage == EvqVaryingIn) {
+                        variable.getWritableType().getQualifier().layoutLocation = nextInLocation;
+                        nextInLocation += size;
+                    } else {
+                        variable.getWritableType().getQualifier().layoutLocation = nextOutLocation;
+                        nextOutLocation += size;
+                    }
                 }
+                trackLinkage(variable);
             }
-            trackLinkage(variable);
         }
     };
 
@@ -1494,7 +1558,7 @@
         for (auto member = memberList.begin(); member != memberList.end(); ++member)
             assignLocation(**member);
     } else if (wasSplit(variable.getUniqueId())) {
-        TVariable* splitIoVar = getSplitIoVar(variable.getUniqueId());
+        TVariable* splitIoVar = getSplitNonIoVar(variable.getUniqueId());
         assignLocation(*splitIoVar);
     } else {
         assignLocation(variable);
@@ -1535,32 +1599,6 @@
         error(loc, "function name is redeclaration of existing name", function.getName().c_str(), "");
 }
 
-// Finalization step: Add interstage IO variables to the linkage in canonical order.
-void HlslParseContext::addInterstageIoToLinkage()
-{
-    TSourceLoc loc;
-    loc.init();
-
-    std::vector<tInterstageIoData> io;
-    io.reserve(interstageBuiltInIo.size());
-
-    for (auto ioVar = interstageBuiltInIo.begin(); ioVar != interstageBuiltInIo.end(); ++ioVar)
-        io.push_back(ioVar->first);
-
-    // Our canonical order is the TBuiltInVariable numeric order.
-    std::sort(io.begin(), io.end());
-
-    // We have to (potentially) track two IO blocks, one in, one out.  E.g, a GS may have a
-    // PerVertex block in both directions, possibly with different members.
-    for (int idx = 0; idx < int(io.size()); ++idx) {
-        TVariable* var = interstageBuiltInIo[io[idx]];
-
-        // Add the loose interstage IO to the linkage
-        if (var->getType().isLooseAndBuiltIn(language))
-            trackLinkage(*var);
-    }
-}
-
 // For struct buffers with counters, we must pass the counter buffer as hidden parameter.
 // This adds the hidden parameter to the parameter list in 'paramNodes' if needed.
 // Otherwise, it's a no-op
@@ -1655,7 +1693,7 @@
             if (shouldFlatten(variable->getType())) {
                 // Expand the AST parameter nodes (but not the name mangling or symbol table view)
                 // for structures that need to be flattened.
-                flatten(*variable);
+                flatten(*variable, false);
                 const TTypeList* structure = variable->getType().getStruct();
                 for (int mem = 0; mem < (int)structure->size(); ++mem) {
                     paramNodes = intermediate.growAggregate(paramNodes,
@@ -1875,7 +1913,7 @@
         return language == EShLangTessEvaluation &&
         type.contains([](const TType* t) {
                 return t->getQualifier().builtIn == EbvTessLevelOuter ||
-                t->getQualifier().builtIn == EbvTessLevelInner;
+                       t->getQualifier().builtIn == EbvTessLevelInner;
             });
     };
 
@@ -1901,15 +1939,15 @@
     // Further this return/in/out transform by flattening, splitting, and assigning locations
     const auto makeVariableInOut = [&](TVariable& variable) {
         if (variable.getType().isStruct()) {
-            const TStorageQualifier qualifier = variable.getType().getQualifier().storage;
-            // struct inputs to the vertex stage and outputs from the fragment stage must be flattened
-            if ((language == EShLangVertex   && qualifier == EvqVaryingIn) ||
-                (language == EShLangFragment && qualifier == EvqVaryingOut))
-                flatten(variable);
-            // Structs contain interstage IO must be split
-            else if (variable.getType().containsBuiltInInterstageIO(language))
-                split(variable);
+            if (variable.getType().getQualifier().isArrayedIo(language)) {
+                if (variable.getType().containsBuiltIn())
+                    split(variable);
+            } else
+                flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */);
         }
+        // TODO: flatten arrays too
+        // TODO: flatten everything in I/O
+        // TODO: replace all split with flatten, make all paths can create flattened I/O, then split code can be removed
 
         // For clip and cull distance, multiple output variables potentially get merged
         // into one in assignClipCullDistance.  That code in assignClipCullDistance
@@ -1920,7 +1958,7 @@
     if (entryPointOutput != nullptr)
         makeVariableInOut(*entryPointOutput);
     for (auto it = inputs.begin(); it != inputs.end(); ++it)
-        if (!isDsPcfInput((*it)->getType()))  // skip domain shader PCF input (see comment below)
+        if (!isDsPcfInput((*it)->getType()))  // wait until the end for PCF input (see comment below)
             makeVariableInOut(*(*it));
     for (auto it = outputs.begin(); it != outputs.end(); ++it)
         makeVariableInOut(*(*it));
@@ -1932,7 +1970,7 @@
     // however, so this ensures the linkage is built in the correct order regardless of argument order.
     if (language == EShLangTessEvaluation) {
         for (auto it = inputs.begin(); it != inputs.end(); ++it)
-            if (isDsPcfInput((*it)->getType()))  // skip domain shader PCF input (see comment below)
+            if (isDsPcfInput((*it)->getType()))
                 makeVariableInOut(*(*it));
     }
 
@@ -1984,7 +2022,7 @@
         // an array element as indexed by invocation ID, which we might have to make up.
         // This is required to match SPIR-V semantics.
         if (language == EShLangTessControl) {
-            TIntermSymbol* invocationIdSym = findLinkageSymbol(EbvInvocationId);
+            TIntermSymbol* invocationIdSym = findTessLinkageSymbol(EbvInvocationId);
 
             // If there is no user declared invocation ID, we must make one.
             if (invocationIdSym == nullptr) {
@@ -2217,7 +2255,7 @@
         value = intermediate.addConversion(EOpReturn, *currentFunctionType, value);
         if (value && *currentFunctionType != value->getType())
             value = intermediate.addUniShapeConversion(EOpReturn, *currentFunctionType, value);
-        if (value == nullptr) {
+        if (value == nullptr || *currentFunctionType != value->getType()) {
             error(loc, "type does not match, or is not convertible to, the function's return type", "return", "");
             return value;
         }
@@ -2249,26 +2287,39 @@
 TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc, TOperator op, int semanticId,
                                                            TIntermTyped* left, TIntermTyped* right)
 {
+    switch (language) {
+    case EShLangFragment:
+    case EShLangVertex:
+    case EShLangGeometry:
+        break;
+    default:
+        error(loc, "unimplemented: clip/cull not currently implemented for this stage", "", "");
+        return nullptr;
+    }
+
     TVariable** clipCullVar = nullptr;
 
-    const TBuiltInVariable builtInType = left->getQualifier().builtIn;
+    // Figure out if we are assigning to, or from, clip or cull distance.
+    const bool isOutput = isClipOrCullDistance(left->getType());
 
-    // array sizes, or 1 if it's not an array:
-    const int rhsArraySize = (right->getType().isArray() ? right->getType().getOuterArraySize() : 1);
-    // vector sizes:
-    const int rhsVectorSize = right->getType().getVectorSize();
+    // This is the rvalue or lvalue holding the clip or cull distance.
+    TIntermTyped* clipCullNode = isOutput ? left : right;
+    // This is the value going into or out of the clip or cull distance.
+    TIntermTyped* internalNode = isOutput ? right : left;
 
-    decltype(clipSemanticNSize)* semanticNSize = nullptr;
+    const TBuiltInVariable builtInType = clipCullNode->getQualifier().builtIn;
+
+    decltype(clipSemanticNSizeIn)* semanticNSize = nullptr;
 
     // Refer to either the clip or the cull distance, depending on semantic.
     switch (builtInType) {
     case EbvClipDistance:
-        clipCullVar = &clipDistanceOutput;
-        semanticNSize = &clipSemanticNSize;
+        clipCullVar = isOutput ? &clipDistanceOutput : &clipDistanceInput;
+        semanticNSize = isOutput ? &clipSemanticNSizeOut : &clipSemanticNSizeIn;
         break;
     case EbvCullDistance:
-        clipCullVar = &cullDistanceOutput;
-        semanticNSize = &cullSemanticNSize;
+        clipCullVar = isOutput ? &cullDistanceOutput : &cullDistanceInput;
+        semanticNSize = isOutput ? &cullSemanticNSizeOut : &cullSemanticNSizeIn;
         break;
 
     // called invalidly: we expected a clip or a cull distance.
@@ -2294,31 +2345,52 @@
         vecItems += (*semanticNSize)[x];
         arrayLoc += (*semanticNSize)[x];
     }
-        
+ 
+
+    // It can have up to 2 array dimensions (in the case of geometry shader inputs)
+    const TArraySizes* const internalArraySizes = internalNode->getType().getArraySizes();
+    const int internalArrayDims = internalNode->getType().isArray() ? internalArraySizes->getNumDims() : 0;
+    // vector sizes:
+    const int internalVectorSize = internalNode->getType().getVectorSize();
+    // array sizes, or 1 if it's not an array:
+    const int internalInnerArraySize = (internalArrayDims > 0 ? internalArraySizes->getDimSize(internalArrayDims-1) : 1);
+    const int internalOuterArraySize = (internalArrayDims > 1 ? internalArraySizes->getDimSize(0) : 1);
+
+    // The created type may be an array of arrays, e.g, for geometry shader inputs.
+    const bool isImplicitlyArrayed = (language == EShLangGeometry && !isOutput);
 
     // If we haven't created the output already, create it now.
     if (*clipCullVar == nullptr) {
-        // ClipDistance and CullDistance are handled specially in the entry point output 
-        // copy algorithm, because they may need to be unpacked from components of vectors
-        // (or a scalar) into a float array.  Here, we make the array the right size and type,
+        // ClipDistance and CullDistance are handled specially in the entry point input/output copy
+        // algorithm, because they may need to be unpacked from components of vectors (or a scalar)
+        // into a float array, or vice versa.  Here, we make the array the right size and type,
         // which depends on the incoming data, which has several potential dimensions:
-        //    Semantic ID
-        //    vector size
-        //    array size
+        //    * Semantic ID
+        //    * vector size 
+        //    * array size
         // Of those, semantic ID and array size cannot appear simultaneously.
+        //
+        // Also to note: for implicitly arrayed forms (e.g, geometry shader inputs), we need to create two
+        // array dimensions.  The shader's declaration may have one or two array dimensions.  One is always
+        // the geometry's dimension.
 
-        const int requiredArraySize = arrayLoc * rhsArraySize;
+        const bool useInnerSize = internalArrayDims > 1 || !isImplicitlyArrayed;
 
-        TType clipCullType(EbtFloat, left->getType().getQualifier().storage, 1);
-        clipCullType.getQualifier() = left->getType().getQualifier();
+        const int requiredInnerArraySize = arrayLoc * (useInnerSize ? internalInnerArraySize : 1);
+        const int requiredOuterArraySize = (internalArrayDims > 0) ? internalArraySizes->getDimSize(0) : 1;
+
+        TType clipCullType(EbtFloat, clipCullNode->getType().getQualifier().storage, 1);
+        clipCullType.getQualifier() = clipCullNode->getType().getQualifier();
 
         // Create required array dimension
         TArraySizes arraySizes;
-        arraySizes.addInnerSize(requiredArraySize);
+        if (isImplicitlyArrayed)
+            arraySizes.addInnerSize(requiredOuterArraySize);
+        arraySizes.addInnerSize(requiredInnerArraySize);
         clipCullType.newArraySizes(arraySizes);
 
         // Obtain symbol name: we'll use that for the symbol we introduce.
-        TIntermSymbol* sym = left->getAsSymbolNode();
+        TIntermSymbol* sym = clipCullNode->getAsSymbolNode();
         assert(sym != nullptr);
 
         // We are moving the semantic ID from the layout location, so it is no longer needed or
@@ -2332,66 +2404,105 @@
     }
 
     // Create symbol for the clip or cull variable.
-    left = intermediate.addSymbol(**clipCullVar);
+    TIntermSymbol* clipCullSym = intermediate.addSymbol(**clipCullVar);
+
+    // vector sizes:
+    const int clipCullVectorSize = clipCullSym->getType().getVectorSize();
 
     // array sizes, or 1 if it's not an array:
-    const int lhsArraySize = (left->getType().isArray() ? left->getType().getOuterArraySize() : 1);
-    // vector sizes:
-    const int lhsVectorSize = left->getType().getVectorSize();
+    const TArraySizes* const clipCullArraySizes = clipCullSym->getType().getArraySizes();
+    const int clipCullOuterArraySize = isImplicitlyArrayed ? clipCullArraySizes->getDimSize(0) : 1;
+    const int clipCullInnerArraySize = clipCullArraySizes->getDimSize(isImplicitlyArrayed ? 1 : 0);
 
-    // left has got to be an array of scalar floats, per SPIR-V semantics.
+    // clipCullSym has got to be an array of scalar floats, per SPIR-V semantics.
     // fixBuiltInIoType() should have handled that upstream.
-    assert(left->getType().isArray());
-    assert(left->getType().getVectorSize() == 1);
-    assert(left->getType().getBasicType() == EbtFloat);
+    assert(clipCullSym->getType().isArray());
+    assert(clipCullSym->getType().getVectorSize() == 1);
+    assert(clipCullSym->getType().getBasicType() == EbtFloat);
 
     // We may be creating multiple sub-assignments.  This is an aggregate to hold them.
     // TODO: it would be possible to be clever sometimes and avoid the sequence node if not needed.
     TIntermAggregate* assignList = nullptr;
 
+    // Holds individual component assignments as we make them.
+    TIntermTyped* clipCullAssign = nullptr;
+
     // If the types are homomorphic, use a simple assign.  No need to mess about with 
     // individual components.
-    if (left->getType().isArray() == right->getType().isArray() &&
-        lhsArraySize == rhsArraySize &&
-        lhsVectorSize == rhsVectorSize) {
-        assignList = intermediate.growAggregate(assignList, intermediate.addAssign(op, left, right, loc));
+    if (clipCullSym->getType().isArray() == internalNode->getType().isArray() &&
+        clipCullInnerArraySize == internalInnerArraySize &&
+        clipCullOuterArraySize == internalOuterArraySize &&
+        clipCullVectorSize == internalVectorSize) {
+
+        if (isOutput)
+            clipCullAssign = intermediate.addAssign(op, clipCullSym, internalNode, loc);
+        else
+            clipCullAssign = intermediate.addAssign(op, internalNode, clipCullSym, loc);
+
+        assignList = intermediate.growAggregate(assignList, clipCullAssign);
         assignList->setOperator(EOpSequence);
+
         return assignList;
     }
 
-    // We are going to copy each component of the right (per array element if indicated) to sequential
-    // array elements of the left.  This tracks the lhs element we're writing to as we go along.
+    // We are going to copy each component of the internal (per array element if indicated) to sequential
+    // array elements of the clipCullSym.  This tracks the lhs element we're writing to as we go along.
     // We may be starting in the middle - e.g, for a non-zero semantic ID calculated above.
-    int lhsArrayPos = semanticOffset[semanticId];
+    int clipCullInnerArrayPos = semanticOffset[semanticId];
+    int clipCullOuterArrayPos = 0;
 
-    // Loop through every component of every element of the RHS, and copy to LHS elements in turn.
-    for (int rhsArrayPos = 0; rhsArrayPos < rhsArraySize; ++rhsArrayPos) {
-        for (int rhsComponent = 0; rhsComponent < rhsVectorSize; ++rhsComponent) {
-            // LHS array member to write to:
-            TIntermTyped* lhsMember = intermediate.addIndex(EOpIndexDirect, left,
-                                                            intermediate.addConstantUnion(lhsArrayPos++, loc), loc);
+    // Lambda to add an index to a node, set the type of the result, and return the new node.
+    const auto addIndex = [this, &loc](TIntermTyped* node, int pos) -> TIntermTyped* {
+        const TType derefType(node->getType(), 0);
+        node = intermediate.addIndex(EOpIndexDirect, node, intermediate.addConstantUnion(pos, loc), loc);
+        node->setType(derefType);
+        return node;
+    };
 
-            TIntermTyped* rhsMember = right;
+    // Loop through every component of every element of the internal, and copy to or from the matching external.
+    for (int internalOuterArrayPos = 0; internalOuterArrayPos < internalOuterArraySize; ++internalOuterArrayPos) {
+        for (int internalInnerArrayPos = 0; internalInnerArrayPos < internalInnerArraySize; ++internalInnerArrayPos) {
+            for (int internalComponent = 0; internalComponent < internalVectorSize; ++internalComponent) {
+                // clip/cull array member to read from / write to:
+                TIntermTyped* clipCullMember = clipCullSym;
 
-            // If right is an array, extract the element of interest
-            if (right->getType().isArray()) {
-                const TType derefType(rhsMember->getType(), 0);
-                rhsMember = intermediate.addIndex(EOpIndexDirect, rhsMember,
-                                                  intermediate.addConstantUnion(rhsArrayPos, loc), loc);
-                rhsMember->setType(derefType);
+                // If implicitly arrayed, there is an outer array dimension involved
+                if (isImplicitlyArrayed)
+                    clipCullMember = addIndex(clipCullMember, clipCullOuterArrayPos);
+
+                // Index into proper array position for clip cull member
+                clipCullMember = addIndex(clipCullMember, clipCullInnerArrayPos++);
+
+                // if needed, start over with next outer array slice.
+                if (isImplicitlyArrayed && clipCullInnerArrayPos >= clipCullInnerArraySize) {
+                    clipCullInnerArrayPos = semanticOffset[semanticId];
+                    ++clipCullOuterArrayPos;
+                }
+
+                // internal member to read from / write to:
+                TIntermTyped* internalMember = internalNode;
+
+                // If internal node has outer array dimension, index appropriately.
+                if (internalArrayDims > 1)
+                    internalMember = addIndex(internalMember, internalOuterArrayPos);
+
+                // If internal node has inner array dimension, index appropriately.
+                if (internalArrayDims > 0)
+                    internalMember = addIndex(internalMember, internalInnerArrayPos);
+
+                // If internal node is a vector, extract the component of interest.
+                if (internalNode->getType().isVector())
+                    internalMember = addIndex(internalMember, internalComponent);
+
+                // Create an assignment: output from internal to clip cull, or input from clip cull to internal.
+                if (isOutput)
+                    clipCullAssign = intermediate.addAssign(op, clipCullMember, internalMember, loc);
+                else
+                    clipCullAssign = intermediate.addAssign(op, internalMember, clipCullMember, loc);
+
+                // Track assignment in the sequence.
+                assignList = intermediate.growAggregate(assignList, clipCullAssign);
             }
-
-            // If right is a vector, extract the component of interest.
-            if (right->getType().isVector()) {
-                const TType derefType(rhsMember->getType(), 0);
-                rhsMember = intermediate.addIndex(EOpIndexDirect, rhsMember,
-                                                  intermediate.addConstantUnion(rhsComponent, loc), loc);
-                rhsMember->setType(derefType);
-            }
-
-            // Assign: to the proper lhs member.
-            assignList = intermediate.growAggregate(assignList,
-                                                    intermediate.addAssign(op, lhsMember, rhsMember, loc));
         }
     }
 
@@ -2405,17 +2516,23 @@
 // and possibly contains opaque values, such that the initializer should never exist
 // as emitted code, because even creating the initializer would write opaques.
 //
-// Decompose this into individual member-wise assignments, which themselves are
-// expected to then not exist for opaque types, because they will turn into aliases.
+// If possible, decompose this into individual member-wise assignments, which themselves
+// are expected to then not exist for opaque types, because they will turn into aliases.
 //
 // Return a node that contains the non-aliased assignments that must continue to exist.
-TIntermAggregate* HlslParseContext::executeFlattenedInitializer(const TSourceLoc& loc, TIntermSymbol* symbol,
-                                                                const TIntermAggregate& initializer)
+TIntermTyped* HlslParseContext::executeFlattenedInitializer(const TSourceLoc& loc, TIntermSymbol* symbol,
+                                                            TIntermAggregate& initializer)
 {
+    // We need individual RHS initializers per member to do this
+    const TTypeList* typeList = symbol->getType().getStruct();
+    if (typeList == nullptr || initializer.getSequence().size() != typeList->size()) {
+        warn(loc, "cannot do member-wise aliasing for opaque members with this initializer", "=", "");
+        return handleAssign(loc, EOpAssign, symbol, &initializer);
+    }
+
     TIntermAggregate* initList = nullptr;
     // synthesize an access to each member, and then an assignment to it
-    const TTypeList& typeList = *symbol->getType().getStruct();
-    for (int member = 0; member < (int)typeList.size(); ++member) {
+    for (int member = 0; member < (int)typeList->size(); ++member) {
         TIntermTyped* memberInitializer = initializer.getSequence()[member]->getAsTyped();
         TIntermTyped* flattenedMember = flattenAccess(symbol, member);
         if (flattenedMember->getType().containsOpaque())
@@ -2455,8 +2572,10 @@
     // isn't, we fall back to a member-wise copy.
     if (!isFlattenLeft && !isFlattenRight && !isSplitLeft && !isSplitRight) {
         // Clip and cull distance requires more processing.  See comment above assignClipCullDistance.
-        if (isClipOrCullDistance(left->getType())) {
-            const int semanticId = left->getType().getQualifier().layoutLocation;
+        if (isClipOrCullDistance(left->getType()) || isClipOrCullDistance(right->getType())) {
+            const bool isOutput = isClipOrCullDistance(left->getType());
+
+            const int semanticId = (isOutput ? left : right)->getType().getQualifier().layoutLocation;
             return assignClipCullDistance(loc, op, semanticId, left, right);
         }
 
@@ -2530,11 +2649,18 @@
 
         TIntermTyped* subTree;
         const TType derefType(node->getType(), member);
-        if (split && derefType.isBuiltInInterstageIO(language)) {
-            // copy from interstage IO built-in if needed
+        const TVariable* builtInVar = nullptr;
+        if ((flattened || split) && derefType.isBuiltIn()) {
             const TIntermTyped* outer = isLeft ? outerLeft : outerRight;
-            subTree = intermediate.addSymbol(*interstageBuiltInIo.find(
-                                             HlslParseContext::tInterstageIoData(derefType, outer->getType()))->second);
+            auto splitPair = splitBuiltIns.find(HlslParseContext::tInterstageIoData(
+                                                   derefType.getQualifier().builtIn,
+                                                   outer->getType().getQualifier().storage));
+            if (splitPair != splitBuiltIns.end())
+                builtInVar = splitPair->second;
+        }
+        if (builtInVar != nullptr) {
+            // copy from interstage IO built-in if needed
+            subTree = intermediate.addSymbol(*builtInVar);
 
             // Arrayness of builtIn symbols isn't handled by the normal recursion:
             // it's been extracted and moved to the built-in.
@@ -2629,13 +2755,15 @@
                 TIntermTyped* subSplitRight = isSplitRight ? getMember(false, right, member, splitRight, memberR)
                                                            : subRight;
 
-                if (isClipOrCullDistance(subSplitLeft->getType())) {
+                if (isClipOrCullDistance(subSplitLeft->getType()) || isClipOrCullDistance(subSplitRight->getType())) {
                     // Clip and cull distance built-in assignment is complex in its own right, and is handled in
                     // a separate function dedicated to that task.  See comment above assignClipCullDistance;
 
+                    const bool isOutput = isClipOrCullDistance(subSplitLeft->getType());
+
                     // Since all clip/cull semantics boil down to the same built-in type, we need to get the
                     // semantic ID from the dereferenced type's layout location, to avoid an N-1 mapping.
-                    const TType derefType(left->getType(), member);
+                    const TType derefType((isOutput ? left : right)->getType(), member);
                     const int semanticId = derefType.getQualifier().layoutLocation;
 
                     TIntermAggregate* clipCullAssign = assignClipCullDistance(loc, op, semanticId,
@@ -2644,8 +2772,8 @@
                     assignList = intermediate.growAggregate(assignList, clipCullAssign, loc);
 
                 } else if (!isFlattenLeft && !isFlattenRight &&
-                           !typeL.containsBuiltInInterstageIO(language) &&
-                           !typeR.containsBuiltInInterstageIO(language)) {
+                           !typeL.containsBuiltIn() &&
+                           !typeR.containsBuiltIn()) {
                     // If this is the final flattening (no nested types below to flatten)
                     // we'll copy the member, else recurse into the type hierarchy.
                     // However, if splitting the struct, that means we can copy a whole
@@ -2661,8 +2789,8 @@
                     traverse(subLeft, subRight, subSplitLeft, subSplitRight);
                 }
 
-                memberL += (typeL.isBuiltInInterstageIO(language) ? 0 : 1);
-                memberR += (typeR.isBuiltInInterstageIO(language) ? 0 : 1);
+                memberL += (typeL.isBuiltIn() ? 0 : 1);
+                memberR += (typeR.isBuiltIn() ? 0 : 1);
             }
         } else {
             // Member copy
@@ -2677,10 +2805,10 @@
     // If either left or right was a split structure, we must read or write it, but still have to
     // parallel-recurse through the unsplit structure to identify the built-in IO vars.
     if (isSplitLeft)
-        splitLeft = intermediate.addSymbol(*getSplitIoVar(left->getAsSymbolNode()->getId()), loc);
+        splitLeft = intermediate.addSymbol(*getSplitNonIoVar(left->getAsSymbolNode()->getId()), loc);
 
     if (isSplitRight)
-        splitRight = intermediate.addSymbol(*getSplitIoVar(right->getAsSymbolNode()->getId()), loc);
+        splitRight = intermediate.addSymbol(*getSplitNonIoVar(right->getAsSymbolNode()->getId()), loc);
 
     // This makes the whole assignment, recursing through subtypes as needed.
     traverse(left, right, splitLeft, splitRight);
@@ -3268,21 +3396,99 @@
     if (node == nullptr || !node->getAsOperator())
         return;
 
-    const auto clampReturn = [&loc, &node, this](TIntermTyped* result, const TSampler& sampler) -> TIntermTyped* {
-        // Sampler return must always be a vec4, but we can construct a shorter vector
+    // Sampler return must always be a vec4, but we can construct a shorter vector or a structure from it.
+    const auto convertReturn = [&loc, &node, this](TIntermTyped* result, const TSampler& sampler) -> TIntermTyped* {
         result->setType(TType(node->getType().getBasicType(), EvqTemporary, node->getVectorSize()));
 
-        if (sampler.vectorSize < (unsigned)node->getVectorSize()) {
-            // Too many components.  Construct shorter vector from it.
-            const TType clampedType(result->getType().getBasicType(), EvqTemporary, sampler.vectorSize);
+        TIntermTyped* convertedResult = nullptr;
+        
+        TType retType;
+        getTextureReturnType(sampler, retType);
 
-            const TOperator op = intermediate.mapTypeToConstructorOp(clampedType);
+        if (retType.isStruct()) {
+            // For type convenience, conversionAggregate points to the convertedResult (we know it's an aggregate here)
+            TIntermAggregate* conversionAggregate = new TIntermAggregate;
+            convertedResult = conversionAggregate;
 
-            result = constructBuiltIn(clampedType, op, result, loc, false);
+            // Convert vector output to return structure.  We will need a temp symbol to copy the results to.
+            TVariable* structVar = makeInternalVariable("@sampleStructTemp", retType);
+
+            // We also need a temp symbol to hold the result of the texture.  We don't want to re-fetch the
+            // sample each time we'll index into the result, so we'll copy to this, and index into the copy.
+            TVariable* sampleShadow = makeInternalVariable("@sampleResultShadow", result->getType());
+
+            // Initial copy from texture to our sample result shadow.
+            TIntermTyped* shadowCopy = intermediate.addAssign(EOpAssign, intermediate.addSymbol(*sampleShadow, loc),
+                                                              result, loc);
+
+            conversionAggregate->getSequence().push_back(shadowCopy);
+
+            unsigned vec4Pos = 0;
+
+            for (unsigned m = 0; m < unsigned(retType.getStruct()->size()); ++m) {
+                const TType memberType(retType, m); // dereferenced type of the member we're about to assign.
+                
+                // Check for bad struct members.  This should have been caught upstream.  Complain, because
+                // wwe don't know what to do with it.  This algorithm could be generalized to handle
+                // other things, e.g, sub-structures, but HLSL doesn't allow them.
+                if (!memberType.isVector() && !memberType.isScalar()) {
+                    error(loc, "expected: scalar or vector type in texture structure", "", "");
+                    return nullptr;
+                }
+                    
+                // Index into the struct variable to find the member to assign.
+                TIntermTyped* structMember = intermediate.addIndex(EOpIndexDirectStruct,
+                                                                   intermediate.addSymbol(*structVar, loc),
+                                                                   intermediate.addConstantUnion(m, loc), loc);
+
+                structMember->setType(memberType);
+
+                // Assign each component of (possible) vector in struct member.
+                for (int component = 0; component < memberType.getVectorSize(); ++component) {
+                    TIntermTyped* vec4Member = intermediate.addIndex(EOpIndexDirect,
+                                                                     intermediate.addSymbol(*sampleShadow, loc),
+                                                                     intermediate.addConstantUnion(vec4Pos++, loc), loc);
+                    vec4Member->setType(TType(memberType.getBasicType(), EvqTemporary, 1));
+
+                    TIntermTyped* memberAssign = nullptr;
+
+                    if (memberType.isVector()) {
+                        // Vector member: we need to create an access chain to the vector component.
+
+                        TIntermTyped* structVecComponent = intermediate.addIndex(EOpIndexDirect, structMember,
+                                                                                 intermediate.addConstantUnion(component, loc), loc);
+                        
+                        memberAssign = intermediate.addAssign(EOpAssign, structVecComponent, vec4Member, loc);
+                    } else {
+                        // Scalar member: we can assign to it directly.
+                        memberAssign = intermediate.addAssign(EOpAssign, structMember, vec4Member, loc);
+                    }
+
+                    
+                    conversionAggregate->getSequence().push_back(memberAssign);
+                }
+            }
+
+            // Add completed variable so the expression results in the whole struct value we just built.
+            conversionAggregate->getSequence().push_back(intermediate.addSymbol(*structVar, loc));
+
+            // Make it a sequence.
+            intermediate.setAggregateOperator(conversionAggregate, EOpSequence, retType, loc);
+        } else {
+            // vector clamp the output if template vector type is smaller than sample result.
+            if (retType.getVectorSize() < node->getVectorSize()) {
+                // Too many components.  Construct shorter vector from it.
+                const TOperator op = intermediate.mapTypeToConstructorOp(retType);
+
+                convertedResult = constructBuiltIn(retType, op, result, loc, false);
+            } else {
+                // Enough components.  Use directly.
+                convertedResult = result;
+            }
         }
 
-        result->setLoc(loc);
-        return result;
+        convertedResult->setLoc(loc);
+        return convertedResult;
     };
 
     const TOperator op  = node->getAsOperator()->getOp();
@@ -3348,7 +3554,7 @@
             tex->getSequence().push_back(constructCoord); // coordinate
             tex->getSequence().push_back(bias);           // bias
 
-            node = clampReturn(tex, sampler);
+            node = convertReturn(tex, sampler);
 
             break;
         }
@@ -3388,7 +3594,7 @@
             if (argOffset != nullptr)
                 txsample->getSequence().push_back(argOffset);
 
-            node = clampReturn(txsample, sampler);
+            node = convertReturn(txsample, sampler);
 
             break;
         }
@@ -3421,7 +3627,7 @@
             if (argOffset != nullptr)
                 txsample->getSequence().push_back(argOffset);
 
-            node = clampReturn(txsample, sampler);
+            node = convertReturn(txsample, sampler);
 
             break;
         }
@@ -3697,7 +3903,7 @@
                 txfetch->getSequence().push_back(argOffset);
             }
 
-            node = clampReturn(txfetch, sampler);
+            node = convertReturn(txfetch, sampler);
 
             break;
         }
@@ -3728,7 +3934,7 @@
             if (argOffset != nullptr)
                 txsample->getSequence().push_back(argOffset);
 
-            node = clampReturn(txsample, sampler);
+            node = convertReturn(txsample, sampler);
 
             break;
         }
@@ -4944,7 +5150,7 @@
     const auto setArgList = [&](int paramNum, const TVector<TIntermTyped*>& args) {
         if (args.size() == 1)
             setArg(paramNum, args.front());
-        else {
+        else if (args.size() > 1) {
             if (function.getParamCount() + functionParamNumberOffset == 1) {
                 arguments = intermediate.makeAggregate(args.front());
                 std::for_each(args.begin() + 1, args.end(), 
@@ -4955,8 +5161,8 @@
                 auto it = aggregate->getSequence().erase(aggregate->getSequence().begin() + paramNum);
                 aggregate->getSequence().insert(it, args.begin(), args.end());
             }
+            functionParamNumberOffset += (int)(args.size() - 1);
         }
-        functionParamNumberOffset += (args.size() - 1);
     };
 
     // Process each argument's conversion
@@ -6146,133 +6352,6 @@
 }
 
 //
-// Either redeclare the requested block, or give an error message why it can't be done.
-//
-// TODO: functionality: explicitly sizing members of redeclared blocks is not giving them an explicit size
-void HlslParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName,
-                                             const TString* instanceName, TArraySizes* arraySizes)
-{
-    // Redeclaring a built-in block...
-
-    // Blocks with instance names are easy to find, lookup the instance name,
-    // Anonymous blocks need to be found via a member.
-    bool builtIn;
-    TSymbol* block;
-    if (instanceName)
-        block = symbolTable.find(*instanceName, &builtIn);
-    else
-        block = symbolTable.find(newTypeList.front().type->getFieldName(), &builtIn);
-
-    // If the block was not found, this must be a version/profile/stage
-    // that doesn't have it, or the instance name is wrong.
-    const char* errorName = instanceName ? instanceName->c_str() : newTypeList.front().type->getFieldName().c_str();
-    if (block == nullptr) {
-        error(loc, "no declaration found for redeclaration", errorName, "");
-        return;
-    }
-    // Built-in blocks cannot be redeclared more than once, which if happened,
-    // we'd be finding the already redeclared one here, rather than the built in.
-    if (! builtIn) {
-        error(loc, "can only redeclare a built-in block once, and before any use", blockName.c_str(), "");
-        return;
-    }
-
-    // Copy the block to make a writable version, to insert into the block table after editing.
-    block = symbolTable.copyUpDeferredInsert(block);
-
-    if (block->getType().getBasicType() != EbtBlock) {
-        error(loc, "cannot redeclare a non block as a block", errorName, "");
-        return;
-    }
-
-    // Edit and error check the container against the redeclaration
-    //  - remove unused members
-    //  - ensure remaining qualifiers/types match
-    TType& type = block->getWritableType();
-    TTypeList::iterator member = type.getWritableStruct()->begin();
-    size_t numOriginalMembersFound = 0;
-    while (member != type.getStruct()->end()) {
-        // look for match
-        bool found = false;
-        TTypeList::const_iterator newMember;
-        TSourceLoc memberLoc;
-        memberLoc.init();
-        for (newMember = newTypeList.begin(); newMember != newTypeList.end(); ++newMember) {
-            if (member->type->getFieldName() == newMember->type->getFieldName()) {
-                found = true;
-                memberLoc = newMember->loc;
-                break;
-            }
-        }
-
-        if (found) {
-            ++numOriginalMembersFound;
-            // - ensure match between redeclared members' types
-            // - check for things that can't be changed
-            // - update things that can be changed
-            TType& oldType = *member->type;
-            const TType& newType = *newMember->type;
-            if (! newType.sameElementType(oldType))
-                error(memberLoc, "cannot redeclare block member with a different type",
-                      member->type->getFieldName().c_str(), "");
-            if (oldType.isArray() != newType.isArray())
-                error(memberLoc, "cannot change arrayness of redeclared block member",
-                      member->type->getFieldName().c_str(), "");
-            else if (! oldType.sameArrayness(newType) && oldType.isExplicitlySizedArray())
-                error(memberLoc, "cannot change array size of redeclared block member",
-                      member->type->getFieldName().c_str(), "");
-            if (newType.getQualifier().isMemory())
-                error(memberLoc, "cannot add memory qualifier to redeclared block member",
-                      member->type->getFieldName().c_str(), "");
-            if (newType.getQualifier().hasLayout())
-                error(memberLoc, "cannot add layout to redeclared block member",
-                      member->type->getFieldName().c_str(), "");
-            if (newType.getQualifier().patch)
-                error(memberLoc, "cannot add patch to redeclared block member",
-                      member->type->getFieldName().c_str(), "");
-            oldType.getQualifier().centroid = newType.getQualifier().centroid;
-            oldType.getQualifier().sample = newType.getQualifier().sample;
-            oldType.getQualifier().invariant = newType.getQualifier().invariant;
-            oldType.getQualifier().noContraction = newType.getQualifier().noContraction;
-            oldType.getQualifier().smooth = newType.getQualifier().smooth;
-            oldType.getQualifier().flat = newType.getQualifier().flat;
-            oldType.getQualifier().nopersp = newType.getQualifier().nopersp;
-
-            // go to next member
-            ++member;
-        } else {
-            // For missing members of anonymous blocks that have been redeclared,
-            // hide the original (shared) declaration.
-            // Instance-named blocks can just have the member removed.
-            if (instanceName)
-                member = type.getWritableStruct()->erase(member);
-            else {
-                member->type->hideMember();
-                ++member;
-            }
-        }
-    }
-
-    if (numOriginalMembersFound < newTypeList.size())
-        error(loc, "block redeclaration has extra members", blockName.c_str(), "");
-    if (type.isArray() != (arraySizes != nullptr))
-        error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), "");
-    else if (type.isArray()) {
-        if (type.isExplicitlySizedArray() && arraySizes->getOuterSize() == UnsizedArraySize)
-            error(loc, "block already declared with size, can't redeclare as implicitly-sized", blockName.c_str(), "");
-        else if (type.isExplicitlySizedArray() && type.getArraySizes() != *arraySizes)
-            error(loc, "cannot change array size of redeclared block", blockName.c_str(), "");
-        else if (type.isImplicitlySizedArray() && arraySizes->getOuterSize() != UnsizedArraySize)
-            type.changeOuterArraySize(arraySizes->getOuterSize());
-    }
-
-    symbolTable.insert(*block);
-
-    // Save it in the AST for linker use.
-    trackLinkage(*block);
-}
-
-//
 // Generate index to the array element in a structure buffer (SSBO)
 //
 TIntermTyped* HlslParseContext::indexStructBufferContent(const TSourceLoc& loc, TIntermTyped* buffer) const
@@ -6368,6 +6447,7 @@
         type.getQualifier().storage = EvqConstReadOnly;
         break;
     case EvqGlobal:
+    case EvqUniform:
     case EvqTemporary:
         type.getQualifier().storage = EvqIn;
         break;
@@ -7201,6 +7281,11 @@
         }
         if (newLists.uniform) {
             newMember(newUniformMember);
+
+            // inherit default matrix layout (changeable via #pragma pack_matrix), if none given.
+            if (member->type->isMatrix() && member->type->getQualifier().layoutMatrix == ElmNone)
+                newUniformMember.type->getQualifier().layoutMatrix = globalUniformDefaults.layoutMatrix;
+
             correctUniform(newUniformMember.type->getQualifier());
             newLists.uniform->push_back(newUniformMember);
         }
@@ -7312,7 +7397,7 @@
         return nullptr;
 
     if (flattenVar)
-        flatten(*symbol->getAsVariable());
+        flatten(*symbol->getAsVariable(), symbolTable.atGlobalLevel());
 
     if (initializer == nullptr)
         return nullptr;
@@ -8035,17 +8120,17 @@
             case EvqBuffer:
                 correctUniform(type.getQualifier());
                 if (it != ioTypeMap.end() && it->second.uniform)
-                    type.setStruct(it->second.uniform);
+                    memberType.setStruct(it->second.uniform);
                 break;
             case EvqVaryingIn:
                 correctInput(type.getQualifier());
                 if (it != ioTypeMap.end() && it->second.input)
-                    type.setStruct(it->second.input);
+                    memberType.setStruct(it->second.input);
                 break;
             case EvqVaryingOut:
                 correctOutput(type.getQualifier());
                 if (it != ioTypeMap.end() && it->second.output)
-                    type.setStruct(it->second.output);
+                    memberType.setStruct(it->second.output);
                 break;
             default:
                 break;
@@ -8053,13 +8138,6 @@
         }
     }
 
-    // This might be a redeclaration of a built-in block.  If so, redeclareBuiltinBlock() will
-    // do all the rest.
-    // if (! symbolTable.atBuiltInLevel() && builtInName(*blockName)) {
-    //    redeclareBuiltinBlock(loc, typeList, *blockName, instanceName, arraySizes);
-    //    return;
-    //}
-
     // Make default block qualification, and adjust the member qualifications
 
     TQualifier defaultQualification;
@@ -8801,9 +8879,6 @@
         qualifier.sample = false;
     }
 
-    if (isClipOrCullDistance(qualifier))
-        qualifier.layoutLocation = TQualifier::layoutLocationEnd;
-
     qualifier.clearStreamLayout();
     qualifier.clearXfbLayout();
 
@@ -8860,11 +8935,111 @@
 }
 
 
-// Return a symbol for the linkage variable of the given TBuiltInVariable type
-TIntermSymbol* HlslParseContext::findLinkageSymbol(TBuiltInVariable biType) const
+// Set texture return type.  Returns success (not all types are valid).
+bool HlslParseContext::setTextureReturnType(TSampler& sampler, const TType& retType, const TSourceLoc& loc)
 {
-    const auto it = builtInLinkageSymbols.find(biType);
-    if (it == builtInLinkageSymbols.end())  // if it wasn't declared by the user, return nullptr
+    // Seed the output with an invalid index.  We will set it to a valid one if we can.
+    sampler.structReturnIndex = TSampler::noReturnStruct;
+
+    // Arrays aren't supported.
+    if (retType.isArray()) {
+        error(loc, "Arrays not supported in texture template types", "", "");
+        return false;
+    }
+
+    // If return type is a vector, remember the vector size in the sampler, and return.
+    if (retType.isVector() || retType.isScalar()) {
+        sampler.vectorSize = retType.getVectorSize();
+        return true;
+    }
+
+    // If it wasn't a vector, it must be a struct meeting certain requirements.  The requirements
+    // are checked below: just check for struct-ness here.
+    if (!retType.isStruct()) {
+        error(loc, "Invalid texture template type", "", "");
+        return false;
+    }
+
+    TTypeList* members = retType.getWritableStruct();
+
+    // Check for too many or not enough structure members.
+    if (members->size() > 4 || members->size() == 0) {
+        error(loc, "Invalid member count in texture template structure", "", "");
+        return false;
+    }
+
+    // Error checking: We must have <= 4 total components, all of the same basic type.
+    unsigned totalComponents = 0;
+    for (unsigned m = 0; m < members->size(); ++m) {
+        // Check for bad member types
+        if (!(*members)[m].type->isScalar() && !(*members)[m].type->isVector()) {
+            error(loc, "Invalid texture template struct member type", "", "");
+            return false;
+        }
+
+        const unsigned memberVectorSize = (*members)[m].type->getVectorSize();
+        totalComponents += memberVectorSize;
+
+        // too many total member components
+        if (totalComponents > 4) {
+            error(loc, "Too many components in texture template structure type", "", "");
+            return false;
+        }
+
+        // All members must be of a common basic type
+        if ((*members)[m].type->getBasicType() != (*members)[0].type->getBasicType()) {
+            error(loc, "Texture template structure members must same basic type", "", "");
+            return false;
+        }
+    }
+
+    // If the structure in the return type already exists in the table, we'll use it.  Otherwise, we'll make
+    // a new entry.  This is a linear search, but it hardly ever happens, and the list cannot be very large.
+    for (unsigned int idx = 0; idx < textureReturnStruct.size(); ++idx) {
+        if (textureReturnStruct[idx] == members) {
+            sampler.structReturnIndex = idx;
+            return true;
+        }
+    }
+
+    // It wasn't found as an existing entry.  See if we have room for a new one.
+    if (textureReturnStruct.size() >= TSampler::structReturnSlots) {
+        error(loc, "Texture template struct return slots exceeded", "", "");
+        return false;
+    }
+
+    // Insert it in the vector that tracks struct return types.
+    sampler.structReturnIndex = unsigned(textureReturnStruct.size());
+    textureReturnStruct.push_back(members);
+    
+    // Success!
+    return true;
+}
+
+// Return the sampler return type in retType.
+void HlslParseContext::getTextureReturnType(const TSampler& sampler, TType& retType) const
+{
+    if (sampler.hasReturnStruct()) {
+        assert(textureReturnStruct.size() >= sampler.structReturnIndex);
+
+        // We land here if the texture return is a structure.
+        TTypeList* blockStruct = textureReturnStruct[sampler.structReturnIndex];
+
+        const TType resultType(blockStruct, "");
+        retType.shallowCopy(resultType);
+    } else {
+        // We land here if the texture return is a vector or scalar.
+        const TType resultType(sampler.type, EvqTemporary, sampler.getVectorSize());
+        retType.shallowCopy(resultType);
+    }
+}
+
+
+// Return a symbol for the tessellation linkage variable of the given TBuiltInVariable type
+TIntermSymbol* HlslParseContext::findTessLinkageSymbol(TBuiltInVariable biType) const
+{
+    const auto it = builtInTessLinkageSymbols.find(biType);
+    if (it == builtInTessLinkageSymbols.end())  // if it wasn't declared by the user, return nullptr
         return nullptr;
 
     return intermediate.addSymbol(*it->second->getAsVariable());
@@ -8922,7 +9097,6 @@
         }
     };
 
-
     // If we synthesize a built-in interface variable, we must add it to the linkage.
     const auto addToLinkage = [&](const TType& type, const TString* name, TIntermSymbol** symbolNode) {
         if (name == nullptr) {
@@ -8974,7 +9148,7 @@
 
     TFunction& patchConstantFunction = const_cast<TFunction&>(*candidateList[0]);
     const int pcfParamCount = patchConstantFunction.getParamCount();
-    TIntermSymbol* invocationIdSym = findLinkageSymbol(EbvInvocationId);
+    TIntermSymbol* invocationIdSym = findTessLinkageSymbol(EbvInvocationId);
     TIntermSequence& epBodySeq = entryPointFunctionBody->getAsAggregate()->getSequence();
 
     int outPatchParam = -1; // -1 means there isn't one.
@@ -9024,7 +9198,7 @@
                 // Presently, the only non-built-in we support is InputPatch, which is treated as
                 // a pseudo-built-in.
                 if (biType == EbvInputPatch) {
-                    builtInLinkageSymbols[biType] = inputPatch;
+                    builtInTessLinkageSymbols[biType] = inputPatch;
                 } else if (biType == EbvOutputPatch) {
                     // Nothing...
                 } else {
@@ -9070,7 +9244,7 @@
                 // find which built-in it is
                 const TBuiltInVariable biType = patchConstantFunction[p].getDeclaredBuiltIn();
                 
-                inputArg = findLinkageSymbol(biType);
+                inputArg = findTessLinkageSymbol(biType);
 
                 if (inputArg == nullptr) {
                     error(loc, "unable to find patch constant function built-in variable", "", "");
@@ -9197,7 +9371,7 @@
         TVariable* pcfOutput = makeInternalVariable("@patchConstantOutput", outType);
         pcfOutput->getWritableType().getQualifier().storage = EvqVaryingOut;
 
-        if (pcfOutput->getType().containsBuiltInInterstageIO(language))
+        if (pcfOutput->getType().containsBuiltIn())
             split(*pcfOutput);
 
         assignToInterface(*pcfOutput);
@@ -9264,7 +9438,6 @@
 
     removeUnusedStructBufferCounters();
     addPatchConstantInvocation();
-    addInterstageIoToLinkage();
 
     TParseContextBase::finish();
 }
diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h
index ef81409..a276d6e 100755
--- a/hlsl/hlslParseHelper.h
+++ b/hlsl/hlslParseHelper.h
@@ -89,7 +89,7 @@
     void remapNonEntryPointIO(TFunction& function);
     TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*);
     void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg);
-    TIntermAggregate* executeFlattenedInitializer(const TSourceLoc&, TIntermSymbol*, const TIntermAggregate&);
+    TIntermTyped* executeFlattenedInitializer(const TSourceLoc&, TIntermSymbol*, TIntermAggregate&);
     TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
     TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
     TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*);
@@ -133,7 +133,6 @@
     void mergeQualifiers(TQualifier& dst, const TQualifier& src);
     int computeSamplerTypeIndex(TSampler&);
     TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
-    void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes);
     void paramFix(TType& type);
     void specializationCheck(const TSourceLoc&, const TType&, const char* op);
 
@@ -214,6 +213,12 @@
     // Share struct buffer deep types
     void shareStructBufferType(TType&);
 
+    // Set texture return type of the given sampler.  Returns success (not all types are valid).
+    bool setTextureReturnType(TSampler& sampler, const TType& retType, const TSourceLoc& loc);
+
+    // Obtain the sampler return type of the given sampler in retType.
+    void getTextureReturnType(const TSampler& sampler, TType& retType) const;
+
 protected:
     struct TFlattenData {
         TFlattenData() : nextBinding(TQualifier::layoutBindingEnd),
@@ -249,27 +254,29 @@
     bool shouldFlatten(const TType&) const;
     bool wasFlattened(const TIntermTyped* node) const;
     bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); }
-    int  addFlattenedMember(const TVariable&, const TType&, TFlattenData&, const TString& name, bool track);
+    int  addFlattenedMember(const TVariable&, const TType&, TFlattenData&, const TString& name, bool linkage,
+                            const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
     bool isFinalFlattening(const TType& type) const { return !(type.isStruct() || type.isArray()); }
 
     // Structure splitting (splits interstage built-in types into its own struct)
-    TType& split(TType& type, TString name, const TType* outerStructType = nullptr);
     void split(const TVariable&);
+    void splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes*, const TQualifier&);
+    const TType& split(const TType& type, const TString& name, const TQualifier&);
     bool wasSplit(const TIntermTyped* node) const;
-    bool wasSplit(int id) const { return splitIoVars.find(id) != splitIoVars.end(); }
-    TVariable* getSplitIoVar(const TIntermTyped* node) const;
-    TVariable* getSplitIoVar(const TVariable* var) const;
-    TVariable* getSplitIoVar(int id) const;
-    void addInterstageIoToLinkage();
+    bool wasSplit(int id) const { return splitNonIoVars.find(id) != splitNonIoVars.end(); }
+    TVariable* getSplitNonIoVar(int id) const;
     void addPatchConstantInvocation();
     TIntermTyped* makeIntegerIndex(TIntermTyped*);
 
     void fixBuiltInIoType(TType&);
 
-    void flatten(const TVariable& variable);
-    int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name);
-    int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name);
-    int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name);
+    void flatten(const TVariable& variable, bool linkage);
+    int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
+                const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
+    int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
+                      const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes);
+    int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage,
+                     const TQualifier& outerQualifier);
 
     bool hasUniform(const TQualifier& qualifier) const;
     void clearUniform(TQualifier& qualifier);
@@ -312,14 +319,14 @@
     static bool isClipOrCullDistance(const TQualifier& qual) { return isClipOrCullDistance(qual.builtIn); }
     static bool isClipOrCullDistance(const TType& type) { return isClipOrCullDistance(type.getQualifier()); }
 
-    // Pass through to base class after remembering builtin mappings.
+    // Pass through to base class after remembering built-in mappings.
     using TParseContextBase::trackLinkage;
     void trackLinkage(TSymbol& variable) override;
 
     void finish() override; // post-processing
 
     // Linkage symbol helpers
-    TIntermSymbol* findLinkageSymbol(TBuiltInVariable biType) const;
+    TIntermSymbol* findTessLinkageSymbol(TBuiltInVariable biType) const;
 
     // Current state of parsing
     int annotationNestingLevel;  // 0 if outside all annotations
@@ -383,24 +390,24 @@
     TMap<const TTypeList*, tIoKinds> ioTypeMap;
 
     // Structure splitting data:
-    TMap<int, TVariable*>              splitIoVars;  // variables with the builtin interstage IO removed, indexed by unique ID.
+    TMap<int, TVariable*> splitNonIoVars;  // variables with the built-in interstage IO removed, indexed by unique ID.
 
     // Structuredbuffer shared types.  Typically there are only a few.
     TVector<TType*> structBufferTypes;
+
+    // This tracks texture sample user structure return types.  Only a limited number are supported, as
+    // may fit in TSampler::structReturnIndex.
+    TVector<TTypeList*> textureReturnStruct;
     
     TMap<TString, bool> structBufferCounter;
 
-    // The builtin interstage IO map considers e.g, EvqPosition on input and output separately, so that we
+    // The built-in interstage IO map considers e.g, EvqPosition on input and output separately, so that we
     // can build the linkage correctly if position appears on both sides.  Otherwise, multiple positions
     // are considered identical.
     struct tInterstageIoData {
         tInterstageIoData(TBuiltInVariable bi, TStorageQualifier q) :
             builtIn(bi), storage(q) { }
 
-        tInterstageIoData(const TType& memberType, const TType& storageType) :
-            builtIn(memberType.getQualifier().builtIn),
-            storage(storageType.getQualifier().storage) { }
-
         TBuiltInVariable  builtIn;
         TStorageQualifier storage;
 
@@ -410,7 +417,7 @@
         }
     };
 
-    TMap<tInterstageIoData, TVariable*> interstageBuiltInIo; // individual builtin interstage IO vars, indexed by builtin type.
+    TMap<tInterstageIoData, TVariable*> splitBuiltIns; // split built-ins, indexed by built-in type.
     TVariable* inputPatch;
 
     unsigned int nextInLocation;
@@ -421,19 +428,23 @@
     TIntermNode* entryPointFunctionBody;
 
     TString patchConstantFunctionName; // hull shader patch constant function name, from function level attribute.
-    TMap<TBuiltInVariable, TSymbol*> builtInLinkageSymbols; // used for tessellation, finding declared builtins
+    TMap<TBuiltInVariable, TSymbol*> builtInTessLinkageSymbols; // used for tessellation, finding declared built-ins
 
     TVector<TString> currentTypePrefix;      // current scoping prefix for nested structures
     TVector<TVariable*> implicitThisStack;   // currently active 'this' variables for nested structures
 
     TVariable* gsStreamOutput;               // geometry shader stream outputs, for emit (Append method)
 
-    TVariable* clipDistanceOutput;           // synthesized clip distance output variable (shader might have >1)
-    TVariable* cullDistanceOutput;           // synthesized cull distance output variable (shader might have >1)
+    TVariable* clipDistanceOutput;           // synthesized clip distance out variable (shader might have >1)
+    TVariable* cullDistanceOutput;           // synthesized cull distance out variable (shader might have >1)
+    TVariable* clipDistanceInput;            // synthesized clip distance in variable (shader might have >1)
+    TVariable* cullDistanceInput;            // synthesized cull distance in variable (shader might have >1)
 
     static const int maxClipCullRegs = 2;
-    std::array<int, maxClipCullRegs> clipSemanticNSize; // vector, indexed by clip semantic ID
-    std::array<int, maxClipCullRegs> cullSemanticNSize; // vector, indexed by cull semantic ID
+    std::array<int, maxClipCullRegs> clipSemanticNSizeIn;  // vector, indexed by clip semantic ID
+    std::array<int, maxClipCullRegs> cullSemanticNSizeIn;  // vector, indexed by cull semantic ID
+    std::array<int, maxClipCullRegs> clipSemanticNSizeOut; // vector, indexed by clip semantic ID
+    std::array<int, maxClipCullRegs> cullSemanticNSizeOut; // vector, indexed by cull semantic ID
 
     // This tracks the first (mip level) argument to the .mips[][] operator.  Since this can be nested as
     // in tx.mips[tx.mips[0][1].x][2], we need a stack.  We also track the TSourceLoc for error reporting 
@@ -447,7 +458,7 @@
     TVector<tMipsOperatorData> mipsOperatorMipArg;
 };
 
-// This is the prefix we use for builtin methods to avoid namespace collisions with
+// This is the prefix we use for built-in methods to avoid namespace collisions with
 // global scope user functions.
 // TODO: this would be better as a nonparseable character, but that would
 // require changing the scanner.