Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc

Includes:
b5b08462 Merge pull request #1124 from xorgy/check-inner-implicit-atomic-uint
60209951 Merge pull request #1127 from xorgy/preprocessor-int-min-mod-negative-one
9d4a1b24 Preprocessor: Evaluate INT_MIN % -1 to 0.
047b65f9 Merge pull request #1125 from greg-lunarg/kg1
cc80d80d Update spirv-tools known-good
437911af GLSL: Check for implicit inner dimension in array of atomic_uint.
9cfc1551 Merge pull request #1118 from xorgy/only-swizzle-numbers-and-bools
016e47f7 Merge branch 'only-parse-inf-constant-in-hlsl' of https://github.com/xorgy/glslang into xorgy-only-parse-inf-constant-in-hlsl
6e33b787 Tests: Add test for GLSL +-#INF.
79a40740 Merge pull request #1120 from xorgy/overlong-hex-literal
60312662 GLSL: Only parse [-]1.#INF in HLSL mode.
9028ed20 Check for hexadecimal literals exceeding MaxTokenLength.
07c0bcea Only try swizzles on vectors, numbers, and booleans.
b1eaf82c Merge pull request #1115 from LoopDawg/stdarray-binding-set
2915da30 Nonfunctional: minor: use std::array for per-set shifts, fix warning.
573cc9e9 Merge pull request #1111 from LoopDawg/per-set-binding-offsets
7a9db71f SPV: Don't emit StorageImageMultisample capability for subpass images.
6cfeced8 Non-functional: missing comments from missed git add.
1b46f137 HLSL: Fix #1106. Support shader setting of binding/set for $Global.
08a14422 Add per-descriptor-set IO mapping shift values.
fe4e572c GLSL->SPIR-V: Put precision decorations on imageLoad().
f0e35bf0 GLSL: Make sampling operations have agnostic precision qualifiers for desktop.
3112b568 Merge pull request #1113 from xorgy/preprocessor-int-min-over-negative-one
0b55e0f2 Merge pull request #1102 from KhronosGroup/partially-flatten
dc756a61 Preprocessor: Evaluate INT_MIN / -1 to 0.
a50b107e Build: Fix build warning.
8b555f74 Merge pull request #1109 from xorgy/never-try-to-swizzle-void
5313613d Don't try to swizzle void.
856502cb Update spirv-tools known-good
7d67c6cb PP: Fix #1104: Missing check for #if overflow.
1a4bbc4a HLSL: More clip fix: It is more involved than previous commit. Complete.
4ce5b562 Fix #1103: clip() works on int/uint.
5889fa03 Tests: Add clip(int) tests.
cf571f73 Infrastructure: Add a TShader method to publicly expose the intermediate.
41aa1995 HLSL: Partially flatten hierarchies, instead of all or nothing.
60e91611 Merge pull request #1098 from LoopDawg/attribute-gets
0d1f63ec Merge pull request #1097 from SWIFTingAround/master
ad2bc097 Merge pull request #1094 from LoopDawg/split-shadow-tx
ddb45f8d Merge pull request #1080 from hedejing/master
52c087ff HLSL: add helper access methods to TAttributeMap
aab00012 Set cmake-policy CMP0048 to NEW
fdbd0eba Add getAsLoopNode() method for Loop node
028c5a8d HLSL: nonfunctional: rename setId -> switchId, add comment
bb79abcc HLSL: Validate implicit initializer assignment to opaque members.
07ed11f9 SPV: GeneratorVersion: bump version number because of atomic decrement change.
b27de028 Merge pull request #1090 from tafuri/#1084-fix-segfault
48d6e798 SPV: Correct semantics of atomic-counter decrement.
592e8f04 HLSL: Tests: Add subset of flattened opaque test to legalize results.
4f6865f4 Added test for local structured buffer variable
5133b108 Fixed formatting
908813c2 Merge pull request #1089 from LoopDawg/split-shadow-tx
0a826111 Only track variables in the global scope
73c57bbe HLSL: split textures used for both shadow and non-shadow modes
263986eb Readme: Update with additional Windows build information for SPIRV-tools build.
2c9c2af6 Merge pull request #1085 from KhronosGroup/flatten-assign-subset
700bdeb7 HLSL: Fix #954: Track/access subsets of flattened multi-level aggregates.
86a82bb9 Merge pull request #1081 from xxxbxxx/for-upstream-1
a6085875 HLSL: Fix crash when flattening both side of assignement simultaneously.
24919659 Merge pull request #1075 from LoopDawg/subpass-input
7f93d56e HLSL: add subpass input types and methods
092b7d2e Build: Fix a couple build issues.
77ea30bd HLSL: Additional attribute support: [[]], namespace, parameters:
3693e631 Fix #1060: Could crash if using --source-entry-point with -e; fixed.
5a57ca68 Merge pull request #1078 from greg-lunarg/addopt14
354a54c6 Legalization: Fix tests after workarounds removed
d41993d9 SPV: rationalize parameter handling for "original" and "writable" parameters.
bed4e4f7 HLSL: Pass opaques by local copy, instead of by interface original.
15fa7ef5 HLSL: Remove workarounds for assigning to opaques.
dabd1bf2 Merge pull request #1076 from LoopDawg/shadow-tx-types
195f584e HLSL: force textures to shadow modes from combined samplers
fc7aeaee Merge pull request #1077 from greg-lunarg/addopt12
52fe3d59 Legalization: Fix warnings and disable tests when spirv-tools not present
3ddcd3f1 Merge pull request #1070 from greg-lunarg/addopt8
e2b36163 Advance spirv-opt known-good to hopefully fix travis multithread failure
b56366ab Legalization: Skip spirv-tools tests
741d1f20 Pick up latest spirv-tools in attempt to fix travis failures
87fd7429 Try Python interpreter on update_glslang_sources.py in appveyor
f451756d Fix travis and appveyor calls to update_glslang_sources.py
cd1f169c Enable HLSL legalization
44dd6a00 Merge pull request #1072 from amdrexu/feature
e8fe8b0d Implement extension GL_NV_shader_atomic_int64
f21c173a Merge pull request #1071 from antiagainst/ninja-make
afa128a8 Travis: use make instead of ninja and limit concurrent jobs
9cf5dfbd Merge pull request #1063 from LoopDawg/remapper-error-cleanup
ea5204d1 Build: Merge pull request #1068 from greg-lunarg/addopt4
fd34f0e6 CMake changes for HLSL legalization
8004d365 Remapper: make remapper robust against non-exiting error handlers
5f77d864 HLSL: Fix #1064: Don't include empty structures on OpEntryPoint
31365afa Merge pull request #1044 from dsrbecky/image_external_essl3
ae8af5d3 HLSL: fix array[1] of vec4 constant declaration.
c64a9dd6 Test: Make another test legal HLSL, and rationalize GLSL vs HLSL addConstructor().
bdbbc68e HLSL: Add bounds checking, shared with GLSL. Partially address #1032.
346dd7c7 Merge pull request #1051 from LoopDawg/bug-1049
4a145dbf HLSL: handle split InputPatch templat type in patch constant functions
a5d86164 HLSL: allow mixed user & builtin members in hull shader output structure
ba6a3c29 GLSL: Make gl_Layer and gl_ViewportIndex always be outside blocks.
aab3bcff Merge pull request #1056 from KhronosGroup/glsl-entrypoint-rename
9855bdad GLSL: Promote HLSL entry-point renaming code to be used by GLSL as well.
4f4683d2 Merge pull request #1050 from amdrexu/feature
30ac0525 Merge pull request #1055 from KhronosGroup/strdup
d9bd97d0 Build: Fix strdup -> _strdup warnings.
b3ca4045 Build: Fix build warnings.
5002c26b Fix #1043: set all scan string-locations to have bias, not just the first one.
a25530cc Non-functional: Make usage for entry points more consistent.
e22c11fd Merge pull request #1053 from mchock-nv/mchock-nv-fix-lambda
ea1ea974 Address #1052: Have language-level exits of case statements.
933c10cd Delete unused 'this' capture
05506bb8 Implement the extension GL_AMD_shader_fragment_mask
d004e5ca Merge pull request #1047 from svenstaro/add-stdin-option
0dd1285c Add --stdin
8688e3fb Merge pull request #1048 from LoopDawg/opaque-type-fix
76117921 Fix lvalue check in SPIR-V generation
2c5b3d64 Add support for GL_OES_EGL_image_external_essl3

Test: checkbuild.py on Linux; unit tests on Windows
Change-Id: I58d37c7e7a7fb77751c6a848d43e4957d18e7e84
diff --git a/.appveyor.yml b/.appveyor.yml
index 64e7ae6..d5c7225 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -25,6 +25,7 @@
 # scripts that run after cloning repository
 install:
   - git clone https://github.com/google/googletest.git External/googletest
+  - C:/Python27/python.exe update_glslang_sources.py
 
 build:
   parallel: true  # enable MSBuild parallel builds
diff --git a/.gitignore b/.gitignore
index 3e6cc14..a1fe394 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 build/
 Test/localResults/
 External/googletest
+External/spirv-tools
diff --git a/.travis.yml b/.travis.yml
index 40e3fc7..0237d25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,11 +39,8 @@
   apt:
     packages:
       - clang-3.6
-      - ninja-build
 
 install:
-  # Install ninja on Mac OS X.
-  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
   # Make sure that clang-3.6 is selected on Linux.
   - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
       export CC=clang-3.6 CXX=clang++-3.6;
@@ -57,7 +54,8 @@
     fi
 
 before_script:
-  - git clone https://github.com/google/googletest.git External/googletest
+  - git clone --depth=1 https://github.com/google/googletest.git External/googletest
+  - ./update_glslang_sources.py
 
 script:
   - mkdir build && cd build
@@ -68,14 +66,12 @@
             -DANDROID_NATIVE_API_LEVEL=android-12
             -DCMAKE_BUILD_TYPE=Release
             -DANDROID_ABI="armeabi-v7a with NEON"
-            -DBUILD_TESTING=OFF
-            -GNinja ..;
-      ninja;
+            -DBUILD_TESTING=OFF ..;
+      make -j4;
     else
       cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
-            -DCMAKE_INSTALL_PREFIX=`pwd`/install
-            -GNinja ..;
-      ninja install;
+            -DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
+      make -j4 install;
       ctest --output-on-failure &&
       cd ../Test && ./runtests;
     fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9bc94b0..0d453cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,9 @@
 # increase to 3.1 once all major distributions
 # include a version of CMake >= 3.1
 cmake_minimum_required(VERSION 2.8.12)
+if (POLICY CMP0048)
+  cmake_policy(SET CMP0048 NEW)
+endif()
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 # Adhere to GNU filesystem layout conventions
@@ -18,6 +21,8 @@
 
 option(ENABLE_HLSL "Enables HLSL input support" ON)
 
+option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
+
 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
     set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
 endif()
@@ -52,7 +57,7 @@
 
 if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
     add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
-                        -Wunused-parameter -Wunused-value  -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable)
+                        -Wunused-parameter -Wunused-value  -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
     add_compile_options(-Wno-reorder)  # disable this from -Wall, since it happens all over.
 elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
     add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
@@ -83,6 +88,17 @@
 # We depend on these for later projects, so they should come first.
 add_subdirectory(External)
 
+if(NOT TARGET SPIRV-Tools-opt)
+    set(ENABLE_OPT OFF)
+endif()
+
+if(ENABLE_OPT)
+    message(STATUS "optimizer enabled")
+    add_definitions(-DENABLE_OPT)
+elseif(ENABLE_HLSL)
+    message(STATUS "spirv-tools not linked - illegal SPIRV may be generated for HLSL")
+endif()
+
 add_subdirectory(glslang)
 add_subdirectory(OGLCompilersDLL)
 if(ENABLE_GLSLANG_BINARIES)
diff --git a/External/CMakeLists.txt b/External/CMakeLists.txt
index 4f694ee..4d96901 100644
--- a/External/CMakeLists.txt
+++ b/External/CMakeLists.txt
@@ -33,3 +33,11 @@
             "Google Mock was not found - tests based on that will not build")
     endif()
 endif()
+
+if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
+    if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
+        set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests")
+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
+    endif()
+endif()
+
diff --git a/README.md b/README.md
index 193e38d..9d5efb5 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,7 @@
 ### Dependencies
 
 * [CMake][cmake]: for generating compilation targets.
+* [Python 2.7][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools.)
 * [bison][bison]: _optional_, but needed when changing the grammar (glslang.y).
 * [googletest][googletest]: _optional_, but should use if making any changes to glslang.
 
@@ -74,6 +75,18 @@
 git clone https://github.com/google/googletest.git External/googletest
 ```
 
+If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan,
+or wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, install
+spirv-tools with this:
+
+```bash
+./update_glslang_sources.py
+```
+
+For running the CMake GUI or Visual Studio with python dependencies, you will,
+in addition to python within the cygwin environment, need a Windows [python][python]
+installation, including selecting the `PATH` update.
+
 #### 3) Configure
 
 Assume the source directory is `$SOURCE_DIR` and
@@ -301,6 +314,7 @@
 
 
 [cmake]: https://cmake.org/
+[python]: https://www.python.org/
 [bison]: https://www.gnu.org/software/bison/
 [googletest]: https://github.com/google/googletest
 [bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index 3c5ebab..b1c0277 100755
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -42,12 +42,21 @@
 add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
 set_property(TARGET SPIRV PROPERTY FOLDER glslang)
 set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(SPIRV glslang)
 
 add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
 set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
 set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
 
+if(ENABLE_OPT)
+    target_include_directories(SPIRV
+        PRIVATE ${spirv-tools_SOURCE_DIR}/include
+        PRIVATE ${spirv-tools_SOURCE_DIR}/source
+    )
+    target_link_libraries(SPIRV glslang SPIRV-Tools-opt SPVRemapper)
+else()
+    target_link_libraries(SPIRV glslang)
+endif(ENABLE_OPT)
+
 if(WIN32)
     source_group("Source" FILES ${SOURCES} ${HEADERS})
     source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
diff --git a/SPIRV/GLSL.ext.AMD.h b/SPIRV/GLSL.ext.AMD.h
index 5121ed9..7e97be3 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 = 5;
+static const int GLSLextAMDRevision = 6;
 
 // SPV_AMD_shader_ballot
 static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot";
@@ -106,4 +106,12 @@
 
 static const Capability CapabilityImageReadWriteLodAMD = static_cast<Capability>(5015);
 
+// SPV_AMD_shader_fragment_mask
+static const char* const E_SPV_AMD_shader_fragment_mask = "SPV_AMD_shader_fragment_mask";
+
+static const Capability CapabilityFragmentMaskAMD = static_cast<Capability>(5010);
+
+static const Op OpFragmentMaskFetchAMD = static_cast<Op>(5011);
+static const Op OpFragmentFetchAMD     = static_cast<Op>(5012);
+
 #endif  // #ifndef GLSLextAMD_H
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index b6c9705..b0e51df 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -52,6 +52,16 @@
 #endif
 }
 
+#ifdef ENABLE_OPT
+    #include "spirv-tools/optimizer.hpp"
+    #include "message.h"
+    #include "SPVRemapper.h"
+#endif
+
+#ifdef ENABLE_OPT
+using namespace spvtools;
+#endif
+
 // Glslang includes
 #include "../glslang/MachineIndependent/localintermediate.h"
 #include "../glslang/MachineIndependent/SymbolTable.h"
@@ -71,7 +81,7 @@
 // For low-order part of the generator's magic number. Bump up
 // when there is a change in the style (e.g., if SSA form changes,
 // or a different instruction sequence to do something gets used).
-const int GeneratorVersion = 1;
+const int GeneratorVersion = 2;
 
 namespace {
 class SpecConstantOpModeGuard {
@@ -148,6 +158,8 @@
     void declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember);
 
     bool isShaderEntryPoint(const glslang::TIntermAggregate* node);
+    bool writableParam(glslang::TStorageQualifier);
+    bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam);
     void makeFunctions(const glslang::TIntermSequence&);
     void makeGlobalInitializers(const glslang::TIntermSequence&);
     void visitFunctions(const glslang::TIntermSequence&);
@@ -453,15 +465,13 @@
         return spv::BuiltInCullDistance;
 
     case glslang::EbvViewportIndex:
-        if (!memberDeclaration) {
-            builder.addCapability(spv::CapabilityMultiViewport);
-            if (glslangIntermediate->getStage() == EShLangVertex ||
-                glslangIntermediate->getStage() == EShLangTessControl ||
-                glslangIntermediate->getStage() == EShLangTessEvaluation) {
+        builder.addCapability(spv::CapabilityMultiViewport);
+        if (glslangIntermediate->getStage() == EShLangVertex ||
+            glslangIntermediate->getStage() == EShLangTessControl ||
+            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 
-                builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
-                builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
-            }
+            builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
         }
         return spv::BuiltInViewportIndex;
 
@@ -478,17 +488,14 @@
         return spv::BuiltInSampleMask;
 
     case glslang::EbvLayer:
-        if (!memberDeclaration) {
-            builder.addCapability(spv::CapabilityGeometry);
-            if (glslangIntermediate->getStage() == EShLangVertex ||
-                glslangIntermediate->getStage() == EShLangTessControl ||
-                glslangIntermediate->getStage() == EShLangTessEvaluation) {
+        builder.addCapability(spv::CapabilityGeometry);
+        if (glslangIntermediate->getStage() == EShLangVertex ||
+            glslangIntermediate->getStage() == EShLangTessControl ||
+            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 
-                builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
-                builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
-            }
+            builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
+            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
         }
-
         return spv::BuiltInLayer;
 
     case glslang::EbvPosition:             return spv::BuiltInPosition;
@@ -766,33 +773,41 @@
 {
     if (type.getQualifier().isPipeInput())
         return spv::StorageClassInput;
-    else if (type.getQualifier().isPipeOutput())
+    if (type.getQualifier().isPipeOutput())
         return spv::StorageClassOutput;
-    else if (type.getBasicType() == glslang::EbtAtomicUint)
-        return spv::StorageClassAtomicCounter;
-    else if (type.containsOpaque())
-        return spv::StorageClassUniformConstant;
-    else if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
+
+    if (glslangIntermediate->getSource() != glslang::EShSourceHlsl ||
+        type.getQualifier().storage == glslang::EvqUniform) {
+        if (type.getBasicType() == glslang::EbtAtomicUint)
+            return spv::StorageClassAtomicCounter;
+        if (type.containsOpaque())
+            return spv::StorageClassUniformConstant;
+    }
+
+    if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
         builder.addExtension(spv::E_SPV_KHR_storage_buffer_storage_class);
         return spv::StorageClassStorageBuffer;
-    } else if (type.getQualifier().isUniformOrBuffer()) {
+    }
+
+    if (type.getQualifier().isUniformOrBuffer()) {
         if (type.getQualifier().layoutPushConstant)
             return spv::StorageClassPushConstant;
         if (type.getBasicType() == glslang::EbtBlock)
             return spv::StorageClassUniform;
-        else
-            return spv::StorageClassUniformConstant;
-    } else {
-        switch (type.getQualifier().storage) {
-        case glslang::EvqShared:        return spv::StorageClassWorkgroup;  break;
-        case glslang::EvqGlobal:        return spv::StorageClassPrivate;
-        case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
-        case glslang::EvqTemporary:     return spv::StorageClassFunction;
-        default:
-            assert(0);
-            return spv::StorageClassFunction;
-        }
+        return spv::StorageClassUniformConstant;
     }
+
+    switch (type.getQualifier().storage) {
+    case glslang::EvqShared:        return spv::StorageClassWorkgroup;
+    case glslang::EvqGlobal:        return spv::StorageClassPrivate;
+    case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
+    case glslang::EvqTemporary:     return spv::StorageClassFunction;
+    default:
+        assert(0);
+        break;
+    }
+
+    return spv::StorageClassFunction;
 }
 
 // Return whether or not the given type is something that should be tied to a
@@ -1086,8 +1101,10 @@
     // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
     if (builder.isPointer(id)) {
         spv::StorageClass sc = builder.getStorageClass(id);
-        if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)
-            iOSet.insert(id);
+        if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput) {
+            if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0)
+                iOSet.insert(id);
+        }
     }
 
     // Only process non-linkage-only nodes for generating actual static uses
@@ -2485,10 +2502,6 @@
     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;
 };
@@ -2936,8 +2949,6 @@
     case glslang::EbvCullDistance:
     case glslang::EbvPointSize:
 #ifdef NV_EXTENSIONS
-    case glslang::EbvLayer:
-    case glslang::EbvViewportIndex:
     case glslang::EbvViewportMaskNV:
     case glslang::EbvSecondaryPositionNV:
     case glslang::EbvSecondaryViewportMaskNV:
@@ -2960,6 +2971,24 @@
     return node->getName().compare(glslangIntermediate->getEntryPointMangledName().c_str()) == 0;
 }
 
+// Does parameter need a place to keep writes, separate from the original?
+bool TGlslangToSpvTraverser::writableParam(glslang::TStorageQualifier qualifier)
+{
+    return qualifier != glslang::EvqConstReadOnly;
+}
+
+// Is parameter pass-by-original?
+bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, const glslang::TType& paramType,
+                                           bool implicitThisParam)
+{
+    if (implicitThisParam)                                                                     // implicit this
+        return true;
+    if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
+        return false;
+    return paramType.containsOpaque() ||                                                       // sampler, etc.
+           (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO
+}
+
 // Make all the functions, skeletally, without actually visiting their bodies.
 void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslFunctions)
 {
@@ -3000,13 +3029,9 @@
         for (int p = 0; p < (int)parameters.size(); ++p) {
             const glslang::TType& paramType = parameters[p]->getAsTyped()->getType();
             spv::Id typeId = convertGlslangToSpvType(paramType);
-            // can we pass by reference?
-            if (paramType.containsOpaque() ||                                // sampler, etc.
-                (paramType.getBasicType() == glslang::EbtBlock &&
-                 paramType.getQualifier().storage == glslang::EvqBuffer) ||  // SSBO
-                (p == 0 && implicitThis))                                    // implicit 'this'
+            if (originalParam(paramType.getQualifier().storage, paramType, implicitThis && p == 0))
                 typeId = builder.makePointer(TranslateStorageClass(paramType), typeId);
-            else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly)
+            else if (writableParam(paramType.getQualifier().storage))
                 typeId = builder.makePointer(spv::StorageClassFunction, typeId);
             else
                 rValueParameters.insert(parameters[p]->getAsSymbolNode()->getId());
@@ -3204,9 +3229,7 @@
     glslang::TCrackedTextureOp cracked;
     node->crackTexture(sampler, cracked);
 
-    const bool isUnsignedResult =
-        node->getType().getBasicType() == glslang::EbtUint64 ||
-        node->getType().getBasicType() == glslang::EbtUint;
+    const bool isUnsignedResult = node->getType().getBasicType() == glslang::EbtUint;
 
     // Check for queries
     if (cracked.query) {
@@ -3258,7 +3281,9 @@
                 operands.push_back(spv::ImageOperandsSampleMask);
                 operands.push_back(*(opIt++));
             }
-            return builder.createOp(spv::OpImageRead, resultType(), operands);
+            spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands);
+            builder.setPrecision(result, precision);
+            return result;
         }
 
         operands.push_back(*(opIt++));
@@ -3281,7 +3306,10 @@
             }
             if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
                 builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
-            return builder.createOp(spv::OpImageRead, resultType(), operands);
+
+            spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands);
+            builder.setPrecision(result, precision);
+            return result;
 #ifdef AMD_EXTENSIONS
         } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) {
 #else
@@ -3358,6 +3386,45 @@
         }
     }
 
+#ifdef AMD_EXTENSIONS
+    // Check for fragment mask functions other than queries
+    if (cracked.fragMask) {
+        assert(sampler.ms);
+
+        auto opIt = arguments.begin();
+        std::vector<spv::Id> operands;
+
+        // Extract the image if necessary
+        if (builder.isSampledImage(params.sampler))
+            params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
+
+        operands.push_back(params.sampler);
+        ++opIt;
+
+        if (sampler.isSubpass()) {
+            // add on the (0,0) coordinate
+            spv::Id zero = builder.makeIntConstant(0);
+            std::vector<spv::Id> comps;
+            comps.push_back(zero);
+            comps.push_back(zero);
+            operands.push_back(builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps));
+        }
+
+        for (; opIt != arguments.end(); ++opIt)
+            operands.push_back(*opIt);
+
+        spv::Op fragMaskOp = spv::OpNop;
+        if (node->getOp() == glslang::EOpFragmentMaskFetch)
+            fragMaskOp = spv::OpFragmentMaskFetchAMD;
+        else if (node->getOp() == glslang::EOpFragmentFetch)
+            fragMaskOp = spv::OpFragmentFetchAMD;
+
+        builder.addExtension(spv::E_SPV_AMD_shader_fragment_mask);
+        builder.addCapability(spv::CapabilityFragmentMaskAMD);
+        return builder.createOp(fragMaskOp, resultType(), operands);
+    }
+#endif
+
     // Check for texture functions other than queries
     bool sparse = node->isSparseTexture();
     bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
@@ -3547,8 +3614,9 @@
         builder.clearAccessChain();
         glslangArgs[a]->traverse(this);
         argTypes.push_back(&paramType);
-        // keep outputs and opaque objects as l-values, evaluate input-only as r-values
-        if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.containsOpaque()) {
+        // keep outputs and pass-by-originals as l-values, evaluate others as r-values
+        if (writableParam(qualifiers[a]) ||
+            originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0)) {
             // save l-value
             lValues.push_back(builder.getAccessChain());
         } else {
@@ -3567,13 +3635,11 @@
     for (int a = 0; a < (int)glslangArgs.size(); ++a) {
         const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType();
         spv::Id arg;
-        if (paramType.containsOpaque() ||
-            (paramType.getBasicType() == glslang::EbtBlock && qualifiers[a] == glslang::EvqBuffer) ||
-            (a == 0 && function->hasImplicitThis())) {
+        if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0)) {
             builder.setAccessChain(lValues[lValueCount]);
             arg = builder.accessChainGetLValue();
             ++lValueCount;
-        } else if (qualifiers[a] != glslang::EvqConstReadOnly) {
+        } else if (writableParam(qualifiers[a])) {
             // need space to hold the copy
             arg = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(paramType), "param");
             if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) {
@@ -3600,7 +3666,9 @@
     lValueCount = 0;
     for (int a = 0; a < (int)glslangArgs.size(); ++a) {
         const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType();
-        if (qualifiers[a] != glslang::EvqConstReadOnly) {
+        if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0))
+            ++lValueCount;
+        else if (writableParam(qualifiers[a])) {
             if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) {
                 spv::Id copy = builder.createLoad(spvArgs[a]);
                 builder.setAccessChain(lValues[lValueCount]);
@@ -4716,12 +4784,12 @@
     case glslang::EOpAtomicMin:
     case glslang::EOpImageAtomicMin:
     case glslang::EOpAtomicCounterMin:
-        opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin;
+        opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMin : spv::OpAtomicSMin;
         break;
     case glslang::EOpAtomicMax:
     case glslang::EOpImageAtomicMax:
     case glslang::EOpAtomicCounterMax:
-        opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax;
+        opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMax : spv::OpAtomicSMax;
         break;
     case glslang::EOpAtomicAnd:
     case glslang::EOpImageAtomicAnd:
@@ -4762,11 +4830,15 @@
         break;
     }
 
+    if (typeProxy == glslang::EbtInt64 || typeProxy == glslang::EbtUint64)
+        builder.addCapability(spv::CapabilityInt64Atomics);
+
     // Sort out the operands
     //  - mapping from glslang -> SPV
     //  - there are extra SPV operands with no glslang source
     //  - compare-exchange swaps the value and comparator
     //  - compare-exchange has an extra memory semantics
+    //  - EOpAtomicCounterDecrement needs a post decrement
     std::vector<spv::Id> spvAtomicOperands;  // hold the spv operands
     auto opIt = operands.begin();            // walk the glslang operands
     spvAtomicOperands.push_back(*(opIt++));
@@ -4785,7 +4857,14 @@
     for (; opIt != operands.end(); ++opIt)
         spvAtomicOperands.push_back(*opIt);
 
-    return builder.createOp(opCode, typeId, spvAtomicOperands);
+    spv::Id resultId = builder.createOp(opCode, typeId, spvAtomicOperands);
+
+    // GLSL and HLSL atomic-counter decrement return post-decrement value,
+    // while SPIR-V returns pre-decrement value. Translate between these semantics.
+    if (op == glslang::EOpAtomicCounterDecrement)
+        resultId = builder.createBinOp(spv::OpISub, typeId, resultId, builder.makeIntConstant(1));
+
+    return resultId;
 }
 
 // Create group invocation operations.
@@ -5924,6 +6003,12 @@
     out.close();
 }
 
+#ifdef ENABLE_OPT
+void errHandler(const std::string& str) {
+    std::cerr << str << std::endl;
+}
+#endif
+
 //
 // Set up the glslang traversal
 //
@@ -5952,6 +6037,50 @@
     it.finishSpv();
     it.dumpSpv(spirv);
 
+#ifdef ENABLE_OPT
+    // If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan
+    // eg. forward and remove memory writes of opaque types.
+    if ((intermediate.getSource() == EShSourceHlsl ||
+                options->optimizeSize) &&
+            !options->disableOptimizer) {
+        spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2;
+
+        spvtools::Optimizer optimizer(target_env);
+        optimizer.SetMessageConsumer([](spv_message_level_t level,
+                                         const char* source,
+                                         const spv_position_t& position,
+                                         const char* message) {
+            std::cerr << StringifyMessage(level, source, position, message)
+                      << std::endl;
+        });
+
+        optimizer.RegisterPass(CreateInlineExhaustivePass());
+        optimizer.RegisterPass(CreateLocalAccessChainConvertPass());
+        optimizer.RegisterPass(CreateLocalSingleBlockLoadStoreElimPass());
+        optimizer.RegisterPass(CreateLocalSingleStoreElimPass());
+        optimizer.RegisterPass(CreateInsertExtractElimPass());
+        optimizer.RegisterPass(CreateAggressiveDCEPass());
+        optimizer.RegisterPass(CreateDeadBranchElimPass());
+        optimizer.RegisterPass(CreateCFGCleanupPass());
+        optimizer.RegisterPass(CreateBlockMergePass());
+        optimizer.RegisterPass(CreateLocalMultiStoreElimPass());
+        optimizer.RegisterPass(CreateInsertExtractElimPass());
+        optimizer.RegisterPass(CreateAggressiveDCEPass());
+        // TODO(greg-lunarg): Add this when AMD driver issues are resolved
+        // if (options->optimizeSize)
+        //     optimizer.RegisterPass(CreateCommonUniformElimPass());
+
+        if (!optimizer.Run(spirv.data(), spirv.size(), &spirv))
+            return;
+
+        // Remove dead module-level objects: functions, types, vars
+        // TODO(greg-lunarg): Switch to spirv-opt versions when available
+        spv::spirvbin_t Remapper(0);
+        Remapper.registerErrorHandler(errHandler);
+        Remapper.remap(spirv, spv::spirvbin_t::DCE_ALL);
+    }
+#endif
+
     glslang::GetThreadPoolAllocator().pop();
 }
 
diff --git a/SPIRV/GlslangToSpv.h b/SPIRV/GlslangToSpv.h
index 0dad4d2..0398501 100644
--- a/SPIRV/GlslangToSpv.h
+++ b/SPIRV/GlslangToSpv.h
@@ -48,8 +48,11 @@
 namespace glslang {
 
 struct SpvOptions {
-    SpvOptions() : generateDebugInfo(false) { }
+    SpvOptions() : generateDebugInfo(false), disableOptimizer(true),
+        optimizeSize(false) { }
     bool generateDebugInfo;
+    bool disableOptimizer;
+    bool optimizeSize;
 };
 
 void GetSpirvVersion(std::string&);
diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp
index e8031d0..4d96df6 100755
--- a/SPIRV/SPVRemapper.cpp
+++ b/SPIRV/SPVRemapper.cpp
@@ -135,6 +135,9 @@
         const unsigned typeStart = idPos(id);
         const spv::Op  opCode    = asOpCode(typeStart);
 
+        if (errorLatch)
+            return 0;
+
         switch (opCode) {
         case spv::OpTypeInt:   // fall through...
         case spv::OpTypeFloat: return (spv[typeStart+2]+31)/32;
@@ -148,8 +151,10 @@
     unsigned spirvbin_t::idTypeSizeInWords(spv::Id id) const
     {
         const auto tid_it = idTypeSizeMap.find(id);
-        if (tid_it == idTypeSizeMap.end())
+        if (tid_it == idTypeSizeMap.end()) {
             error("type size for ID not found");
+            return 0;
+        }
 
         return tid_it->second;
     }
@@ -215,14 +220,19 @@
     bool spirvbin_t::isConstOp(spv::Op opCode) const
     {
         switch (opCode) {
-        case spv::OpConstantNull:       error("unimplemented constant type");
-        case spv::OpConstantSampler:    error("unimplemented constant type");
+        case spv::OpConstantNull:
+        case spv::OpConstantSampler:
+            error("unimplemented constant type");
+            return true;
 
         case spv::OpConstantTrue:
         case spv::OpConstantFalse:
         case spv::OpConstantComposite:
-        case spv::OpConstant:         return true;
-        default:                      return false;
+        case spv::OpConstant:
+            return true;
+
+        default:
+            return false;
         }
     }
 
@@ -248,19 +258,31 @@
     {
         assert(id != spv::NoResult && newId != spv::NoResult);
 
+        if (id > bound()) {
+            error(std::string("ID out of range: ") + std::to_string(id));
+            return spirvbin_t::unused;
+        }
+
         if (id >= idMapL.size())
             idMapL.resize(id+1, unused);
 
         if (newId != unmapped && newId != unused) {
-            if (isOldIdUnused(id))
+            if (isOldIdUnused(id)) {
                 error(std::string("ID unused in module: ") + std::to_string(id));
+                return spirvbin_t::unused;
+            }
 
-            if (!isOldIdUnmapped(id))
+            if (!isOldIdUnmapped(id)) {
                 error(std::string("ID already mapped: ") + std::to_string(id) + " -> "
-                + std::to_string(localId(id)));
+                        + std::to_string(localId(id)));
 
-            if (isNewIdMapped(newId))
+                return spirvbin_t::unused;
+            }
+
+            if (isNewIdMapped(newId)) {
                 error(std::string("ID already used in module: ") + std::to_string(newId));
+                return spirvbin_t::unused;
+            }
 
             msg(4, 4, std::string("map: ") + std::to_string(id) + " -> " + std::to_string(newId));
             setMapped(newId);
@@ -294,6 +316,10 @@
         process(inst_fn_nop, // ignore instructions
             [this](spv::Id& id) {
                 id = localId(id);
+
+                if (errorLatch)
+                    return;
+
                 assert(id != unused && id != unmapped);
             }
         );
@@ -312,14 +338,22 @@
                 continue;
 
             // Find a new mapping for any used but unmapped IDs
-            if (isOldIdUnmapped(id))
+            if (isOldIdUnmapped(id)) {
                 localId(id, unusedId = nextUnusedId(unusedId));
+                if (errorLatch)
+                    return;
+            }
 
-            if (isOldIdUnmapped(id))
+            if (isOldIdUnmapped(id)) {
                 error(std::string("old ID not mapped: ") + std::to_string(id));
+                return;
+            }
 
             // Track max bound
             maxBound = std::max(maxBound, localId(id) + 1);
+
+            if (errorLatch)
+                return;
         }
 
         bound(maxBound); // reset header ID bound to as big as it now needs to be
@@ -401,6 +435,9 @@
                     if (typeId != spv::NoResult) {
                         const unsigned idTypeSize = typeSizeInWords(typeId);
 
+                        if (errorLatch)
+                            return false;
+
                         if (idTypeSize != 0)
                             idTypeSizeMap[resultId] = idTypeSize;
                     }
@@ -416,17 +453,26 @@
                 } else if (opCode == spv::Op::OpEntryPoint) {
                     entryPoint = asId(start + 2);
                 } else if (opCode == spv::Op::OpFunction) {
-                    if (fnStart != 0)
+                    if (fnStart != 0) {
                         error("nested function found");
+                        return false;
+                    }
+
                     fnStart = start;
                     fnRes   = asId(start + 2);
                 } else if (opCode == spv::Op::OpFunctionEnd) {
                     assert(fnRes != spv::NoResult);
-                    if (fnStart == 0)
+                    if (fnStart == 0) {
                         error("function end without function start");
+                        return false;
+                    }
+
                     fnPos[fnRes] = range_t(fnStart, start + asWordCount(start));
                     fnStart = 0;
                 } else if (isConstOp(opCode)) {
+                    if (errorLatch)
+                        return false;
+
                     assert(asId(start + 2) != spv::NoResult);
                     typeConstPos.insert(start);
                 } else if (isTypeOp(opCode)) {
@@ -446,18 +492,24 @@
     {
         msg(2, 2, std::string("validating: "));
 
-        if (spv.size() < header_size)
+        if (spv.size() < header_size) {
             error("file too short: ");
+            return;
+        }
 
-        if (magic() != spv::MagicNumber)
+        if (magic() != spv::MagicNumber) {
             error("bad magic number");
+            return;
+        }
 
         // field 1 = version
         // field 2 = generator magic
         // field 3 = result <id> bound
 
-        if (schemaNum() != 0)
+        if (schemaNum() != 0) {
             error("bad schema, must be 0");
+            return;
+        }
     }
 
     int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn)
@@ -467,8 +519,10 @@
         const int      nextInst  = word++ + wordCount;
         spv::Op  opCode    = asOpCode(instructionStart);
 
-        if (nextInst > int(spv.size()))
+        if (nextInst > int(spv.size())) {
             error("spir instruction terminated too early");
+            return -1;
+        }
 
         // Base for computing number of operands; will be updated as more is learned
         unsigned numOperands = wordCount - 1;
@@ -550,6 +604,9 @@
                     const unsigned literalSize = idTypeSizeInWords(idBuffer[literalSizePos]);
                     const unsigned numLiteralIdPairs = (nextInst-word) / (1+literalSize);
 
+                    if (errorLatch)
+                        return -1;
+
                     for (unsigned arg=0; arg<numLiteralIdPairs; ++arg) {
                         word += literalSize;  // literal
                         idFn(asId(word++));   // label
@@ -626,9 +683,13 @@
         // basic parsing and InstructionDesc table borrowed from SpvDisassemble.cpp...
         unsigned nextInst = unsigned(spv.size());
 
-        for (unsigned word = begin; word < end; word = nextInst)
+        for (unsigned word = begin; word < end; word = nextInst) {
             nextInst = processInstruction(word, instFn, idFn);
 
+            if (errorLatch)
+                return *this;
+        }
+
         return *this;
     }
 
@@ -643,8 +704,11 @@
             for (const char c : name.first)
                 hashval = hashval * 1009 + c;
 
-            if (isOldIdUnmapped(name.second))
+            if (isOldIdUnmapped(name.second)) {
                 localId(name.second, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+                if (errorLatch)
+                    return;
+            }
         }
     }
 
@@ -666,6 +730,9 @@
             [&](spv::Op, unsigned start) { instPos.push_back(start); return true; },
             op_fn_nop);
 
+        if (errorLatch)
+            return;
+
         // Window size for context-sensitive canonicalization values
         // Empirical best size from a single data set.  TODO: Would be a good tunable.
         // We essentially perform a little convolution around each instruction,
@@ -701,8 +768,12 @@
                         hashval = hashval * 30103 + asOpCodeHash(instPos[i]); // 30103 = semiarbitrary prime
                     }
 
-                    if (isOldIdUnmapped(resId))
+                    if (isOldIdUnmapped(resId)) {
                         localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+                        if (errorLatch)
+                            return;
+                    }
+
                 }
             }
         }
@@ -795,6 +866,9 @@
             [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; }
         );
 
+        if (errorLatch)
+            return;
+
         // EXPERIMENTAL: Implicit output stores
         fnLocalVars.clear();
         idMap.clear();
@@ -815,11 +889,17 @@
             },
             op_fn_nop);
 
+        if (errorLatch)
+            return;
+
         process(
             inst_fn_nop,
             [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; }
         );
 
+        if (errorLatch)
+            return;
+
         strip();          // strip out data we decided to eliminate
     }
 
@@ -919,6 +999,9 @@
             }
         );
 
+        if (errorLatch)
+            return;
+
         process(
             [&](spv::Op opCode, unsigned start) {
                 if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0)
@@ -927,6 +1010,9 @@
             },
             op_fn_nop);
 
+        if (errorLatch)
+            return;
+
         // Chase replacements to their origins, in case there is a chain such as:
         //   2 = store 1
         //   3 = load 2
@@ -960,6 +1046,9 @@
             }
         );
 
+        if (errorLatch)
+            return;
+
         strip();          // strip out data we decided to eliminate
     }
 
@@ -1003,6 +1092,9 @@
                         fn->second.first,
                         fn->second.second);
 
+                    if (errorLatch)
+                        return;
+
                     fn = fnPos.erase(fn);
                 } else ++fn;
             }
@@ -1035,6 +1127,9 @@
             [&](spv::Id& id) { if (varUseCount[id]) ++varUseCount[id]; }
         );
 
+        if (errorLatch)
+            return;
+
         // Remove single-use function variables + associated decorations and names
         process(
             [&](spv::Op opCode, unsigned start) {
@@ -1076,6 +1171,9 @@
                     [&](spv::Id& id) { if (isType[id]) ++typeUseCount[id]; }
                     );
 
+            if (errorLatch)
+                return;
+
             // Remove single reference types
             for (const auto typeStart : typeConstPos) {
                 const spv::Id typeId = asTypeConstId(typeStart);
@@ -1085,6 +1183,9 @@
                     stripInst(typeStart);
                 }
             }
+
+            if (errorLatch)
+                return;
         }
     }
 
@@ -1163,8 +1264,10 @@
     unsigned spirvbin_t::idPos(spv::Id id) const
     {
         const auto tid_it = idPosR.find(id);
-        if (tid_it == idPosR.end())
+        if (tid_it == idPosR.end()) {
             error("ID not found");
+            return 0;
+        }
 
         return tid_it->second;
     }
@@ -1263,8 +1366,14 @@
             const spv::Id       resId     = asTypeConstId(typeStart);
             const std::uint32_t hashval   = hashType(typeStart);
 
-            if (isOldIdUnmapped(resId))
+            if (errorLatch)
+                return;
+
+            if (isOldIdUnmapped(resId)) {
                 localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+                if (errorLatch)
+                    return;
+            }
         }
     }
 
@@ -1310,24 +1419,49 @@
         msg(3, 4, std::string("ID bound: ") + std::to_string(bound()));
 
         if (options & STRIP)         stripDebug();
+        if (errorLatch) return;
+
         strip();        // strip out data we decided to eliminate
+        if (errorLatch) return;
+
         if (options & OPT_LOADSTORE) optLoadStore();
+        if (errorLatch) return;
+
         if (options & OPT_FWD_LS)    forwardLoadStores();
+        if (errorLatch) return;
+
         if (options & DCE_FUNCS)     dceFuncs();
+        if (errorLatch) return;
+
         if (options & DCE_VARS)      dceVars();
+        if (errorLatch) return;
+
         if (options & DCE_TYPES)     dceTypes();
+        if (errorLatch) return;
 
         strip();         // strip out data we decided to eliminate
+        if (errorLatch) return;
+
         stripDeadRefs(); // remove references to things we DCEed
+        if (errorLatch) return;
+
         // after the last strip, we must clean any debug info referring to now-deleted data
 
         if (options & MAP_TYPES)     mapTypeConst();
+        if (errorLatch) return;
+
         if (options & MAP_NAMES)     mapNames();
+        if (errorLatch) return;
+
         if (options & MAP_FUNCS)     mapFnBodies();
+        if (errorLatch) return;
 
         if (options & MAP_ALL) {
             mapRemainder(); // map any unmapped IDs
+            if (errorLatch) return;
+
             applyMap();     // Now remap each shader to the new IDs we've come up with
+            if (errorLatch) return;
         }
     }
 
diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h
index f9f369a..97e3f31 100755
--- a/SPIRV/SPVRemapper.h
+++ b/SPIRV/SPVRemapper.h
@@ -39,6 +39,7 @@
 #include <string>
 #include <vector>
 #include <cstdlib>
+#include <exception>
 
 namespace spv {
 
@@ -111,7 +112,9 @@
 class spirvbin_t : public spirvbin_base_t
 {
 public:
-   spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose) { }
+   spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose), errorLatch(false)
+   { }
+
    virtual ~spirvbin_t() { }
 
    // remap on an existing binary in memory
@@ -165,7 +168,7 @@
    typedef std::unordered_map<spv::Id, unsigned> typesize_map_t;
 
    // handle error
-   void error(const std::string& txt) const { errorHandler(txt); }
+   void error(const std::string& txt) const { errorLatch = true; errorHandler(txt); }
 
    bool     isConstOp(spv::Op opCode)      const;
    bool     isTypeOp(spv::Op opCode)       const;
@@ -286,6 +289,11 @@
    std::uint32_t options;
    int           verbose;     // verbosity level
 
+   // Error latch: this is set if the error handler is ever executed.  It would be better to
+   // use a try/catch block and throw, but that's not desired for certain environments, so
+   // this is the alternative.
+   mutable bool errorLatch;
+
    static errorfn_t errorHandler;
    static logfn_t   logHandler;
 };
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index 289d59a..c795ca8 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -469,7 +469,10 @@
 
     if (ms) {
         if (sampled == 2) {
-            addCapability(CapabilityStorageImageMultisample);
+            // Images used with subpass data are not storage
+            // images, so don't require the capability for them.
+            if (dim != Dim::DimSubpassData)
+                addCapability(CapabilityStorageImageMultisample);
             if (arrayed)
                 addCapability(CapabilityImageMSArray);
         }
diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp
index 2fe5d9c..f9d5254 100755
--- a/SPIRV/doc.cpp
+++ b/SPIRV/doc.cpp
@@ -847,6 +847,7 @@
 
 #ifdef AMD_EXTENSIONS
     case 5009: return "ImageGatherBiasLodAMD";
+    case 5010: return "FragmentMaskAMD";
     case 5015: return "ImageReadWriteLodAMD";
 #endif
 
@@ -1207,6 +1208,9 @@
     case 5005: return "OpGroupFMaxNonUniformAMD";
     case 5006: return "OpGroupUMaxNonUniformAMD";
     case 5007: return "OpGroupSMaxNonUniformAMD";
+
+    case 5011: return "OpFragmentMaskFetchAMD";
+    case 5012: return "OpFragmentFetchAMD";
 #endif
 
     case OpcodeCeiling:
@@ -2869,6 +2873,15 @@
     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X");
+
+    InstructionDesc[OpFragmentMaskFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD);
+    InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'");
+    InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'");
+
+    InstructionDesc[OpFragmentFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD);
+    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
+    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
+    InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
 #endif
 }
 
diff --git a/StandAlone/DirStackFileIncluder.h b/StandAlone/DirStackFileIncluder.h
index 8d6543a..1873413 100644
--- a/StandAlone/DirStackFileIncluder.h
+++ b/StandAlone/DirStackFileIncluder.h
@@ -54,7 +54,7 @@
                                         const char* includerName,
                                         size_t inclusionDepth) override
     {
-        return readLocalPath(headerName, includerName, inclusionDepth);
+        return readLocalPath(headerName, includerName, (int)inclusionDepth);
     }
 
     virtual IncludeResult* includeSystem(const char* headerName,
@@ -73,7 +73,7 @@
     virtual void pushExternalLocalDirectory(const std::string& dir)
     {
         directoryStack.push_back(dir);
-        externalLocalDirectoryCount = directoryStack.size();
+        externalLocalDirectoryCount = (int)directoryStack.size();
     }
 
     virtual void releaseInclude(IncludeResult* result) override
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 53a33b8..19302cb 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -55,6 +55,7 @@
 #include <cctype>
 #include <cmath>
 #include <array>
+#include <map>
 #include <memory>
 #include <thread>
 
@@ -94,6 +95,9 @@
     EOptionHlslIoMapping        = (1 << 24),
     EOptionAutoMapLocations     = (1 << 25),
     EOptionDebug                = (1 << 26),
+    EOptionStdin                = (1 << 27),
+    EOptionOptimizeDisable      = (1 << 28),
+    EOptionOptimizeSize         = (1 << 29),
 };
 
 //
@@ -154,12 +158,11 @@
 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;
-std::array<unsigned int, EShLangCount> baseImageBinding;
-std::array<unsigned int, EShLangCount> baseUboBinding;
-std::array<unsigned int, EShLangCount> baseSsboBinding;
-std::array<unsigned int, EShLangCount> baseUavBinding;
+// Per descriptor-set binding base data
+typedef std::map<unsigned int, unsigned int> TPerSetBaseBinding;
+
+std::array<std::array<unsigned int, EShLangCount>, glslang::EResCount> baseBinding;
+std::array<std::array<TPerSetBaseBinding, EShLangCount>, glslang::EResCount> baseBindingForSet;
 std::array<std::vector<std::string>, EShLangCount> baseResourceSetBinding;
 
 // Add things like "#define ..." to a preamble to use in the beginning of the shader.
@@ -263,31 +266,54 @@
 }
 
 //
-// Process an optional binding base of the form:
-//   --argname [stage] base
+// Process an optional binding base of one the forms:
+//   --argname [stage] base            // base for stage (if given) or all stages (if not)
+//   --argname [stage] [set base]...   // set/base pairs: set the base for given binding set.
+
 // Where stage is one of the forms accepted by FindLanguage, and base is an integer
 //
-void ProcessBindingBase(int& argc, char**& argv, std::array<unsigned int, EShLangCount>& base)
+void ProcessBindingBase(int& argc, char**& argv, glslang::TResourceType res)
 {
     if (argc < 2)
         usage();
 
-    if (!isdigit(argv[1][0])) {
+    EShLanguage lang = EShLangCount;
+    int singleBase = 0;
+    TPerSetBaseBinding perSetBase;
+    int arg = 1;
+
+    // Parse stage, if given
+    if (!isdigit(argv[arg][0])) {
         if (argc < 3) // this form needs one more argument
             usage();
 
-        // Parse form: --argname stage base
-        const EShLanguage lang = FindLanguage(argv[1], false);
-        base[lang] = atoi(argv[2]);
-        argc-= 2;
-        argv+= 2;
-    } else {
-        // Parse form: --argname base
-        for (int lang=0; lang<EShLangCount; ++lang)
-            base[lang] = atoi(argv[1]);
+        lang = FindLanguage(argv[arg++], false);
+    }
 
-        argc--;
-        argv++;
+    if ((argc - arg) > 2 && isdigit(argv[arg+0][0]) && isdigit(argv[arg+1][0])) {
+        // Parse a per-set binding base
+        while ((argc - arg) > 2 && isdigit(argv[arg+0][0]) && isdigit(argv[arg+1][0])) {
+            const int setNum = atoi(argv[arg++]);
+            const int baseNum = atoi(argv[arg++]);
+            perSetBase[setNum] = baseNum;
+        }
+    } else {
+        // Parse single binding base
+        singleBase = atoi(argv[arg++]);
+    }
+
+    argc -= (arg-1);
+    argv += (arg-1);
+
+    // Set one or all languages
+    const int langMin = (lang < EShLangCount) ? lang+0 : 0;
+    const int langMax = (lang < EShLangCount) ? lang+1 : EShLangCount;
+
+    for (int lang = langMin; lang < langMax; ++lang) {
+        if (!perSetBase.empty())
+            baseBindingForSet[res][lang] = perSetBase;
+        else
+            baseBinding[res][lang] = singleBase;
     }
 }
 
@@ -336,12 +362,8 @@
 //
 void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItems, int argc, char* argv[])
 {
-    baseSamplerBinding.fill(0);
-    baseTextureBinding.fill(0);
-    baseImageBinding.fill(0);
-    baseUboBinding.fill(0);
-    baseSsboBinding.fill(0);
-    baseUavBinding.fill(0);
+    for (int res = 0; res < glslang::EResCount; ++res)
+        baseBinding[res].fill(0);
 
     ExecutableName = argv[0];
     workItems.reserve(argc);
@@ -438,30 +460,30 @@
                     } else if (lowerword == "shift-image-bindings" ||  // synonyms
                                lowerword == "shift-image-binding"  ||
                                lowerword == "sib") {
-                        ProcessBindingBase(argc, argv, baseImageBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResImage);
                     } else if (lowerword == "shift-sampler-bindings" || // synonyms
                         lowerword == "shift-sampler-binding"  ||
                         lowerword == "ssb") {
-                        ProcessBindingBase(argc, argv, baseSamplerBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResSampler);
                     } else if (lowerword == "shift-uav-bindings" ||  // synonyms
                                lowerword == "shift-uav-binding"  ||
                                lowerword == "suavb") {
-                        ProcessBindingBase(argc, argv, baseUavBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResUav);
                     } else if (lowerword == "shift-texture-bindings" ||  // synonyms
                                lowerword == "shift-texture-binding"  ||
                                lowerword == "stb") {
-                        ProcessBindingBase(argc, argv, baseTextureBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResTexture);
                     } else if (lowerword == "shift-ubo-bindings" ||  // synonyms
                                lowerword == "shift-ubo-binding"  ||
                                lowerword == "shift-cbuffer-bindings" ||
                                lowerword == "shift-cbuffer-binding"  ||
                                lowerword == "sub" ||
                                lowerword == "scb") {
-                        ProcessBindingBase(argc, argv, baseUboBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResUbo);
                     } else if (lowerword == "shift-ssbo-bindings" ||  // synonyms
                                lowerword == "shift-ssbo-binding"  ||
                                lowerword == "sbb") {
-                        ProcessBindingBase(argc, argv, baseSsboBinding);
+                        ProcessBindingBase(argc, argv, glslang::EResSsbo);
                     } else if (lowerword == "source-entrypoint" || // synonyms
                                lowerword == "sep") {
                         if (argc <= 1)
@@ -469,6 +491,9 @@
                         sourceEntryPointName = argv[1];
                         bumpArg();
                         break;
+                    } else if (lowerword == "stdin") {
+                        Options |= EOptionStdin;
+                        shaderStageName = argv[1];
                     } else if (lowerword == "suppress-warnings") {
                         Options |= EOptionSuppressWarnings;
                     } else if (lowerword == "target-env") {
@@ -524,6 +549,18 @@
             case 'I':
                 IncludeDirectoryList.push_back(getStringOperand("-I<dir> include path"));
                 break;
+            case 'O':
+                if (argv[0][2] == 'd')
+                    Options |= EOptionOptimizeDisable;
+                else if (argv[0][2] == 's')
+#ifdef ENABLE_OPT
+                    Options |= EOptionOptimizeSize;
+#else
+                    Error("-Os not available; optimizer not linked");
+#endif
+                else
+                    Error("unknown -O option");
+                break;
             case 'S':
                 if (argc <= 1)
                     Error("no <stage> specified for -S");
@@ -549,7 +586,7 @@
                 // This is okay for one compilation unit with one entry point.
                 entryPointName = argv[1];
                 if (argc <= 1)
-                    Error("no <entry-point> provided for -e");
+                    Error("no <name> provided for -e");
                 bumpArg();
                 break;
             case 'g':
@@ -606,6 +643,10 @@
         }
     }
 
+    // Make sure that -S is always specified if --stdin is specified
+    if ((Options & EOptionStdin) && shaderStageName == nullptr)
+        Error("must provide -S when --stdin is given");
+
     // Make sure that -E is not specified alongside linking (which includes SPV generation)
     if ((Options & EOptionOutputPreprocessed) && (Options & EOptionLinkProgram))
         Error("can't use -E when linking is selected");
@@ -654,17 +695,31 @@
 void CompileShaders(glslang::TWorklist& worklist)
 {
     glslang::TWorkItem* workItem;
-    while (worklist.remove(workItem)) {
-        ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options);
+    if (Options & EOptionStdin) {
+        worklist.remove(workItem);
+        ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), Options);
         if (compiler == 0)
             return;
 
-        CompileFile(workItem->name.c_str(), compiler);
+        CompileFile("stdin", compiler);
 
-        if (! (Options & EOptionSuppressInfolog))
-            workItem->results = ShGetInfoLog(compiler);
+            if (! (Options & EOptionSuppressInfolog))
+                workItem->results = ShGetInfoLog(compiler);
 
         ShDestruct(compiler);
+    } else {
+        while (worklist.remove(workItem)) {
+            ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options);
+            if (compiler == 0)
+                return;
+
+            CompileFile(workItem->name.c_str(), compiler);
+
+            if (! (Options & EOptionSuppressInfolog))
+                workItem->results = ShGetInfoLog(compiler);
+
+            ShDestruct(compiler);
+        }
     }
 }
 
@@ -745,18 +800,30 @@
         shader->setStringsWithLengthsAndNames(compUnit.text, NULL, compUnit.fileNameList, compUnit.count);
         if (entryPointName) // HLSL todo: this needs to be tracked per compUnits
             shader->setEntryPoint(entryPointName);
-        if (sourceEntryPointName)
+        if (sourceEntryPointName) {
+            if (entryPointName == nullptr)
+                printf("Warning: Changing source entry point name without setting an entry-point name.\n"
+                       "Use '-e <name>'.\n");
             shader->setSourceEntryPoint(sourceEntryPointName);
+        }
         if (UserPreamble.isSet())
             shader->setPreamble(UserPreamble.get());
         shader->addProcesses(Processes);
 
-        shader->setShiftSamplerBinding(baseSamplerBinding[compUnit.stage]);
-        shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]);
-        shader->setShiftImageBinding(baseImageBinding[compUnit.stage]);
-        shader->setShiftUboBinding(baseUboBinding[compUnit.stage]);
-        shader->setShiftSsboBinding(baseSsboBinding[compUnit.stage]);
-        shader->setShiftUavBinding(baseUavBinding[compUnit.stage]);
+        // Set IO mapper binding shift values
+        for (int r = 0; r < glslang::EResCount; ++r) {
+            const glslang::TResourceType res = glslang::TResourceType(r);
+
+            // Set base bindings
+            shader->setShiftBinding(res, baseBinding[res][compUnit.stage]);
+            
+            // Set bindings for particular resource sets
+            // TODO: use a range based for loop here, when available in all environments.
+            for (auto i = baseBindingForSet[res][compUnit.stage].begin();
+                 i != baseBindingForSet[res][compUnit.stage].end(); ++i)
+                shader->setShiftBindingForSet(res, i->first, i->second);
+        }
+
         shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
         shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
         shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]);
@@ -860,6 +927,8 @@
                     glslang::SpvOptions spvOptions;
                     if (Options & EOptionDebug)
                         spvOptions.generateDebugInfo = true;
+                    spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0;
+                    spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0;
                     glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions);
 
                     // Dump the spv to a file or stdout, etc., but only if not doing
@@ -908,19 +977,32 @@
 {
     std::vector<ShaderCompUnit> compUnits;
 
-    // Transfer all the work items from to a simple list of
-    // of compilation units.  (We don't care about the thread
-    // work-item distribution properties in this path, which
-    // is okay due to the limited number of shaders, know since
-    // they are all getting linked together.)
-    glslang::TWorkItem* workItem;
-    while (Worklist.remove(workItem)) {
-        ShaderCompUnit compUnit(FindLanguage(workItem->name));
-        char* fileText = ReadFileData(workItem->name.c_str());
-        if (fileText == nullptr)
-            usage();
-        compUnit.addString(workItem->name, fileText);
+    // If this is using stdin, we can't really detect multiple different file
+    // units by input type. We need to assume that we're just being given one
+    // file of a certain type.
+    if ((Options & EOptionStdin) != 0) {
+        ShaderCompUnit compUnit(FindLanguage("stdin"));
+        std::istreambuf_iterator<char> begin(std::cin), end;
+        std::string tempString(begin, end);
+        char* fileText = strdup(tempString.c_str());
+        std::string fileName = "stdin";
+        compUnit.addString(fileName, fileText);
         compUnits.push_back(compUnit);
+    } else {
+        // Transfer all the work items from to a simple list of
+        // of compilation units.  (We don't care about the thread
+        // work-item distribution properties in this path, which
+        // is okay due to the limited number of shaders, know since
+        // they are all getting linked together.)
+        glslang::TWorkItem* workItem;
+        while (Worklist.remove(workItem)) {
+            ShaderCompUnit compUnit(FindLanguage(workItem->name));
+            char* fileText = ReadFileData(workItem->name.c_str());
+            if (fileText == nullptr)
+                usage();
+            compUnit.addString(workItem->name, fileText);
+            compUnits.push_back(compUnit);
+        }
     }
 
     // Actual call to programmatic processing of compile and link,
@@ -973,10 +1055,15 @@
             return ESuccess;
     }
 
-    if (workList.empty()) {
+    if (workList.empty() && ((Options & EOptionStdin) == 0)) {
         usage();
     }
 
+    if (Options & EOptionStdin) {
+        workItems.push_back(std::unique_ptr<glslang::TWorkItem>{new glslang::TWorkItem("stdin")});
+        workList.add(workItems.back().get());
+    }
+
     ProcessConfigFile();
 
     //
@@ -1087,7 +1174,14 @@
 void CompileFile(const char* fileName, ShHandle compiler)
 {
     int ret = 0;
-    char* shaderString = ReadFileData(fileName);
+    char* shaderString;
+    if ((Options & EOptionStdin) != 0) {
+        std::istreambuf_iterator<char> begin(std::cin), end;
+        std::string tempString(begin, end);
+        shaderString = strdup(tempString.c_str());
+    } else {
+        shaderString = ReadFileData(fileName);
+    }
 
     // move to length-based strings, rather than null-terminated strings
     int* lengths = new int[1];
@@ -1154,6 +1248,8 @@
            "  -H          print human readable form of SPIR-V; turns on -V\n"
            "  -I<dir>     add dir to the include search path; includer's directory\n"
            "              is searched first, followed by left-to-right order of -I\n"
+           "  -Od         disables optimization. May cause illegal SPIR-V for HLSL.\n"
+           "  -Os         optimizes SPIR-V to minimize size.\n"
            "  -S <stage>  uses specified stage rather than parsing the file extension\n"
            "              choices for <stage> are vert, tesc, tese, geom, frag, or comp\n"
            "  -U<macro>   undefine a pre-processor macro\n"
@@ -1167,13 +1263,13 @@
            "              creates the default configuration file (redirect to a .conf file)\n"
            "  -d          default to desktop (#version 110) when there is no shader #version\n"
            "              (default is ES version 100)\n"
-           "  -e          specify entry-point name\n"
+           "  -e <name>   specify <name> as the entry-point name\n"
            "  -g          generate debug information\n"
            "  -h          print this usage message\n"
            "  -i          intermediate tree (glslang AST) is printed out\n"
            "  -l          link all input files together to form a single module\n"
            "  -m          memory leak mode\n"
-           "  -o  <file>  save binary to <file>, requires a binary option (e.g., -V)\n"
+           "  -o <file>   save binary to <file>, requires a binary option (e.g., -V)\n"
            "  -q          dump reflection query database\n"
            "  -r          synonym for --relaxed-errors\n"
            "  -s          silent mode\n"
@@ -1205,21 +1301,31 @@
            "              Set descriptor set for all resources\n"
            "  --rsb [stage] type set binding       synonym for --resource-set-binding\n"
            "  --shift-image-binding [stage] num    base binding number for images (uav)\n"
+           "  --shift-image-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --sib [stage] num                    synonym for --shift-image-binding\n"
            "  --shift-sampler-binding [stage] num  base binding number for samplers\n"
+           "  --shift-sampler-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --ssb [stage] num                    synonym for --shift-sampler-binding\n"
            "  --shift-ssbo-binding [stage] num     base binding number for SSBOs\n"
+           "  --shift-ssbo-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --sbb [stage] num                    synonym for --shift-ssbo-binding\n"
            "  --shift-texture-binding [stage] num  base binding number for textures\n"
+           "  --shift-texture-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --stb [stage] num                    synonym for --shift-texture-binding\n"
            "  --shift-uav-binding [stage] num      base binding number for UAVs\n"
+           "  --shift-uav-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --suavb [stage] num                  synonym for --shift-uav-binding\n"
            "  --shift-UBO-binding [stage] num      base binding number for UBOs\n"
+           "  --shift-UBO-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --shift-cbuffer-binding [stage] num  synonym for --shift-UBO-binding\n"
+           "  --shift-cbuffer-binding [stage] [set num]... per-descriptor-set shift values\n"
            "  --sub [stage] num                    synonym for --shift-UBO-binding\n"
-           "  --source-entrypoint name             the given shader source function is\n"
-           "                                       renamed to be the entry point given in -e\n"
+           "  --source-entrypoint <name>           the given shader source function is\n"
+           "                                       renamed to be the <name> given in -e\n"
            "  --sep                                synonym for --source-entrypoint\n"
+           "  --stdin                              Read from stdin instead of from a file.\n"
+           "                                       You'll have to provide the shader stage\n"
+           "                                       using -S.\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"
diff --git a/Test/100samplerExternal.frag b/Test/100samplerExternal.frag
new file mode 100644
index 0000000..9f6f397
--- /dev/null
+++ b/Test/100samplerExternal.frag
@@ -0,0 +1,41 @@
+#version 100

+

+#extension GL_OES_EGL_image_external : enable

+

+uniform samplerExternalOES sExt;

+precision mediump samplerExternalOES;

+uniform samplerExternalOES mediumExt;

+uniform highp samplerExternalOES highExt;

+

+void main()

+{

+    texture2D(sExt, vec2(0.2));

+    texture2D(mediumExt, vec2(0.2));

+    texture2D(highExt, vec2(0.2));

+    texture2DProj(sExt, vec3(0.3));

+    texture2DProj(sExt, vec4(0.3));

+

+    int lod = 0;

+    highp float bias = 0.01;

+    textureSize(sExt, lod);  // ERROR

+    texture(sExt, vec2(0.2));  // ERROR

+    texture(sExt, vec2(0.2), bias);  // ERROR

+    textureProj(sExt, vec3(0.2));  // ERROR

+    textureProj(sExt, vec3(0.2), bias);  // ERROR

+    textureProj(sExt, vec4(0.2));  // ERROR

+    textureProj(sExt, vec4(0.2), bias);  // ERROR

+    texelFetch(sExt, ivec2(4), lod);  // ERROR

+

+    texture3D(sExt, vec3(0.3));  // ERROR

+    texture2DProjLod(sExt, vec3(0.3), 0.3);  // ERROR

+    texture(sExt, vec3(0.3));  // ERROR

+    textureProjLod(sExt, vec3(0.3), 0.3);  // ERROR

+}

+

+#extension GL_OES_EGL_image_external : disable

+

+#extension GL_OES_EGL_image_external_essl3 : enable

+uniform samplerExternalOES badExt;  // ERROR

+#extension GL_OES_EGL_image_external_essl3 : disable

+

+uniform samplerExternalOES badExt;  // ERROR

diff --git a/Test/300samplerExternal.frag b/Test/300samplerExternal.frag
new file mode 100644
index 0000000..3724f8e
--- /dev/null
+++ b/Test/300samplerExternal.frag
@@ -0,0 +1,41 @@
+#version 300 es

+

+#extension GL_OES_EGL_image_external_essl3 : enable

+

+uniform samplerExternalOES sExt;

+precision mediump samplerExternalOES;

+uniform samplerExternalOES mediumExt;

+uniform highp samplerExternalOES highExt;

+

+void main()

+{

+    texture2D(sExt, vec2(0.2));  // ERROR

+    texture2D(mediumExt, vec2(0.2));  // ERROR

+    texture2D(highExt, vec2(0.2));  // ERROR

+    texture2DProj(sExt, vec3(0.3));  // ERROR

+    texture2DProj(sExt, vec4(0.3));  // ERROR

+

+    int lod = 0;

+    highp float bias = 0.01;

+    textureSize(sExt, lod);

+    texture(sExt, vec2(0.2));

+    texture(sExt, vec2(0.2), bias);

+    textureProj(sExt, vec3(0.2));

+    textureProj(sExt, vec3(0.2), bias);

+    textureProj(sExt, vec4(0.2));

+    textureProj(sExt, vec4(0.2), bias);

+    texelFetch(sExt, ivec2(4), lod);

+

+    texture3D(sExt, vec3(0.3));  // ERROR

+    texture2DProjLod(sExt, vec3(0.3), 0.3);  // ERROR

+    texture(sExt, vec3(0.3));  // ERROR

+    textureProjLod(sExt, vec3(0.3), 0.3);  // ERROR

+}

+

+#extension GL_OES_EGL_image_external_essl3 : disable

+

+#extension GL_OES_EGL_image_external : enable

+uniform samplerExternalOES badExt;  // ERROR

+#extension GL_OES_EGL_image_external : disable

+

+uniform samplerExternalOES badExt;  // ERROR

diff --git a/Test/baseLegalResults/hlsl.aliasOpaque.frag.out b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out
new file mode 100644
index 0000000..779d5e1
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out
@@ -0,0 +1,50 @@
+hlsl.aliasOpaque.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 81
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 57
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 37  "gss2"
+                              Name 39  "gss"
+                              Name 43  "gtex"
+                              Name 57  "@entryPointOutput"
+                              Decorate 37(gss2) DescriptorSet 0
+                              Decorate 39(gss) DescriptorSet 0
+                              Decorate 43(gtex) DescriptorSet 0
+                              Decorate 57(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeSampler
+               8:             TypeFloat 32
+              10:             TypeImage 8(float) 2D sampled format:Unknown
+              12:             TypeVector 8(float) 4
+              25:             TypeSampledImage 10
+              27:             TypeVector 8(float) 2
+              28:    8(float) Constant 1045220557
+              29:    8(float) Constant 1050253722
+              30:   27(fvec2) ConstantComposite 28 29
+              36:             TypePointer UniformConstant 6
+        37(gss2):     36(ptr) Variable UniformConstant
+         39(gss):     36(ptr) Variable UniformConstant
+              42:             TypePointer UniformConstant 10
+        43(gtex):     42(ptr) Variable UniformConstant
+              46:    8(float) Constant 1077936128
+              56:             TypePointer Output 12(fvec4)
+57(@entryPointOutput):     56(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              68:           6 Load 39(gss)
+              69:          10 Load 43(gtex)
+              78:          25 SampledImage 69 68
+              79:   12(fvec4) ImageSampleImplicitLod 78 30
+              80:   12(fvec4) VectorTimesScalar 79 46
+                              Store 57(@entryPointOutput) 80
+                              Return
+                              FunctionEnd
diff --git a/Test/baseLegalResults/hlsl.flattenOpaque.frag.out b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out
new file mode 100644
index 0000000..3c7d198
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out
@@ -0,0 +1,65 @@
+hlsl.flattenOpaque.frag
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 144
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 97
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 38  "tex"
+                              Name 70  "s.s2D"
+                              Name 79  "s2.s2D"
+                              Name 80  "s2.tex"
+                              Name 97  "@entryPointOutput"
+                              Decorate 38(tex) DescriptorSet 0
+                              Decorate 70(s.s2D) DescriptorSet 0
+                              Decorate 79(s2.s2D) DescriptorSet 0
+                              Decorate 80(s2.tex) DescriptorSet 0
+                              Decorate 97(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeSampler
+               8:             TypeFloat 32
+               9:             TypeVector 8(float) 4
+              14:             TypeVector 8(float) 2
+              21:             TypeImage 8(float) 2D sampled format:Unknown
+              37:             TypePointer UniformConstant 21
+         38(tex):     37(ptr) Variable UniformConstant
+              41:             TypeSampledImage 21
+              43:    8(float) Constant 1045220557
+              44:    8(float) Constant 1050253722
+              45:   14(fvec2) ConstantComposite 43 44
+              69:             TypePointer UniformConstant 6
+       70(s.s2D):     69(ptr) Variable UniformConstant
+      79(s2.s2D):     69(ptr) Variable UniformConstant
+      80(s2.tex):     37(ptr) Variable UniformConstant
+              96:             TypePointer Output 9(fvec4)
+97(@entryPointOutput):     96(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+             109:           6 Load 70(s.s2D)
+             123:          21 Load 38(tex)
+             125:          41 SampledImage 123 109
+             126:    9(fvec4) ImageSampleImplicitLod 125 45
+             111:           6 Load 70(s.s2D)
+             128:          21 Load 38(tex)
+             130:          41 SampledImage 128 111
+             132:    9(fvec4) ImageSampleImplicitLod 130 45
+             113:    9(fvec4) FAdd 126 132
+             114:           6 Load 79(s2.s2D)
+             115:          21 Load 80(s2.tex)
+             136:          41 SampledImage 115 114
+             137:    9(fvec4) ImageSampleImplicitLod 136 45
+             117:    9(fvec4) FAdd 113 137
+             118:           6 Load 79(s2.s2D)
+             119:          21 Load 80(s2.tex)
+             141:          41 SampledImage 119 118
+             143:    9(fvec4) ImageSampleImplicitLod 141 45
+             121:    9(fvec4) FAdd 117 143
+                              Store 97(@entryPointOutput) 121
+                              Return
+                              FunctionEnd
diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out
new file mode 100644
index 0000000..4aef874
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out
@@ -0,0 +1,49 @@
+hlsl.flattenOpaqueInit.vert
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 125
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 82
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 17  "FxaaTex"
+                              MemberName 17(FxaaTex) 0  "smpl"
+                              MemberName 17(FxaaTex) 1  "tex"
+                              Name 38  "g_tInputTexture_sampler"
+                              Name 42  "g_tInputTexture"
+                              Name 82  "@entryPointOutput"
+                              Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
+                              Decorate 42(g_tInputTexture) DescriptorSet 0
+                              Decorate 82(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeSampler
+               8:             TypeFloat 32
+               9:             TypeImage 8(float) 2D sampled format:Unknown
+              11:             TypeVector 8(float) 4
+     17(FxaaTex):             TypeStruct 6 9
+              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
+              37:             TypePointer UniformConstant 6
+38(g_tInputTexture_sampler):     37(ptr) Variable UniformConstant
+              41:             TypePointer UniformConstant 9
+42(g_tInputTexture):     41(ptr) Variable UniformConstant
+              81:             TypePointer Output 11(fvec4)
+82(@entryPointOutput):     81(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              96:           6 Load 38(g_tInputTexture_sampler)
+              97:           9 Load 42(g_tInputTexture)
+             123:          26 SampledImage 97 96
+             124:   11(fvec4) ImageSampleExplicitLod 123 31 Lod 32
+                              Store 82(@entryPointOutput) 124
+                              Return
+                              FunctionEnd
diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out
new file mode 100644
index 0000000..0b05615
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out
@@ -0,0 +1,49 @@
+hlsl.flattenOpaqueInitMix.vert
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 100
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 68
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 34  "FxaaTex"
+                              MemberName 34(FxaaTex) 0  "smpl"
+                              MemberName 34(FxaaTex) 1  "tex"
+                              MemberName 34(FxaaTex) 2  "f"
+                              Name 38  "g_tInputTexture_sampler"
+                              Name 41  "g_tInputTexture"
+                              Name 68  "@entryPointOutput"
+                              Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
+                              Decorate 41(g_tInputTexture) DescriptorSet 0
+                              Decorate 68(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeSampler
+               8:             TypeFloat 32
+               9:             TypeImage 8(float) 2D sampled format:Unknown
+              12:             TypeVector 8(float) 4
+              24:             TypeSampledImage 9
+              28:             TypeVector 8(float) 2
+              30:    8(float) Constant 0
+     34(FxaaTex):             TypeStruct 6 9 8(float)
+              37:             TypePointer UniformConstant 6
+38(g_tInputTexture_sampler):     37(ptr) Variable UniformConstant
+              40:             TypePointer UniformConstant 9
+41(g_tInputTexture):     40(ptr) Variable UniformConstant
+              43:    8(float) Constant 1056964608
+              67:             TypePointer Output 12(fvec4)
+68(@entryPointOutput):     67(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              79:           6 Load 38(g_tInputTexture_sampler)
+              80:           9 Load 41(g_tInputTexture)
+              95:          24 SampledImage 80 79
+              98:   28(fvec2) CompositeConstruct 43 43
+              99:   12(fvec4) ImageSampleExplicitLod 95 98 Lod 30
+                              Store 68(@entryPointOutput) 99
+                              Return
+                              FunctionEnd
diff --git a/Test/baseLegalResults/hlsl.flattenSubset.frag.out b/Test/baseLegalResults/hlsl.flattenSubset.frag.out
new file mode 100755
index 0000000..20aedec
--- /dev/null
+++ b/Test/baseLegalResults/hlsl.flattenSubset.frag.out
@@ -0,0 +1,48 @@
+hlsl.flattenSubset.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 85
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 54 57
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 17  "samp"
+                              Name 41  "tex"
+                              Name 54  "vpos"
+                              Name 57  "@entryPointOutput"
+                              Decorate 17(samp) DescriptorSet 0
+                              Decorate 41(tex) DescriptorSet 0
+                              Decorate 54(vpos) Location 0
+                              Decorate 57(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+              13:             TypeSampler
+              16:             TypePointer UniformConstant 13
+        17(samp):     16(ptr) Variable UniformConstant
+              39:             TypeImage 6(float) 2D sampled format:Unknown
+              40:             TypePointer UniformConstant 39
+         41(tex):     40(ptr) Variable UniformConstant
+              44:             TypeSampledImage 39
+              46:             TypeVector 6(float) 2
+              47:    6(float) Constant 1056964608
+              48:   46(fvec2) ConstantComposite 47 47
+              53:             TypePointer Input 7(fvec4)
+        54(vpos):     53(ptr) Variable Input
+              56:             TypePointer Output 7(fvec4)
+57(@entryPointOutput):     56(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              74:          13 Load 17(samp)
+              81:          39 Load 41(tex)
+              83:          44 SampledImage 81 74
+              84:    7(fvec4) ImageSampleImplicitLod 83 48
+                              Store 57(@entryPointOutput) 84
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/100samplerExternal.frag.out b/Test/baseResults/100samplerExternal.frag.out
new file mode 100644
index 0000000..8b689c7
--- /dev/null
+++ b/Test/baseResults/100samplerExternal.frag.out
@@ -0,0 +1,172 @@
+100samplerExternal.frag
+ERROR: 0:20: 'textureSize' : no matching overloaded function found 
+ERROR: 0:21: 'texture' : no matching overloaded function found 
+ERROR: 0:22: 'texture' : no matching overloaded function found 
+ERROR: 0:23: 'textureProj' : no matching overloaded function found 
+ERROR: 0:24: 'textureProj' : no matching overloaded function found 
+ERROR: 0:25: 'textureProj' : no matching overloaded function found 
+ERROR: 0:26: 'textureProj' : no matching overloaded function found 
+ERROR: 0:27: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:29: 'texture3D' : no matching overloaded function found 
+ERROR: 0:30: 'texture2DProjLod' : no matching overloaded function found 
+ERROR: 0:31: 'texture' : no matching overloaded function found 
+ERROR: 0:32: 'textureProjLod' : no matching overloaded function found 
+ERROR: 0:38: 'samplerExternalOES' : required extension not requested: GL_OES_EGL_image_external
+ERROR: 0:41: '' :  syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
+ERROR: 14 compilation errors.  No code generated.
+
+
+Shader version: 100
+Requested GL_OES_EGL_image_external
+Requested GL_OES_EGL_image_external_essl3
+ERROR: node is still EOpNull!
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      texture ( global lowp 4-component vector of float)
+0:12        'sExt' ( uniform lowp samplerExternalOES)
+0:12        Constant:
+0:12          0.200000
+0:12          0.200000
+0:13      texture ( global mediump 4-component vector of float)
+0:13        'mediumExt' ( uniform mediump samplerExternalOES)
+0:13        Constant:
+0:13          0.200000
+0:13          0.200000
+0:14      texture ( global highp 4-component vector of float)
+0:14        'highExt' ( uniform highp samplerExternalOES)
+0:14        Constant:
+0:14          0.200000
+0:14          0.200000
+0:15      textureProj ( global lowp 4-component vector of float)
+0:15        'sExt' ( uniform lowp samplerExternalOES)
+0:15        Constant:
+0:15          0.300000
+0:15          0.300000
+0:15          0.300000
+0:16      textureProj ( global lowp 4-component vector of float)
+0:16        'sExt' ( uniform lowp samplerExternalOES)
+0:16        Constant:
+0:16          0.300000
+0:16          0.300000
+0:16          0.300000
+0:16          0.300000
+0:18      Sequence
+0:18        move second child to first child ( temp mediump int)
+0:18          'lod' ( temp mediump int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      Sequence
+0:19        move second child to first child ( temp highp float)
+0:19          'bias' ( temp highp float)
+0:19          Constant:
+0:19            0.010000
+0:20      Constant:
+0:20        0.000000
+0:21      Constant:
+0:21        0.000000
+0:22      Constant:
+0:22        0.000000
+0:23      Constant:
+0:23        0.000000
+0:24      Constant:
+0:24        0.000000
+0:25      Constant:
+0:25        0.000000
+0:26      Constant:
+0:26        0.000000
+0:27      Constant:
+0:27        0.000000
+0:29      Constant:
+0:29        0.000000
+0:30      Constant:
+0:30        0.000000
+0:31      Constant:
+0:31        0.000000
+0:32      Constant:
+0:32        0.000000
+0:?   Linker Objects
+0:?     'sExt' ( uniform lowp samplerExternalOES)
+0:?     'mediumExt' ( uniform mediump samplerExternalOES)
+0:?     'highExt' ( uniform highp samplerExternalOES)
+0:?     'badExt' ( uniform mediump samplerExternalOES)
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+Requested GL_OES_EGL_image_external
+Requested GL_OES_EGL_image_external_essl3
+ERROR: node is still EOpNull!
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      texture ( global lowp 4-component vector of float)
+0:12        'sExt' ( uniform lowp samplerExternalOES)
+0:12        Constant:
+0:12          0.200000
+0:12          0.200000
+0:13      texture ( global mediump 4-component vector of float)
+0:13        'mediumExt' ( uniform mediump samplerExternalOES)
+0:13        Constant:
+0:13          0.200000
+0:13          0.200000
+0:14      texture ( global highp 4-component vector of float)
+0:14        'highExt' ( uniform highp samplerExternalOES)
+0:14        Constant:
+0:14          0.200000
+0:14          0.200000
+0:15      textureProj ( global lowp 4-component vector of float)
+0:15        'sExt' ( uniform lowp samplerExternalOES)
+0:15        Constant:
+0:15          0.300000
+0:15          0.300000
+0:15          0.300000
+0:16      textureProj ( global lowp 4-component vector of float)
+0:16        'sExt' ( uniform lowp samplerExternalOES)
+0:16        Constant:
+0:16          0.300000
+0:16          0.300000
+0:16          0.300000
+0:16          0.300000
+0:18      Sequence
+0:18        move second child to first child ( temp mediump int)
+0:18          'lod' ( temp mediump int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      Sequence
+0:19        move second child to first child ( temp highp float)
+0:19          'bias' ( temp highp float)
+0:19          Constant:
+0:19            0.010000
+0:20      Constant:
+0:20        0.000000
+0:21      Constant:
+0:21        0.000000
+0:22      Constant:
+0:22        0.000000
+0:23      Constant:
+0:23        0.000000
+0:24      Constant:
+0:24        0.000000
+0:25      Constant:
+0:25        0.000000
+0:26      Constant:
+0:26        0.000000
+0:27      Constant:
+0:27        0.000000
+0:29      Constant:
+0:29        0.000000
+0:30      Constant:
+0:30        0.000000
+0:31      Constant:
+0:31        0.000000
+0:32      Constant:
+0:32        0.000000
+0:?   Linker Objects
+0:?     'sExt' ( uniform lowp samplerExternalOES)
+0:?     'mediumExt' ( uniform mediump samplerExternalOES)
+0:?     'highExt' ( uniform highp samplerExternalOES)
+0:?     'badExt' ( uniform mediump samplerExternalOES)
+
diff --git a/Test/baseResults/150.tesc.out b/Test/baseResults/150.tesc.out
index 5cc9e80..25e44ed 100644
--- a/Test/baseResults/150.tesc.out
+++ b/Test/baseResults/150.tesc.out
@@ -754,7 +754,7 @@
 ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments 
 ERROR: 0:29: '=' :  cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
 ERROR: 0:30: 'initializer list' : wrong number of matrix columns:  temp 4X2 matrix of float
-ERROR: 0:40: 'constructor' :  cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s,  global float t}'
+ERROR: 0:40: 'constructor' :  cannot convert parameter 1 from ' const structure{ global 4-component vector of float a,  global 4-component vector of float b}' to ' temp structure{ global float s,  global float t}'
 ERROR: 0:70: 'initializer list' : wrong number of structure members 
 ERROR: 13 compilation errors.  No code generated.
 
diff --git a/Test/baseResults/300samplerExternal.frag.out b/Test/baseResults/300samplerExternal.frag.out
new file mode 100644
index 0000000..9074552
--- /dev/null
+++ b/Test/baseResults/300samplerExternal.frag.out
@@ -0,0 +1,197 @@
+300samplerExternal.frag
+ERROR: 0:12: 'texture2D' : no matching overloaded function found 
+ERROR: 0:13: 'texture2D' : no matching overloaded function found 
+ERROR: 0:14: 'texture2D' : no matching overloaded function found 
+ERROR: 0:15: 'texture2DProj' : no matching overloaded function found 
+ERROR: 0:16: 'texture2DProj' : no matching overloaded function found 
+ERROR: 0:29: 'texture3D' : no matching overloaded function found 
+ERROR: 0:30: 'texture2DProjLod' : no matching overloaded function found 
+ERROR: 0:31: 'texture' : no matching overloaded function found 
+ERROR: 0:32: 'textureProjLod' : no matching overloaded function found 
+ERROR: 0:38: 'samplerExternalOES' : required extension not requested: GL_OES_EGL_image_external_essl3
+ERROR: 0:41: '' :  syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
+ERROR: 11 compilation errors.  No code generated.
+
+
+Shader version: 300
+Requested GL_OES_EGL_image_external
+Requested GL_OES_EGL_image_external_essl3
+ERROR: node is still EOpNull!
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      Constant:
+0:12        0.000000
+0:13      Constant:
+0:13        0.000000
+0:14      Constant:
+0:14        0.000000
+0:15      Constant:
+0:15        0.000000
+0:16      Constant:
+0:16        0.000000
+0:18      Sequence
+0:18        move second child to first child ( temp mediump int)
+0:18          'lod' ( temp mediump int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      Sequence
+0:19        move second child to first child ( temp highp float)
+0:19          'bias' ( temp highp float)
+0:19          Constant:
+0:19            0.010000
+0:20      textureSize ( global highp 2-component vector of int, operation at mediump)
+0:20        'sExt' ( uniform lowp samplerExternalOES)
+0:20        'lod' ( temp mediump int)
+0:21      texture ( global lowp 4-component vector of float)
+0:21        'sExt' ( uniform lowp samplerExternalOES)
+0:21        Constant:
+0:21          0.200000
+0:21          0.200000
+0:22      texture ( global lowp 4-component vector of float, operation at highp)
+0:22        'sExt' ( uniform lowp samplerExternalOES)
+0:22        Constant:
+0:22          0.200000
+0:22          0.200000
+0:22        'bias' ( temp highp float)
+0:23      textureProj ( global lowp 4-component vector of float)
+0:23        'sExt' ( uniform lowp samplerExternalOES)
+0:23        Constant:
+0:23          0.200000
+0:23          0.200000
+0:23          0.200000
+0:24      textureProj ( global lowp 4-component vector of float, operation at highp)
+0:24        'sExt' ( uniform lowp samplerExternalOES)
+0:24        Constant:
+0:24          0.200000
+0:24          0.200000
+0:24          0.200000
+0:24        'bias' ( temp highp float)
+0:25      textureProj ( global lowp 4-component vector of float)
+0:25        'sExt' ( uniform lowp samplerExternalOES)
+0:25        Constant:
+0:25          0.200000
+0:25          0.200000
+0:25          0.200000
+0:25          0.200000
+0:26      textureProj ( global lowp 4-component vector of float, operation at highp)
+0:26        'sExt' ( uniform lowp samplerExternalOES)
+0:26        Constant:
+0:26          0.200000
+0:26          0.200000
+0:26          0.200000
+0:26          0.200000
+0:26        'bias' ( temp highp float)
+0:27      textureFetch ( global lowp 4-component vector of float, operation at mediump)
+0:27        'sExt' ( uniform lowp samplerExternalOES)
+0:27        Constant:
+0:27          4 (const int)
+0:27          4 (const int)
+0:27        'lod' ( temp mediump int)
+0:29      Constant:
+0:29        0.000000
+0:30      Constant:
+0:30        0.000000
+0:31      Constant:
+0:31        0.000000
+0:32      Constant:
+0:32        0.000000
+0:?   Linker Objects
+0:?     'sExt' ( uniform lowp samplerExternalOES)
+0:?     'mediumExt' ( uniform mediump samplerExternalOES)
+0:?     'highExt' ( uniform highp samplerExternalOES)
+0:?     'badExt' ( uniform mediump samplerExternalOES)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+Requested GL_OES_EGL_image_external
+Requested GL_OES_EGL_image_external_essl3
+ERROR: node is still EOpNull!
+0:10  Function Definition: main( ( global void)
+0:10    Function Parameters: 
+0:12    Sequence
+0:12      Constant:
+0:12        0.000000
+0:13      Constant:
+0:13        0.000000
+0:14      Constant:
+0:14        0.000000
+0:15      Constant:
+0:15        0.000000
+0:16      Constant:
+0:16        0.000000
+0:18      Sequence
+0:18        move second child to first child ( temp mediump int)
+0:18          'lod' ( temp mediump int)
+0:18          Constant:
+0:18            0 (const int)
+0:19      Sequence
+0:19        move second child to first child ( temp highp float)
+0:19          'bias' ( temp highp float)
+0:19          Constant:
+0:19            0.010000
+0:20      textureSize ( global highp 2-component vector of int, operation at mediump)
+0:20        'sExt' ( uniform lowp samplerExternalOES)
+0:20        'lod' ( temp mediump int)
+0:21      texture ( global lowp 4-component vector of float)
+0:21        'sExt' ( uniform lowp samplerExternalOES)
+0:21        Constant:
+0:21          0.200000
+0:21          0.200000
+0:22      texture ( global lowp 4-component vector of float, operation at highp)
+0:22        'sExt' ( uniform lowp samplerExternalOES)
+0:22        Constant:
+0:22          0.200000
+0:22          0.200000
+0:22        'bias' ( temp highp float)
+0:23      textureProj ( global lowp 4-component vector of float)
+0:23        'sExt' ( uniform lowp samplerExternalOES)
+0:23        Constant:
+0:23          0.200000
+0:23          0.200000
+0:23          0.200000
+0:24      textureProj ( global lowp 4-component vector of float, operation at highp)
+0:24        'sExt' ( uniform lowp samplerExternalOES)
+0:24        Constant:
+0:24          0.200000
+0:24          0.200000
+0:24          0.200000
+0:24        'bias' ( temp highp float)
+0:25      textureProj ( global lowp 4-component vector of float)
+0:25        'sExt' ( uniform lowp samplerExternalOES)
+0:25        Constant:
+0:25          0.200000
+0:25          0.200000
+0:25          0.200000
+0:25          0.200000
+0:26      textureProj ( global lowp 4-component vector of float, operation at highp)
+0:26        'sExt' ( uniform lowp samplerExternalOES)
+0:26        Constant:
+0:26          0.200000
+0:26          0.200000
+0:26          0.200000
+0:26          0.200000
+0:26        'bias' ( temp highp float)
+0:27      textureFetch ( global lowp 4-component vector of float, operation at mediump)
+0:27        'sExt' ( uniform lowp samplerExternalOES)
+0:27        Constant:
+0:27          4 (const int)
+0:27          4 (const int)
+0:27        'lod' ( temp mediump int)
+0:29      Constant:
+0:29        0.000000
+0:30      Constant:
+0:30        0.000000
+0:31      Constant:
+0:31        0.000000
+0:32      Constant:
+0:32        0.000000
+0:?   Linker Objects
+0:?     'sExt' ( uniform lowp samplerExternalOES)
+0:?     'mediumExt' ( uniform mediump samplerExternalOES)
+0:?     'highExt' ( uniform highp samplerExternalOES)
+0:?     'badExt' ( uniform mediump samplerExternalOES)
+
diff --git a/Test/baseResults/420.tese.out b/Test/baseResults/420.tese.out
index 66d41e5..f14e1c0 100644
--- a/Test/baseResults/420.tese.out
+++ b/Test/baseResults/420.tese.out
@@ -10,7 +10,7 @@
 ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments 
 ERROR: 0:29: '=' :  cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
 ERROR: 0:30: 'initializer list' : wrong number of matrix columns:  temp 4X2 matrix of float
-ERROR: 0:40: 'constructor' :  cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s,  global float t}'
+ERROR: 0:40: 'constructor' :  cannot convert parameter 1 from ' const structure{ global 4-component vector of float a,  global 4-component vector of float b}' to ' temp structure{ global float s,  global float t}'
 ERROR: 0:70: 'initializer list' : wrong number of structure members 
 ERROR: 13 compilation errors.  No code generated.
 
diff --git a/Test/baseResults/cppDeepNest.frag.out b/Test/baseResults/cppDeepNest.frag.out
new file mode 100755
index 0000000..969a256
--- /dev/null
+++ b/Test/baseResults/cppDeepNest.frag.out
@@ -0,0 +1,20 @@
+cppDeepNest.frag
+ERROR: 0:66: '#if/#ifdef/#ifndef' : maximum nesting depth exceeded 
+ERROR: 0:66: '' : missing #endif 
+ERROR: 0:66: '' :  syntax error, unexpected $end
+ERROR: 3 compilation errors.  No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:?   Linker Objects
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:?   Linker Objects
+
diff --git a/Test/baseResults/cppIntMinOverNegativeOne.frag.out b/Test/baseResults/cppIntMinOverNegativeOne.frag.out
new file mode 100644
index 0000000..5dce7c3
--- /dev/null
+++ b/Test/baseResults/cppIntMinOverNegativeOne.frag.out
@@ -0,0 +1,14 @@
+cppIntMinOverNegativeOne.frag
+Shader version: 100
+0:? Sequence
+0:?   Linker Objects
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
+
+Shader version: 100
+0:? Sequence
+0:?   Linker Objects
+
diff --git a/Test/baseResults/glsl.entryPointRename.vert.bad.out b/Test/baseResults/glsl.entryPointRename.vert.bad.out
new file mode 100644
index 0000000..6f4c9ae
--- /dev/null
+++ b/Test/baseResults/glsl.entryPointRename.vert.bad.out
@@ -0,0 +1,45 @@
+glsl.entryPointRename.vert
+ERROR: Source entry point must be "main"
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 20
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "foo" 13
+                              Source GLSL 460
+                              Name 4  "foo"
+                              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 13  ""
+                              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
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 1
+              10:             TypeArray 6(float) 9
+11(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 10 10
+              12:             TypePointer Output 11(gl_PerVertex)
+              13:     12(ptr) Variable Output
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:    6(float) Constant 1065353216
+              17:    7(fvec4) ConstantComposite 16 16 16 16
+              18:             TypePointer Output 7(fvec4)
+          4(foo):           2 Function None 3
+               5:             Label
+              19:     18(ptr) AccessChain 13 15
+                              Store 19 17
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/glsl.entryPointRename.vert.out b/Test/baseResults/glsl.entryPointRename.vert.out
new file mode 100644
index 0000000..7cc825b
--- /dev/null
+++ b/Test/baseResults/glsl.entryPointRename.vert.out
@@ -0,0 +1,43 @@
+glsl.entryPointRename.vert
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 20
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "foo" 13
+                              Source GLSL 460
+                              Name 4  "foo"
+                              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 13  ""
+                              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
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeInt 32 0
+               9:      8(int) Constant 1
+              10:             TypeArray 6(float) 9
+11(gl_PerVertex):             TypeStruct 7(fvec4) 6(float) 10 10
+              12:             TypePointer Output 11(gl_PerVertex)
+              13:     12(ptr) Variable Output
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:    6(float) Constant 1065353216
+              17:    7(fvec4) ConstantComposite 16 16 16 16
+              18:             TypePointer Output 7(fvec4)
+          4(foo):           2 Function None 3
+               5:             Label
+              19:     18(ptr) AccessChain 13 15
+                              Store 19 17
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/glsl.entryPointRename2.vert.out b/Test/baseResults/glsl.entryPointRename2.vert.out
new file mode 100644
index 0000000..aebd86b
--- /dev/null
+++ b/Test/baseResults/glsl.entryPointRename2.vert.out
@@ -0,0 +1,4 @@
+glsl.entryPointRename2.vert
+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/glspv.version.frag.out b/Test/baseResults/glspv.version.frag.out
index 3e8e8c4..30eb445 100755
--- a/Test/baseResults/glspv.version.frag.out
+++ b/Test/baseResults/glspv.version.frag.out
@@ -2,7 +2,7 @@
 ERROR: #version: compilation for SPIR-V does not support the compatibility profile
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 6
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.aliasOpaque.frag.out b/Test/baseResults/hlsl.aliasOpaque.frag.out
index 222322e..694d404 100755
--- a/Test/baseResults/hlsl.aliasOpaque.frag.out
+++ b/Test/baseResults/hlsl.aliasOpaque.frag.out
@@ -1,4 +1,5 @@
 hlsl.aliasOpaque.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
 Shader version: 500
 gl_FragCoord origin is upper left
 0:? Sequence
@@ -21,18 +22,24 @@
 0:17  Function Definition: @main( ( temp 4-component vector of float)
 0:17    Function Parameters: 
 0:?     Sequence
-0:19      'gss2' ( uniform sampler)
-0:20      'gss' ( uniform sampler)
-0:21      'gtex' ( uniform texture2D)
+0:19      move second child to first child ( temp sampler)
+0:?         'os.ss' ( temp sampler)
+0:19        'gss2' ( uniform sampler)
+0:20      move second child to first child ( temp sampler)
+0:?         'os.ss' ( temp sampler)
+0:20        'gss' ( uniform sampler)
+0:21      move second child to first child ( temp texture2D)
+0:?         'os.tex' ( temp texture2D)
+0:21        'gtex' ( uniform texture2D)
 0:22      move second child to first child ( 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:?           'os.ss' ( temp sampler)
 0:?           'os.a' ( temp float)
-0:?           'gtex' ( uniform texture2D)
+0:?           'os.tex' ( temp texture2D)
 0:17  Function Definition: main( ( temp void)
 0:17    Function Parameters: 
 0:?     Sequence
@@ -71,18 +78,24 @@
 0:17  Function Definition: @main( ( temp 4-component vector of float)
 0:17    Function Parameters: 
 0:?     Sequence
-0:19      'gss2' ( uniform sampler)
-0:20      'gss' ( uniform sampler)
-0:21      'gtex' ( uniform texture2D)
+0:19      move second child to first child ( temp sampler)
+0:?         'os.ss' ( temp sampler)
+0:19        'gss2' ( uniform sampler)
+0:20      move second child to first child ( temp sampler)
+0:?         'os.ss' ( temp sampler)
+0:20        'gss' ( uniform sampler)
+0:21      move second child to first child ( temp texture2D)
+0:?         'os.tex' ( temp texture2D)
+0:21        'gtex' ( uniform texture2D)
 0:22      move second child to first child ( 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:?           'os.ss' ( temp sampler)
 0:?           'os.a' ( temp float)
-0:?           'gtex' ( uniform texture2D)
+0:?           'os.tex' ( temp texture2D)
 0:17  Function Definition: main( ( temp void)
 0:17    Function Parameters: 
 0:?     Sequence
@@ -96,13 +109,13 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
-// Id's are bound by 48
+// Generated by (magic number): 80002
+// Id's are bound by 59
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 46
+                              EntryPoint Fragment 4  "main" 57
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -111,24 +124,28 @@
                               Name 15  "s.a"
                               Name 16  "s.tex"
                               Name 20  "@main("
-                              Name 35  "gss2"
-                              Name 36  "gss"
-                              Name 37  "gtex"
-                              Name 38  "os.a"
-                              Name 40  "param"
-                              Name 46  "@entryPointOutput"
-                              Decorate 35(gss2) DescriptorSet 0
-                              Decorate 36(gss) DescriptorSet 0
-                              Decorate 37(gtex) DescriptorSet 0
-                              Decorate 46(@entryPointOutput) Location 0
+                              Name 35  "os.ss"
+                              Name 37  "gss2"
+                              Name 39  "gss"
+                              Name 41  "os.tex"
+                              Name 43  "gtex"
+                              Name 45  "os.a"
+                              Name 47  "param"
+                              Name 49  "param"
+                              Name 51  "param"
+                              Name 57  "@entryPointOutput"
+                              Decorate 37(gss2) DescriptorSet 0
+                              Decorate 39(gss) DescriptorSet 0
+                              Decorate 43(gtex) DescriptorSet 0
+                              Decorate 57(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeSampler
-               7:             TypePointer UniformConstant 6
+               7:             TypePointer Function 6
                8:             TypeFloat 32
                9:             TypePointer Function 8(float)
               10:             TypeImage 8(float) 2D sampled format:Unknown
-              11:             TypePointer UniformConstant 10
+              11:             TypePointer Function 10
               12:             TypeVector 8(float) 4
               13:             TypeFunction 12(fvec4) 7(ptr) 9(ptr) 11(ptr)
               19:             TypeFunction 12(fvec4)
@@ -137,16 +154,18 @@
               28:    8(float) Constant 1045220557
               29:    8(float) Constant 1050253722
               30:   27(fvec2) ConstantComposite 28 29
-        35(gss2):      7(ptr) Variable UniformConstant
-         36(gss):      7(ptr) Variable UniformConstant
-        37(gtex):     11(ptr) Variable UniformConstant
-              39:    8(float) Constant 1077936128
-              45:             TypePointer Output 12(fvec4)
-46(@entryPointOutput):     45(ptr) Variable Output
+              36:             TypePointer UniformConstant 6
+        37(gss2):     36(ptr) Variable UniformConstant
+         39(gss):     36(ptr) Variable UniformConstant
+              42:             TypePointer UniformConstant 10
+        43(gtex):     42(ptr) Variable UniformConstant
+              46:    8(float) Constant 1077936128
+              56:             TypePointer Output 12(fvec4)
+57(@entryPointOutput):     56(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-              47:   12(fvec4) FunctionCall 20(@main()
-                              Store 46(@entryPointOutput) 47
+              58:   12(fvec4) FunctionCall 20(@main()
+                              Store 57(@entryPointOutput) 58
                               Return
                               FunctionEnd
 17(osCall(struct-OS-p1-f1-t211;):   12(fvec4) Function None 13
@@ -164,11 +183,25 @@
                               FunctionEnd
       20(@main():   12(fvec4) Function None 19
               21:             Label
-        38(os.a):      9(ptr) Variable Function
-       40(param):      9(ptr) Variable Function
-                              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
+       35(os.ss):      7(ptr) Variable Function
+      41(os.tex):     11(ptr) Variable Function
+        45(os.a):      9(ptr) Variable Function
+       47(param):      7(ptr) Variable Function
+       49(param):      9(ptr) Variable Function
+       51(param):     11(ptr) Variable Function
+              38:           6 Load 37(gss2)
+                              Store 35(os.ss) 38
+              40:           6 Load 39(gss)
+                              Store 35(os.ss) 40
+              44:          10 Load 43(gtex)
+                              Store 41(os.tex) 44
+                              Store 45(os.a) 46
+              48:           6 Load 35(os.ss)
+                              Store 47(param) 48
+              50:    8(float) Load 45(os.a)
+                              Store 49(param) 50
+              52:          10 Load 41(os.tex)
+                              Store 51(param) 52
+              53:   12(fvec4) FunctionCall 17(osCall(struct-OS-p1-f1-t211;) 47(param) 49(param) 51(param)
+                              ReturnValue 53
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.amend.frag.out b/Test/baseResults/hlsl.amend.frag.out
index 388d346..9830385 100755
--- a/Test/baseResults/hlsl.amend.frag.out
+++ b/Test/baseResults/hlsl.amend.frag.out
@@ -160,7 +160,7 @@
 0:?     'm' ( global 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 57
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.array.flatten.frag.out b/Test/baseResults/hlsl.array.flatten.frag.out
index 0129ede..e32eb15 100644
--- a/Test/baseResults/hlsl.array.flatten.frag.out
+++ b/Test/baseResults/hlsl.array.flatten.frag.out
@@ -1,4 +1,5 @@
 hlsl.array.flatten.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
 Shader version: 500
 gl_FragCoord origin is upper left
 0:? Sequence
@@ -344,14 +345,14 @@
 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 137
+// Generated by (magic number): 80002
+// Id's are bound by 143
 
                               Capability Shader
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 128
+                              EntryPoint Fragment 4  "main" 134
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -366,60 +367,62 @@
                               Name 34  "not_flattened_a"
                               Name 42  "g_tex[1]"
                               Name 45  "g_samp[1]"
-                              Name 61  "local_sampler_array"
-                              Name 63  "g_samp[0]"
-                              Name 68  "g_samp[2]"
-                              Name 71  "local_texture_array"
-                              Name 72  "g_tex[0]"
-                              Name 77  "g_tex[2]"
-                              Name 83  "local_float_array"
-                              Name 89  "$Global"
-                              MemberName 89($Global) 0  "g_mats"
-                              MemberName 89($Global) 1  "g_mats_explicit"
-                              MemberName 89($Global) 2  "g_floats"
-                              Name 91  ""
-                              Name 105  "aggShadow"
-                              Name 112  "aggShadow"
-                              Name 123  "ps_output"
-                              Name 124  "param"
-                              Name 128  "ps_output.color"
-                              Name 131  "g_tex_explicit[0]"
-                              Name 132  "g_tex_explicit[1]"
-                              Name 133  "g_tex_explicit[2]"
-                              Name 134  "g_samp_explicit[0]"
-                              Name 135  "g_samp_explicit[1]"
-                              Name 136  "g_samp_explicit[2]"
+                              Name 63  "local_sampler_array"
+                              Name 65  "g_samp[0]"
+                              Name 70  "g_samp[2]"
+                              Name 73  "local_texture_array"
+                              Name 74  "g_tex[0]"
+                              Name 79  "g_tex[2]"
+                              Name 85  "local_float_array"
+                              Name 91  "$Global"
+                              MemberName 91($Global) 0  "g_mats"
+                              MemberName 91($Global) 1  "g_mats_explicit"
+                              MemberName 91($Global) 2  "g_floats"
+                              Name 93  ""
+                              Name 107  "aggShadow"
+                              Name 114  "aggShadow"
+                              Name 121  "param"
+                              Name 123  "param"
+                              Name 129  "ps_output"
+                              Name 130  "param"
+                              Name 134  "ps_output.color"
+                              Name 137  "g_tex_explicit[0]"
+                              Name 138  "g_tex_explicit[1]"
+                              Name 139  "g_tex_explicit[2]"
+                              Name 140  "g_samp_explicit[0]"
+                              Name 141  "g_samp_explicit[1]"
+                              Name 142  "g_samp_explicit[2]"
                               Decorate 42(g_tex[1]) DescriptorSet 0
                               Decorate 45(g_samp[1]) DescriptorSet 0
-                              Decorate 63(g_samp[0]) DescriptorSet 0
-                              Decorate 68(g_samp[2]) DescriptorSet 0
-                              Decorate 72(g_tex[0]) DescriptorSet 0
-                              Decorate 77(g_tex[2]) DescriptorSet 0
-                              Decorate 86 ArrayStride 48
-                              Decorate 87 ArrayStride 48
-                              Decorate 88 ArrayStride 16
-                              MemberDecorate 89($Global) 0 RowMajor
-                              MemberDecorate 89($Global) 0 Offset 0
-                              MemberDecorate 89($Global) 0 MatrixStride 16
-                              MemberDecorate 89($Global) 1 RowMajor
-                              MemberDecorate 89($Global) 1 Offset 192
-                              MemberDecorate 89($Global) 1 MatrixStride 16
-                              MemberDecorate 89($Global) 2 Offset 384
-                              Decorate 89($Global) Block
-                              Decorate 91 DescriptorSet 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
-                              Decorate 132(g_tex_explicit[1]) Binding 2
-                              Decorate 133(g_tex_explicit[2]) DescriptorSet 0
-                              Decorate 133(g_tex_explicit[2]) Binding 3
-                              Decorate 134(g_samp_explicit[0]) DescriptorSet 0
-                              Decorate 134(g_samp_explicit[0]) Binding 5
-                              Decorate 135(g_samp_explicit[1]) DescriptorSet 0
-                              Decorate 135(g_samp_explicit[1]) Binding 6
-                              Decorate 136(g_samp_explicit[2]) DescriptorSet 0
-                              Decorate 136(g_samp_explicit[2]) Binding 7
+                              Decorate 65(g_samp[0]) DescriptorSet 0
+                              Decorate 70(g_samp[2]) DescriptorSet 0
+                              Decorate 74(g_tex[0]) DescriptorSet 0
+                              Decorate 79(g_tex[2]) DescriptorSet 0
+                              Decorate 88 ArrayStride 48
+                              Decorate 89 ArrayStride 48
+                              Decorate 90 ArrayStride 16
+                              MemberDecorate 91($Global) 0 RowMajor
+                              MemberDecorate 91($Global) 0 Offset 0
+                              MemberDecorate 91($Global) 0 MatrixStride 16
+                              MemberDecorate 91($Global) 1 RowMajor
+                              MemberDecorate 91($Global) 1 Offset 192
+                              MemberDecorate 91($Global) 1 MatrixStride 16
+                              MemberDecorate 91($Global) 2 Offset 384
+                              Decorate 91($Global) Block
+                              Decorate 93 DescriptorSet 0
+                              Decorate 134(ps_output.color) Location 0
+                              Decorate 137(g_tex_explicit[0]) DescriptorSet 0
+                              Decorate 137(g_tex_explicit[0]) Binding 1
+                              Decorate 138(g_tex_explicit[1]) DescriptorSet 0
+                              Decorate 138(g_tex_explicit[1]) Binding 2
+                              Decorate 139(g_tex_explicit[2]) DescriptorSet 0
+                              Decorate 139(g_tex_explicit[2]) Binding 3
+                              Decorate 140(g_samp_explicit[0]) DescriptorSet 0
+                              Decorate 140(g_samp_explicit[0]) Binding 5
+                              Decorate 141(g_samp_explicit[1]) DescriptorSet 0
+                              Decorate 141(g_samp_explicit[1]) Binding 6
+                              Decorate 142(g_samp_explicit[2]) DescriptorSet 0
+                              Decorate 142(g_samp_explicit[2]) Binding 7
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -429,10 +432,10 @@
               12:             TypeInt 32 0
               13:     12(int) Constant 3
               14:             TypeArray 11 13
-              15:             TypePointer UniformConstant 14
+              15:             TypePointer Function 14
               16:             TypeSampler
               17:             TypeArray 16 13
-              18:             TypePointer UniformConstant 17
+              18:             TypePointer Function 17
               19:             TypeFunction 7(fvec4) 15(ptr) 18(ptr)
    24(PS_OUTPUT):             TypeStruct 7(fvec4)
               25:             TypePointer Function 24(PS_OUTPUT)
@@ -454,48 +457,46 @@
    45(g_samp[1]):     44(ptr) Variable UniformConstant
               47:             TypeSampledImage 11
               49:    6(float) Constant 1045220557
-61(local_sampler_array):     18(ptr) Variable UniformConstant
-              62:     30(int) Constant 0
-   63(g_samp[0]):     44(ptr) Variable UniformConstant
-   68(g_samp[2]):     44(ptr) Variable UniformConstant
-71(local_texture_array):     15(ptr) Variable UniformConstant
-    72(g_tex[0]):     41(ptr) Variable UniformConstant
-    77(g_tex[2]):     41(ptr) Variable UniformConstant
-              80:     12(int) Constant 4
-              81:             TypeArray 6(float) 80
-              82:             TypePointer Function 81
-              84:             TypeVector 6(float) 3
-              85:             TypeMatrix 84(fvec3) 3
-              86:             TypeArray 85 80
-              87:             TypeArray 85 80
-              88:             TypeArray 6(float) 80
-     89($Global):             TypeStruct 86 87 88
-              90:             TypePointer Uniform 89($Global)
-              91:     90(ptr) Variable Uniform
-              92:             TypePointer Uniform 88
-              96:             TypePointer Function 6(float)
-  105(aggShadow):     15(ptr) Variable UniformConstant
-  112(aggShadow):     18(ptr) Variable UniformConstant
-             121:             TypePointer Function 7(fvec4)
-             127:             TypePointer Output 7(fvec4)
-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
-134(g_samp_explicit[0]):     44(ptr) Variable UniformConstant
-135(g_samp_explicit[1]):     44(ptr) Variable UniformConstant
-136(g_samp_explicit[2]):     44(ptr) Variable UniformConstant
+              53:             TypePointer Function 11
+              56:             TypePointer Function 16
+              64:     30(int) Constant 0
+   65(g_samp[0]):     44(ptr) Variable UniformConstant
+   70(g_samp[2]):     44(ptr) Variable UniformConstant
+    74(g_tex[0]):     41(ptr) Variable UniformConstant
+    79(g_tex[2]):     41(ptr) Variable UniformConstant
+              82:     12(int) Constant 4
+              83:             TypeArray 6(float) 82
+              84:             TypePointer Function 83
+              86:             TypeVector 6(float) 3
+              87:             TypeMatrix 86(fvec3) 3
+              88:             TypeArray 87 82
+              89:             TypeArray 87 82
+              90:             TypeArray 6(float) 82
+     91($Global):             TypeStruct 88 89 90
+              92:             TypePointer Uniform 91($Global)
+              93:     92(ptr) Variable Uniform
+              94:             TypePointer Uniform 90
+              98:             TypePointer Function 6(float)
+             127:             TypePointer Function 7(fvec4)
+             133:             TypePointer Output 7(fvec4)
+134(ps_output.color):    133(ptr) Variable Output
+137(g_tex_explicit[0]):     41(ptr) Variable UniformConstant
+138(g_tex_explicit[1]):     41(ptr) Variable UniformConstant
+139(g_tex_explicit[2]):     41(ptr) Variable UniformConstant
+140(g_samp_explicit[0]):     44(ptr) Variable UniformConstant
+141(g_samp_explicit[1]):     44(ptr) Variable UniformConstant
+142(g_samp_explicit[2]):     44(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
-  123(ps_output):     25(ptr) Variable Function
-      124(param):     25(ptr) Variable Function
+  129(ps_output):     25(ptr) Variable Function
+      130(param):     25(ptr) Variable Function
                               Store 34(not_flattened_a) 40
-             125:           2 FunctionCall 28(@main(struct-PS_OUTPUT-vf41;) 124(param)
-             126:24(PS_OUTPUT) Load 124(param)
-                              Store 123(ps_output) 126
-             129:    121(ptr) AccessChain 123(ps_output) 62
-             130:    7(fvec4) Load 129
-                              Store 128(ps_output.color) 130
+             131:           2 FunctionCall 28(@main(struct-PS_OUTPUT-vf41;) 130(param)
+             132:24(PS_OUTPUT) Load 130(param)
+                              Store 129(ps_output) 132
+             135:    127(ptr) AccessChain 129(ps_output) 64
+             136:    7(fvec4) Load 135
+                              Store 134(ps_output.color) 136
                               Return
                               FunctionEnd
      9(TestFn1():    7(fvec4) Function None 8
@@ -510,72 +511,82 @@
        20(l_tex):     15(ptr) FunctionParameter
       21(l_samp):     18(ptr) FunctionParameter
               23:             Label
-              53:     41(ptr) AccessChain 20(l_tex) 36
-              54:          11 Load 53
-              55:     44(ptr) AccessChain 21(l_samp) 36
-              56:          16 Load 55
-              57:          47 SampledImage 54 56
-              58:    7(fvec4) ImageSampleImplicitLod 57 49
-                              ReturnValue 58
+              54:     53(ptr) AccessChain 20(l_tex) 36
+              55:          11 Load 54
+              57:     56(ptr) AccessChain 21(l_samp) 36
+              58:          16 Load 57
+              59:          47 SampledImage 55 58
+              60:    7(fvec4) ImageSampleImplicitLod 59 49
+                              ReturnValue 60
                               FunctionEnd
 28(@main(struct-PS_OUTPUT-vf41;):           2 Function None 26
    27(ps_output):     25(ptr) FunctionParameter
               29:             Label
-83(local_float_array):     82(ptr) Variable Function
-              64:          16 Load 63(g_samp[0])
-              65:     44(ptr) AccessChain 61(local_sampler_array) 62
-                              Store 65 64
-              66:          16 Load 45(g_samp[1])
-              67:     44(ptr) AccessChain 61(local_sampler_array) 35
+63(local_sampler_array):     18(ptr) Variable Function
+73(local_texture_array):     15(ptr) Variable Function
+85(local_float_array):     84(ptr) Variable Function
+  107(aggShadow):     15(ptr) Variable Function
+  114(aggShadow):     18(ptr) Variable Function
+      121(param):     15(ptr) Variable Function
+      123(param):     18(ptr) Variable Function
+              66:          16 Load 65(g_samp[0])
+              67:     56(ptr) AccessChain 63(local_sampler_array) 64
                               Store 67 66
-              69:          16 Load 68(g_samp[2])
-              70:     44(ptr) AccessChain 61(local_sampler_array) 36
-                              Store 70 69
-              73:          11 Load 72(g_tex[0])
-              74:     41(ptr) AccessChain 71(local_texture_array) 62
-                              Store 74 73
-              75:          11 Load 42(g_tex[1])
-              76:     41(ptr) AccessChain 71(local_texture_array) 35
+              68:          16 Load 45(g_samp[1])
+              69:     56(ptr) AccessChain 63(local_sampler_array) 35
+                              Store 69 68
+              71:          16 Load 70(g_samp[2])
+              72:     56(ptr) AccessChain 63(local_sampler_array) 36
+                              Store 72 71
+              75:          11 Load 74(g_tex[0])
+              76:     53(ptr) AccessChain 73(local_texture_array) 64
                               Store 76 75
-              78:          11 Load 77(g_tex[2])
-              79:     41(ptr) AccessChain 71(local_texture_array) 36
-                              Store 79 78
-              93:     92(ptr) AccessChain 91 36
-              94:          88 Load 93
-              95:    6(float) CompositeExtract 94 0
-              97:     96(ptr) AccessChain 83(local_float_array) 62
-                              Store 97 95
-              98:    6(float) CompositeExtract 94 1
-              99:     96(ptr) AccessChain 83(local_float_array) 35
-                              Store 99 98
-             100:    6(float) CompositeExtract 94 2
-             101:     96(ptr) AccessChain 83(local_float_array) 36
+              77:          11 Load 42(g_tex[1])
+              78:     53(ptr) AccessChain 73(local_texture_array) 35
+                              Store 78 77
+              80:          11 Load 79(g_tex[2])
+              81:     53(ptr) AccessChain 73(local_texture_array) 36
+                              Store 81 80
+              95:     94(ptr) AccessChain 93 36
+              96:          90 Load 95
+              97:    6(float) CompositeExtract 96 0
+              99:     98(ptr) AccessChain 85(local_float_array) 64
+                              Store 99 97
+             100:    6(float) CompositeExtract 96 1
+             101:     98(ptr) AccessChain 85(local_float_array) 35
                               Store 101 100
-             102:    6(float) CompositeExtract 94 3
-             103:     96(ptr) AccessChain 83(local_float_array) 37
+             102:    6(float) CompositeExtract 96 2
+             103:     98(ptr) AccessChain 85(local_float_array) 36
                               Store 103 102
-             104:    7(fvec4) FunctionCall 9(TestFn1()
-             106:          11 Load 72(g_tex[0])
-             107:     41(ptr) AccessChain 105(aggShadow) 62
-                              Store 107 106
-             108:          11 Load 42(g_tex[1])
-             109:     41(ptr) AccessChain 105(aggShadow) 35
+             104:    6(float) CompositeExtract 96 3
+             105:     98(ptr) AccessChain 85(local_float_array) 37
+                              Store 105 104
+             106:    7(fvec4) FunctionCall 9(TestFn1()
+             108:          11 Load 74(g_tex[0])
+             109:     53(ptr) AccessChain 107(aggShadow) 64
                               Store 109 108
-             110:          11 Load 77(g_tex[2])
-             111:     41(ptr) AccessChain 105(aggShadow) 36
+             110:          11 Load 42(g_tex[1])
+             111:     53(ptr) AccessChain 107(aggShadow) 35
                               Store 111 110
-             113:          16 Load 63(g_samp[0])
-             114:     44(ptr) AccessChain 112(aggShadow) 62
-                              Store 114 113
-             115:          16 Load 45(g_samp[1])
-             116:     44(ptr) AccessChain 112(aggShadow) 35
+             112:          11 Load 79(g_tex[2])
+             113:     53(ptr) AccessChain 107(aggShadow) 36
+                              Store 113 112
+             115:          16 Load 65(g_samp[0])
+             116:     56(ptr) AccessChain 114(aggShadow) 64
                               Store 116 115
-             117:          16 Load 68(g_samp[2])
-             118:     44(ptr) AccessChain 112(aggShadow) 36
+             117:          16 Load 45(g_samp[1])
+             118:     56(ptr) AccessChain 114(aggShadow) 35
                               Store 118 117
-             119:    7(fvec4) FunctionCall 22(TestFn2(t11[3];p1[3];) 105(aggShadow) 112(aggShadow)
-             120:    7(fvec4) FAdd 104 119
-             122:    121(ptr) AccessChain 27(ps_output) 62
-                              Store 122 120
+             119:          16 Load 70(g_samp[2])
+             120:     56(ptr) AccessChain 114(aggShadow) 36
+                              Store 120 119
+             122:          14 Load 107(aggShadow)
+                              Store 121(param) 122
+             124:          17 Load 114(aggShadow)
+                              Store 123(param) 124
+             125:    7(fvec4) FunctionCall 22(TestFn2(t11[3];p1[3];) 121(param) 123(param)
+             126:    7(fvec4) FAdd 106 125
+             128:    127(ptr) AccessChain 27(ps_output) 64
+                              Store 128 126
                               Return
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.array.frag.out b/Test/baseResults/hlsl.array.frag.out
index 52008e3..dc48f6f 100755
--- a/Test/baseResults/hlsl.array.frag.out
+++ b/Test/baseResults/hlsl.array.frag.out
@@ -2,72 +2,142 @@
 Shader version: 500
 gl_FragCoord origin is upper left
 0:? Sequence
-0:8  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
-0:8    Function Parameters: 
-0:8      'i' ( in int)
-0:8      'input' ( in 3-element array of 4-component vector of float)
+0:7  Sequence
+0:7    move second child to first child ( temp 4-component vector of float)
+0:7      'C' ( global 4-component vector of float)
+0:?       Constant:
+0:?         1.000000
+0:?         2.000000
+0:?         3.000000
+0:?         4.000000
+0:11  Sequence
+0:11    move second child to first child ( temp 2-element array of 4-component vector of float)
+0:11      'c2' ( global 2-element array of 4-component vector of float)
+0:11      Construct vec4 ( temp 2-element array of 4-component vector of float)
+0:11        'C' ( global 4-component vector of float)
+0:?         Constant:
+0:?           1.000000
+0:?           2.000000
+0:?           3.000000
+0:?           4.000000
+0:14  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
+0:14    Function Parameters: 
+0:14      'i' ( in int)
+0:14      'input' ( in 3-element array of 4-component vector of float)
 0:?     Sequence
-0:10      Branch: Return with expression
-0:10        add ( temp 4-component vector of float)
-0:10          add ( temp 4-component vector of float)
-0:10            add ( temp 4-component vector of float)
-0:10              add ( temp 4-component vector of float)
-0:10                add ( temp 4-component vector of float)
-0:10                  add ( temp 4-component vector of float)
-0:10                    direct index ( temp 4-component vector of float)
-0:10                      a: direct index for structure ( uniform 4-element array of 4-component vector of float)
-0:10                        'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                        Constant:
-0:10                          0 (const uint)
-0:10                      Constant:
-0:10                        1 (const int)
-0:10                    indirect index ( temp 4-component vector of float)
-0:10                      a: direct index for structure ( uniform 4-element array of 4-component vector of float)
-0:10                        'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                        Constant:
-0:10                          0 (const uint)
-0:10                      'i' ( in int)
-0:10                  direct index ( temp 4-component vector of float)
-0:10                    'input' ( in 3-element array of 4-component vector of float)
-0:10                    Constant:
-0:10                      2 (const int)
-0:10                indirect index ( temp 4-component vector of float)
-0:10                  'input' ( in 3-element array of 4-component vector of float)
-0:10                  'i' ( in int)
-0:10              direct index ( temp 4-component vector of float)
-0:10                'b' ( temp 10-element array of 4-component vector of float)
-0:10                Constant:
-0:10                  5 (const int)
-0:10            indirect index ( temp 4-component vector of float)
-0:10              'b' ( temp 10-element array of 4-component vector of float)
-0:10              'i' ( in int)
-0:10          indirect index ( temp 4-component vector of float)
-0:10            m: direct index for structure ( temp 7-element array of 4-component vector of float)
-0:10              indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
-0:10                s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
-0:10                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                  Constant:
-0:10                    1 (const uint)
-0:10                'i' ( in int)
-0:10              Constant:
-0:10                0 (const int)
-0:10            'i' ( in int)
-0:8  Function Definition: PixelShaderFunction( ( temp void)
-0:8    Function Parameters: 
+0:15      Sequence
+0:15        move second child to first child ( temp 10-element array of 4-component vector of float)
+0:15          'b' ( temp 10-element array of 4-component vector of float)
+0:15          Construct vec4 ( temp 10-element array of 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:16      Sequence
+0:16        move second child to first child ( temp 4-component vector of float)
+0:16          'tmp' ( temp 4-component vector of float)
+0:16          add ( temp 4-component vector of float)
+0:16            add ( temp 4-component vector of float)
+0:16              add ( temp 4-component vector of float)
+0:16                add ( temp 4-component vector of float)
+0:16                  'C' ( global 4-component vector of float)
+0:16                  direct index ( temp 4-component vector of float)
+0:16                    a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
+0:16                      'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                Constant:
+0:16                  1.000000
+0:16                  2.000000
+0:16                  3.000000
+0:16                  4.000000
+0:16              indirect index ( temp 4-component vector of float)
+0:16                a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
+0:16                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:16                  Constant:
+0:16                    3 (const uint)
+0:16                'i' ( in int)
+0:16            indirect index ( temp 4-component vector of float)
+0:16              'c2' ( global 2-element array of 4-component vector of float)
+0:16              'i' ( in int)
+0:17      Branch: Return with expression
+0:17        add ( temp 4-component vector of float)
+0:17          add ( temp 4-component vector of float)
+0:17            add ( temp 4-component vector of float)
+0:17              add ( temp 4-component vector of float)
+0:17                add ( temp 4-component vector of float)
+0:17                  add ( temp 4-component vector of float)
+0:17                    add ( temp 4-component vector of float)
+0:17                      direct index ( temp 4-component vector of float)
+0:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
+0:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                          Constant:
+0:17                            0 (const uint)
+0:17                        Constant:
+0:17                          1 (const int)
+0:17                      indirect index ( temp 4-component vector of float)
+0:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
+0:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                          Constant:
+0:17                            0 (const uint)
+0:17                        'i' ( in int)
+0:17                    direct index ( temp 4-component vector of float)
+0:17                      'input' ( in 3-element array of 4-component vector of float)
+0:17                      Constant:
+0:17                        2 (const int)
+0:17                  indirect index ( temp 4-component vector of float)
+0:17                    'input' ( in 3-element array of 4-component vector of float)
+0:17                    'i' ( in int)
+0:17                direct index ( temp 4-component vector of float)
+0:17                  'b' ( temp 10-element array of 4-component vector of float)
+0:17                  Constant:
+0:17                    5 (const int)
+0:17              indirect index ( temp 4-component vector of float)
+0:17                'b' ( temp 10-element array of 4-component vector of float)
+0:17                'i' ( in int)
+0:17            indirect index ( temp 4-component vector of float)
+0:17              m: direct index for structure ( temp 7-element array of 4-component vector of float)
+0:17                indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
+0:17                  s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
+0:17                    'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                    Constant:
+0:17                      1 (const uint)
+0:17                  'i' ( in int)
+0:17                Constant:
+0:17                  0 (const int)
+0:17              'i' ( in int)
+0:17          'tmp' ( temp 4-component vector of float)
+0:14  Function Definition: PixelShaderFunction( ( temp void)
+0:14    Function Parameters: 
 0:?     Sequence
-0:8      move second child to first child ( temp int)
+0:14      move second child to first child ( temp int)
 0:?         'i' ( temp int)
 0:?         'i' (layout( location=0) flat in int)
-0:8      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:14      move second child to first child ( temp 3-element array of 4-component vector of float)
 0:?         'input' ( temp 3-element array of 4-component vector of float)
 0:?         'input' (layout( location=1) in 3-element array of 4-component vector of float)
-0:8      move second child to first child ( temp 4-component vector of float)
+0:14      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: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
+0:14        Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
 0:?           'i' ( temp int)
 0:?           'input' ( temp 3-element array of 4-component vector of float)
 0:?   Linker Objects
-0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
+0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:?     'C' ( global 4-component vector of float)
+0:?     'c1' ( const 1-element array of 4-component vector of float)
+0:?       1.000000
+0:?       2.000000
+0:?       3.000000
+0:?       4.000000
+0:?     'c2' ( global 2-element array of 4-component vector of float)
 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 4-component vector of float)
@@ -79,116 +149,195 @@
 Shader version: 500
 gl_FragCoord origin is upper left
 0:? Sequence
-0:8  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
-0:8    Function Parameters: 
-0:8      'i' ( in int)
-0:8      'input' ( in 3-element array of 4-component vector of float)
+0:7  Sequence
+0:7    move second child to first child ( temp 4-component vector of float)
+0:7      'C' ( global 4-component vector of float)
+0:?       Constant:
+0:?         1.000000
+0:?         2.000000
+0:?         3.000000
+0:?         4.000000
+0:11  Sequence
+0:11    move second child to first child ( temp 2-element array of 4-component vector of float)
+0:11      'c2' ( global 2-element array of 4-component vector of float)
+0:11      Construct vec4 ( temp 2-element array of 4-component vector of float)
+0:11        'C' ( global 4-component vector of float)
+0:?         Constant:
+0:?           1.000000
+0:?           2.000000
+0:?           3.000000
+0:?           4.000000
+0:14  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
+0:14    Function Parameters: 
+0:14      'i' ( in int)
+0:14      'input' ( in 3-element array of 4-component vector of float)
 0:?     Sequence
-0:10      Branch: Return with expression
-0:10        add ( temp 4-component vector of float)
-0:10          add ( temp 4-component vector of float)
-0:10            add ( temp 4-component vector of float)
-0:10              add ( temp 4-component vector of float)
-0:10                add ( temp 4-component vector of float)
-0:10                  add ( temp 4-component vector of float)
-0:10                    direct index ( temp 4-component vector of float)
-0:10                      a: direct index for structure ( uniform 4-element array of 4-component vector of float)
-0:10                        'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                        Constant:
-0:10                          0 (const uint)
-0:10                      Constant:
-0:10                        1 (const int)
-0:10                    indirect index ( temp 4-component vector of float)
-0:10                      a: direct index for structure ( uniform 4-element array of 4-component vector of float)
-0:10                        'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                        Constant:
-0:10                          0 (const uint)
-0:10                      'i' ( in int)
-0:10                  direct index ( temp 4-component vector of float)
-0:10                    'input' ( in 3-element array of 4-component vector of float)
-0:10                    Constant:
-0:10                      2 (const int)
-0:10                indirect index ( temp 4-component vector of float)
-0:10                  'input' ( in 3-element array of 4-component vector of float)
-0:10                  'i' ( in int)
-0:10              direct index ( temp 4-component vector of float)
-0:10                'b' ( temp 10-element array of 4-component vector of float)
-0:10                Constant:
-0:10                  5 (const int)
-0:10            indirect index ( temp 4-component vector of float)
-0:10              'b' ( temp 10-element array of 4-component vector of float)
-0:10              'i' ( in int)
-0:10          indirect index ( temp 4-component vector of float)
-0:10            m: direct index for structure ( temp 7-element array of 4-component vector of float)
-0:10              indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
-0:10                s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
-0:10                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
-0:10                  Constant:
-0:10                    1 (const uint)
-0:10                'i' ( in int)
-0:10              Constant:
-0:10                0 (const int)
-0:10            'i' ( in int)
-0:8  Function Definition: PixelShaderFunction( ( temp void)
-0:8    Function Parameters: 
+0:15      Sequence
+0:15        move second child to first child ( temp 10-element array of 4-component vector of float)
+0:15          'b' ( temp 10-element array of 4-component vector of float)
+0:15          Construct vec4 ( temp 10-element array of 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:15            'C' ( global 4-component vector of float)
+0:16      Sequence
+0:16        move second child to first child ( temp 4-component vector of float)
+0:16          'tmp' ( temp 4-component vector of float)
+0:16          add ( temp 4-component vector of float)
+0:16            add ( temp 4-component vector of float)
+0:16              add ( temp 4-component vector of float)
+0:16                add ( temp 4-component vector of float)
+0:16                  'C' ( global 4-component vector of float)
+0:16                  direct index ( temp 4-component vector of float)
+0:16                    a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
+0:16                      'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:16                      Constant:
+0:16                        2 (const uint)
+0:16                    Constant:
+0:16                      0 (const int)
+0:16                Constant:
+0:16                  1.000000
+0:16                  2.000000
+0:16                  3.000000
+0:16                  4.000000
+0:16              indirect index ( temp 4-component vector of float)
+0:16                a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
+0:16                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:16                  Constant:
+0:16                    3 (const uint)
+0:16                'i' ( in int)
+0:16            indirect index ( temp 4-component vector of float)
+0:16              'c2' ( global 2-element array of 4-component vector of float)
+0:16              'i' ( in int)
+0:17      Branch: Return with expression
+0:17        add ( temp 4-component vector of float)
+0:17          add ( temp 4-component vector of float)
+0:17            add ( temp 4-component vector of float)
+0:17              add ( temp 4-component vector of float)
+0:17                add ( temp 4-component vector of float)
+0:17                  add ( temp 4-component vector of float)
+0:17                    add ( temp 4-component vector of float)
+0:17                      direct index ( temp 4-component vector of float)
+0:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
+0:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                          Constant:
+0:17                            0 (const uint)
+0:17                        Constant:
+0:17                          1 (const int)
+0:17                      indirect index ( temp 4-component vector of float)
+0:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
+0:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                          Constant:
+0:17                            0 (const uint)
+0:17                        'i' ( in int)
+0:17                    direct index ( temp 4-component vector of float)
+0:17                      'input' ( in 3-element array of 4-component vector of float)
+0:17                      Constant:
+0:17                        2 (const int)
+0:17                  indirect index ( temp 4-component vector of float)
+0:17                    'input' ( in 3-element array of 4-component vector of float)
+0:17                    'i' ( in int)
+0:17                direct index ( temp 4-component vector of float)
+0:17                  'b' ( temp 10-element array of 4-component vector of float)
+0:17                  Constant:
+0:17                    5 (const int)
+0:17              indirect index ( temp 4-component vector of float)
+0:17                'b' ( temp 10-element array of 4-component vector of float)
+0:17                'i' ( in int)
+0:17            indirect index ( temp 4-component vector of float)
+0:17              m: direct index for structure ( temp 7-element array of 4-component vector of float)
+0:17                indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
+0:17                  s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
+0:17                    'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:17                    Constant:
+0:17                      1 (const uint)
+0:17                  'i' ( in int)
+0:17                Constant:
+0:17                  0 (const int)
+0:17              'i' ( in int)
+0:17          'tmp' ( temp 4-component vector of float)
+0:14  Function Definition: PixelShaderFunction( ( temp void)
+0:14    Function Parameters: 
 0:?     Sequence
-0:8      move second child to first child ( temp int)
+0:14      move second child to first child ( temp int)
 0:?         'i' ( temp int)
 0:?         'i' (layout( location=0) flat in int)
-0:8      move second child to first child ( temp 3-element array of 4-component vector of float)
+0:14      move second child to first child ( temp 3-element array of 4-component vector of float)
 0:?         'input' ( temp 3-element array of 4-component vector of float)
 0:?         'input' (layout( location=1) in 3-element array of 4-component vector of float)
-0:8      move second child to first child ( temp 4-component vector of float)
+0:14      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: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
+0:14        Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
 0:?           'i' ( temp int)
 0:?           'input' ( temp 3-element array of 4-component vector of float)
 0:?   Linker Objects
-0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s})
+0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
+0:?     'C' ( global 4-component vector of float)
+0:?     'c1' ( const 1-element array of 4-component vector of float)
+0:?       1.000000
+0:?       2.000000
+0:?       3.000000
+0:?       4.000000
+0:?     'c2' ( global 2-element array of 4-component vector of float)
 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 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
-// Id's are bound by 81
+// Generated by (magic number): 80002
+// Id's are bound by 126
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "PixelShaderFunction" 68 72 75
+                              EntryPoint Fragment 4  "PixelShaderFunction" 112 116 119
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "PixelShaderFunction"
                               Name 17  "@PixelShaderFunction(i1;vf4[3];"
                               Name 15  "i"
                               Name 16  "input"
-                              Name 23  ""
-                              MemberName 23 0  "m"
-                              Name 26  "$Global"
-                              MemberName 26($Global) 0  "a"
-                              MemberName 26($Global) 1  "s"
-                              Name 28  ""
-                              Name 50  "b"
-                              Name 66  "i"
-                              Name 68  "i"
-                              Name 70  "input"
-                              Name 72  "input"
-                              Name 75  "@entryPointOutput"
-                              Name 76  "param"
-                              Name 78  "param"
-                              Decorate 20 ArrayStride 16
-                              Decorate 22 ArrayStride 16
-                              MemberDecorate 23 0 Offset 0
-                              Decorate 25 ArrayStride 112
-                              MemberDecorate 26($Global) 0 Offset 0
-                              MemberDecorate 26($Global) 1 Offset 64
-                              Decorate 26($Global) Block
-                              Decorate 28 DescriptorSet 0
-                              Decorate 68(i) Flat
-                              Decorate 68(i) Location 0
-                              Decorate 72(input) Location 1
-                              Decorate 75(@entryPointOutput) Location 0
+                              Name 20  "C"
+                              Name 29  "c2"
+                              Name 35  "b"
+                              Name 48  "tmp"
+                              Name 54  ""
+                              MemberName 54 0  "m"
+                              Name 60  "$Global"
+                              MemberName 60($Global) 0  "a"
+                              MemberName 60($Global) 1  "s"
+                              MemberName 60($Global) 2  "a1"
+                              MemberName 60($Global) 3  "a2"
+                              Name 62  ""
+                              Name 110  "i"
+                              Name 112  "i"
+                              Name 114  "input"
+                              Name 116  "input"
+                              Name 119  "@entryPointOutput"
+                              Name 120  "param"
+                              Name 122  "param"
+                              Decorate 51 ArrayStride 16
+                              Decorate 53 ArrayStride 16
+                              MemberDecorate 54 0 Offset 0
+                              Decorate 56 ArrayStride 112
+                              Decorate 58 ArrayStride 16
+                              Decorate 59 ArrayStride 16
+                              MemberDecorate 60($Global) 0 Offset 0
+                              MemberDecorate 60($Global) 1 Offset 64
+                              MemberDecorate 60($Global) 2 Offset 1296
+                              MemberDecorate 60($Global) 3 Offset 1312
+                              Decorate 60($Global) Block
+                              Decorate 62 DescriptorSet 0
+                              Decorate 112(i) Flat
+                              Decorate 112(i) Location 0
+                              Decorate 116(input) Location 1
+                              Decorate 119(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -200,78 +349,127 @@
               12:             TypeArray 9(fvec4) 11
               13:             TypePointer Function 12
               14:             TypeFunction 9(fvec4) 7(ptr) 13(ptr)
-              19:     10(int) Constant 4
-              20:             TypeArray 9(fvec4) 19
-              21:     10(int) Constant 7
-              22:             TypeArray 9(fvec4) 21
-              23:             TypeStruct 22
-              24:     10(int) Constant 11
-              25:             TypeArray 23(struct) 24
-     26($Global):             TypeStruct 20 25
-              27:             TypePointer Uniform 26($Global)
-              28:     27(ptr) Variable Uniform
-              29:      6(int) Constant 0
-              30:      6(int) Constant 1
-              31:             TypePointer Uniform 9(fvec4)
-              38:      6(int) Constant 2
-              39:             TypePointer Function 9(fvec4)
-              47:     10(int) Constant 10
-              48:             TypeArray 9(fvec4) 47
-              49:             TypePointer Function 48
-              51:      6(int) Constant 5
-              67:             TypePointer Input 6(int)
-           68(i):     67(ptr) Variable Input
-              71:             TypePointer Input 12
-       72(input):     71(ptr) Variable Input
-              74:             TypePointer Output 9(fvec4)
-75(@entryPointOutput):     74(ptr) Variable Output
+              19:             TypePointer Private 9(fvec4)
+           20(C):     19(ptr) Variable Private
+              21:    8(float) Constant 1065353216
+              22:    8(float) Constant 1073741824
+              23:    8(float) Constant 1077936128
+              24:    8(float) Constant 1082130432
+              25:    9(fvec4) ConstantComposite 21 22 23 24
+              26:     10(int) Constant 2
+              27:             TypeArray 9(fvec4) 26
+              28:             TypePointer Private 27
+          29(c2):     28(ptr) Variable Private
+              32:     10(int) Constant 10
+              33:             TypeArray 9(fvec4) 32
+              34:             TypePointer Function 33
+              47:             TypePointer Function 9(fvec4)
+              50:     10(int) Constant 4
+              51:             TypeArray 9(fvec4) 50
+              52:     10(int) Constant 7
+              53:             TypeArray 9(fvec4) 52
+              54:             TypeStruct 53
+              55:     10(int) Constant 11
+              56:             TypeArray 54(struct) 55
+              57:     10(int) Constant 1
+              58:             TypeArray 9(fvec4) 57
+              59:             TypeArray 9(fvec4) 26
+     60($Global):             TypeStruct 51 56 58 59
+              61:             TypePointer Uniform 60($Global)
+              62:     61(ptr) Variable Uniform
+              63:      6(int) Constant 2
+              64:      6(int) Constant 0
+              65:             TypePointer Uniform 9(fvec4)
+              70:      6(int) Constant 3
+              79:      6(int) Constant 1
+              93:      6(int) Constant 5
+             111:             TypePointer Input 6(int)
+          112(i):    111(ptr) Variable Input
+             115:             TypePointer Input 12
+      116(input):    115(ptr) Variable Input
+             118:             TypePointer Output 9(fvec4)
+119(@entryPointOutput):    118(ptr) Variable Output
+             125:          58 ConstantComposite 25
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
-           66(i):      7(ptr) Variable Function
-       70(input):     13(ptr) Variable Function
-       76(param):      7(ptr) Variable Function
-       78(param):     13(ptr) Variable Function
-              69:      6(int) Load 68(i)
-                              Store 66(i) 69
-              73:          12 Load 72(input)
-                              Store 70(input) 73
-              77:      6(int) Load 66(i)
-                              Store 76(param) 77
-              79:          12 Load 70(input)
-                              Store 78(param) 79
-              80:    9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 76(param) 78(param)
-                              Store 75(@entryPointOutput) 80
+          110(i):      7(ptr) Variable Function
+      114(input):     13(ptr) Variable Function
+      120(param):      7(ptr) Variable Function
+      122(param):     13(ptr) Variable Function
+                              Store 20(C) 25
+              30:    9(fvec4) Load 20(C)
+              31:          27 CompositeConstruct 30 25
+                              Store 29(c2) 31
+             113:      6(int) Load 112(i)
+                              Store 110(i) 113
+             117:          12 Load 116(input)
+                              Store 114(input) 117
+             121:      6(int) Load 110(i)
+                              Store 120(param) 121
+             123:          12 Load 114(input)
+                              Store 122(param) 123
+             124:    9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 120(param) 122(param)
+                              Store 119(@entryPointOutput) 124
                               Return
                               FunctionEnd
 17(@PixelShaderFunction(i1;vf4[3];):    9(fvec4) Function None 14
            15(i):      7(ptr) FunctionParameter
        16(input):     13(ptr) FunctionParameter
               18:             Label
-           50(b):     49(ptr) Variable Function
-              32:     31(ptr) AccessChain 28 29 30
-              33:    9(fvec4) Load 32
-              34:      6(int) Load 15(i)
-              35:     31(ptr) AccessChain 28 29 34
-              36:    9(fvec4) Load 35
-              37:    9(fvec4) FAdd 33 36
-              40:     39(ptr) AccessChain 16(input) 38
-              41:    9(fvec4) Load 40
-              42:    9(fvec4) FAdd 37 41
-              43:      6(int) Load 15(i)
-              44:     39(ptr) AccessChain 16(input) 43
-              45:    9(fvec4) Load 44
-              46:    9(fvec4) FAdd 42 45
-              52:     39(ptr) AccessChain 50(b) 51
-              53:    9(fvec4) Load 52
-              54:    9(fvec4) FAdd 46 53
-              55:      6(int) Load 15(i)
-              56:     39(ptr) AccessChain 50(b) 55
-              57:    9(fvec4) Load 56
-              58:    9(fvec4) FAdd 54 57
-              59:      6(int) Load 15(i)
-              60:      6(int) Load 15(i)
-              61:     31(ptr) AccessChain 28 30 59 29 60
-              62:    9(fvec4) Load 61
-              63:    9(fvec4) FAdd 58 62
-                              ReturnValue 63
+           35(b):     34(ptr) Variable Function
+         48(tmp):     47(ptr) Variable Function
+              36:    9(fvec4) Load 20(C)
+              37:    9(fvec4) Load 20(C)
+              38:    9(fvec4) Load 20(C)
+              39:    9(fvec4) Load 20(C)
+              40:    9(fvec4) Load 20(C)
+              41:    9(fvec4) Load 20(C)
+              42:    9(fvec4) Load 20(C)
+              43:    9(fvec4) Load 20(C)
+              44:    9(fvec4) Load 20(C)
+              45:    9(fvec4) Load 20(C)
+              46:          33 CompositeConstruct 36 37 38 39 40 41 42 43 44 45
+                              Store 35(b) 46
+              49:    9(fvec4) Load 20(C)
+              66:     65(ptr) AccessChain 62 63 64
+              67:    9(fvec4) Load 66
+              68:    9(fvec4) FAdd 49 67
+              69:    9(fvec4) FAdd 68 25
+              71:      6(int) Load 15(i)
+              72:     65(ptr) AccessChain 62 70 71
+              73:    9(fvec4) Load 72
+              74:    9(fvec4) FAdd 69 73
+              75:      6(int) Load 15(i)
+              76:     19(ptr) AccessChain 29(c2) 75
+              77:    9(fvec4) Load 76
+              78:    9(fvec4) FAdd 74 77
+                              Store 48(tmp) 78
+              80:     65(ptr) AccessChain 62 64 79
+              81:    9(fvec4) Load 80
+              82:      6(int) Load 15(i)
+              83:     65(ptr) AccessChain 62 64 82
+              84:    9(fvec4) Load 83
+              85:    9(fvec4) FAdd 81 84
+              86:     47(ptr) AccessChain 16(input) 63
+              87:    9(fvec4) Load 86
+              88:    9(fvec4) FAdd 85 87
+              89:      6(int) Load 15(i)
+              90:     47(ptr) AccessChain 16(input) 89
+              91:    9(fvec4) Load 90
+              92:    9(fvec4) FAdd 88 91
+              94:     47(ptr) AccessChain 35(b) 93
+              95:    9(fvec4) Load 94
+              96:    9(fvec4) FAdd 92 95
+              97:      6(int) Load 15(i)
+              98:     47(ptr) AccessChain 35(b) 97
+              99:    9(fvec4) Load 98
+             100:    9(fvec4) FAdd 96 99
+             101:      6(int) Load 15(i)
+             102:      6(int) Load 15(i)
+             103:     65(ptr) AccessChain 62 79 101 64 102
+             104:    9(fvec4) Load 103
+             105:    9(fvec4) FAdd 100 104
+             106:    9(fvec4) Load 48(tmp)
+             107:    9(fvec4) FAdd 105 106
+                              ReturnValue 107
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.array.implicit-size.frag.out b/Test/baseResults/hlsl.array.implicit-size.frag.out
index e4854db..cfd6562 100644
--- a/Test/baseResults/hlsl.array.implicit-size.frag.out
+++ b/Test/baseResults/hlsl.array.implicit-size.frag.out
@@ -163,7 +163,7 @@
 0:?     'g_mystruct' ( global 2-element array of structure{ temp int i,  temp float f})
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 72
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.array.multidim.frag.out b/Test/baseResults/hlsl.array.multidim.frag.out
index c62fd7d..133c71f 100644
--- a/Test/baseResults/hlsl.array.multidim.frag.out
+++ b/Test/baseResults/hlsl.array.multidim.frag.out
@@ -134,7 +134,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 57
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.assoc.frag.out b/Test/baseResults/hlsl.assoc.frag.out
index dcefa9c..7f071e4 100755
--- a/Test/baseResults/hlsl.assoc.frag.out
+++ b/Test/baseResults/hlsl.assoc.frag.out
@@ -132,7 +132,7 @@
 0:?     'a5' (layout( location=4) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 58
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.attribute.expression.comp.out b/Test/baseResults/hlsl.attribute.expression.comp.out
index 701511e..5fcf10d 100644
--- a/Test/baseResults/hlsl.attribute.expression.comp.out
+++ b/Test/baseResults/hlsl.attribute.expression.comp.out
@@ -82,7 +82,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 39
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.attribute.frag.out b/Test/baseResults/hlsl.attribute.frag.out
index 47fb677..99471c4 100755
--- a/Test/baseResults/hlsl.attribute.frag.out
+++ b/Test/baseResults/hlsl.attribute.frag.out
@@ -50,7 +50,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 24
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.attributeC11.frag.out b/Test/baseResults/hlsl.attributeC11.frag.out
new file mode 100755
index 0000000..02b0ede
--- /dev/null
+++ b/Test/baseResults/hlsl.attributeC11.frag.out
@@ -0,0 +1,176 @@
+hlsl.attributeC11.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:16  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:16    Function Parameters: 
+0:16      'input' ( in 4-component vector of float)
+0:?     Sequence
+0:17      Branch: Return with expression
+0:17        add ( temp 4-component vector of float)
+0:17          'input' ( in 4-component vector of float)
+0:17          textureFetch ( temp 4-component vector of float)
+0:17            'attach' ( uniform texture2D)
+0:17            vector swizzle ( temp int)
+0:17              Constant:
+0:17                0 (const int)
+0:17                0 (const int)
+0:17              Sequence
+0:17                Constant:
+0:17                  0 (const int)
+0:17            direct index ( temp int)
+0:17              Constant:
+0:17                0 (const int)
+0:17                0 (const int)
+0:17              Constant:
+0:17                1 (const int)
+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:?         'input' ( temp 4-component vector of float)
+0:?         'input' (layout( location=8) in 4-component vector of float)
+0:16      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=7) out 4-component vector of float)
+0:16        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'input' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'buffer1' (layout( set=0 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 2-component vector of float f} @data})
+0:?     'buffer3' (layout( set=2 binding=3 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 2-component vector of float f} @data})
+0:?     'attach' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=7) out 4-component vector of float)
+0:?     'input' (layout( location=8) in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:16  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:16    Function Parameters: 
+0:16      'input' ( in 4-component vector of float)
+0:?     Sequence
+0:17      Branch: Return with expression
+0:17        add ( temp 4-component vector of float)
+0:17          'input' ( in 4-component vector of float)
+0:17          textureFetch ( temp 4-component vector of float)
+0:17            'attach' ( uniform texture2D)
+0:17            vector swizzle ( temp int)
+0:17              Constant:
+0:17                0 (const int)
+0:17                0 (const int)
+0:17              Sequence
+0:17                Constant:
+0:17                  0 (const int)
+0:17            direct index ( temp int)
+0:17              Constant:
+0:17                0 (const int)
+0:17                0 (const int)
+0:17              Constant:
+0:17                1 (const int)
+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:?         'input' ( temp 4-component vector of float)
+0:?         'input' (layout( location=8) in 4-component vector of float)
+0:16      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=7) out 4-component vector of float)
+0:16        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'input' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'buffer1' (layout( set=0 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 2-component vector of float f} @data})
+0:?     'buffer3' (layout( set=2 binding=3 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 2-component vector of float f} @data})
+0:?     'attach' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=7) out 4-component vector of float)
+0:?     'input' (layout( location=8) in 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 47
+
+                              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 16  "attach"
+                              Name 31  "input"
+                              Name 33  "input"
+                              Name 36  "@entryPointOutput"
+                              Name 37  "param"
+                              Name 41  "S"
+                              MemberName 41(S) 0  "f"
+                              Name 43  "buffer1"
+                              MemberName 43(buffer1) 0  "@data"
+                              Name 45  "buffer1"
+                              Name 46  "buffer3"
+                              Decorate 16(attach) DescriptorSet 0
+                              Decorate 16(attach) InputAttachmentIndex 4
+                              Decorate 33(input) Location 8
+                              Decorate 36(@entryPointOutput) Location 7
+                              MemberDecorate 41(S) 0 Offset 0
+                              Decorate 42 ArrayStride 8
+                              MemberDecorate 43(buffer1) 0 NonWritable
+                              MemberDecorate 43(buffer1) 0 Offset 0
+                              Decorate 43(buffer1) BufferBlock
+                              Decorate 45(buffer1) DescriptorSet 0
+                              Decorate 45(buffer1) Binding 1
+                              Decorate 46(buffer3) DescriptorSet 2
+                              Decorate 46(buffer3) Binding 3
+               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(attach):     15(ptr) Variable UniformConstant
+              18:             TypeInt 32 1
+              19:             TypeVector 18(int) 2
+              20:     18(int) Constant 0
+              21:   19(ivec2) ConstantComposite 20 20
+              22:             TypeInt 32 0
+              23:     22(int) Constant 0
+              25:     22(int) Constant 1
+              32:             TypePointer Input 7(fvec4)
+       33(input):     32(ptr) Variable Input
+              35:             TypePointer Output 7(fvec4)
+36(@entryPointOutput):     35(ptr) Variable Output
+              40:             TypeVector 6(float) 2
+           41(S):             TypeStruct 40(fvec2)
+              42:             TypeRuntimeArray 41(S)
+     43(buffer1):             TypeStruct 42
+              44:             TypePointer Uniform 43(buffer1)
+     45(buffer1):     44(ptr) Variable Uniform
+     46(buffer3):     44(ptr) Variable Uniform
+         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:    7(fvec4) Load 10(input)
+              17:          14 Load 16(attach)
+              24:     18(int) CompositeExtract 21 0
+              26:     18(int) CompositeExtract 21 1
+              27:    7(fvec4) ImageFetch 17 24 Lod 26
+              28:    7(fvec4) FAdd 13 27
+                              ReturnValue 28
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out b/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out
new file mode 100755
index 0000000..e00ae52
--- /dev/null
+++ b/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out
@@ -0,0 +1,109 @@
+hlsl.attributeGlobalBuffer.frag
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:6  Function Definition: @main( ( temp 4-component vector of float)
+0:6    Function Parameters: 
+0:?     Sequence
+0:7      Branch: Return with expression
+0:7        add ( temp 4-component vector of float)
+0:7          u1: direct index for structure ( uniform 4-component vector of float)
+0:7            'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+0:7            Constant:
+0:7              0 (const uint)
+0:7          u2: direct index for structure ( uniform 4-component vector of float)
+0:7            'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+0:7            Constant:
+0:7              1 (const uint)
+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:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:6        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+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:6  Function Definition: @main( ( temp 4-component vector of float)
+0:6    Function Parameters: 
+0:?     Sequence
+0:7      Branch: Return with expression
+0:7        add ( temp 4-component vector of float)
+0:7          u1: direct index for structure ( uniform 4-component vector of float)
+0:7            'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+0:7            Constant:
+0:7              0 (const uint)
+0:7          u2: direct index for structure ( uniform 4-component vector of float)
+0:7            'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+0:7            Constant:
+0:7              1 (const uint)
+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:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:6        Function Call: @main( ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'anon@0' (layout( set=2 binding=5 row_major std140) uniform block{ uniform 4-component vector of float u1,  uniform 4-component vector of float u2})
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 28
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 26
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 9  "@main("
+                              Name 11  "$Global"
+                              MemberName 11($Global) 0  "u1"
+                              MemberName 11($Global) 1  "u2"
+                              Name 13  ""
+                              Name 26  "@entryPointOutput"
+                              MemberDecorate 11($Global) 0 Offset 0
+                              MemberDecorate 11($Global) 1 Offset 16
+                              Decorate 11($Global) Block
+                              Decorate 13 DescriptorSet 2
+                              Decorate 13 Binding 5
+                              Decorate 26(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypeFunction 7(fvec4)
+     11($Global):             TypeStruct 7(fvec4) 7(fvec4)
+              12:             TypePointer Uniform 11($Global)
+              13:     12(ptr) Variable Uniform
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:             TypePointer Uniform 7(fvec4)
+              19:     14(int) Constant 1
+              25:             TypePointer Output 7(fvec4)
+26(@entryPointOutput):     25(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+              27:    7(fvec4) FunctionCall 9(@main()
+                              Store 26(@entryPointOutput) 27
+                              Return
+                              FunctionEnd
+       9(@main():    7(fvec4) Function None 8
+              10:             Label
+              17:     16(ptr) AccessChain 13 15
+              18:    7(fvec4) Load 17
+              20:     16(ptr) AccessChain 13 19
+              21:    7(fvec4) Load 20
+              22:    7(fvec4) FAdd 18 21
+                              ReturnValue 22
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.basic.comp.out b/Test/baseResults/hlsl.basic.comp.out
index 9842506..b72c848 100755
--- a/Test/baseResults/hlsl.basic.comp.out
+++ b/Test/baseResults/hlsl.basic.comp.out
@@ -60,7 +60,7 @@
 0:?     'gti' ( in int LocalInvocationID)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 35
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.basic.geom.out b/Test/baseResults/hlsl.basic.geom.out
index 220180c..9d9aaa7 100644
--- a/Test/baseResults/hlsl.basic.geom.out
+++ b/Test/baseResults/hlsl.basic.geom.out
@@ -188,7 +188,7 @@
 0:?     'OutputStream.something' (layout( location=1) out int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 68
 
                               Capability Geometry
diff --git a/Test/baseResults/hlsl.boolConv.vert.out b/Test/baseResults/hlsl.boolConv.vert.out
index 32c6eb2..5d94fe9 100755
--- a/Test/baseResults/hlsl.boolConv.vert.out
+++ b/Test/baseResults/hlsl.boolConv.vert.out
@@ -224,7 +224,7 @@
 0:?     '@entryPointOutput' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 109
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.buffer.frag.out b/Test/baseResults/hlsl.buffer.frag.out
index c0d251c..0b73f8d 100755
--- a/Test/baseResults/hlsl.buffer.frag.out
+++ b/Test/baseResults/hlsl.buffer.frag.out
@@ -114,7 +114,7 @@
 0:?     'input' ( in 4-component vector of float FragCoord)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 61
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.calculatelod.dx10.frag.out b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
index 217edf0..bbdd216 100644
--- a/Test/baseResults/hlsl.calculatelod.dx10.frag.out
+++ b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
@@ -356,7 +356,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 148
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.cast.frag.out b/Test/baseResults/hlsl.cast.frag.out
index 854c94e..5d7cd71 100755
--- a/Test/baseResults/hlsl.cast.frag.out
+++ b/Test/baseResults/hlsl.cast.frag.out
@@ -72,7 +72,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 39
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.charLit.vert.out b/Test/baseResults/hlsl.charLit.vert.out
index cc8388a..4555ba6 100755
--- a/Test/baseResults/hlsl.charLit.vert.out
+++ b/Test/baseResults/hlsl.charLit.vert.out
@@ -146,7 +146,7 @@
 0:?     '@entryPointOutput' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 58
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clip.frag.out b/Test/baseResults/hlsl.clip.frag.out
index 9b2de87..e2e1a0a 100644
--- a/Test/baseResults/hlsl.clip.frag.out
+++ b/Test/baseResults/hlsl.clip.frag.out
@@ -74,7 +74,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 30
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-1.frag.out b/Test/baseResults/hlsl.clipdistance-1.frag.out
index b3cdb61..8327898 100644
--- a/Test/baseResults/hlsl.clipdistance-1.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-1.frag.out
@@ -98,7 +98,7 @@
 0:?     'cull' ( in 1-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 53
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-1.geom.out b/Test/baseResults/hlsl.clipdistance-1.geom.out
index bde7822..5fd9aec 100644
--- a/Test/baseResults/hlsl.clipdistance-1.geom.out
+++ b/Test/baseResults/hlsl.clipdistance-1.geom.out
@@ -550,7 +550,7 @@
 0:?     'OutputStream.clip' ( out 2-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 118
 
                               Capability Geometry
diff --git a/Test/baseResults/hlsl.clipdistance-1.vert.out b/Test/baseResults/hlsl.clipdistance-1.vert.out
index b11c1cf..94b1c7f 100644
--- a/Test/baseResults/hlsl.clipdistance-1.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-1.vert.out
@@ -108,7 +108,7 @@
 0:?     'cull' ( out 1-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 46
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-2.frag.out b/Test/baseResults/hlsl.clipdistance-2.frag.out
index f39295e..cbda87c 100644
--- a/Test/baseResults/hlsl.clipdistance-2.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-2.frag.out
@@ -290,7 +290,7 @@
 0:?     'cull' ( in 4-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 84
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-2.geom.out b/Test/baseResults/hlsl.clipdistance-2.geom.out
index 158cb2c..1b9f020 100644
--- a/Test/baseResults/hlsl.clipdistance-2.geom.out
+++ b/Test/baseResults/hlsl.clipdistance-2.geom.out
@@ -724,7 +724,7 @@
 0:?     'OutputStream.clip' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 128
 
                               Capability Geometry
diff --git a/Test/baseResults/hlsl.clipdistance-2.vert.out b/Test/baseResults/hlsl.clipdistance-2.vert.out
index bdab064..9afe2ed 100644
--- a/Test/baseResults/hlsl.clipdistance-2.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-2.vert.out
@@ -420,7 +420,7 @@
 0:?     'cull' ( out 4-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 89
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-3.frag.out b/Test/baseResults/hlsl.clipdistance-3.frag.out
index 8515cd7..1faa87e 100644
--- a/Test/baseResults/hlsl.clipdistance-3.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-3.frag.out
@@ -98,7 +98,7 @@
 0:?     'cull' ( in 2-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 53
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-3.geom.out b/Test/baseResults/hlsl.clipdistance-3.geom.out
index d48c73a..c99a957 100644
--- a/Test/baseResults/hlsl.clipdistance-3.geom.out
+++ b/Test/baseResults/hlsl.clipdistance-3.geom.out
@@ -630,7 +630,7 @@
 0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 127
 
                               Capability Geometry
diff --git a/Test/baseResults/hlsl.clipdistance-3.vert.out b/Test/baseResults/hlsl.clipdistance-3.vert.out
index a301b34..25ca231 100644
--- a/Test/baseResults/hlsl.clipdistance-3.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-3.vert.out
@@ -136,7 +136,7 @@
 0:?     'cull' ( out 2-element array of float CullDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 51
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-4.frag.out b/Test/baseResults/hlsl.clipdistance-4.frag.out
index b5fa6c5..b52d917 100644
--- a/Test/baseResults/hlsl.clipdistance-4.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-4.frag.out
@@ -174,7 +174,7 @@
 0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 57
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-4.geom.out b/Test/baseResults/hlsl.clipdistance-4.geom.out
index 82d0c0a..9518823 100644
--- a/Test/baseResults/hlsl.clipdistance-4.geom.out
+++ b/Test/baseResults/hlsl.clipdistance-4.geom.out
@@ -612,7 +612,7 @@
 0:?     'OutputStream.clip1' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 130
 
                               Capability Geometry
diff --git a/Test/baseResults/hlsl.clipdistance-4.vert.out b/Test/baseResults/hlsl.clipdistance-4.vert.out
index ac99334..575f7d1 100644
--- a/Test/baseResults/hlsl.clipdistance-4.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-4.vert.out
@@ -270,7 +270,7 @@
 0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 72
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-5.frag.out b/Test/baseResults/hlsl.clipdistance-5.frag.out
index 7c1bac5..7a7f985 100644
--- a/Test/baseResults/hlsl.clipdistance-5.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-5.frag.out
@@ -232,7 +232,7 @@
 0:?     'v.ClipRect' ( in 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 62
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-5.vert.out b/Test/baseResults/hlsl.clipdistance-5.vert.out
index 7a50973..5e40f88 100644
--- a/Test/baseResults/hlsl.clipdistance-5.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-5.vert.out
@@ -318,7 +318,7 @@
 0:?     '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 73
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-6.frag.out b/Test/baseResults/hlsl.clipdistance-6.frag.out
index c249b0e..907122d 100644
--- a/Test/baseResults/hlsl.clipdistance-6.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-6.frag.out
@@ -282,7 +282,7 @@
 0:?     'v.clip1' ( in 8-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 79
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-6.vert.out b/Test/baseResults/hlsl.clipdistance-6.vert.out
index 6449482..15c987c 100644
--- a/Test/baseResults/hlsl.clipdistance-6.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-6.vert.out
@@ -428,7 +428,7 @@
 0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 86
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-7.frag.out b/Test/baseResults/hlsl.clipdistance-7.frag.out
index e6e5c00..03c329f 100644
--- a/Test/baseResults/hlsl.clipdistance-7.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-7.frag.out
@@ -270,7 +270,7 @@
 0:?     'v.clip1' ( in 8-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 78
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-7.vert.out b/Test/baseResults/hlsl.clipdistance-7.vert.out
index 5a93c2c..468ea66 100644
--- a/Test/baseResults/hlsl.clipdistance-7.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-7.vert.out
@@ -384,7 +384,7 @@
 0:?     '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 81
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-8.frag.out b/Test/baseResults/hlsl.clipdistance-8.frag.out
index 6777efa..6abc4b1 100644
--- a/Test/baseResults/hlsl.clipdistance-8.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-8.frag.out
@@ -186,7 +186,7 @@
 0:?     'v.clip1' ( in 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 65
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-8.vert.out b/Test/baseResults/hlsl.clipdistance-8.vert.out
index 1705f2b..6188f6e 100644
--- a/Test/baseResults/hlsl.clipdistance-8.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-8.vert.out
@@ -240,7 +240,7 @@
 0:?     '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 62
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-9.frag.out b/Test/baseResults/hlsl.clipdistance-9.frag.out
index b5c0926..57a722b 100644
--- a/Test/baseResults/hlsl.clipdistance-9.frag.out
+++ b/Test/baseResults/hlsl.clipdistance-9.frag.out
@@ -144,7 +144,7 @@
 0:?     'clip0' ( in 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 68
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.clipdistance-9.vert.out b/Test/baseResults/hlsl.clipdistance-9.vert.out
index f984be0..1dc8355 100644
--- a/Test/baseResults/hlsl.clipdistance-9.vert.out
+++ b/Test/baseResults/hlsl.clipdistance-9.vert.out
@@ -194,7 +194,7 @@
 0:?     'clip0' ( out 4-element array of float ClipDistance)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 67
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.comparison.vec.frag.out b/Test/baseResults/hlsl.comparison.vec.frag.out
index 2e57170..e2d4637 100644
--- a/Test/baseResults/hlsl.comparison.vec.frag.out
+++ b/Test/baseResults/hlsl.comparison.vec.frag.out
@@ -262,7 +262,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 96
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.conditional.frag.out b/Test/baseResults/hlsl.conditional.frag.out
index 7397c6f..bbcfd55 100755
--- a/Test/baseResults/hlsl.conditional.frag.out
+++ b/Test/baseResults/hlsl.conditional.frag.out
@@ -522,7 +522,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 220
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.constantbuffer.frag.out b/Test/baseResults/hlsl.constantbuffer.frag.out
index 2c7dafe..58e9ed8 100644
--- a/Test/baseResults/hlsl.constantbuffer.frag.out
+++ b/Test/baseResults/hlsl.constantbuffer.frag.out
@@ -45,7 +45,7 @@
 0:24                direct index (layout( row_major std140) temp 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
 0:24                  'cb3' (layout( row_major std140) uniform 2-element array of 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
 0:24                  Constant:
-0:24                    2 (const int)
+0:24                    1 (const int)
 0:24                Constant:
 0:24                  3 (const int)
 0:24              Constant:
@@ -113,7 +113,7 @@
 0:24                direct index (layout( row_major std140) temp 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
 0:24                  'cb3' (layout( row_major std140) uniform 2-element array of 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
 0:24                  Constant:
-0:24                    2 (const int)
+0:24                    1 (const int)
 0:24                Constant:
 0:24                  3 (const int)
 0:24              Constant:
@@ -132,7 +132,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 66
 
                               Capability Shader
@@ -231,7 +231,7 @@
               54:    7(fvec4)   FAdd 45 53
                                 ReturnValue 54
               56:               Label
-              58:     41(ptr)   AccessChain 18(cb3) 21 57 20
+              58:     41(ptr)   AccessChain 18(cb3) 20 57 20
               59:    6(float)   Load 58
               60:    7(fvec4)   CompositeConstruct 59 59 59 59
                                 ReturnValue 60
diff --git a/Test/baseResults/hlsl.constructArray.vert.out b/Test/baseResults/hlsl.constructArray.vert.out
index dd2c243..7140bea 100755
--- a/Test/baseResults/hlsl.constructArray.vert.out
+++ b/Test/baseResults/hlsl.constructArray.vert.out
@@ -268,7 +268,7 @@
 0:?     '@entryPointOutput' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 89
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.constructexpr.frag.out b/Test/baseResults/hlsl.constructexpr.frag.out
index ecaf95a..1321bfe 100644
--- a/Test/baseResults/hlsl.constructexpr.frag.out
+++ b/Test/baseResults/hlsl.constructexpr.frag.out
@@ -104,7 +104,7 @@
 0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 40
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.constructimat.frag.out b/Test/baseResults/hlsl.constructimat.frag.out
index adabb80..f54945a 100644
--- a/Test/baseResults/hlsl.constructimat.frag.out
+++ b/Test/baseResults/hlsl.constructimat.frag.out
@@ -544,7 +544,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 98
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.dashI.vert.out b/Test/baseResults/hlsl.dashI.vert.out
index 27e9129..e8c1dc6 100644
--- a/Test/baseResults/hlsl.dashI.vert.out
+++ b/Test/baseResults/hlsl.dashI.vert.out
@@ -1,6 +1,6 @@
 hlsl.dashI.vert
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 40
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out
index 3d493f7..a54c98d 100644
--- a/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out
+++ b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out
@@ -1,6 +1,6 @@
 hlsl.deadFunctionMissingBody.vert
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 18
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.depthGreater.frag.out b/Test/baseResults/hlsl.depthGreater.frag.out
index f1bbb5b..44c414c 100755
--- a/Test/baseResults/hlsl.depthGreater.frag.out
+++ b/Test/baseResults/hlsl.depthGreater.frag.out
@@ -50,7 +50,7 @@
 0:?     'depth' ( out float FragDepth)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 20
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.depthLess.frag.out b/Test/baseResults/hlsl.depthLess.frag.out
index 7a3e926..f97f1be 100755
--- a/Test/baseResults/hlsl.depthLess.frag.out
+++ b/Test/baseResults/hlsl.depthLess.frag.out
@@ -42,7 +42,7 @@
 0:?     '@entryPointOutput' ( out float FragDepth)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 16
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.discard.frag.out b/Test/baseResults/hlsl.discard.frag.out
index 508ac5a..7a6ed45 100755
--- a/Test/baseResults/hlsl.discard.frag.out
+++ b/Test/baseResults/hlsl.discard.frag.out
@@ -108,7 +108,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 50
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.doLoop.frag.out b/Test/baseResults/hlsl.doLoop.frag.out
index bdd9338..bee6c29 100755
--- a/Test/baseResults/hlsl.doLoop.frag.out
+++ b/Test/baseResults/hlsl.doLoop.frag.out
@@ -144,7 +144,7 @@
 0:?     'input' (layout( location=0) in float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 71
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.domain.1.tese.out b/Test/baseResults/hlsl.domain.1.tese.out
index e8a1955..e0fa528 100644
--- a/Test/baseResults/hlsl.domain.1.tese.out
+++ b/Test/baseResults/hlsl.domain.1.tese.out
@@ -286,7 +286,7 @@
 0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 103
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.domain.2.tese.out b/Test/baseResults/hlsl.domain.2.tese.out
index 0f42131..02c86ae 100644
--- a/Test/baseResults/hlsl.domain.2.tese.out
+++ b/Test/baseResults/hlsl.domain.2.tese.out
@@ -284,7 +284,7 @@
 0:?     'pcf_data.foo' (layout( location=2) patch in float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 98
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.domain.3.tese.out b/Test/baseResults/hlsl.domain.3.tese.out
index 254afe6..6330d08 100644
--- a/Test/baseResults/hlsl.domain.3.tese.out
+++ b/Test/baseResults/hlsl.domain.3.tese.out
@@ -264,7 +264,7 @@
 0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 100
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.emptystruct.init.vert.out b/Test/baseResults/hlsl.emptystruct.init.vert.out
index 202e2c0..295fb04 100644
--- a/Test/baseResults/hlsl.emptystruct.init.vert.out
+++ b/Test/baseResults/hlsl.emptystruct.init.vert.out
@@ -60,7 +60,7 @@
 0:?     'vertexIndex' (layout( location=0) in uint)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 29
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.emptystructreturn.frag.out b/Test/baseResults/hlsl.emptystructreturn.frag.out
index 5440045..ee20b7d 100644
--- a/Test/baseResults/hlsl.emptystructreturn.frag.out
+++ b/Test/baseResults/hlsl.emptystructreturn.frag.out
@@ -50,13 +50,13 @@
 0:?   Linker Objects
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 27
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 20 23
+                              EntryPoint Fragment 4  "main"
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
diff --git a/Test/baseResults/hlsl.emptystructreturn.vert.out b/Test/baseResults/hlsl.emptystructreturn.vert.out
index c8cea5d..7ff09dd 100644
--- a/Test/baseResults/hlsl.emptystructreturn.vert.out
+++ b/Test/baseResults/hlsl.emptystructreturn.vert.out
@@ -48,13 +48,13 @@
 0:?   Linker Objects
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 27
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 20 23
+                              EntryPoint Vertex 4  "main"
                               Source HLSL 500
                               Name 4  "main"
                               Name 6  "vs_in"
diff --git a/Test/baseResults/hlsl.entry-in.frag.out b/Test/baseResults/hlsl.entry-in.frag.out
index f274793..10d8544 100755
--- a/Test/baseResults/hlsl.entry-in.frag.out
+++ b/Test/baseResults/hlsl.entry-in.frag.out
@@ -166,7 +166,7 @@
 0:?     'i.i2' (layout( location=1) flat in 2-component vector of int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 74
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.entry-out.frag.out b/Test/baseResults/hlsl.entry-out.frag.out
index 9ff7d33..40fc164 100755
--- a/Test/baseResults/hlsl.entry-out.frag.out
+++ b/Test/baseResults/hlsl.entry-out.frag.out
@@ -244,7 +244,7 @@
 0:?     'out3.i' (layout( location=5) out 2-component vector of int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 89
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.entry.rename.frag.out b/Test/baseResults/hlsl.entry.rename.frag.out
index a85123d..9972ec0 100644
--- a/Test/baseResults/hlsl.entry.rename.frag.out
+++ b/Test/baseResults/hlsl.entry.rename.frag.out
@@ -72,7 +72,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 32
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out b/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out
index 4ff69a4..6b05ef2 100644
--- a/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out
+++ b/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out
@@ -1,6 +1,6 @@
 hlsl.explicitDescriptorSet.frag
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 31
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.explicitDescriptorSet.frag.out b/Test/baseResults/hlsl.explicitDescriptorSet.frag.out
index e33f9d6..2f09280 100644
--- a/Test/baseResults/hlsl.explicitDescriptorSet.frag.out
+++ b/Test/baseResults/hlsl.explicitDescriptorSet.frag.out
@@ -1,6 +1,6 @@
 hlsl.explicitDescriptorSet.frag
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 31
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.flatten.return.frag.out b/Test/baseResults/hlsl.flatten.return.frag.out
index fd344c9..730a989 100644
--- a/Test/baseResults/hlsl.flatten.return.frag.out
+++ b/Test/baseResults/hlsl.flatten.return.frag.out
@@ -118,7 +118,7 @@
 0:?     '@entryPointOutput.other_struct_member3' (layout( location=3) out float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 49
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.flattenOpaque.frag.out b/Test/baseResults/hlsl.flattenOpaque.frag.out
index aa72124..8eafba8 100755
--- a/Test/baseResults/hlsl.flattenOpaque.frag.out
+++ b/Test/baseResults/hlsl.flattenOpaque.frag.out
@@ -178,13 +178,13 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
-// Id's are bound by 85
+// Generated by (magic number): 80002
+// Id's are bound by 99
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 83
+                              EntryPoint Fragment 4  "main" 97
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -201,22 +201,28 @@
                               Name 30  "s.tex"
                               Name 31  "f2"
                               Name 35  "@main("
-                              Name 37  "tex"
-                              Name 68  "s.s2D"
-                              Name 70  "param"
-                              Name 73  "s2.s2D"
-                              Name 74  "s2.tex"
-                              Name 77  "param"
-                              Name 83  "@entryPointOutput"
-                              Decorate 37(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
+                              Name 38  "tex"
+                              Name 70  "s.s2D"
+                              Name 71  "param"
+                              Name 74  "param"
+                              Name 76  "param"
+                              Name 79  "s2.s2D"
+                              Name 80  "s2.tex"
+                              Name 81  "param"
+                              Name 83  "param"
+                              Name 87  "param"
+                              Name 89  "param"
+                              Name 91  "param"
+                              Name 97  "@entryPointOutput"
+                              Decorate 38(tex) DescriptorSet 0
+                              Decorate 70(s.s2D) DescriptorSet 0
+                              Decorate 79(s2.s2D) DescriptorSet 0
+                              Decorate 80(s2.tex) DescriptorSet 0
+                              Decorate 97(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeSampler
-               7:             TypePointer UniformConstant 6
+               7:             TypePointer Function 6
                8:             TypeFloat 32
                9:             TypeVector 8(float) 4
               10:             TypeFunction 9(fvec4) 7(ptr)
@@ -224,80 +230,100 @@
               15:             TypePointer Function 14(fvec2)
               16:             TypeFunction 9(fvec4) 7(ptr) 15(ptr)
               21:             TypeImage 8(float) 2D sampled format:Unknown
-              22:             TypePointer UniformConstant 21
+              22:             TypePointer Function 21
               23:             TypeFunction 9(fvec4) 7(ptr) 22(ptr)
               28:             TypeFunction 9(fvec4) 7(ptr) 22(ptr) 15(ptr)
               34:             TypeFunction 9(fvec4)
-         37(tex):     22(ptr) Variable UniformConstant
-              40:             TypeSampledImage 21
-              42:    8(float) Constant 1045220557
-              43:    8(float) Constant 1050253722
-              44:   14(fvec2) ConstantComposite 42 43
-       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
+              37:             TypePointer UniformConstant 21
+         38(tex):     37(ptr) Variable UniformConstant
+              41:             TypeSampledImage 21
+              43:    8(float) Constant 1045220557
+              44:    8(float) Constant 1050253722
+              45:   14(fvec2) ConstantComposite 43 44
+              69:             TypePointer UniformConstant 6
+       70(s.s2D):     69(ptr) Variable UniformConstant
+      79(s2.s2D):     69(ptr) Variable UniformConstant
+      80(s2.tex):     37(ptr) Variable UniformConstant
+              96:             TypePointer Output 9(fvec4)
+97(@entryPointOutput):     96(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-              84:    9(fvec4) FunctionCall 35(@main()
-                              Store 83(@entryPointOutput) 84
+              98:    9(fvec4) FunctionCall 35(@main()
+                              Store 97(@entryPointOutput) 98
                               Return
                               FunctionEnd
 12(osCall1(struct-os-p11;):    9(fvec4) Function None 10
        11(s.s2D):      7(ptr) FunctionParameter
               13:             Label
-              38:          21 Load 37(tex)
-              39:           6 Load 11(s.s2D)
-              41:          40 SampledImage 38 39
-              45:    9(fvec4) ImageSampleImplicitLod 41 44
-                              ReturnValue 45
+              39:          21 Load 38(tex)
+              40:           6 Load 11(s.s2D)
+              42:          41 SampledImage 39 40
+              46:    9(fvec4) ImageSampleImplicitLod 42 45
+                              ReturnValue 46
                               FunctionEnd
 19(osCall2(struct-os-p11;vf2;):    9(fvec4) Function None 16
        17(s.s2D):      7(ptr) FunctionParameter
           18(f2):     15(ptr) FunctionParameter
               20:             Label
-              48:          21 Load 37(tex)
-              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
+              49:          21 Load 38(tex)
+              50:           6 Load 17(s.s2D)
+              51:          41 SampledImage 49 50
+              52:   14(fvec2) Load 18(f2)
+              53:    9(fvec4) ImageSampleImplicitLod 51 52
+                              ReturnValue 53
                               FunctionEnd
 26(os2Call1(struct-os2-p1-t211;):    9(fvec4) Function None 23
        24(s.s2D):      7(ptr) FunctionParameter
        25(s.tex):     22(ptr) FunctionParameter
               27:             Label
-              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
+              56:          21 Load 25(s.tex)
+              57:           6 Load 24(s.s2D)
+              58:          41 SampledImage 56 57
+              59:    9(fvec4) ImageSampleImplicitLod 58 45
+                              ReturnValue 59
                               FunctionEnd
 32(os2Call2(struct-os2-p1-t211;vf2;):    9(fvec4) Function None 28
        29(s.s2D):      7(ptr) FunctionParameter
        30(s.tex):     22(ptr) FunctionParameter
           31(f2):     15(ptr) FunctionParameter
               33:             Label
-              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
-                              ReturnValue 65
+              62:          21 Load 30(s.tex)
+              63:           6 Load 29(s.s2D)
+              64:          41 SampledImage 62 63
+              65:   14(fvec2) Load 31(f2)
+              66:    9(fvec4) ImageSampleImplicitLod 64 65
+                              ReturnValue 66
                               FunctionEnd
       35(@main():    9(fvec4) Function None 34
               36:             Label
-       70(param):     15(ptr) Variable Function
-       77(param):     15(ptr) Variable Function
-              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(s.s2D) 70(param)
-              72:    9(fvec4) FAdd 69 71
-              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(s2.s2D) 74(s2.tex) 77(param)
-              79:    9(fvec4) FAdd 76 78
-                              ReturnValue 79
+       71(param):      7(ptr) Variable Function
+       74(param):      7(ptr) Variable Function
+       76(param):     15(ptr) Variable Function
+       81(param):      7(ptr) Variable Function
+       83(param):     22(ptr) Variable Function
+       87(param):      7(ptr) Variable Function
+       89(param):     22(ptr) Variable Function
+       91(param):     15(ptr) Variable Function
+              72:           6 Load 70(s.s2D)
+                              Store 71(param) 72
+              73:    9(fvec4) FunctionCall 12(osCall1(struct-os-p11;) 71(param)
+              75:           6 Load 70(s.s2D)
+                              Store 74(param) 75
+                              Store 76(param) 45
+              77:    9(fvec4) FunctionCall 19(osCall2(struct-os-p11;vf2;) 74(param) 76(param)
+              78:    9(fvec4) FAdd 73 77
+              82:           6 Load 79(s2.s2D)
+                              Store 81(param) 82
+              84:          21 Load 80(s2.tex)
+                              Store 83(param) 84
+              85:    9(fvec4) FunctionCall 26(os2Call1(struct-os2-p1-t211;) 81(param) 83(param)
+              86:    9(fvec4) FAdd 78 85
+              88:           6 Load 79(s2.s2D)
+                              Store 87(param) 88
+              90:          21 Load 80(s2.tex)
+                              Store 89(param) 90
+                              Store 91(param) 45
+              92:    9(fvec4) FunctionCall 32(os2Call2(struct-os2-p1-t211;vf2;) 87(param) 89(param) 91(param)
+              93:    9(fvec4) FAdd 86 92
+                              ReturnValue 93
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
index 4bd3161..b82cfff 100755
--- a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
+++ b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out
@@ -1,6 +1,5 @@
 hlsl.flattenOpaqueInit.vert
-WARNING: 0:20: '=' : cannot do member-wise aliasing for opaque members with this initializer 
-
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
 Shader version: 500
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
@@ -19,13 +18,36 @@
 0:10  Function Definition: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
 0:10    Function Parameters: 
 0:?     Sequence
-0:12      'g_tInputTexture_sampler' ( uniform sampler)
-0:13      'g_tInputTexture' ( uniform texture2D)
+0:12      move second child to first child ( temp sampler)
+0:?         't.smpl' ( temp sampler)
+0:12        'g_tInputTexture_sampler' ( uniform sampler)
+0:13      move second child to first child ( temp texture2D)
+0:?         't.tex' ( temp texture2D)
+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:19      Sequence
+0:19        Sequence
+0:19          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19            Construct structure ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              'g_tInputTexture_sampler' ( uniform sampler)
+0:19              'g_tInputTexture' ( uniform texture2D)
+0:19          move second child to first child ( temp sampler)
+0:?             'tex1.smpl' ( temp sampler)
+0:19            smpl: direct index for structure ( temp sampler)
+0:19              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              Constant:
+0:19                0 (const int)
+0:19          move second child to first child ( temp texture2D)
+0:?             'tex1.tex' ( temp texture2D)
+0:19            tex: direct index for structure ( temp texture2D)
+0:19              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              Constant:
+0:19                1 (const int)
 0:20      Sequence
 0:20        Sequence
 0:20          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
@@ -43,10 +65,18 @@
 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:21      Sequence
+0:21        Sequence
+0:21          move second child to first child ( temp sampler)
+0:?             'tex3.smpl' ( temp sampler)
+0:?             'tex1.smpl' ( temp sampler)
+0:21          move second child to first child ( temp texture2D)
+0:?             'tex3.tex' ( temp texture2D)
+0:?             'tex1.tex' ( temp texture2D)
+0:22      Branch: Return with expression
+0:22        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
+0:?           'tex3.smpl' ( temp sampler)
+0:?           'tex3.tex' ( temp texture2D)
 0:18  Function Definition: main( ( temp void)
 0:18    Function Parameters: 
 0:?     Sequence
@@ -80,13 +110,36 @@
 0:10  Function Definition: fillOpaque( ( temp structure{ temp sampler smpl,  temp texture2D tex})
 0:10    Function Parameters: 
 0:?     Sequence
-0:12      'g_tInputTexture_sampler' ( uniform sampler)
-0:13      'g_tInputTexture' ( uniform texture2D)
+0:12      move second child to first child ( temp sampler)
+0:?         't.smpl' ( temp sampler)
+0:12        'g_tInputTexture_sampler' ( uniform sampler)
+0:13      move second child to first child ( temp texture2D)
+0:?         't.tex' ( temp texture2D)
+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:19      Sequence
+0:19        Sequence
+0:19          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19            Construct structure ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              'g_tInputTexture_sampler' ( uniform sampler)
+0:19              'g_tInputTexture' ( uniform texture2D)
+0:19          move second child to first child ( temp sampler)
+0:?             'tex1.smpl' ( temp sampler)
+0:19            smpl: direct index for structure ( temp sampler)
+0:19              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              Constant:
+0:19                0 (const int)
+0:19          move second child to first child ( temp texture2D)
+0:?             'tex1.tex' ( temp texture2D)
+0:19            tex: direct index for structure ( temp texture2D)
+0:19              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex})
+0:19              Constant:
+0:19                1 (const int)
 0:20      Sequence
 0:20        Sequence
 0:20          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex})
@@ -104,10 +157,18 @@
 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:21      Sequence
+0:21        Sequence
+0:21          move second child to first child ( temp sampler)
+0:?             'tex3.smpl' ( temp sampler)
+0:?             'tex1.smpl' ( temp sampler)
+0:21          move second child to first child ( temp texture2D)
+0:?             'tex3.tex' ( temp texture2D)
+0:?             'tex1.tex' ( temp texture2D)
+0:22      Branch: Return with expression
+0:22        Function Call: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
+0:?           'tex3.smpl' ( temp sampler)
+0:?           'tex3.tex' ( temp texture2D)
 0:18  Function Definition: main( ( temp void)
 0:18    Function Parameters: 
 0:?     Sequence
@@ -120,13 +181,13 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
-// Id's are bound by 60
+// Generated by (magic number): 80002
+// Id's are bound by 84
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 58
+                              EntryPoint Vertex 4  "main" 82
                               Source HLSL 500
                               Name 4  "main"
                               Name 15  "lookUp(struct-FxaaTex-p1-t211;"
@@ -137,23 +198,32 @@
                               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
+                              Name 36  "t.smpl"
+                              Name 38  "g_tInputTexture_sampler"
+                              Name 40  "t.tex"
+                              Name 42  "g_tInputTexture"
+                              Name 45  "t"
+                              Name 49  "flattenTemp"
+                              Name 53  "tex1.smpl"
+                              Name 58  "tex1.tex"
+                              Name 62  "flattenTemp"
+                              Name 64  "tex2.smpl"
+                              Name 67  "tex2.tex"
+                              Name 70  "tex3.smpl"
+                              Name 72  "tex3.tex"
+                              Name 74  "param"
+                              Name 76  "param"
+                              Name 82  "@entryPointOutput"
+                              Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
+                              Decorate 42(g_tInputTexture) DescriptorSet 0
+                              Decorate 82(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeSampler
-               7:             TypePointer UniformConstant 6
+               7:             TypePointer Function 6
                8:             TypeFloat 32
                9:             TypeImage 8(float) 2D sampled format:Unknown
-              10:             TypePointer UniformConstant 9
+              10:             TypePointer Function 9
               11:             TypeVector 8(float) 4
               12:             TypeFunction 11(fvec4) 7(ptr) 10(ptr)
      17(FxaaTex):             TypeStruct 6 9
@@ -165,22 +235,20 @@
               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
+              37:             TypePointer UniformConstant 6
+38(g_tInputTexture_sampler):     37(ptr) Variable UniformConstant
+              41:             TypePointer UniformConstant 9
+42(g_tInputTexture):     41(ptr) Variable UniformConstant
+              44:             TypePointer Function 17(FxaaTex)
+              54:             TypeInt 32 1
+              55:     54(int) Constant 0
+              59:     54(int) Constant 1
+              81:             TypePointer Output 11(fvec4)
+82(@entryPointOutput):     81(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-              59:   11(fvec4) FunctionCall 22(@main()
-                              Store 58(@entryPointOutput) 59
+              83:   11(fvec4) FunctionCall 22(@main()
+                              Store 82(@entryPointOutput) 83
                               Return
                               FunctionEnd
 15(lookUp(struct-FxaaTex-p1-t211;):   11(fvec4) Function None 12
@@ -195,19 +263,54 @@
                               FunctionEnd
  19(fillOpaque(): 17(FxaaTex) Function None 18
               20:             Label
-              40: 17(FxaaTex) Load 39(t)
-                              ReturnValue 40
+      36(t.smpl):      7(ptr) Variable Function
+       40(t.tex):     10(ptr) Variable Function
+           45(t):     44(ptr) Variable Function
+              39:           6 Load 38(g_tInputTexture_sampler)
+                              Store 36(t.smpl) 39
+              43:           9 Load 42(g_tInputTexture)
+                              Store 40(t.tex) 43
+              46: 17(FxaaTex) Load 45(t)
+                              ReturnValue 46
                               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
+ 49(flattenTemp):     44(ptr) Variable Function
+   53(tex1.smpl):      7(ptr) Variable Function
+    58(tex1.tex):     10(ptr) Variable Function
+ 62(flattenTemp):     44(ptr) Variable Function
+   64(tex2.smpl):      7(ptr) Variable Function
+    67(tex2.tex):     10(ptr) Variable Function
+   70(tex3.smpl):      7(ptr) Variable Function
+    72(tex3.tex):     10(ptr) Variable Function
+       74(param):      7(ptr) Variable Function
+       76(param):     10(ptr) Variable Function
+              50:           6 Load 38(g_tInputTexture_sampler)
+              51:           9 Load 42(g_tInputTexture)
+              52: 17(FxaaTex) CompositeConstruct 50 51
+                              Store 49(flattenTemp) 52
+              56:      7(ptr) AccessChain 49(flattenTemp) 55
+              57:           6 Load 56
+                              Store 53(tex1.smpl) 57
+              60:     10(ptr) AccessChain 49(flattenTemp) 59
+              61:           9 Load 60
+                              Store 58(tex1.tex) 61
+              63: 17(FxaaTex) FunctionCall 19(fillOpaque()
+                              Store 62(flattenTemp) 63
+              65:      7(ptr) AccessChain 62(flattenTemp) 55
+              66:           6 Load 65
+                              Store 64(tex2.smpl) 66
+              68:     10(ptr) AccessChain 62(flattenTemp) 59
+              69:           9 Load 68
+                              Store 67(tex2.tex) 69
+              71:           6 Load 53(tex1.smpl)
+                              Store 70(tex3.smpl) 71
+              73:           9 Load 58(tex1.tex)
+                              Store 72(tex3.tex) 73
+              75:           6 Load 70(tex3.smpl)
+                              Store 74(param) 75
+              77:           9 Load 72(tex3.tex)
+                              Store 76(param) 77
+              78:   11(fvec4) FunctionCall 15(lookUp(struct-FxaaTex-p1-t211;) 74(param) 76(param)
+                              ReturnValue 78
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
index 1dbc3c3..2de3483 100755
--- a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
+++ b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out
@@ -1,4 +1,5 @@
 hlsl.flattenOpaqueInitMix.vert
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
 Shader version: 500
 0:? Sequence
 0:5  Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
@@ -19,15 +20,36 @@
 0:10    Function Parameters: 
 0:?     Sequence
 0:11      Sequence
-0:?         Sequence
+0:11        Sequence
+0:11          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11            Construct structure ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              'g_tInputTexture_sampler' ( uniform sampler)
+0:11              'g_tInputTexture' ( uniform texture2D)
+0:11              Constant:
+0:11                0.500000
+0:11          move second child to first child ( temp sampler)
+0:?             'tex.smpl' ( temp sampler)
+0:11            smpl: direct index for structure ( temp sampler)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                0 (const int)
+0:11          move second child to first child ( temp texture2D)
+0:?             'tex.tex' ( temp texture2D)
+0:11            tex: direct index for structure ( temp texture2D)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                1 (const int)
 0:11          move second child to first child ( temp float)
 0:?             'tex.f' ( temp float)
-0:11            Constant:
-0:11              0.500000
+0:11            f: direct index for structure ( temp float)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                2 (const int)
 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:?           'tex.smpl' ( temp sampler)
+0:?           'tex.tex' ( temp texture2D)
 0:?           'tex.f' ( temp float)
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
@@ -64,15 +86,36 @@
 0:10    Function Parameters: 
 0:?     Sequence
 0:11      Sequence
-0:?         Sequence
+0:11        Sequence
+0:11          move second child to first child ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11            'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11            Construct structure ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              'g_tInputTexture_sampler' ( uniform sampler)
+0:11              'g_tInputTexture' ( uniform texture2D)
+0:11              Constant:
+0:11                0.500000
+0:11          move second child to first child ( temp sampler)
+0:?             'tex.smpl' ( temp sampler)
+0:11            smpl: direct index for structure ( temp sampler)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                0 (const int)
+0:11          move second child to first child ( temp texture2D)
+0:?             'tex.tex' ( temp texture2D)
+0:11            tex: direct index for structure ( temp texture2D)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                1 (const int)
 0:11          move second child to first child ( temp float)
 0:?             'tex.f' ( temp float)
-0:11            Constant:
-0:11              0.500000
+0:11            f: direct index for structure ( temp float)
+0:11              'flattenTemp' ( temp structure{ temp sampler smpl,  temp texture2D tex,  temp float f})
+0:11              Constant:
+0:11                2 (const int)
 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:?           'tex.smpl' ( temp sampler)
+0:?           'tex.tex' ( temp texture2D)
 0:?           'tex.f' ( temp float)
 0:10  Function Definition: main( ( temp void)
 0:10    Function Parameters: 
@@ -86,13 +129,13 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
-// Id's are bound by 46
+// Generated by (magic number): 80002
+// Id's are bound by 70
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 44
+                              EntryPoint Vertex 4  "main" 68
                               Source HLSL 500
                               Name 4  "main"
                               Name 17  "lookUp(struct-FxaaTex-p1-t21-f11;"
@@ -100,21 +143,30 @@
                               Name 15  "tex.tex"
                               Name 16  "tex.f"
                               Name 20  "@main("
-                              Name 34  "tex.f"
-                              Name 36  "g_tInputTexture_sampler"
-                              Name 37  "g_tInputTexture"
-                              Name 38  "param"
-                              Name 44  "@entryPointOutput"
-                              Decorate 36(g_tInputTexture_sampler) DescriptorSet 0
-                              Decorate 37(g_tInputTexture) DescriptorSet 0
-                              Decorate 44(@entryPointOutput) Location 0
+                              Name 34  "FxaaTex"
+                              MemberName 34(FxaaTex) 0  "smpl"
+                              MemberName 34(FxaaTex) 1  "tex"
+                              MemberName 34(FxaaTex) 2  "f"
+                              Name 36  "flattenTemp"
+                              Name 38  "g_tInputTexture_sampler"
+                              Name 41  "g_tInputTexture"
+                              Name 45  "tex.smpl"
+                              Name 50  "tex.tex"
+                              Name 54  "tex.f"
+                              Name 58  "param"
+                              Name 60  "param"
+                              Name 62  "param"
+                              Name 68  "@entryPointOutput"
+                              Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
+                              Decorate 41(g_tInputTexture) DescriptorSet 0
+                              Decorate 68(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeSampler
-               7:             TypePointer UniformConstant 6
+               7:             TypePointer Function 6
                8:             TypeFloat 32
                9:             TypeImage 8(float) 2D sampled format:Unknown
-              10:             TypePointer UniformConstant 9
+              10:             TypePointer Function 9
               11:             TypePointer Function 8(float)
               12:             TypeVector 8(float) 4
               13:             TypeFunction 12(fvec4) 7(ptr) 10(ptr) 11(ptr)
@@ -122,15 +174,23 @@
               24:             TypeSampledImage 9
               28:             TypeVector 8(float) 2
               30:    8(float) Constant 0
-              35:    8(float) Constant 1056964608
-36(g_tInputTexture_sampler):      7(ptr) Variable UniformConstant
-37(g_tInputTexture):     10(ptr) Variable UniformConstant
-              43:             TypePointer Output 12(fvec4)
-44(@entryPointOutput):     43(ptr) Variable Output
+     34(FxaaTex):             TypeStruct 6 9 8(float)
+              35:             TypePointer Function 34(FxaaTex)
+              37:             TypePointer UniformConstant 6
+38(g_tInputTexture_sampler):     37(ptr) Variable UniformConstant
+              40:             TypePointer UniformConstant 9
+41(g_tInputTexture):     40(ptr) Variable UniformConstant
+              43:    8(float) Constant 1056964608
+              46:             TypeInt 32 1
+              47:     46(int) Constant 0
+              51:     46(int) Constant 1
+              55:     46(int) Constant 2
+              67:             TypePointer Output 12(fvec4)
+68(@entryPointOutput):     67(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
-              45:   12(fvec4) FunctionCall 20(@main()
-                              Store 44(@entryPointOutput) 45
+              69:   12(fvec4) FunctionCall 20(@main()
+                              Store 68(@entryPointOutput) 69
                               Return
                               FunctionEnd
 17(lookUp(struct-FxaaTex-p1-t21-f11;):   12(fvec4) Function None 13
@@ -149,11 +209,32 @@
                               FunctionEnd
       20(@main():   12(fvec4) Function None 19
               21:             Label
-       34(tex.f):     11(ptr) Variable Function
-       38(param):     11(ptr) Variable Function
-                              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
+ 36(flattenTemp):     35(ptr) Variable Function
+    45(tex.smpl):      7(ptr) Variable Function
+     50(tex.tex):     10(ptr) Variable Function
+       54(tex.f):     11(ptr) Variable Function
+       58(param):      7(ptr) Variable Function
+       60(param):     10(ptr) Variable Function
+       62(param):     11(ptr) Variable Function
+              39:           6 Load 38(g_tInputTexture_sampler)
+              42:           9 Load 41(g_tInputTexture)
+              44: 34(FxaaTex) CompositeConstruct 39 42 43
+                              Store 36(flattenTemp) 44
+              48:      7(ptr) AccessChain 36(flattenTemp) 47
+              49:           6 Load 48
+                              Store 45(tex.smpl) 49
+              52:     10(ptr) AccessChain 36(flattenTemp) 51
+              53:           9 Load 52
+                              Store 50(tex.tex) 53
+              56:     11(ptr) AccessChain 36(flattenTemp) 55
+              57:    8(float) Load 56
+                              Store 54(tex.f) 57
+              59:           6 Load 45(tex.smpl)
+                              Store 58(param) 59
+              61:           9 Load 50(tex.tex)
+                              Store 60(param) 61
+              63:    8(float) Load 54(tex.f)
+                              Store 62(param) 63
+              64:   12(fvec4) FunctionCall 17(lookUp(struct-FxaaTex-p1-t21-f11;) 58(param) 60(param) 62(param)
+                              ReturnValue 64
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenSubset.frag.out b/Test/baseResults/hlsl.flattenSubset.frag.out
new file mode 100755
index 0000000..f6d867f
--- /dev/null
+++ b/Test/baseResults/hlsl.flattenSubset.frag.out
@@ -0,0 +1,218 @@
+hlsl.flattenSubset.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:30  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:30    Function Parameters: 
+0:30      'vpos' ( in 4-component vector of float)
+0:?     Sequence
+0:33      move second child to first child ( temp sampler)
+0:?         's1.s0.ss' ( temp sampler)
+0:33        'samp' ( uniform sampler)
+0:34      Sequence
+0:34        move second child to first child ( temp float)
+0:?           's2.resources.b' ( temp float)
+0:?           's1.b' ( temp float)
+0:34        move second child to first child ( temp sampler)
+0:?           's2.resources.samplerState' ( temp sampler)
+0:?           's1.samplerState' ( temp sampler)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.s0.x' ( temp int)
+0:?           's1.s0.x' ( temp int)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.s0.y' ( temp int)
+0:?           's1.s0.y' ( temp int)
+0:34        move second child to first child ( temp sampler)
+0:?           's2.resources.s0.ss' ( temp sampler)
+0:?           's1.s0.ss' ( temp sampler)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.a' ( temp int)
+0:?           's1.a' ( temp int)
+0:35      Branch: Return with expression
+0:35        texture ( temp 4-component vector of float)
+0:35          Construct combined texture-sampler ( temp sampler2D)
+0:35            'tex' ( uniform texture2D)
+0:?             's2.resources.s0.ss' ( temp sampler)
+0:35          Constant:
+0:35            0.500000
+0:35            0.500000
+0:30  Function Definition: main( ( temp void)
+0:30    Function Parameters: 
+0:?     Sequence
+0:30      move second child to first child ( temp 4-component vector of float)
+0:?         'vpos' ( temp 4-component vector of float)
+0:?         'vpos' (layout( location=0) in 4-component vector of float)
+0:30      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:30        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'vpos' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'samp' ( uniform sampler)
+0:?     'tex' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'vpos' (layout( location=0) in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:30  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:30    Function Parameters: 
+0:30      'vpos' ( in 4-component vector of float)
+0:?     Sequence
+0:33      move second child to first child ( temp sampler)
+0:?         's1.s0.ss' ( temp sampler)
+0:33        'samp' ( uniform sampler)
+0:34      Sequence
+0:34        move second child to first child ( temp float)
+0:?           's2.resources.b' ( temp float)
+0:?           's1.b' ( temp float)
+0:34        move second child to first child ( temp sampler)
+0:?           's2.resources.samplerState' ( temp sampler)
+0:?           's1.samplerState' ( temp sampler)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.s0.x' ( temp int)
+0:?           's1.s0.x' ( temp int)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.s0.y' ( temp int)
+0:?           's1.s0.y' ( temp int)
+0:34        move second child to first child ( temp sampler)
+0:?           's2.resources.s0.ss' ( temp sampler)
+0:?           's1.s0.ss' ( temp sampler)
+0:34        move second child to first child ( temp int)
+0:?           's2.resources.a' ( temp int)
+0:?           's1.a' ( temp int)
+0:35      Branch: Return with expression
+0:35        texture ( temp 4-component vector of float)
+0:35          Construct combined texture-sampler ( temp sampler2D)
+0:35            'tex' ( uniform texture2D)
+0:?             's2.resources.s0.ss' ( temp sampler)
+0:35          Constant:
+0:35            0.500000
+0:35            0.500000
+0:30  Function Definition: main( ( temp void)
+0:30    Function Parameters: 
+0:?     Sequence
+0:30      move second child to first child ( temp 4-component vector of float)
+0:?         'vpos' ( temp 4-component vector of float)
+0:?         'vpos' (layout( location=0) in 4-component vector of float)
+0:30      move second child to first child ( temp 4-component vector of float)
+0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:30        Function Call: @main(vf4; ( temp 4-component vector of float)
+0:?           'vpos' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'samp' ( uniform sampler)
+0:?     'tex' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'vpos' (layout( location=0) in 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 61
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 54 57
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 11  "@main(vf4;"
+                              Name 10  "vpos"
+                              Name 15  "s1.s0.ss"
+                              Name 17  "samp"
+                              Name 20  "s2.resources.b"
+                              Name 21  "s1.b"
+                              Name 23  "s2.resources.samplerState"
+                              Name 24  "s1.samplerState"
+                              Name 28  "s2.resources.s0.x"
+                              Name 29  "s1.s0.x"
+                              Name 31  "s2.resources.s0.y"
+                              Name 32  "s1.s0.y"
+                              Name 34  "s2.resources.s0.ss"
+                              Name 36  "s2.resources.a"
+                              Name 37  "s1.a"
+                              Name 41  "tex"
+                              Name 52  "vpos"
+                              Name 54  "vpos"
+                              Name 57  "@entryPointOutput"
+                              Name 58  "param"
+                              Decorate 17(samp) DescriptorSet 0
+                              Decorate 41(tex) DescriptorSet 0
+                              Decorate 54(vpos) Location 0
+                              Decorate 57(@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)
+              13:             TypeSampler
+              14:             TypePointer Function 13
+              16:             TypePointer UniformConstant 13
+        17(samp):     16(ptr) Variable UniformConstant
+              19:             TypePointer Function 6(float)
+              26:             TypeInt 32 1
+              27:             TypePointer Function 26(int)
+              39:             TypeImage 6(float) 2D sampled format:Unknown
+              40:             TypePointer UniformConstant 39
+         41(tex):     40(ptr) Variable UniformConstant
+              44:             TypeSampledImage 39
+              46:             TypeVector 6(float) 2
+              47:    6(float) Constant 1056964608
+              48:   46(fvec2) ConstantComposite 47 47
+              53:             TypePointer Input 7(fvec4)
+        54(vpos):     53(ptr) Variable Input
+              56:             TypePointer Output 7(fvec4)
+57(@entryPointOutput):     56(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+        52(vpos):      8(ptr) Variable Function
+       58(param):      8(ptr) Variable Function
+              55:    7(fvec4) Load 54(vpos)
+                              Store 52(vpos) 55
+              59:    7(fvec4) Load 52(vpos)
+                              Store 58(param) 59
+              60:    7(fvec4) FunctionCall 11(@main(vf4;) 58(param)
+                              Store 57(@entryPointOutput) 60
+                              Return
+                              FunctionEnd
+  11(@main(vf4;):    7(fvec4) Function None 9
+        10(vpos):      8(ptr) FunctionParameter
+              12:             Label
+    15(s1.s0.ss):     14(ptr) Variable Function
+20(s2.resources.b):     19(ptr) Variable Function
+        21(s1.b):     19(ptr) Variable Function
+23(s2.resources.samplerState):     14(ptr) Variable Function
+24(s1.samplerState):     14(ptr) Variable Function
+28(s2.resources.s0.x):     27(ptr) Variable Function
+     29(s1.s0.x):     27(ptr) Variable Function
+31(s2.resources.s0.y):     27(ptr) Variable Function
+     32(s1.s0.y):     27(ptr) Variable Function
+34(s2.resources.s0.ss):     14(ptr) Variable Function
+36(s2.resources.a):     27(ptr) Variable Function
+        37(s1.a):     27(ptr) Variable Function
+              18:          13 Load 17(samp)
+                              Store 15(s1.s0.ss) 18
+              22:    6(float) Load 21(s1.b)
+                              Store 20(s2.resources.b) 22
+              25:          13 Load 24(s1.samplerState)
+                              Store 23(s2.resources.samplerState) 25
+              30:     26(int) Load 29(s1.s0.x)
+                              Store 28(s2.resources.s0.x) 30
+              33:     26(int) Load 32(s1.s0.y)
+                              Store 31(s2.resources.s0.y) 33
+              35:          13 Load 15(s1.s0.ss)
+                              Store 34(s2.resources.s0.ss) 35
+              38:     26(int) Load 37(s1.a)
+                              Store 36(s2.resources.a) 38
+              42:          39 Load 41(tex)
+              43:          13 Load 34(s2.resources.s0.ss)
+              45:          44 SampledImage 42 43
+              49:    7(fvec4) ImageSampleImplicitLod 45 48
+                              ReturnValue 49
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.flattenSubset2.frag.out b/Test/baseResults/hlsl.flattenSubset2.frag.out
new file mode 100755
index 0000000..4983834
--- /dev/null
+++ b/Test/baseResults/hlsl.flattenSubset2.frag.out
@@ -0,0 +1,207 @@
+hlsl.flattenSubset2.frag
+WARNING: AST will form illegal SPIR-V; need to transform to legalize
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'vpos' ( in 4-component vector of float)
+0:?     Sequence
+0:13      Sequence
+0:13        move second child to first child ( temp float)
+0:?           'a1.n.y' ( temp float)
+0:?           'a2.n.y' ( temp float)
+0:13        move second child to first child ( temp texture2D)
+0:?           'a1.n.texNested' ( temp texture2D)
+0:?           'a2.n.texNested' ( temp texture2D)
+0:14      Sequence
+0:14        move second child to first child ( temp float)
+0:?           'b.n.y' ( temp float)
+0:?           'a1.n.y' ( temp float)
+0:14        move second child to first child ( temp texture2D)
+0:?           'b.n.texNested' ( temp texture2D)
+0:?           'a1.n.texNested' ( temp texture2D)
+0:17      Sequence
+0:17        Sequence
+0:17          move second child to first child ( temp float)
+0:?             'n.y' ( temp float)
+0:?             'b.n.y' ( temp float)
+0:17          move second child to first child ( temp texture2D)
+0:?             'n.texNested' ( temp texture2D)
+0:?             'b.n.texNested' ( temp texture2D)
+0:20      move second child to first child ( temp texture2D)
+0:?         'a2.n.texNested' ( temp texture2D)
+0:20        'someTex' ( uniform texture2D)
+0:21      move second child to first child ( temp float)
+0:?         'a1.n.y' ( temp float)
+0:21        Constant:
+0:21          1.000000
+0:23      Branch: Return with expression
+0:?         Constant:
+0:?           0.000000
+0:?           0.000000
+0:?           0.000000
+0:?           0.000000
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         'vpos' ( temp 4-component vector of float)
+0:?         'vpos' (layout( location=0) in 4-component vector of float)
+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(vf4; ( temp 4-component vector of float)
+0:?           'vpos' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'someTex' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'vpos' (layout( location=0) in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 500
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8  Function Definition: @main(vf4; ( temp 4-component vector of float)
+0:8    Function Parameters: 
+0:8      'vpos' ( in 4-component vector of float)
+0:?     Sequence
+0:13      Sequence
+0:13        move second child to first child ( temp float)
+0:?           'a1.n.y' ( temp float)
+0:?           'a2.n.y' ( temp float)
+0:13        move second child to first child ( temp texture2D)
+0:?           'a1.n.texNested' ( temp texture2D)
+0:?           'a2.n.texNested' ( temp texture2D)
+0:14      Sequence
+0:14        move second child to first child ( temp float)
+0:?           'b.n.y' ( temp float)
+0:?           'a1.n.y' ( temp float)
+0:14        move second child to first child ( temp texture2D)
+0:?           'b.n.texNested' ( temp texture2D)
+0:?           'a1.n.texNested' ( temp texture2D)
+0:17      Sequence
+0:17        Sequence
+0:17          move second child to first child ( temp float)
+0:?             'n.y' ( temp float)
+0:?             'b.n.y' ( temp float)
+0:17          move second child to first child ( temp texture2D)
+0:?             'n.texNested' ( temp texture2D)
+0:?             'b.n.texNested' ( temp texture2D)
+0:20      move second child to first child ( temp texture2D)
+0:?         'a2.n.texNested' ( temp texture2D)
+0:20        'someTex' ( uniform texture2D)
+0:21      move second child to first child ( temp float)
+0:?         'a1.n.y' ( temp float)
+0:21        Constant:
+0:21          1.000000
+0:23      Branch: Return with expression
+0:?         Constant:
+0:?           0.000000
+0:?           0.000000
+0:?           0.000000
+0:?           0.000000
+0:8  Function Definition: main( ( temp void)
+0:8    Function Parameters: 
+0:?     Sequence
+0:8      move second child to first child ( temp 4-component vector of float)
+0:?         'vpos' ( temp 4-component vector of float)
+0:?         'vpos' (layout( location=0) in 4-component vector of float)
+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(vf4; ( temp 4-component vector of float)
+0:?           'vpos' ( temp 4-component vector of float)
+0:?   Linker Objects
+0:?     'someTex' ( uniform texture2D)
+0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
+0:?     'vpos' (layout( location=0) in 4-component vector of float)
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 47
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 40 43
+                              ExecutionMode 4 OriginUpperLeft
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 11  "@main(vf4;"
+                              Name 10  "vpos"
+                              Name 14  "a1.n.y"
+                              Name 15  "a2.n.y"
+                              Name 19  "a1.n.texNested"
+                              Name 20  "a2.n.texNested"
+                              Name 22  "b.n.y"
+                              Name 24  "b.n.texNested"
+                              Name 26  "n.y"
+                              Name 28  "n.texNested"
+                              Name 31  "someTex"
+                              Name 38  "vpos"
+                              Name 40  "vpos"
+                              Name 43  "@entryPointOutput"
+                              Name 44  "param"
+                              Decorate 31(someTex) DescriptorSet 0
+                              Decorate 40(vpos) Location 0
+                              Decorate 43(@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)
+              13:             TypePointer Function 6(float)
+              17:             TypeImage 6(float) 2D sampled format:Unknown
+              18:             TypePointer Function 17
+              30:             TypePointer UniformConstant 17
+     31(someTex):     30(ptr) Variable UniformConstant
+              33:    6(float) Constant 1065353216
+              34:    6(float) Constant 0
+              35:    7(fvec4) ConstantComposite 34 34 34 34
+              39:             TypePointer Input 7(fvec4)
+        40(vpos):     39(ptr) Variable Input
+              42:             TypePointer Output 7(fvec4)
+43(@entryPointOutput):     42(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+        38(vpos):      8(ptr) Variable Function
+       44(param):      8(ptr) Variable Function
+              41:    7(fvec4) Load 40(vpos)
+                              Store 38(vpos) 41
+              45:    7(fvec4) Load 38(vpos)
+                              Store 44(param) 45
+              46:    7(fvec4) FunctionCall 11(@main(vf4;) 44(param)
+                              Store 43(@entryPointOutput) 46
+                              Return
+                              FunctionEnd
+  11(@main(vf4;):    7(fvec4) Function None 9
+        10(vpos):      8(ptr) FunctionParameter
+              12:             Label
+      14(a1.n.y):     13(ptr) Variable Function
+      15(a2.n.y):     13(ptr) Variable Function
+19(a1.n.texNested):     18(ptr) Variable Function
+20(a2.n.texNested):     18(ptr) Variable Function
+       22(b.n.y):     13(ptr) Variable Function
+24(b.n.texNested):     18(ptr) Variable Function
+         26(n.y):     13(ptr) Variable Function
+ 28(n.texNested):     18(ptr) Variable Function
+              16:    6(float) Load 15(a2.n.y)
+                              Store 14(a1.n.y) 16
+              21:          17 Load 20(a2.n.texNested)
+                              Store 19(a1.n.texNested) 21
+              23:    6(float) Load 14(a1.n.y)
+                              Store 22(b.n.y) 23
+              25:          17 Load 19(a1.n.texNested)
+                              Store 24(b.n.texNested) 25
+              27:    6(float) Load 22(b.n.y)
+                              Store 26(n.y) 27
+              29:          17 Load 24(b.n.texNested)
+                              Store 28(n.texNested) 29
+              32:          17 Load 31(someTex)
+                              Store 20(a2.n.texNested) 32
+                              Store 14(a1.n.y) 33
+                              ReturnValue 35
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.float1.frag.out b/Test/baseResults/hlsl.float1.frag.out
index 21b1c19..ed2b6c9 100755
--- a/Test/baseResults/hlsl.float1.frag.out
+++ b/Test/baseResults/hlsl.float1.frag.out
@@ -65,7 +65,7 @@
 0:?     'scalar' ( global float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 27
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.float4.frag.out b/Test/baseResults/hlsl.float4.frag.out
index 4da2a16..84213ce 100755
--- a/Test/baseResults/hlsl.float4.frag.out
+++ b/Test/baseResults/hlsl.float4.frag.out
@@ -42,7 +42,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform bool ff1, layout( offset=20) uniform float ff2, layout( binding=0 offset=32) uniform 4-component vector of float ff3, layout( binding=1 offset=48) uniform 4-component vector of float ff4})
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 26
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.forLoop.frag.out b/Test/baseResults/hlsl.forLoop.frag.out
index eaca9fd..c9efc33 100755
--- a/Test/baseResults/hlsl.forLoop.frag.out
+++ b/Test/baseResults/hlsl.forLoop.frag.out
@@ -402,7 +402,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 183
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.fraggeom.frag.out b/Test/baseResults/hlsl.fraggeom.frag.out
index 7cb85cd..a010b6e 100644
--- a/Test/baseResults/hlsl.fraggeom.frag.out
+++ b/Test/baseResults/hlsl.fraggeom.frag.out
@@ -64,7 +64,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 25
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gather.array.dx10.frag.out b/Test/baseResults/hlsl.gather.array.dx10.frag.out
index 1f5164c..c2e25ce 100644
--- a/Test/baseResults/hlsl.gather.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.array.dx10.frag.out
@@ -260,7 +260,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 124
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.frag.out b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
index 73bd6e1..a41c03a 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
@@ -256,7 +256,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 135
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.vert.out b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
index 51154ca..432da7b 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
@@ -220,7 +220,7 @@
 0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 126
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gather.offset.dx10.frag.out b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
index 1e633e8..77410b0 100644
--- a/Test/baseResults/hlsl.gather.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
@@ -206,7 +206,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 114
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
index 85ea585..a6e50ff 100644
--- a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
@@ -200,7 +200,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 97
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
index d80e59d..2191553 100644
--- a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
@@ -748,7 +748,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 255
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
index ab1d45b..6dbdfaa 100644
--- a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
@@ -756,7 +756,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 265
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
index 8b8a610..ddbe283 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
@@ -1260,7 +1260,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 399
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
index f7bd523..360f75c 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
@@ -1252,7 +1252,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 389
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
index 996e070..7bfed63 100644
--- a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
@@ -10,7 +10,7 @@
 0:45          'txval001' ( temp 4-component vector of float)
 0:45          textureGatherOffset ( temp 4-component vector of float)
 0:45            Construct combined texture-sampler ( temp sampler2DShadow)
-0:45              'g_tTex2df4' ( uniform texture2D)
+0:45              'g_tTex2df4' ( uniform texture2DShadow)
 0:45              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:45            c2: direct index for structure ( uniform 2-component vector of float)
 0:45              '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})
@@ -26,7 +26,7 @@
 0:46          'txval011' ( temp 4-component vector of int)
 0:46          textureGatherOffset ( temp 4-component vector of int)
 0:46            Construct combined texture-sampler ( temp isampler2DShadow)
-0:46              'g_tTex2di4' ( uniform itexture2D)
+0:46              'g_tTex2di4' ( uniform itexture2DShadow)
 0:46              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:46            c2: direct index for structure ( uniform 2-component vector of float)
 0:46              '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})
@@ -42,7 +42,7 @@
 0:47          'txval021' ( temp 4-component vector of uint)
 0:47          textureGatherOffset ( temp 4-component vector of uint)
 0:47            Construct combined texture-sampler ( temp usampler2DShadow)
-0:47              'g_tTex2du4' ( uniform utexture2D)
+0:47              'g_tTex2du4' ( uniform utexture2DShadow)
 0:47              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:47            c2: direct index for structure ( uniform 2-component vector of float)
 0:47              '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})
@@ -58,7 +58,7 @@
 0:49          'txval004' ( temp 4-component vector of float)
 0:49          textureGatherOffsets ( temp 4-component vector of float)
 0:49            Construct combined texture-sampler ( temp sampler2DShadow)
-0:49              'g_tTex2df4' ( uniform texture2D)
+0:49              'g_tTex2df4' ( uniform texture2DShadow)
 0:49              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:49            c2: direct index for structure ( uniform 2-component vector of float)
 0:49              '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})
@@ -80,7 +80,7 @@
 0:50          'txval014' ( temp 4-component vector of int)
 0:50          textureGatherOffsets ( temp 4-component vector of int)
 0:50            Construct combined texture-sampler ( temp isampler2DShadow)
-0:50              'g_tTex2di4' ( uniform itexture2D)
+0:50              'g_tTex2di4' ( uniform itexture2DShadow)
 0:50              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:50            c2: direct index for structure ( uniform 2-component vector of float)
 0:50              '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})
@@ -102,7 +102,7 @@
 0:51          'txval024' ( temp 4-component vector of uint)
 0:51          textureGatherOffsets ( temp 4-component vector of uint)
 0:51            Construct combined texture-sampler ( temp usampler2DShadow)
-0:51              'g_tTex2du4' ( uniform utexture2D)
+0:51              'g_tTex2du4' ( uniform utexture2DShadow)
 0:51              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:51            c2: direct index for structure ( uniform 2-component vector of float)
 0:51              '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})
@@ -124,7 +124,7 @@
 0:53          'txval401' ( temp 4-component vector of float)
 0:53          textureGatherOffset ( temp 4-component vector of float)
 0:53            Construct combined texture-sampler ( temp sampler2DShadow)
-0:53              'g_tTex2df4' ( uniform texture2D)
+0:53              'g_tTex2df4' ( uniform texture2DShadow)
 0:53              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:53            c2: direct index for structure ( uniform 2-component vector of float)
 0:53              '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})
@@ -140,7 +140,7 @@
 0:54          'txval411' ( temp 4-component vector of int)
 0:54          textureGatherOffset ( temp 4-component vector of int)
 0:54            Construct combined texture-sampler ( temp isampler2DShadow)
-0:54              'g_tTex2di4' ( uniform itexture2D)
+0:54              'g_tTex2di4' ( uniform itexture2DShadow)
 0:54              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:54            c2: direct index for structure ( uniform 2-component vector of float)
 0:54              '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})
@@ -156,7 +156,7 @@
 0:55          'txval421' ( temp 4-component vector of uint)
 0:55          textureGatherOffset ( temp 4-component vector of uint)
 0:55            Construct combined texture-sampler ( temp usampler2DShadow)
-0:55              'g_tTex2du4' ( uniform utexture2D)
+0:55              'g_tTex2du4' ( uniform utexture2DShadow)
 0:55              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:55            c2: direct index for structure ( uniform 2-component vector of float)
 0:55              '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})
@@ -211,9 +211,9 @@
 0:?     'g_tTex1df4' (layout( binding=0) uniform texture1D)
 0:?     'g_tTex1di4' ( uniform itexture1D)
 0:?     'g_tTex1du4' ( uniform utexture1D)
-0:?     'g_tTex2df4' ( uniform texture2D)
-0:?     'g_tTex2di4' ( uniform itexture2D)
-0:?     'g_tTex2du4' ( uniform utexture2D)
+0:?     'g_tTex2df4' ( uniform texture2DShadow)
+0:?     'g_tTex2di4' ( uniform itexture2DShadow)
+0:?     'g_tTex2du4' ( uniform utexture2DShadow)
 0:?     'g_tTex3df4' ( uniform texture3D)
 0:?     'g_tTex3di4' ( uniform itexture3D)
 0:?     'g_tTex3du4' ( uniform utexture3D)
@@ -239,7 +239,7 @@
 0:45          'txval001' ( temp 4-component vector of float)
 0:45          textureGatherOffset ( temp 4-component vector of float)
 0:45            Construct combined texture-sampler ( temp sampler2DShadow)
-0:45              'g_tTex2df4' ( uniform texture2D)
+0:45              'g_tTex2df4' ( uniform texture2DShadow)
 0:45              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:45            c2: direct index for structure ( uniform 2-component vector of float)
 0:45              '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})
@@ -255,7 +255,7 @@
 0:46          'txval011' ( temp 4-component vector of int)
 0:46          textureGatherOffset ( temp 4-component vector of int)
 0:46            Construct combined texture-sampler ( temp isampler2DShadow)
-0:46              'g_tTex2di4' ( uniform itexture2D)
+0:46              'g_tTex2di4' ( uniform itexture2DShadow)
 0:46              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:46            c2: direct index for structure ( uniform 2-component vector of float)
 0:46              '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})
@@ -271,7 +271,7 @@
 0:47          'txval021' ( temp 4-component vector of uint)
 0:47          textureGatherOffset ( temp 4-component vector of uint)
 0:47            Construct combined texture-sampler ( temp usampler2DShadow)
-0:47              'g_tTex2du4' ( uniform utexture2D)
+0:47              'g_tTex2du4' ( uniform utexture2DShadow)
 0:47              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:47            c2: direct index for structure ( uniform 2-component vector of float)
 0:47              '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})
@@ -287,7 +287,7 @@
 0:49          'txval004' ( temp 4-component vector of float)
 0:49          textureGatherOffsets ( temp 4-component vector of float)
 0:49            Construct combined texture-sampler ( temp sampler2DShadow)
-0:49              'g_tTex2df4' ( uniform texture2D)
+0:49              'g_tTex2df4' ( uniform texture2DShadow)
 0:49              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:49            c2: direct index for structure ( uniform 2-component vector of float)
 0:49              '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})
@@ -309,7 +309,7 @@
 0:50          'txval014' ( temp 4-component vector of int)
 0:50          textureGatherOffsets ( temp 4-component vector of int)
 0:50            Construct combined texture-sampler ( temp isampler2DShadow)
-0:50              'g_tTex2di4' ( uniform itexture2D)
+0:50              'g_tTex2di4' ( uniform itexture2DShadow)
 0:50              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:50            c2: direct index for structure ( uniform 2-component vector of float)
 0:50              '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})
@@ -331,7 +331,7 @@
 0:51          'txval024' ( temp 4-component vector of uint)
 0:51          textureGatherOffsets ( temp 4-component vector of uint)
 0:51            Construct combined texture-sampler ( temp usampler2DShadow)
-0:51              'g_tTex2du4' ( uniform utexture2D)
+0:51              'g_tTex2du4' ( uniform utexture2DShadow)
 0:51              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:51            c2: direct index for structure ( uniform 2-component vector of float)
 0:51              '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})
@@ -353,7 +353,7 @@
 0:53          'txval401' ( temp 4-component vector of float)
 0:53          textureGatherOffset ( temp 4-component vector of float)
 0:53            Construct combined texture-sampler ( temp sampler2DShadow)
-0:53              'g_tTex2df4' ( uniform texture2D)
+0:53              'g_tTex2df4' ( uniform texture2DShadow)
 0:53              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:53            c2: direct index for structure ( uniform 2-component vector of float)
 0:53              '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})
@@ -369,7 +369,7 @@
 0:54          'txval411' ( temp 4-component vector of int)
 0:54          textureGatherOffset ( temp 4-component vector of int)
 0:54            Construct combined texture-sampler ( temp isampler2DShadow)
-0:54              'g_tTex2di4' ( uniform itexture2D)
+0:54              'g_tTex2di4' ( uniform itexture2DShadow)
 0:54              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:54            c2: direct index for structure ( uniform 2-component vector of float)
 0:54              '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})
@@ -385,7 +385,7 @@
 0:55          'txval421' ( temp 4-component vector of uint)
 0:55          textureGatherOffset ( temp 4-component vector of uint)
 0:55            Construct combined texture-sampler ( temp usampler2DShadow)
-0:55              'g_tTex2du4' ( uniform utexture2D)
+0:55              'g_tTex2du4' ( uniform utexture2DShadow)
 0:55              'g_sSampCmp' (layout( binding=0) uniform sampler)
 0:55            c2: direct index for structure ( uniform 2-component vector of float)
 0:55              '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})
@@ -440,9 +440,9 @@
 0:?     'g_tTex1df4' (layout( binding=0) uniform texture1D)
 0:?     'g_tTex1di4' ( uniform itexture1D)
 0:?     'g_tTex1du4' ( uniform utexture1D)
-0:?     'g_tTex2df4' ( uniform texture2D)
-0:?     'g_tTex2di4' ( uniform itexture2D)
-0:?     'g_tTex2du4' ( uniform utexture2D)
+0:?     'g_tTex2df4' ( uniform texture2DShadow)
+0:?     'g_tTex2di4' ( uniform itexture2DShadow)
+0:?     'g_tTex2du4' ( uniform utexture2DShadow)
 0:?     'g_tTex3df4' ( uniform texture3D)
 0:?     'g_tTex3di4' ( uniform itexture3D)
 0:?     'g_tTex3du4' ( uniform utexture3D)
@@ -454,14 +454,14 @@
 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 167
+// Generated by (magic number): 80002
+// Id's are bound by 164
 
                               Capability Shader
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 132 136
+                              EntryPoint Fragment 4  "main" 129 133
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -472,61 +472,61 @@
                               Name 13  "txval001"
                               Name 16  "g_tTex2df4"
                               Name 20  "g_sSampCmp"
-                              Name 27  "$Global"
-                              MemberName 27($Global) 0  "c1"
-                              MemberName 27($Global) 1  "c2"
-                              MemberName 27($Global) 2  "c3"
-                              MemberName 27($Global) 3  "c4"
-                              Name 29  ""
-                              Name 42  "txval011"
-                              Name 45  "g_tTex2di4"
-                              Name 59  "txval021"
-                              Name 62  "g_tTex2du4"
-                              Name 72  "txval004"
-                              Name 82  "txval014"
-                              Name 90  "txval024"
-                              Name 98  "txval401"
-                              Name 105  "txval411"
-                              Name 112  "txval421"
-                              Name 120  "psout"
-                              Name 129  "flattenTemp"
-                              Name 132  "@entryPointOutput.Color"
-                              Name 136  "@entryPointOutput.Depth"
-                              Name 141  "g_tTex1df4a"
-                              Name 142  "g_tTex1df4"
-                              Name 145  "g_tTex1di4"
-                              Name 148  "g_tTex1du4"
-                              Name 151  "g_tTex3df4"
-                              Name 154  "g_tTex3di4"
-                              Name 157  "g_tTex3du4"
-                              Name 160  "g_tTexcdf4"
-                              Name 163  "g_tTexcdi4"
-                              Name 166  "g_tTexcdu4"
+                              Name 26  "$Global"
+                              MemberName 26($Global) 0  "c1"
+                              MemberName 26($Global) 1  "c2"
+                              MemberName 26($Global) 2  "c3"
+                              MemberName 26($Global) 3  "c4"
+                              Name 28  ""
+                              Name 41  "txval011"
+                              Name 44  "g_tTex2di4"
+                              Name 57  "txval021"
+                              Name 60  "g_tTex2du4"
+                              Name 69  "txval004"
+                              Name 79  "txval014"
+                              Name 87  "txval024"
+                              Name 95  "txval401"
+                              Name 102  "txval411"
+                              Name 109  "txval421"
+                              Name 117  "psout"
+                              Name 126  "flattenTemp"
+                              Name 129  "@entryPointOutput.Color"
+                              Name 133  "@entryPointOutput.Depth"
+                              Name 138  "g_tTex1df4a"
+                              Name 139  "g_tTex1df4"
+                              Name 142  "g_tTex1di4"
+                              Name 145  "g_tTex1du4"
+                              Name 148  "g_tTex3df4"
+                              Name 151  "g_tTex3di4"
+                              Name 154  "g_tTex3du4"
+                              Name 157  "g_tTexcdf4"
+                              Name 160  "g_tTexcdi4"
+                              Name 163  "g_tTexcdu4"
                               Decorate 16(g_tTex2df4) DescriptorSet 0
                               Decorate 20(g_sSampCmp) DescriptorSet 0
                               Decorate 20(g_sSampCmp) Binding 0
-                              MemberDecorate 27($Global) 0 Offset 0
-                              MemberDecorate 27($Global) 1 Offset 8
-                              MemberDecorate 27($Global) 2 Offset 16
-                              MemberDecorate 27($Global) 3 Offset 32
-                              Decorate 27($Global) Block
-                              Decorate 29 DescriptorSet 0
-                              Decorate 45(g_tTex2di4) DescriptorSet 0
-                              Decorate 62(g_tTex2du4) DescriptorSet 0
-                              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
-                              Decorate 142(g_tTex1df4) Binding 0
-                              Decorate 145(g_tTex1di4) DescriptorSet 0
-                              Decorate 148(g_tTex1du4) DescriptorSet 0
-                              Decorate 151(g_tTex3df4) DescriptorSet 0
-                              Decorate 154(g_tTex3di4) DescriptorSet 0
-                              Decorate 157(g_tTex3du4) DescriptorSet 0
-                              Decorate 160(g_tTexcdf4) DescriptorSet 0
-                              Decorate 163(g_tTexcdi4) DescriptorSet 0
-                              Decorate 166(g_tTexcdu4) DescriptorSet 0
+                              MemberDecorate 26($Global) 0 Offset 0
+                              MemberDecorate 26($Global) 1 Offset 8
+                              MemberDecorate 26($Global) 2 Offset 16
+                              MemberDecorate 26($Global) 3 Offset 32
+                              Decorate 26($Global) Block
+                              Decorate 28 DescriptorSet 0
+                              Decorate 44(g_tTex2di4) DescriptorSet 0
+                              Decorate 60(g_tTex2du4) DescriptorSet 0
+                              Decorate 129(@entryPointOutput.Color) Location 0
+                              Decorate 133(@entryPointOutput.Depth) BuiltIn FragDepth
+                              Decorate 138(g_tTex1df4a) DescriptorSet 0
+                              Decorate 138(g_tTex1df4a) Binding 1
+                              Decorate 139(g_tTex1df4) DescriptorSet 0
+                              Decorate 139(g_tTex1df4) Binding 0
+                              Decorate 142(g_tTex1di4) DescriptorSet 0
+                              Decorate 145(g_tTex1du4) DescriptorSet 0
+                              Decorate 148(g_tTex3df4) DescriptorSet 0
+                              Decorate 151(g_tTex3di4) DescriptorSet 0
+                              Decorate 154(g_tTex3du4) DescriptorSet 0
+                              Decorate 157(g_tTexcdf4) DescriptorSet 0
+                              Decorate 160(g_tTexcdi4) DescriptorSet 0
+                              Decorate 163(g_tTexcdu4) DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -534,177 +534,174 @@
     8(PS_OUTPUT):             TypeStruct 7(fvec4) 6(float)
                9:             TypeFunction 8(PS_OUTPUT)
               12:             TypePointer Function 7(fvec4)
-              14:             TypeImage 6(float) 2D sampled format:Unknown
+              14:             TypeImage 6(float) 2D depth sampled format:Unknown
               15:             TypePointer UniformConstant 14
   16(g_tTex2df4):     15(ptr) Variable UniformConstant
               18:             TypeSampler
               19:             TypePointer UniformConstant 18
   20(g_sSampCmp):     19(ptr) Variable UniformConstant
-              22:             TypeImage 6(float) 2D depth sampled format:Unknown
-              23:             TypeSampledImage 22
-              25:             TypeVector 6(float) 2
-              26:             TypeVector 6(float) 3
-     27($Global):             TypeStruct 6(float) 25(fvec2) 26(fvec3) 7(fvec4)
-              28:             TypePointer Uniform 27($Global)
-              29:     28(ptr) Variable Uniform
-              30:             TypeInt 32 1
-              31:     30(int) Constant 1
-              32:             TypePointer Uniform 25(fvec2)
-              35:    6(float) Constant 1061158912
-              36:             TypeVector 30(int) 2
-              37:     30(int) Constant 0
-              38:   36(ivec2) ConstantComposite 31 37
-              40:             TypeVector 30(int) 4
-              41:             TypePointer Function 40(ivec4)
-              43:             TypeImage 30(int) 2D sampled format:Unknown
-              44:             TypePointer UniformConstant 43
-  45(g_tTex2di4):     44(ptr) Variable UniformConstant
-              48:             TypeImage 30(int) 2D depth sampled format:Unknown
-              49:             TypeSampledImage 48
-              53:     30(int) Constant 4294967295
-              54:   36(ivec2) ConstantComposite 31 53
-              56:             TypeInt 32 0
-              57:             TypeVector 56(int) 4
-              58:             TypePointer Function 57(ivec4)
-              60:             TypeImage 56(int) 2D sampled format:Unknown
-              61:             TypePointer UniformConstant 60
-  62(g_tTex2du4):     61(ptr) Variable UniformConstant
-              65:             TypeImage 56(int) 2D depth sampled format:Unknown
-              66:             TypeSampledImage 65
-              70:   36(ivec2) ConstantComposite 31 31
-              78:     56(int) Constant 4
-              79:             TypeArray 36(ivec2) 78
-              80:          79 ConstantComposite 38 38 38 38
-              88:          79 ConstantComposite 54 54 54 54
-              96:          79 ConstantComposite 70 70 70 70
-             119:             TypePointer Function 8(PS_OUTPUT)
-             121:    6(float) Constant 1065353216
-             122:    7(fvec4) ConstantComposite 121 121 121 121
-             124:             TypePointer Function 6(float)
-             131:             TypePointer Output 7(fvec4)
-132(@entryPointOutput.Color):    131(ptr) Variable Output
-             135:             TypePointer Output 6(float)
-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
- 142(g_tTex1df4):    140(ptr) Variable UniformConstant
-             143:             TypeImage 30(int) 1D sampled format:Unknown
+              22:             TypeSampledImage 14
+              24:             TypeVector 6(float) 2
+              25:             TypeVector 6(float) 3
+     26($Global):             TypeStruct 6(float) 24(fvec2) 25(fvec3) 7(fvec4)
+              27:             TypePointer Uniform 26($Global)
+              28:     27(ptr) Variable Uniform
+              29:             TypeInt 32 1
+              30:     29(int) Constant 1
+              31:             TypePointer Uniform 24(fvec2)
+              34:    6(float) Constant 1061158912
+              35:             TypeVector 29(int) 2
+              36:     29(int) Constant 0
+              37:   35(ivec2) ConstantComposite 30 36
+              39:             TypeVector 29(int) 4
+              40:             TypePointer Function 39(ivec4)
+              42:             TypeImage 29(int) 2D depth sampled format:Unknown
+              43:             TypePointer UniformConstant 42
+  44(g_tTex2di4):     43(ptr) Variable UniformConstant
+              47:             TypeSampledImage 42
+              51:     29(int) Constant 4294967295
+              52:   35(ivec2) ConstantComposite 30 51
+              54:             TypeInt 32 0
+              55:             TypeVector 54(int) 4
+              56:             TypePointer Function 55(ivec4)
+              58:             TypeImage 54(int) 2D depth sampled format:Unknown
+              59:             TypePointer UniformConstant 58
+  60(g_tTex2du4):     59(ptr) Variable UniformConstant
+              63:             TypeSampledImage 58
+              67:   35(ivec2) ConstantComposite 30 30
+              75:     54(int) Constant 4
+              76:             TypeArray 35(ivec2) 75
+              77:          76 ConstantComposite 37 37 37 37
+              85:          76 ConstantComposite 52 52 52 52
+              93:          76 ConstantComposite 67 67 67 67
+             116:             TypePointer Function 8(PS_OUTPUT)
+             118:    6(float) Constant 1065353216
+             119:    7(fvec4) ConstantComposite 118 118 118 118
+             121:             TypePointer Function 6(float)
+             128:             TypePointer Output 7(fvec4)
+129(@entryPointOutput.Color):    128(ptr) Variable Output
+             132:             TypePointer Output 6(float)
+133(@entryPointOutput.Depth):    132(ptr) Variable Output
+             136:             TypeImage 6(float) 1D sampled format:Unknown
+             137:             TypePointer UniformConstant 136
+138(g_tTex1df4a):    137(ptr) Variable UniformConstant
+ 139(g_tTex1df4):    137(ptr) Variable UniformConstant
+             140:             TypeImage 29(int) 1D sampled format:Unknown
+             141:             TypePointer UniformConstant 140
+ 142(g_tTex1di4):    141(ptr) Variable UniformConstant
+             143:             TypeImage 54(int) 1D sampled format:Unknown
              144:             TypePointer UniformConstant 143
- 145(g_tTex1di4):    144(ptr) Variable UniformConstant
-             146:             TypeImage 56(int) 1D sampled format:Unknown
+ 145(g_tTex1du4):    144(ptr) Variable UniformConstant
+             146:             TypeImage 6(float) 3D sampled format:Unknown
              147:             TypePointer UniformConstant 146
- 148(g_tTex1du4):    147(ptr) Variable UniformConstant
-             149:             TypeImage 6(float) 3D sampled format:Unknown
+ 148(g_tTex3df4):    147(ptr) Variable UniformConstant
+             149:             TypeImage 29(int) 3D sampled format:Unknown
              150:             TypePointer UniformConstant 149
- 151(g_tTex3df4):    150(ptr) Variable UniformConstant
-             152:             TypeImage 30(int) 3D sampled format:Unknown
+ 151(g_tTex3di4):    150(ptr) Variable UniformConstant
+             152:             TypeImage 54(int) 3D sampled format:Unknown
              153:             TypePointer UniformConstant 152
- 154(g_tTex3di4):    153(ptr) Variable UniformConstant
-             155:             TypeImage 56(int) 3D sampled format:Unknown
+ 154(g_tTex3du4):    153(ptr) Variable UniformConstant
+             155:             TypeImage 6(float) Cube sampled format:Unknown
              156:             TypePointer UniformConstant 155
- 157(g_tTex3du4):    156(ptr) Variable UniformConstant
-             158:             TypeImage 6(float) Cube sampled format:Unknown
+ 157(g_tTexcdf4):    156(ptr) Variable UniformConstant
+             158:             TypeImage 29(int) Cube sampled format:Unknown
              159:             TypePointer UniformConstant 158
- 160(g_tTexcdf4):    159(ptr) Variable UniformConstant
-             161:             TypeImage 30(int) Cube sampled format:Unknown
+ 160(g_tTexcdi4):    159(ptr) Variable UniformConstant
+             161:             TypeImage 54(int) Cube sampled format:Unknown
              162:             TypePointer UniformConstant 161
- 163(g_tTexcdi4):    162(ptr) Variable UniformConstant
-             164:             TypeImage 56(int) Cube sampled format:Unknown
-             165:             TypePointer UniformConstant 164
- 166(g_tTexcdu4):    165(ptr) Variable UniformConstant
+ 163(g_tTexcdu4):    162(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
-129(flattenTemp):    119(ptr) Variable Function
-             130:8(PS_OUTPUT) FunctionCall 10(@main()
-                              Store 129(flattenTemp) 130
-             133:     12(ptr) AccessChain 129(flattenTemp) 37
-             134:    7(fvec4) Load 133
-                              Store 132(@entryPointOutput.Color) 134
-             137:    124(ptr) AccessChain 129(flattenTemp) 31
-             138:    6(float) Load 137
-                              Store 136(@entryPointOutput.Depth) 138
+126(flattenTemp):    116(ptr) Variable Function
+             127:8(PS_OUTPUT) FunctionCall 10(@main()
+                              Store 126(flattenTemp) 127
+             130:     12(ptr) AccessChain 126(flattenTemp) 36
+             131:    7(fvec4) Load 130
+                              Store 129(@entryPointOutput.Color) 131
+             134:    121(ptr) AccessChain 126(flattenTemp) 30
+             135:    6(float) Load 134
+                              Store 133(@entryPointOutput.Depth) 135
                               Return
                               FunctionEnd
       10(@main():8(PS_OUTPUT) Function None 9
               11:             Label
     13(txval001):     12(ptr) Variable Function
-    42(txval011):     41(ptr) Variable Function
-    59(txval021):     58(ptr) Variable Function
-    72(txval004):     12(ptr) Variable Function
-    82(txval014):     41(ptr) Variable Function
-    90(txval024):     58(ptr) Variable Function
-    98(txval401):     12(ptr) Variable Function
-   105(txval411):     41(ptr) Variable Function
-   112(txval421):     58(ptr) Variable Function
-      120(psout):    119(ptr) Variable Function
+    41(txval011):     40(ptr) Variable Function
+    57(txval021):     56(ptr) Variable Function
+    69(txval004):     12(ptr) Variable Function
+    79(txval014):     40(ptr) Variable Function
+    87(txval024):     56(ptr) Variable Function
+    95(txval401):     12(ptr) Variable Function
+   102(txval411):     40(ptr) Variable Function
+   109(txval421):     56(ptr) Variable Function
+      117(psout):    116(ptr) Variable Function
               17:          14 Load 16(g_tTex2df4)
               21:          18 Load 20(g_sSampCmp)
-              24:          23 SampledImage 17 21
-              33:     32(ptr) AccessChain 29 31
-              34:   25(fvec2) Load 33
-              39:    7(fvec4) ImageDrefGather 24 34 35 ConstOffset 38
-                              Store 13(txval001) 39
-              46:          43 Load 45(g_tTex2di4)
-              47:          18 Load 20(g_sSampCmp)
-              50:          49 SampledImage 46 47
-              51:     32(ptr) AccessChain 29 31
-              52:   25(fvec2) Load 51
-              55:   40(ivec4) ImageDrefGather 50 52 35 ConstOffset 54
-                              Store 42(txval011) 55
-              63:          60 Load 62(g_tTex2du4)
-              64:          18 Load 20(g_sSampCmp)
-              67:          66 SampledImage 63 64
-              68:     32(ptr) AccessChain 29 31
-              69:   25(fvec2) Load 68
-              71:   57(ivec4) ImageDrefGather 67 69 35 ConstOffset 70
-                              Store 59(txval021) 71
-              73:          14 Load 16(g_tTex2df4)
-              74:          18 Load 20(g_sSampCmp)
-              75:          23 SampledImage 73 74
-              76:     32(ptr) AccessChain 29 31
-              77:   25(fvec2) Load 76
-              81:    7(fvec4) ImageDrefGather 75 77 35 ConstOffsets 80
-                              Store 72(txval004) 81
-              83:          43 Load 45(g_tTex2di4)
-              84:          18 Load 20(g_sSampCmp)
-              85:          49 SampledImage 83 84
-              86:     32(ptr) AccessChain 29 31
-              87:   25(fvec2) Load 86
-              89:   40(ivec4) ImageDrefGather 85 87 35 ConstOffsets 88
-                              Store 82(txval014) 89
-              91:          60 Load 62(g_tTex2du4)
-              92:          18 Load 20(g_sSampCmp)
-              93:          66 SampledImage 91 92
-              94:     32(ptr) AccessChain 29 31
-              95:   25(fvec2) Load 94
-              97:   57(ivec4) ImageDrefGather 93 95 35 ConstOffsets 96
-                              Store 90(txval024) 97
-              99:          14 Load 16(g_tTex2df4)
-             100:          18 Load 20(g_sSampCmp)
-             101:          23 SampledImage 99 100
-             102:     32(ptr) AccessChain 29 31
-             103:   25(fvec2) Load 102
-             104:    7(fvec4) ImageDrefGather 101 103 35 ConstOffset 38
-                              Store 98(txval401) 104
-             106:          43 Load 45(g_tTex2di4)
-             107:          18 Load 20(g_sSampCmp)
-             108:          49 SampledImage 106 107
-             109:     32(ptr) AccessChain 29 31
-             110:   25(fvec2) Load 109
-             111:   40(ivec4) ImageDrefGather 108 110 35 ConstOffset 54
-                              Store 105(txval411) 111
-             113:          60 Load 62(g_tTex2du4)
-             114:          18 Load 20(g_sSampCmp)
-             115:          66 SampledImage 113 114
-             116:     32(ptr) AccessChain 29 31
-             117:   25(fvec2) Load 116
-             118:   57(ivec4) ImageDrefGather 115 117 35 ConstOffset 70
-                              Store 112(txval421) 118
-             123:     12(ptr) AccessChain 120(psout) 37
-                              Store 123 122
-             125:    124(ptr) AccessChain 120(psout) 31
-                              Store 125 121
-             126:8(PS_OUTPUT) Load 120(psout)
-                              ReturnValue 126
+              23:          22 SampledImage 17 21
+              32:     31(ptr) AccessChain 28 30
+              33:   24(fvec2) Load 32
+              38:    7(fvec4) ImageDrefGather 23 33 34 ConstOffset 37
+                              Store 13(txval001) 38
+              45:          42 Load 44(g_tTex2di4)
+              46:          18 Load 20(g_sSampCmp)
+              48:          47 SampledImage 45 46
+              49:     31(ptr) AccessChain 28 30
+              50:   24(fvec2) Load 49
+              53:   39(ivec4) ImageDrefGather 48 50 34 ConstOffset 52
+                              Store 41(txval011) 53
+              61:          58 Load 60(g_tTex2du4)
+              62:          18 Load 20(g_sSampCmp)
+              64:          63 SampledImage 61 62
+              65:     31(ptr) AccessChain 28 30
+              66:   24(fvec2) Load 65
+              68:   55(ivec4) ImageDrefGather 64 66 34 ConstOffset 67
+                              Store 57(txval021) 68
+              70:          14 Load 16(g_tTex2df4)
+              71:          18 Load 20(g_sSampCmp)
+              72:          22 SampledImage 70 71
+              73:     31(ptr) AccessChain 28 30
+              74:   24(fvec2) Load 73
+              78:    7(fvec4) ImageDrefGather 72 74 34 ConstOffsets 77
+                              Store 69(txval004) 78
+              80:          42 Load 44(g_tTex2di4)
+              81:          18 Load 20(g_sSampCmp)
+              82:          47 SampledImage 80 81
+              83:     31(ptr) AccessChain 28 30
+              84:   24(fvec2) Load 83
+              86:   39(ivec4) ImageDrefGather 82 84 34 ConstOffsets 85
+                              Store 79(txval014) 86
+              88:          58 Load 60(g_tTex2du4)
+              89:          18 Load 20(g_sSampCmp)
+              90:          63 SampledImage 88 89
+              91:     31(ptr) AccessChain 28 30
+              92:   24(fvec2) Load 91
+              94:   55(ivec4) ImageDrefGather 90 92 34 ConstOffsets 93
+                              Store 87(txval024) 94
+              96:          14 Load 16(g_tTex2df4)
+              97:          18 Load 20(g_sSampCmp)
+              98:          22 SampledImage 96 97
+              99:     31(ptr) AccessChain 28 30
+             100:   24(fvec2) Load 99
+             101:    7(fvec4) ImageDrefGather 98 100 34 ConstOffset 37
+                              Store 95(txval401) 101
+             103:          42 Load 44(g_tTex2di4)
+             104:          18 Load 20(g_sSampCmp)
+             105:          47 SampledImage 103 104
+             106:     31(ptr) AccessChain 28 30
+             107:   24(fvec2) Load 106
+             108:   39(ivec4) ImageDrefGather 105 107 34 ConstOffset 52
+                              Store 102(txval411) 108
+             110:          58 Load 60(g_tTex2du4)
+             111:          18 Load 20(g_sSampCmp)
+             112:          63 SampledImage 110 111
+             113:     31(ptr) AccessChain 28 30
+             114:   24(fvec2) Load 113
+             115:   55(ivec4) ImageDrefGather 112 114 34 ConstOffset 67
+                              Store 109(txval421) 115
+             120:     12(ptr) AccessChain 117(psout) 36
+                              Store 120 119
+             122:    121(ptr) AccessChain 117(psout) 30
+                              Store 122 118
+             123:8(PS_OUTPUT) Load 117(psout)
+                              ReturnValue 123
                               FunctionEnd
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
index 3780bd3..2fdf4f1 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
@@ -2316,7 +2316,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 550
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.vert.out b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
index 275cece..8c940fe 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.vert.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
@@ -116,7 +116,7 @@
 0:?     '@entryPointOutput.Pos' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 48
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
index b301a61..b3d3ce0d 100644
--- a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
@@ -716,7 +716,7 @@
 0:?     '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 232
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
index 12fe30c..22d601d 100644
--- a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
+++ b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out
@@ -578,7 +578,7 @@
 0:?     'sample' (layout( location=0) flat in int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 221
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.global-const-init.frag.out b/Test/baseResults/hlsl.global-const-init.frag.out
index 659ad53..c76f54a 100644
--- a/Test/baseResults/hlsl.global-const-init.frag.out
+++ b/Test/baseResults/hlsl.global-const-init.frag.out
@@ -102,7 +102,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 50
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.hlslOffset.vert.out b/Test/baseResults/hlsl.hlslOffset.vert.out
index dcd8027..4840e61 100644
--- a/Test/baseResults/hlsl.hlslOffset.vert.out
+++ b/Test/baseResults/hlsl.hlslOffset.vert.out
@@ -26,7 +26,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float m0, layout( row_major std140) uniform 3-component vector of float m4, layout( row_major std140) uniform float m16, layout( row_major std140 offset=20) uniform 3-component vector of float m20, layout( row_major std140 offset=36) uniform 3-component vector of float m36, layout( row_major std140 offset=56) uniform 2-component vector of float m56, layout( row_major std140) uniform float m64, layout( row_major std140) uniform 2-component vector of float m68, layout( row_major std140) uniform float m76, layout( row_major std140) uniform float m80, layout( row_major std140) uniform 1-element array of 2-component vector of float m96})
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 18
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.hull.1.tesc.out b/Test/baseResults/hlsl.hull.1.tesc.out
index 151a0b3..57020ee 100644
--- a/Test/baseResults/hlsl.hull.1.tesc.out
+++ b/Test/baseResults/hlsl.hull.1.tesc.out
@@ -32,7 +32,7 @@
 0:?         'm_cpid' ( temp uint)
 0:?         'm_cpid' ( in uint InvocationID)
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'm_cpid' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
@@ -146,7 +146,7 @@
 0:?         'm_cpid' ( temp uint)
 0:?         'm_cpid' ( in uint InvocationID)
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'm_cpid' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
@@ -224,7 +224,7 @@
 0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 90
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.hull.2.tesc.out b/Test/baseResults/hlsl.hull.2.tesc.out
index 11342ea..8d0708d 100644
--- a/Test/baseResults/hlsl.hull.2.tesc.out
+++ b/Test/baseResults/hlsl.hull.2.tesc.out
@@ -28,7 +28,7 @@
 0:?         'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -140,7 +140,7 @@
 0:?         'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -220,7 +220,7 @@
 0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 92
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.hull.3.tesc.out b/Test/baseResults/hlsl.hull.3.tesc.out
index 39d9236..59eed0d 100755
--- a/Test/baseResults/hlsl.hull.3.tesc.out
+++ b/Test/baseResults/hlsl.hull.3.tesc.out
@@ -28,7 +28,7 @@
 0:?         'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -140,7 +140,7 @@
 0:?         'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -220,7 +220,7 @@
 0:?     '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 92
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.hull.4.tesc.out b/Test/baseResults/hlsl.hull.4.tesc.out
new file mode 100644
index 0000000..139d7d4
--- /dev/null
+++ b/Test/baseResults/hlsl.hull.4.tesc.out
@@ -0,0 +1,681 @@
+hlsl.hull.4.tesc
+Shader version: 500
+vertices = 3
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+0:? Sequence
+0:25  Function Definition: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:25    Function Parameters: 
+0:25      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?     Sequence
+0:26      Sequence
+0:26        move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          Constant:
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:28      move second child to first child ( temp float)
+0:28        fInsideTessFactor: direct index for structure ( temp float)
+0:28          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:28          Constant:
+0:28            1 (const int)
+0:28        add ( temp float)
+0:28          direct index ( temp float)
+0:28            m_Position: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                0 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:28          direct index ( temp float)
+0:28            m_Normal: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                1 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:30      Branch: Return with expression
+0:30        'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:39  Function Definition: @main(struct-HS_Input-vf4-vf41[3];u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:39    Function Parameters: 
+0:39      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39      'cpid' ( in uint)
+0:?     Sequence
+0:40      Sequence
+0:40        move second child to first child ( temp structure{ temp 4-component vector of float m_Position})
+0:40          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:40          Constant:
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:41      move second child to first child ( temp 4-component vector of float)
+0:41        m_Position: direct index for structure ( temp 4-component vector of float)
+0:41          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:41          Constant:
+0:41            0 (const int)
+0:41        Constant:
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:42      Branch: Return with expression
+0:42        'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:39  Function Definition: main( ( temp void)
+0:39    Function Parameters: 
+0:?     Sequence
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              1 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              2 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39      move second child to first child ( temp uint)
+0:?         'cpid' ( temp uint)
+0:?         'cpid' ( in uint InvocationID)
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          direct index ( out 4-component vector of float Position)
+0:?             '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            Function Call: @main(struct-HS_Input-vf4-vf41[3];u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'cpid' ( temp uint)
+0:39            Constant:
+0:39              0 (const int)
+0:?       Barrier ( temp void)
+0:?       Test condition and select ( temp void)
+0:?         Condition
+0:?         Compare Equal ( temp bool)
+0:?           'cpid' ( in uint InvocationID)
+0:?           Constant:
+0:?             0 (const int)
+0:?         true case
+0:?         Sequence
+0:?           move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?             '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?             Function Call: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?           Sequence
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   1 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   1 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   2 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   2 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelInner)
+0:?                 '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?               fInsideTessFactor: direct index for structure ( temp float)
+0:?                 '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                 Constant:
+0:?                   1 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:?     'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:?     'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:?     'cpid' ( in uint InvocationID)
+0:?     '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner)
+
+
+Linked tessellation control stage:
+
+
+Shader version: 500
+vertices = 3
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+0:? Sequence
+0:25  Function Definition: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:25    Function Parameters: 
+0:25      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?     Sequence
+0:26      Sequence
+0:26        move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          Constant:
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:28      move second child to first child ( temp float)
+0:28        fInsideTessFactor: direct index for structure ( temp float)
+0:28          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:28          Constant:
+0:28            1 (const int)
+0:28        add ( temp float)
+0:28          direct index ( temp float)
+0:28            m_Position: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                0 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:28          direct index ( temp float)
+0:28            m_Normal: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                1 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:30      Branch: Return with expression
+0:30        'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:39  Function Definition: @main(struct-HS_Input-vf4-vf41[3];u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:39    Function Parameters: 
+0:39      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39      'cpid' ( in uint)
+0:?     Sequence
+0:40      Sequence
+0:40        move second child to first child ( temp structure{ temp 4-component vector of float m_Position})
+0:40          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:40          Constant:
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:41      move second child to first child ( temp 4-component vector of float)
+0:41        m_Position: direct index for structure ( temp 4-component vector of float)
+0:41          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:41          Constant:
+0:41            0 (const int)
+0:41        Constant:
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:42      Branch: Return with expression
+0:42        'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:39  Function Definition: main( ( temp void)
+0:39    Function Parameters: 
+0:?     Sequence
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                0 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              1 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                1 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39          direct index ( in 4-component vector of float Position)
+0:?             'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              2 (const int)
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              1 (const int)
+0:39          m_Normal: direct index for structure ( temp 4-component vector of float)
+0:39            direct index (layout( location=0) in structure{ temp 4-component vector of float m_Normal})
+0:39              'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:39              Constant:
+0:39                2 (const int)
+0:39            Constant:
+0:39              0 (const int)
+0:39      move second child to first child ( temp uint)
+0:?         'cpid' ( temp uint)
+0:?         'cpid' ( in uint InvocationID)
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          direct index ( out 4-component vector of float Position)
+0:?             '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            Function Call: @main(struct-HS_Input-vf4-vf41[3];u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?               'cpid' ( temp uint)
+0:39            Constant:
+0:39              0 (const int)
+0:?       Barrier ( temp void)
+0:?       Test condition and select ( temp void)
+0:?         Condition
+0:?         Compare Equal ( temp bool)
+0:?           'cpid' ( in uint InvocationID)
+0:?           Constant:
+0:?             0 (const int)
+0:?         true case
+0:?         Sequence
+0:?           move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?             '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?             Function Call: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?               'I' ( temp 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?           Sequence
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   1 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   1 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelOuter)
+0:?                 '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?                 Constant:
+0:?                   2 (const int)
+0:?               direct index ( temp float)
+0:?                 fTessFactor: direct index for structure ( temp 3-element array of float)
+0:?                   '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                   Constant:
+0:?                     0 (const int)
+0:?                 Constant:
+0:?                   2 (const int)
+0:?             move second child to first child ( temp float)
+0:?               direct index ( patch out float TessLevelInner)
+0:?                 '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner)
+0:?                 Constant:
+0:?                   0 (const int)
+0:?               fInsideTessFactor: direct index for structure ( temp float)
+0:?                 '@patchConstantResult' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:?                 Constant:
+0:?                   1 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:?     'I.m_Position' ( in 3-element array of 4-component vector of float Position)
+0:?     'I' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float m_Normal})
+0:?     'cpid' ( in uint InvocationID)
+0:?     '@patchConstantOutput.fTessFactor' ( patch out 4-element array of float TessLevelOuter)
+0:?     '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner)
+
+// Module Version 10000
+// Generated by (magic number): 80002
+// Id's are bound by 127
+
+                              Capability Tessellation
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint TessellationControl 4  "main" 56 64 83 86 110 123
+                              ExecutionMode 4 OutputVertices 3
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 SpacingFractionalOdd
+                              ExecutionMode 4 VertexOrderCw
+                              Source HLSL 500
+                              Name 4  "main"
+                              Name 8  "HS_Input"
+                              MemberName 8(HS_Input) 0  "m_Position"
+                              MemberName 8(HS_Input) 1  "m_Normal"
+                              Name 14  "HS_Output"
+                              MemberName 14(HS_Output) 0  "fTessFactor"
+                              MemberName 14(HS_Output) 1  "fInsideTessFactor"
+                              Name 17  "HS_ConstFunc(struct-HS_Input-vf4-vf41[3];"
+                              Name 16  "I"
+                              Name 20  "HS_Main_Output"
+                              MemberName 20(HS_Main_Output) 0  "m_Position"
+                              Name 24  "@main(struct-HS_Input-vf4-vf41[3];u1;"
+                              Name 22  "I"
+                              Name 23  "cpid"
+                              Name 27  "O"
+                              Name 45  "output"
+                              Name 53  "I"
+                              Name 56  "I.m_Position"
+                              Name 61  "HS_Input"
+                              MemberName 61(HS_Input) 0  "m_Normal"
+                              Name 64  "I"
+                              Name 81  "cpid"
+                              Name 83  "cpid"
+                              Name 86  "@entryPointOutput.m_Position"
+                              Name 87  "param"
+                              Name 89  "param"
+                              Name 103  "@patchConstantResult"
+                              Name 104  "param"
+                              Name 110  "@patchConstantOutput.fTessFactor"
+                              Name 123  "@patchConstantOutput.fInsideTessFactor"
+                              Decorate 56(I.m_Position) BuiltIn Position
+                              Decorate 64(I) Location 0
+                              Decorate 83(cpid) BuiltIn InvocationId
+                              Decorate 86(@entryPointOutput.m_Position) BuiltIn Position
+                              Decorate 110(@patchConstantOutput.fTessFactor) Patch
+                              Decorate 110(@patchConstantOutput.fTessFactor) BuiltIn TessLevelOuter
+                              Decorate 123(@patchConstantOutput.fInsideTessFactor) Patch
+                              Decorate 123(@patchConstantOutput.fInsideTessFactor) BuiltIn TessLevelInner
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+     8(HS_Input):             TypeStruct 7(fvec4) 7(fvec4)
+               9:             TypeInt 32 0
+              10:      9(int) Constant 3
+              11:             TypeArray 8(HS_Input) 10
+              12:             TypePointer Function 11
+              13:             TypeArray 6(float) 10
+   14(HS_Output):             TypeStruct 13 6(float)
+              15:             TypeFunction 14(HS_Output) 12(ptr)
+              19:             TypePointer Function 9(int)
+20(HS_Main_Output):             TypeStruct 7(fvec4)
+              21:             TypeFunction 20(HS_Main_Output) 12(ptr) 19(ptr)
+              26:             TypePointer Function 14(HS_Output)
+              28:    6(float) Constant 0
+              29:          13 ConstantComposite 28 28 28
+              30:14(HS_Output) ConstantComposite 29 28
+              31:             TypeInt 32 1
+              32:     31(int) Constant 1
+              33:     31(int) Constant 0
+              34:             TypePointer Function 6(float)
+              44:             TypePointer Function 20(HS_Main_Output)
+              46:    7(fvec4) ConstantComposite 28 28 28 28
+              47:20(HS_Main_Output) ConstantComposite 46
+              48:             TypePointer Function 7(fvec4)
+              54:             TypeArray 7(fvec4) 10
+              55:             TypePointer Input 54
+56(I.m_Position):     55(ptr) Variable Input
+              57:             TypePointer Input 7(fvec4)
+    61(HS_Input):             TypeStruct 7(fvec4)
+              62:             TypeArray 61(HS_Input) 10
+              63:             TypePointer Input 62
+           64(I):     63(ptr) Variable Input
+              74:     31(int) Constant 2
+              82:             TypePointer Input 9(int)
+        83(cpid):     82(ptr) Variable Input
+              85:             TypePointer Output 54
+86(@entryPointOutput.m_Position):     85(ptr) Variable Output
+              93:             TypePointer Output 7(fvec4)
+              95:      9(int) Constant 2
+              96:      9(int) Constant 1
+              97:      9(int) Constant 0
+              99:             TypeBool
+             107:      9(int) Constant 4
+             108:             TypeArray 6(float) 107
+             109:             TypePointer Output 108
+110(@patchConstantOutput.fTessFactor):    109(ptr) Variable Output
+             113:             TypePointer Output 6(float)
+             121:             TypeArray 6(float) 95
+             122:             TypePointer Output 121
+123(@patchConstantOutput.fInsideTessFactor):    122(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+           53(I):     12(ptr) Variable Function
+        81(cpid):     19(ptr) Variable Function
+       87(param):     12(ptr) Variable Function
+       89(param):     19(ptr) Variable Function
+103(@patchConstantResult):     26(ptr) Variable Function
+      104(param):     12(ptr) Variable Function
+              58:     57(ptr) AccessChain 56(I.m_Position) 33
+              59:    7(fvec4) Load 58
+              60:     48(ptr) AccessChain 53(I) 33 33
+                              Store 60 59
+              65:     57(ptr) AccessChain 64(I) 33 33
+              66:    7(fvec4) Load 65
+              67:     48(ptr) AccessChain 53(I) 33 32
+                              Store 67 66
+              68:     57(ptr) AccessChain 56(I.m_Position) 32
+              69:    7(fvec4) Load 68
+              70:     48(ptr) AccessChain 53(I) 32 33
+                              Store 70 69
+              71:     57(ptr) AccessChain 64(I) 32 33
+              72:    7(fvec4) Load 71
+              73:     48(ptr) AccessChain 53(I) 32 32
+                              Store 73 72
+              75:     57(ptr) AccessChain 56(I.m_Position) 74
+              76:    7(fvec4) Load 75
+              77:     48(ptr) AccessChain 53(I) 74 33
+                              Store 77 76
+              78:     57(ptr) AccessChain 64(I) 74 33
+              79:    7(fvec4) Load 78
+              80:     48(ptr) AccessChain 53(I) 74 32
+                              Store 80 79
+              84:      9(int) Load 83(cpid)
+                              Store 81(cpid) 84
+              88:          11 Load 53(I)
+                              Store 87(param) 88
+              90:      9(int) Load 81(cpid)
+                              Store 89(param) 90
+              91:20(HS_Main_Output) FunctionCall 24(@main(struct-HS_Input-vf4-vf41[3];u1;) 87(param) 89(param)
+              92:    7(fvec4) CompositeExtract 91 0
+              94:     93(ptr) AccessChain 86(@entryPointOutput.m_Position) 33
+                              Store 94 92
+                              ControlBarrier 95 96 97
+              98:      9(int) Load 83(cpid)
+             100:    99(bool) IEqual 98 33
+                              SelectionMerge 102 None
+                              BranchConditional 100 101 102
+             101:               Label
+             105:          11   Load 53(I)
+                                Store 104(param) 105
+             106:14(HS_Output)   FunctionCall 17(HS_ConstFunc(struct-HS_Input-vf4-vf41[3];) 104(param)
+                                Store 103(@patchConstantResult) 106
+             111:     34(ptr)   AccessChain 103(@patchConstantResult) 33 33
+             112:    6(float)   Load 111
+             114:    113(ptr)   AccessChain 110(@patchConstantOutput.fTessFactor) 33
+                                Store 114 112
+             115:     34(ptr)   AccessChain 103(@patchConstantResult) 33 32
+             116:    6(float)   Load 115
+             117:    113(ptr)   AccessChain 110(@patchConstantOutput.fTessFactor) 32
+                                Store 117 116
+             118:     34(ptr)   AccessChain 103(@patchConstantResult) 33 74
+             119:    6(float)   Load 118
+             120:    113(ptr)   AccessChain 110(@patchConstantOutput.fTessFactor) 74
+                                Store 120 119
+             124:     34(ptr)   AccessChain 103(@patchConstantResult) 32
+             125:    6(float)   Load 124
+             126:    113(ptr)   AccessChain 123(@patchConstantOutput.fInsideTessFactor) 33
+                                Store 126 125
+                                Branch 102
+             102:             Label
+                              Return
+                              FunctionEnd
+17(HS_ConstFunc(struct-HS_Input-vf4-vf41[3];):14(HS_Output) Function None 15
+           16(I):     12(ptr) FunctionParameter
+              18:             Label
+           27(O):     26(ptr) Variable Function
+                              Store 27(O) 30
+              35:     34(ptr) AccessChain 16(I) 33 33 10
+              36:    6(float) Load 35
+              37:     34(ptr) AccessChain 16(I) 33 32 10
+              38:    6(float) Load 37
+              39:    6(float) FAdd 36 38
+              40:     34(ptr) AccessChain 27(O) 32
+                              Store 40 39
+              41:14(HS_Output) Load 27(O)
+                              ReturnValue 41
+                              FunctionEnd
+24(@main(struct-HS_Input-vf4-vf41[3];u1;):20(HS_Main_Output) Function None 21
+           22(I):     12(ptr) FunctionParameter
+        23(cpid):     19(ptr) FunctionParameter
+              25:             Label
+      45(output):     44(ptr) Variable Function
+                              Store 45(output) 47
+              49:     48(ptr) AccessChain 45(output) 33
+                              Store 49 46
+              50:20(HS_Main_Output) Load 45(output)
+                              ReturnValue 50
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.hull.5.tesc.out b/Test/baseResults/hlsl.hull.5.tesc.out
new file mode 100644
index 0000000..3a42b52
--- /dev/null
+++ b/Test/baseResults/hlsl.hull.5.tesc.out
@@ -0,0 +1,190 @@
+hlsl.hull.5.tesc
+ERROR: 0:0: '' : unimplemented: PCF input patch without entry point input patch parameter 
+ERROR: 1 compilation errors.  No code generated.
+
+
+Shader version: 500
+vertices = 3
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+ERROR: node is still EOpNull!
+0:25  Function Definition: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:25    Function Parameters: 
+0:25      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?     Sequence
+0:26      Sequence
+0:26        move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          Constant:
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:28      move second child to first child ( temp float)
+0:28        fInsideTessFactor: direct index for structure ( temp float)
+0:28          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:28          Constant:
+0:28            1 (const int)
+0:28        add ( temp float)
+0:28          direct index ( temp float)
+0:28            m_Position: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                0 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:28          direct index ( temp float)
+0:28            m_Normal: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                1 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:30      Branch: Return with expression
+0:30        'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:39  Function Definition: @main(u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:39    Function Parameters: 
+0:39      'cpid' ( in uint)
+0:?     Sequence
+0:40      Sequence
+0:40        move second child to first child ( temp structure{ temp 4-component vector of float m_Position})
+0:40          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:40          Constant:
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:41      move second child to first child ( temp 4-component vector of float)
+0:41        m_Position: direct index for structure ( temp 4-component vector of float)
+0:41          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:41          Constant:
+0:41            0 (const int)
+0:41        Constant:
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:42      Branch: Return with expression
+0:42        'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:39  Function Definition: main( ( temp void)
+0:39    Function Parameters: 
+0:?     Sequence
+0:39      move second child to first child ( temp uint)
+0:?         'cpid' ( temp uint)
+0:?         'cpid' ( in uint InvocationID)
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          direct index ( out 4-component vector of float Position)
+0:?             '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            Function Call: @main(u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:?               'cpid' ( temp uint)
+0:39            Constant:
+0:39              0 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:?     'cpid' ( in uint InvocationID)
+
+
+Linked tessellation control stage:
+
+
+Shader version: 500
+vertices = 3
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+ERROR: node is still EOpNull!
+0:25  Function Definition: HS_ConstFunc(struct-HS_Input-vf4-vf41[3]; ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:25    Function Parameters: 
+0:25      'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:?     Sequence
+0:26      Sequence
+0:26        move second child to first child ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:26          Constant:
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:26            0.000000
+0:28      move second child to first child ( temp float)
+0:28        fInsideTessFactor: direct index for structure ( temp float)
+0:28          'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:28          Constant:
+0:28            1 (const int)
+0:28        add ( temp float)
+0:28          direct index ( temp float)
+0:28            m_Position: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                0 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:28          direct index ( temp float)
+0:28            m_Normal: direct index for structure ( temp 4-component vector of float)
+0:28              direct index ( temp structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                'I' ( in 3-element array of structure{ temp 4-component vector of float m_Position,  temp 4-component vector of float m_Normal})
+0:28                Constant:
+0:28                  0 (const int)
+0:28              Constant:
+0:28                1 (const int)
+0:28            Constant:
+0:28              3 (const int)
+0:30      Branch: Return with expression
+0:30        'O' ( temp structure{ temp 3-element array of float fTessFactor,  temp float fInsideTessFactor})
+0:39  Function Definition: @main(u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:39    Function Parameters: 
+0:39      'cpid' ( in uint)
+0:?     Sequence
+0:40      Sequence
+0:40        move second child to first child ( temp structure{ temp 4-component vector of float m_Position})
+0:40          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:40          Constant:
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:40            0.000000
+0:41      move second child to first child ( temp 4-component vector of float)
+0:41        m_Position: direct index for structure ( temp 4-component vector of float)
+0:41          'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:41          Constant:
+0:41            0 (const int)
+0:41        Constant:
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:41          0.000000
+0:42      Branch: Return with expression
+0:42        'output' ( temp structure{ temp 4-component vector of float m_Position})
+0:39  Function Definition: main( ( temp void)
+0:39    Function Parameters: 
+0:?     Sequence
+0:39      move second child to first child ( temp uint)
+0:?         'cpid' ( temp uint)
+0:?         'cpid' ( in uint InvocationID)
+0:39      Sequence
+0:39        move second child to first child ( temp 4-component vector of float)
+0:39          direct index ( out 4-component vector of float Position)
+0:?             '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:39            Constant:
+0:39              0 (const int)
+0:39          m_Position: direct index for structure ( temp 4-component vector of float)
+0:39            Function Call: @main(u1; ( temp structure{ temp 4-component vector of float m_Position})
+0:?               'cpid' ( temp uint)
+0:39            Constant:
+0:39              0 (const int)
+0:?   Linker Objects
+0:?     '@entryPointOutput.m_Position' ( out 3-element array of 4-component vector of float Position)
+0:?     'cpid' ( in uint InvocationID)
+
+SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
index 7fbe0cb..24e4aa7 100644
--- a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
+++ b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out
@@ -29,7 +29,7 @@
 0:?         'cpid' ( temp uint)
 0:?         'cpid' ( in uint InvocationID)
 0:27      move second child to first child ( temp structure{ temp 3-component vector of float val})
-0:27        indirect index ( temp structure{ temp 3-component vector of float val})
+0:27        indirect index (layout( location=0) out structure{ temp 3-component vector of float val})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?           'cpid' ( in uint InvocationID)
 0:27        Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val})
@@ -229,7 +229,7 @@
 0:?         'cpid' ( temp uint)
 0:?         'cpid' ( in uint InvocationID)
 0:27      move second child to first child ( temp structure{ temp 3-component vector of float val})
-0:27        indirect index ( temp structure{ temp 3-component vector of float val})
+0:27        indirect index (layout( location=0) out structure{ temp 3-component vector of float val})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?           'cpid' ( in uint InvocationID)
 0:27        Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val})
@@ -396,7 +396,7 @@
 0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 124
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
index 32764f3..89582b7 100644
--- a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
+++ b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out
@@ -36,7 +36,7 @@
 0:?         'cpid' ( temp uint)
 0:?         'cpid' ( in uint InvocationID)
 0:28      move second child to first child ( temp structure{ temp 3-component vector of float val})
-0:28        indirect index ( temp structure{ temp 3-component vector of float val})
+0:28        indirect index (layout( location=0) out structure{ temp 3-component vector of float val})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?           'cpid' ( in uint InvocationID)
 0:28        Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val})
@@ -82,7 +82,7 @@
 0:?             '@patchConstantResult' ( temp structure{ temp 3-element array of float tfactor,  temp float flInFactor})
 0:?             Function Call: PCF(struct-hs_out_t-vf31[3];struct-hs_in_t-vf31[3]; ( temp structure{ temp 3-element array of float tfactor,  temp float flInFactor})
 0:?               'pcf_out' ( temp 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:?               'i' ( temp 3-element array of structure{ temp 3-component vector of float val})
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
@@ -245,7 +245,7 @@
 0:?         'cpid' ( temp uint)
 0:?         'cpid' ( in uint InvocationID)
 0:28      move second child to first child ( temp structure{ temp 3-component vector of float val})
-0:28        indirect index ( temp structure{ temp 3-component vector of float val})
+0:28        indirect index (layout( location=0) out structure{ temp 3-component vector of float val})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
 0:?           'cpid' ( in uint InvocationID)
 0:28        Function Call: @main(struct-hs_in_t-vf31[3];u1; ( temp structure{ temp 3-component vector of float val})
@@ -291,7 +291,7 @@
 0:?             '@patchConstantResult' ( temp structure{ temp 3-element array of float tfactor,  temp float flInFactor})
 0:?             Function Call: PCF(struct-hs_out_t-vf31[3];struct-hs_in_t-vf31[3]; ( temp structure{ temp 3-element array of float tfactor,  temp float flInFactor})
 0:?               'pcf_out' ( temp 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:?               'i' ( temp 3-element array of structure{ temp 3-component vector of float val})
 0:?           Sequence
 0:?             move second child to first child ( temp float)
 0:?               direct index ( patch out float TessLevelOuter)
@@ -414,7 +414,7 @@
 0:?     '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 126
 
                               Capability Tessellation
@@ -568,7 +568,7 @@
               87:     30(ptr)   AccessChain 67(pcf_out) 81
                                 Store 87 86
               90:          20   Load 67(pcf_out)
-              91:          11   Load 42(i)
+              91:          11   Load 40(i)
               92:22(hs_pcf_t)   FunctionCall 26(PCF(struct-hs_out_t-vf31[3];struct-hs_in_t-vf31[3];) 90 91
                                 Store 89(@patchConstantResult) 92
               98:     97(ptr)   AccessChain 89(@patchConstantResult) 29 29
diff --git a/Test/baseResults/hlsl.hull.void.tesc.out b/Test/baseResults/hlsl.hull.void.tesc.out
index 8dc38fc..68524d9 100644
--- a/Test/baseResults/hlsl.hull.void.tesc.out
+++ b/Test/baseResults/hlsl.hull.void.tesc.out
@@ -29,7 +29,7 @@
 0:?         'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -85,7 +85,7 @@
 0:?         'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint})
 0:?         'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint})
 0:26      move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
-0:26        indirect index ( temp structure{ temp 3-component vector of float cpoint})
+0:26        indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
 0:?           '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint})
 0:?           'InvocationId' ( in uint InvocationID)
 0:26        Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint})
@@ -108,7 +108,7 @@
 0:?     'InvocationId' ( in uint InvocationID)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 55
 
                               Capability Tessellation
diff --git a/Test/baseResults/hlsl.identifier.sample.frag.out b/Test/baseResults/hlsl.identifier.sample.frag.out
index a8870b1..356a212 100644
--- a/Test/baseResults/hlsl.identifier.sample.frag.out
+++ b/Test/baseResults/hlsl.identifier.sample.frag.out
@@ -86,7 +86,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 33
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.if.frag.out b/Test/baseResults/hlsl.if.frag.out
index eade928..8490324 100755
--- a/Test/baseResults/hlsl.if.frag.out
+++ b/Test/baseResults/hlsl.if.frag.out
@@ -216,7 +216,7 @@
 0:?     'input' (layout( location=0) in 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 103
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.implicitBool.frag.out b/Test/baseResults/hlsl.implicitBool.frag.out
index 3eb559b..2da4fae 100755
--- a/Test/baseResults/hlsl.implicitBool.frag.out
+++ b/Test/baseResults/hlsl.implicitBool.frag.out
@@ -334,7 +334,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 140
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.include.vert.out b/Test/baseResults/hlsl.include.vert.out
index 8f31aa0..2a0532e 100755
--- a/Test/baseResults/hlsl.include.vert.out
+++ b/Test/baseResults/hlsl.include.vert.out
@@ -1,6 +1,6 @@
 ../Test/hlsl.include.vert
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 44
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.inf.vert.out b/Test/baseResults/hlsl.inf.vert.out
index ef551e7..afb0a4f 100755
--- a/Test/baseResults/hlsl.inf.vert.out
+++ b/Test/baseResults/hlsl.inf.vert.out
@@ -112,7 +112,7 @@
 0:?     '@entryPointOutput' ( out 4-component vector of float Position)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 37
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.init.frag.out b/Test/baseResults/hlsl.init.frag.out
index 119d0c5..9b52388 100755
--- a/Test/baseResults/hlsl.init.frag.out
+++ b/Test/baseResults/hlsl.init.frag.out
@@ -331,7 +331,7 @@
 0:?     'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float a, layout( row_major std140) uniform float b, layout( row_major std140) uniform float c})
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 110
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.init2.frag.out b/Test/baseResults/hlsl.init2.frag.out
index 0b88500..2aff374 100644
--- a/Test/baseResults/hlsl.init2.frag.out
+++ b/Test/baseResults/hlsl.init2.frag.out
@@ -358,7 +358,7 @@
 0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 112
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.inoutquals.frag.out b/Test/baseResults/hlsl.inoutquals.frag.out
index 1bc4944..c589f5b 100644
--- a/Test/baseResults/hlsl.inoutquals.frag.out
+++ b/Test/baseResults/hlsl.inoutquals.frag.out
@@ -206,7 +206,7 @@
 0:?     'sampleMask' ( out int SampleMaskIn)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 88
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsic.frexp.frag.out b/Test/baseResults/hlsl.intrinsic.frexp.frag.out
index 2aa1229..b04909e 100644
--- a/Test/baseResults/hlsl.intrinsic.frexp.frag.out
+++ b/Test/baseResults/hlsl.intrinsic.frexp.frag.out
@@ -190,7 +190,7 @@
 0:?     '@entryPointOutput.color' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 98
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsic.frexp.vert.out b/Test/baseResults/hlsl.intrinsic.frexp.vert.out
index 1827bd6..01fc5b2 100644
--- a/Test/baseResults/hlsl.intrinsic.frexp.vert.out
+++ b/Test/baseResults/hlsl.intrinsic.frexp.vert.out
@@ -113,7 +113,7 @@
 0:?   Linker Objects
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 78
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.barriers.comp.out b/Test/baseResults/hlsl.intrinsics.barriers.comp.out
index f7e3e22..bc8a073 100644
--- a/Test/baseResults/hlsl.intrinsics.barriers.comp.out
+++ b/Test/baseResults/hlsl.intrinsics.barriers.comp.out
@@ -52,7 +52,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 22
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.comp.out b/Test/baseResults/hlsl.intrinsics.comp.out
index 09a4a5d..01b6f69 100644
--- a/Test/baseResults/hlsl.intrinsics.comp.out
+++ b/Test/baseResults/hlsl.intrinsics.comp.out
@@ -716,7 +716,7 @@
 0:?     'inU1' (layout( location=4) in 4-component vector of uint)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 265
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out b/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out
index 94b4ad7..e365b98 100644
--- a/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out
@@ -74,7 +74,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 29
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.double.frag.out b/Test/baseResults/hlsl.intrinsics.double.frag.out
index 020817a..a2e7c5f 100644
--- a/Test/baseResults/hlsl.intrinsics.double.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.double.frag.out
@@ -164,7 +164,7 @@
 0:?     'inU1b' (layout( location=9) flat in uint)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 90
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out
index 50da716..6612451 100644
--- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out
@@ -154,7 +154,7 @@
 0:?     'inI2' (layout( location=4) flat in 2-component vector of int)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 80
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.f1632.frag.out b/Test/baseResults/hlsl.intrinsics.f1632.frag.out
index e828d96..5c6f6ba 100644
--- a/Test/baseResults/hlsl.intrinsics.f1632.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.f1632.frag.out
@@ -260,7 +260,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 103
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.f3216.frag.out b/Test/baseResults/hlsl.intrinsics.f3216.frag.out
index 3ff9ce7..01c08d2 100644
--- a/Test/baseResults/hlsl.intrinsics.f3216.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.f3216.frag.out
@@ -270,7 +270,7 @@
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 
 // Module Version 10000
-// Generated by (magic number): 80001
+// Generated by (magic number): 80002
 // Id's are bound by 106
 
                               Capability Shader
diff --git a/Test/baseResults/hlsl.intrinsics.frag.out b/Test/baseResults/hlsl.intrinsics.frag.out
index ad70545..105800b 100644
--- a/Test/baseResults/hlsl.intrinsics.frag.out
+++ b/Test/baseResults/hlsl.intrinsics.frag.out
@@ -83,2034 +83,2075 @@
 0:33            0.000000
 0:33        true case
 0:33        Branch: Kill
-0:34      Sequence
-0:34        move second child to first child ( temp float)
-0:34          'r014' ( temp float)
-0:34          cosine ( temp float)
-0:34            'inF0' ( in float)
+0:34      Test condition and select ( temp void)
+0:34        Condition
+0:34        Compare Less Than ( temp bool)
+0:34          'r005' ( temp int)
+0:34          Constant:
+0:34            0 (const int)
+0:34        true case
+0:34        Branch: Kill
 0:35      Sequence
 0:35        move second child to first child ( temp float)
-0:35          'r015' ( temp float)
-0:35          hyp. cosine ( temp float)
+0:35          'r014' ( temp float)
+0:35          cosine ( temp float)
 0:35            'inF0' ( in float)
 0:36      Sequence
-0:36        move second child to first child ( temp int)
-0:36          'r016' ( temp int)
-0:36          bitCount ( temp int)
-0:36            Constant:
-0:36              7 (const int)
+0:36        move second child to first child ( temp float)
+0:36          'r015' ( temp float)
+0:36          hyp. cosine ( temp float)
+0:36            'inF0' ( in float)
 0:37      Sequence
-0:37        move second child to first child ( temp float)
-0:37          'r017' ( temp float)
-0:37          dPdx ( temp float)
-0:37            'inF0' ( in float)
+0:37        move second child to first child ( temp int)
+0:37          'r016' ( temp int)
+0:37          bitCount ( temp int)
+0:37            Constant:
+0:37              7 (const int)
 0:38      Sequence
 0:38        move second child to first child ( temp float)
-0:38          'r018' ( temp float)
-0:38          dPdxCoarse ( temp float)
+0:38          'r017' ( temp float)
+0:38          dPdx ( temp float)
 0:38            'inF0' ( in float)
 0:39      Sequence
 0:39        move second child to first child ( temp float)
-0:39          'r019' ( temp float)
-0:39          dPdxFine ( temp float)
+0:39          'r018' ( temp float)
+0:39          dPdxCoarse ( temp float)
 0:39            'inF0' ( in float)
 0:40      Sequence
 0:40        move second child to first child ( temp float)
-0:40          'r020' ( temp float)
-0:40          dPdy ( temp float)
+0:40          'r019' ( temp float)
+0:40          dPdxFine ( temp float)
 0:40            'inF0' ( in float)
 0:41      Sequence
 0:41        move second child to first child ( temp float)
-0:41          'r021' ( temp float)
-0:41          dPdyCoarse ( temp float)
+0:41          'r020' ( temp float)
+0:41          dPdy ( temp float)
 0:41            'inF0' ( in float)
 0:42      Sequence
 0:42        move second child to first child ( temp float)
-0:42          'r022' ( temp float)
-0:42          dPdyFine ( temp float)
+0:42          'r021' ( temp float)
+0:42          dPdyCoarse ( temp float)
 0:42            'inF0' ( in float)
 0:43      Sequence
 0:43        move second child to first child ( temp float)
-0:43          'r023' ( temp float)
-0:43          degrees ( temp float)
+0:43          'r022' ( temp float)
+0:43          dPdyFine ( temp float)
 0:43            'inF0' ( in float)
-0:47      Sequence
-0:47        move second child to first child ( temp float)
-0:47          'r027' ( temp float)
-0:47          exp ( temp float)
-0:47            'inF0' ( in float)
+0:44      Sequence
+0:44        move second child to first child ( temp float)
+0:44          'r023' ( temp float)
+0:44          degrees ( temp float)
+0:44            'inF0' ( in float)
 0:48      Sequence
 0:48        move second child to first child ( temp float)
-0:48          'r028' ( temp float)
-0:48          exp2 ( temp float)
+0:48          'r027' ( temp float)
+0:48          exp ( temp float)
 0:48            'inF0' ( in float)
 0:49      Sequence
-0:49        move second child to first child ( temp uint)
-0:49          'r029' ( temp uint)
-0:49          Convert int to uint ( temp uint)
-0:49            findMSB ( temp int)
-0:49              Constant:
-0:49                7 (const int)
+0:49        move second child to first child ( temp float)
+0:49          'r028' ( temp float)
+0:49          exp2 ( temp float)
+0:49            'inF0' ( in float)
 0:50      Sequence
 0:50        move second child to first child ( temp uint)
-0:50          'r030' ( temp uint)
+0:50          'r029' ( temp uint)
 0:50          Convert int to uint ( temp uint)
-0:50            findLSB ( temp int)
+0:50            findMSB ( temp int)
 0:50              Constant:
 0:50                7 (const int)
 0:51      Sequence
-0:51        move second child to first child ( temp float)
-0:51          'r031' ( temp float)
-0:51          Floor ( temp float)
-0:51            'inF0' ( in float)
-0:53      Sequence
-0:53        move second child to first child ( temp float)
-0:53          'r033' ( temp float)
-0:53          mod ( temp float)
-0:53            'inF0' ( in float)
-0:53            'inF1' ( in float)
+0:51        move second child to first child ( temp uint)
+0:51          'r030' ( temp uint)
+0:51          Convert int to uint ( temp uint)
+0:51            findLSB ( temp int)
+0:51              Constant:
+0:51                7 (const int)
+0:52      Sequence
+0:52        move second child to first child ( temp float)
+0:52          'r031' ( temp float)
+0:52          Floor ( temp float)
+0:52            'inF0' ( in float)
 0:54      Sequence
 0:54        move second child to first child ( temp float)
-0:54          'r034' ( temp float)
-0:54          Fraction ( temp float)
+0:54          'r033' ( temp float)
+0:54          mod ( temp float)
 0:54            'inF0' ( in float)
+0:54            'inF1' ( in float)
 0:55      Sequence
 0:55        move second child to first child ( temp float)
-0:55          'r036' ( temp float)
-0:55          fwidth ( temp float)
+0:55          'r034' ( temp float)
+0:55          Fraction ( temp float)
 0:55            'inF0' ( in float)
 0:56      Sequence
-0:56        move second child to first child ( temp bool)
-0:56          'r037' ( temp bool)
-0:56          isinf ( temp bool)
+0:56        move second child to first child ( temp float)
+0:56          'r036' ( temp float)
+0:56          fwidth ( temp float)
 0:56            'inF0' ( in float)
 0:57      Sequence
 0:57        move second child to first child ( temp bool)
-0:57          'r038' ( temp bool)
-0:57          isnan ( temp bool)
+0:57          'r037' ( temp bool)
+0:57          isinf ( temp bool)
 0:57            'inF0' ( in float)
 0:58      Sequence
-0:58        move second child to first child ( temp float)
-0:58          'r039' ( temp float)
-0:58          ldexp ( temp float)
+0:58        move second child to first child ( temp bool)
+0:58          'r038' ( temp bool)
+0:58          isnan ( temp bool)
 0:58            'inF0' ( in float)
-0:58            'inF1' ( in float)
 0:59      Sequence
 0:59        move second child to first child ( temp float)
-0:59          'r039a' ( temp float)
-0:59          mix ( temp float)
+0:59          'r039' ( temp float)
+0:59          ldexp ( temp float)
 0:59            'inF0' ( in float)
 0:59            'inF1' ( in float)
-0:59            'inF2' ( in float)
 0:60      Sequence
 0:60        move second child to first child ( temp float)
-0:60          'r040' ( temp float)
-0:60          log ( temp float)
+0:60          'r039a' ( temp float)
+0:60          mix ( temp float)
 0:60            'inF0' ( in float)
+0:60            'inF1' ( in float)
+0:60            'inF2' ( in float)
 0:61      Sequence
 0:61        move second child to first child ( temp float)
-0:61          'r041' ( temp float)
-0:61          component-wise multiply ( temp float)
-0:61            log2 ( temp float)
-0:61              'inF0' ( in float)
-0:61            Constant:
-0:61              0.301030
+0:61          'r040' ( temp float)
+0:61          log ( temp float)
+0:61            'inF0' ( in float)
 0:62      Sequence
 0:62        move second child to first child ( temp float)
-0:62          'r042' ( temp float)
-0:62          log2 ( temp float)
-0:62            'inF0' ( in float)
+0:62          'r041' ( temp float)
+0:62          component-wise multiply ( temp float)
+0:62            log2 ( temp float)
+0:62              'inF0' ( in float)
+0:62            Constant:
+0:62              0.301030
 0:63      Sequence
 0:63        move second child to first child ( temp float)
-0:63          'r043' ( temp float)
-0:63          max ( temp float)
+0:63          'r042' ( temp float)
+0:63          log2 ( temp float)
 0:63            'inF0' ( in float)
-0:63            'inF1' ( in float)
 0:64      Sequence
 0:64        move second child to first child ( temp float)
-0:64          'r044' ( temp float)
-0:64          min ( temp float)
+0:64          'r043' ( temp float)
+0:64          max ( temp float)
 0:64            'inF0' ( in float)
 0:64            'inF1' ( in float)
 0:65      Sequence
 0:65        move second child to first child ( temp float)
-0:65          'r045' ( temp float)
-0:65          pow ( temp float)
+0:65          'r044' ( temp float)
+0:65          min ( temp float)
 0:65            'inF0' ( in float)
 0:65            'inF1' ( in float)
 0:66      Sequence
 0:66        move second child to first child ( temp float)
-0:66          'r046' ( temp float)
-0:66          radians ( temp float)
+0:66          'r045' ( temp float)
+0:66          pow ( temp float)
 0:66            'inF0' ( in float)
+0:66            'inF1' ( in float)
 0:67      Sequence
 0:67        move second child to first child ( temp float)
-0:67          'r047' ( temp float)
-0:67          divide ( temp float)
-0:67            Constant:
-0:67              1.000000
+0:67          'r046' ( temp float)
+0:67          radians ( temp float)
 0:67            'inF0' ( in float)
 0:68      Sequence
-0:68        move second child to first child ( temp uint)
-0:68          'r048' ( temp uint)
-0:68          Convert int to uint ( temp uint)
-0:68            bitFieldReverse ( temp int)
-0:68              Constant:
-0:68                2 (const int)
+0:68        move second child to first child ( temp float)
+0:68          'r047' ( temp float)
+0:68          divide ( temp float)
+0:68            Constant:
+0:68              1.000000
+0:68            'inF0' ( in float)
 0:69      Sequence
-0:69        move second child to first child ( temp float)
-0:69          'r049' ( temp float)
-0:69          roundEven ( temp float)
-0:69            'inF0' ( in float)
+0:69        move second child to first child ( temp uint)
+0:69          'r048' ( temp uint)
+0:69          Convert int to uint ( temp uint)
+0:69            bitFieldReverse ( temp int)
+0:69              Constant:
+0:69                2 (const int)
 0:70      Sequence
 0:70        move second child to first child ( temp float)
-0:70          'r050' ( temp float)
-0:70          inverse sqrt ( temp float)
+0:70          'r049' ( temp float)
+0:70          roundEven ( temp float)
 0:70            'inF0' ( in float)
 0:71      Sequence
 0:71        move second child to first child ( temp float)
-0:71          'r051' ( temp float)
-0:71          clamp ( temp float)
+0:71          'r050' ( temp float)
+0:71          inverse sqrt ( temp float)
 0:71            'inF0' ( in float)
-0:71            Constant:
-0:71              0.000000
-0:71            Constant:
-0:71              1.000000
 0:72      Sequence
 0:72        move second child to first child ( temp float)
-0:72          'r052' ( temp float)
-0:72          Sign ( temp float)
+0:72          'r051' ( temp float)
+0:72          clamp ( temp float)
 0:72            'inF0' ( in float)
+0:72            Constant:
+0:72              0.000000
+0:72            Constant:
+0:72              1.000000
 0:73      Sequence
 0:73        move second child to first child ( temp float)
-0:73          'r053' ( temp float)
-0:73          sine ( temp float)
+0:73          'r052' ( temp float)
+0:73          Sign ( temp float)
 0:73            'inF0' ( in float)
 0:74      Sequence
 0:74        move second child to first child ( temp float)
-0:74          'inF1' ( in float)
+0:74          'r053' ( temp float)
 0:74          sine ( temp float)
 0:74            'inF0' ( in float)
-0:74        move second child to first child ( temp float)
-0:74          'inF2' ( in float)
-0:74          cosine ( temp float)
-0:74            'inF0' ( in float)
 0:75      Sequence
 0:75        move second child to first child ( temp float)
-0:75          'r055' ( temp float)
-0:75          hyp. sine ( temp float)
+0:75          'inF1' ( in float)
+0:75          sine ( temp float)
+0:75            'inF0' ( in float)
+0:75        move second child to first child ( temp float)
+0:75          'inF2' ( in float)
+0:75          cosine ( temp float)
 0:75            'inF0' ( in float)
 0:76      Sequence
 0:76        move second child to first child ( temp float)
-0:76          'r056' ( temp float)
-0:76          smoothstep ( temp float)
+0:76          'r055' ( temp float)
+0:76          hyp. sine ( temp float)
 0:76            'inF0' ( in float)
-0:76            'inF1' ( in float)
-0:76            'inF2' ( in float)
 0:77      Sequence
 0:77        move second child to first child ( temp float)
-0:77          'r057' ( temp float)
-0:77          sqrt ( temp float)
+0:77          'r056' ( temp float)
+0:77          smoothstep ( temp float)
 0:77            'inF0' ( in float)
+0:77            'inF1' ( in float)
+0:77            'inF2' ( in float)
 0:78      Sequence
 0:78        move second child to first child ( temp float)
-0:78          'r058' ( temp float)
-0:78          step ( temp float)
+0:78          'r057' ( temp float)
+0:78          sqrt ( temp float)
 0:78            'inF0' ( in float)
-0:78            'inF1' ( in float)
 0:79      Sequence
 0:79        move second child to first child ( temp float)
-0:79          'r059' ( temp float)
-0:79          tangent ( temp float)
+0:79          'r058' ( temp float)
+0:79          step ( temp float)
 0:79            'inF0' ( in float)
+0:79            'inF1' ( in float)
 0:80      Sequence
 0:80        move second child to first child ( temp float)
-0:80          'r060' ( temp float)
-0:80          hyp. tangent ( temp float)
+0:80          'r059' ( temp float)
+0:80          tangent ( temp float)
 0:80            'inF0' ( in float)
-0:82      Sequence
-0:82        move second child to first child ( temp float)
-0:82          'r061' ( temp float)
-0:82          trunc ( temp float)
-0:82            'inF0' ( in float)
-0:84      Branch: Return with expression
-0:84        Constant:
-0:84          0.000000
-0:88  Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float)
-0:88    Function Parameters: 
-0:88      'inF0' ( in 1-component vector of float)
-0:88      'inF1' ( in 1-component vector of float)
-0:88      'inF2' ( in 1-component vector of float)
+0:81      Sequence
+0:81        move second child to first child ( temp float)
+0:81          'r060' ( temp float)
+0:81          hyp. tangent ( temp float)
+0:81            'inF0' ( in float)
+0:83      Sequence
+0:83        move second child to first child ( temp float)
+0:83          'r061' ( temp float)
+0:83          trunc ( temp float)
+0:83            'inF0' ( in float)
+0:85      Branch: Return with expression
+0:85        Constant:
+0:85          0.000000
+0:89  Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float)
+0:89    Function Parameters: 
+0:89      'inF0' ( in 1-component vector of float)
+0:89      'inF1' ( in 1-component vector of float)
+0:89      'inF2' ( in 1-component vector of float)
 0:?     Sequence
-0:90      Branch: Return with expression
-0:90        Constant:
-0:90          0.000000
-0:94  Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float)
-0:94    Function Parameters: 
-0:94      'inF0' ( in 2-component vector of float)
-0:94      'inF1' ( in 2-component vector of float)
-0:94      'inF2' ( in 2-component vector of float)
-0:94      'inU0' ( in 2-component vector of uint)
-0:94      'inU1' ( in 2-component vector of uint)
+0:91      Branch: Return with expression
+0:91        Constant:
+0:91          0.000000
+0:95  Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float)
+0:95    Function Parameters: 
+0:95      'inF0' ( in 2-component vector of float)
+0:95      'inF1' ( in 2-component vector of float)
+0:95      'inF2' ( in 2-component vector of float)
+0:95      'inU0' ( in 2-component vector of uint)
+0:95      'inU1' ( in 2-component vector of uint)
 0:?     Sequence
-0:97      Sequence
-0:97        move second child to first child ( temp bool)
-0:97          'r000' ( temp bool)
-0:97          all ( temp bool)
-0:97            Convert float to bool ( temp 2-component vector of bool)
-0:97              'inF0' ( in 2-component vector of float)
 0:98      Sequence
-0:98        move second child to first child ( temp 2-component vector of float)
-0:98          'r001' ( temp 2-component vector of float)
-0:98          Absolute value ( temp 2-component vector of float)
-0:98            'inF0' ( in 2-component vector of float)
+0:98        move second child to first child ( temp bool)
+0:98          'r000' ( temp bool)
+0:98          all ( temp bool)
+0:98            Convert float to bool ( temp 2-component vector of bool)
+0:98              'inF0' ( in 2-component vector of float)
 0:99      Sequence
 0:99        move second child to first child ( temp 2-component vector of float)
-0:99          'r002' ( temp 2-component vector of float)
-0:99          arc cosine ( temp 2-component vector of float)
+0:99          'r001' ( temp 2-component vector of float)
+0:99          Absolute value ( temp 2-component vector of float)
 0:99            'inF0' ( in 2-component vector of float)
 0:100      Sequence
-0:100        move second child to first child ( temp bool)
-0:100          'r003' ( temp bool)
-0:100          any ( temp bool)
-0:100            Convert float to bool ( temp 2-component vector of bool)
-0:100              'inF0' ( in 2-component vector of float)
+0:100        move second child to first child ( temp 2-component vector of float)
+0:100          'r002' ( temp 2-component vector of float)
+0:100          arc cosine ( temp 2-component vector of float)
+0:100            'inF0' ( in 2-component vector of float)
 0:101      Sequence
-0:101        move second child to first child ( temp 2-component vector of float)
-0:101          'r004' ( temp 2-component vector of float)
-0:101          arc sine ( temp 2-component vector of float)
-0:101            'inF0' ( in 2-component vector of float)
+0:101        move second child to first child ( temp bool)
+0:101          'r003' ( temp bool)
+0:101          any ( temp bool)
+0:101            Convert float to bool ( temp 2-component vector of bool)
+0:101              'inF0' ( in 2-component vector of float)
 0:102      Sequence
-0:102        move second child to first child ( temp 2-component vector of int)
-0:102          'r005' ( temp 2-component vector of int)
-0:102          floatBitsToInt ( temp 2-component vector of int)
+0:102        move second child to first child ( temp 2-component vector of float)
+0:102          'r004' ( temp 2-component vector of float)
+0:102          arc sine ( temp 2-component vector of float)
 0:102            'inF0' ( in 2-component vector of float)
 0:103      Sequence
-0:103        move second child to first child ( temp 2-component vector of uint)
-0:103          'r006' ( temp 2-component vector of uint)
-0:103          floatBitsToUint ( temp 2-component vector of uint)
+0:103        move second child to first child ( temp 2-component vector of int)
+0:103          'r005' ( temp 2-component vector of int)
+0:103          floatBitsToInt ( temp 2-component vector of int)
 0:103            'inF0' ( in 2-component vector of float)
 0:104      Sequence
-0:104        move second child to first child ( temp 2-component vector of float)
-0:104          'r007' ( temp 2-component vector of float)
-0:104          intBitsToFloat ( temp 2-component vector of float)
-0:104            'inU0' ( in 2-component vector of uint)
-0:106      Sequence
-0:106        move second child to first child ( temp 2-component vector of float)
-0:106          'r009' ( temp 2-component vector of float)
-0:106          arc tangent ( temp 2-component vector of float)
-0:106            'inF0' ( in 2-component vector of float)
+0:104        move second child to first child ( temp 2-component vector of uint)
+0:104          'r006' ( temp 2-component vector of uint)
+0:104          floatBitsToUint ( temp 2-component vector of uint)
+0:104            'inF0' ( in 2-component vector of float)
+0:105      Sequence
+0:105        move second child to first child ( temp 2-component vector of float)
+0:105          'r007' ( temp 2-component vector of float)
+0:105          intBitsToFloat ( temp 2-component vector of float)
+0:105            'inU0' ( in 2-component vector of uint)
 0:107      Sequence
 0:107        move second child to first child ( temp 2-component vector of float)
-0:107          'r010' ( temp 2-component vector of float)
+0:107          'r009' ( temp 2-component vector of float)
 0:107          arc tangent ( temp 2-component vector of float)
 0:107            'inF0' ( in 2-component vector of float)
-0:107            'inF1' ( in 2-component vector of float)
 0:108      Sequence
 0:108        move second child to first child ( temp 2-component vector of float)
-0:108          'r011' ( temp 2-component vector of float)
-0:108          Ceiling ( temp 2-component vector of float)
+0:108          'r010' ( temp 2-component vector of float)
+0:108          arc tangent ( temp 2-component vector of float)
 0:108            'inF0' ( in 2-component vector of float)
+0:108            'inF1' ( in 2-component vector of float)
 0:109      Sequence
 0:109        move second child to first child ( temp 2-component vector of float)
-0:109          'r012' ( temp 2-component vector of float)
-0:109          clamp ( temp 2-component vector of float)
+0:109          'r011' ( temp 2-component vector of float)
+0:109          Ceiling ( temp 2-component vector of float)
 0:109            'inF0' ( in 2-component vector of float)
-0:109            'inF1' ( in 2-component vector of float)
-0:109            'inF2' ( in 2-component vector of float)
-0:110      Test condition and select ( temp void)
-0:110        Condition
-0:110        any ( temp bool)
-0:110          Compare Less Than ( temp 2-component vector of bool)
+0:110      Sequence
+0:110        move second child to first child ( temp 2-component vector of float)
+0:110          'r012' ( temp 2-component vector of float)
+0:110          clamp ( temp 2-component vector of float)
 0:110            'inF0' ( in 2-component vector of float)
-0:110            Constant:
-0:110              0.000000
-0:110              0.000000
-0:110        true case
-0:110        Branch: Kill
-0:111      Sequence
-0:111        move second child to first child ( temp 2-component vector of float)
-0:111          'r013' ( temp 2-component vector of float)
-0:111          cosine ( temp 2-component vector of float)
+0:110            'inF1' ( in 2-component vector of float)
+0:110            'inF2' ( in 2-component vector of float)
+0:111      Test condition and select ( temp void)
+0:111        Condition
+0:111        any ( temp bool)
+0:111          Compare Less Than ( temp 2-component vector of bool)
 0:111            'inF0' ( in 2-component vector of float)
-0:112      Sequence
-0:112        move second child to first child ( temp 2-component vector of float)
-0:112          'r015' ( temp 2-component vector of float)
-0:112          hyp. cosine ( temp 2-component vector of float)
-0:112            'inF0' ( in 2-component vector of float)
+0:111            Constant:
+0:111              0.000000
+0:111              0.000000
+0:111        true case
+0:111        Branch: Kill
+0:112      Test condition and select ( temp void)
+0:112        Condition
+0:112        any ( temp bool)
+0:112          Compare Less Than ( temp 2-component vector of bool)
+0:112            'inU0' ( in 2-component vector of uint)
+0:112            Constant:
+0:112              0.000000
+0:112              0.000000
+0:112        true case
+0:112        Branch: Kill
 0:113      Sequence
-0:113        move second child to first child ( temp 2-component vector of int)
-0:113          'r016' ( temp 2-component vector of int)
+0:113        move second child to first child ( temp 2-component vector of float)
+0:113          'r013' ( temp 2-component vector of float)
+0:113          cosine ( temp 2-component vector of float)
+0:113            'inF0' ( in 2-component vector of float)
+0:114      Sequence
+0:114        move second child to first child ( temp 2-component vector of float)
+0:114          'r015' ( temp 2-component vector of float)
+0:114          hyp. cosine ( temp 2-component vector of float)
+0:114            'inF0' ( in 2-component vector of float)
+0:115      Sequence
+0:115        move second child to first child ( temp 2-component vector of int)
+0:115          'r016' ( temp 2-component vector of int)
 0:?           bitCount ( temp 2-component vector of int)
 0:?             Constant:
 0:?               7 (const int)
 0:?               3 (const int)
-0:114      Sequence
-0:114        move second child to first child ( temp 2-component vector of float)
-0:114          'r017' ( temp 2-component vector of float)
-0:114          dPdx ( temp 2-component vector of float)
-0:114            'inF0' ( in 2-component vector of float)
-0:115      Sequence
-0:115        move second child to first child ( temp 2-component vector of float)
-0:115          'r018' ( temp 2-component vector of float)
-0:115          dPdxCoarse ( temp 2-component vector of float)
-0:115            'inF0' ( in 2-component vector of float)
 0:116      Sequence
 0:116        move second child to first child ( temp 2-component vector of float)
-0:116          'r019' ( temp 2-component vector of float)
-0:116          dPdxFine ( temp 2-component vector of float)
+0:116          'r017' ( temp 2-component vector of float)
+0:116          dPdx ( temp 2-component vector of float)
 0:116            'inF0' ( in 2-component vector of float)
 0:117      Sequence
 0:117        move second child to first child ( temp 2-component vector of float)
-0:117          'r020' ( temp 2-component vector of float)
-0:117          dPdy ( temp 2-component vector of float)
+0:117          'r018' ( temp 2-component vector of float)
+0:117          dPdxCoarse ( temp 2-component vector of float)
 0:117            'inF0' ( in 2-component vector of float)
 0:118      Sequence
 0:118        move second child to first child ( temp 2-component vector of float)
-0:118          'r021' ( temp 2-component vector of float)
-0:118          dPdyCoarse ( temp 2-component vector of float)
+0:118          'r019' ( temp 2-component vector of float)
+0:118          dPdxFine ( temp 2-component vector of float)
 0:118            'inF0' ( in 2-component vector of float)
 0:119      Sequence
 0:119        move second child to first child ( temp 2-component vector of float)
-0:119          'r022' ( temp 2-component vector of float)
-0:119          dPdyFine ( temp 2-component vector of float)
+0:119          'r020' ( temp 2-component vector of float)
+0:119          dPdy ( temp 2-component vector of float)
 0:119            'inF0' ( in 2-component vector of float)
 0:120      Sequence
 0:120        move second child to first child ( temp 2-component vector of float)
-0:120          'r023' ( temp 2-component vector of float)
-0:120          degrees ( temp 2-component vector of float)
+0:120          'r021' ( temp 2-component vector of float)
+0:120          dPdyCoarse ( temp 2-component vector of float)
 0:120            'inF0' ( in 2-component vector of float)
-0:124      Sequence
-0:124        move second child to first child ( temp float)
-0:124          'r026' ( temp float)
-0:124          distance ( temp float)
-0:124            'inF0' ( in 2-component vector of float)
-0:124            'inF1' ( in 2-component vector of float)
-0:125      Sequence
-0:125        move second child to first child ( temp float)
-0:125          'r027' ( temp float)
-0:125          dot-product ( temp float)
-0:125            'inF0' ( in 2-component vector of float)
-0:125            'inF1' ( in 2-component vector of float)
-0:129      Sequence
-0:129        move second child to first child ( temp 2-component vector of float)
-0:129          'r028' ( temp 2-component vector of float)
-0:129          exp ( temp 2-component vector of float)
-0:129            'inF0' ( in 2-component vector of float)
-0:130      Sequence
-0:130        move second child to first child ( temp 2-component vector of float)
-0:130          'r029' ( temp 2-component vector of float)
-0:130          exp2 ( temp 2-component vector of float)
-0:130            'inF0' ( in 2-component vector of float)
+0:121      Sequence
+0:121        move second child to first child ( temp 2-component vector of float)
+0:121          'r022' ( temp 2-component vector of float)
+0:121          dPdyFine ( temp 2-component vector of float)
+0:121            'inF0' ( in 2-component vector of float)
+0:122      Sequence
+0:122        move second child to first child ( temp 2-component vector of float)
+0:122          'r023' ( temp 2-component vector of float)
+0:122          degrees ( temp 2-component vector of float)
+0:122            'inF0' ( in 2-component vector of float)
+0:126      Sequence
+0:126        move second child to first child ( temp float)
+0:126          'r026' ( temp float)
+0:126          distance ( temp float)
+0:126            'inF0' ( in 2-component vector of float)
+0:126            'inF1' ( in 2-component vector of float)
+0:127      Sequence
+0:127        move second child to first child ( temp float)
+0:127          'r027' ( temp float)
+0:127          dot-product ( temp float)
+0:127            'inF0' ( in 2-component vector of float)
+0:127            'inF1' ( in 2-component vector of float)
 0:131      Sequence
 0:131        move second child to first child ( temp 2-component vector of float)
-0:131          'r030' ( temp 2-component vector of float)
-0:131          face-forward ( temp 2-component vector of float)
+0:131          'r028' ( temp 2-component vector of float)
+0:131          exp ( temp 2-component vector of float)
 0:131            'inF0' ( in 2-component vector of float)
-0:131            'inF1' ( in 2-component vector of float)
-0:131            'inF2' ( in 2-component vector of float)
 0:132      Sequence
-0:132        move second child to first child ( temp 2-component vector of uint)
-0:132          'r031' ( temp 2-component vector of uint)
+0:132        move second child to first child ( temp 2-component vector of float)
+0:132          'r029' ( temp 2-component vector of float)
+0:132          exp2 ( temp 2-component vector of float)
+0:132            'inF0' ( in 2-component vector of float)
+0:133      Sequence
+0:133        move second child to first child ( temp 2-component vector of float)
+0:133          'r030' ( temp 2-component vector of float)
+0:133          face-forward ( temp 2-component vector of float)
+0:133            'inF0' ( in 2-component vector of float)
+0:133            'inF1' ( in 2-component vector of float)
+0:133            'inF2' ( in 2-component vector of float)
+0:134      Sequence
+0:134        move second child to first child ( temp 2-component vector of uint)
+0:134          'r031' ( temp 2-component vector of uint)
 0:?           findMSB ( temp 2-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               8 (const uint)
-0:133      Sequence
-0:133        move second child to first child ( temp 2-component vector of uint)
-0:133          'r032' ( temp 2-component vector of uint)
+0:135      Sequence
+0:135        move second child to first child ( temp 2-component vector of uint)
+0:135          'r032' ( temp 2-component vector of uint)
 0:?           findLSB ( temp 2-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               8 (const uint)
-0:134      Sequence
-0:134        move second child to first child ( temp 2-component vector of float)
-0:134          'r033' ( temp 2-component vector of float)
-0:134          Floor ( temp 2-component vector of float)
-0:134            'inF0' ( in 2-component vector of float)
 0:136      Sequence
 0:136        move second child to first child ( temp 2-component vector of float)
-0:136          'r035' ( temp 2-component vector of float)
-0:136          mod ( temp 2-component vector of float)
+0:136          'r033' ( temp 2-component vector of float)
+0:136          Floor ( temp 2-component vector of float)
 0:136            'inF0' ( in 2-component vector of float)
-0:136            'inF1' ( in 2-component vector of float)
-0:137      Sequence
-0:137        move second child to first child ( temp 2-component vector of float)
-0:137          'r036' ( temp 2-component vector of float)
-0:137          Fraction ( temp 2-component vector of float)
-0:137            'inF0' ( in 2-component vector of float)
 0:138      Sequence
 0:138        move second child to first child ( temp 2-component vector of float)
-0:138          'r038' ( temp 2-component vector of float)
-0:138          fwidth ( temp 2-component vector of float)
+0:138          'r035' ( temp 2-component vector of float)
+0:138          mod ( temp 2-component vector of float)
 0:138            'inF0' ( in 2-component vector of float)
+0:138            'inF1' ( in 2-component vector of float)
 0:139      Sequence
-0:139        move second child to first child ( temp 2-component vector of bool)
-0:139          'r039' ( temp 2-component vector of bool)
-0:139          isinf ( temp 2-component vector of bool)
+0:139        move second child to first child ( temp 2-component vector of float)
+0:139          'r036' ( temp 2-component vector of float)
+0:139          Fraction ( temp 2-component vector of float)
 0:139            'inF0' ( in 2-component vector of float)
 0:140      Sequence
-0:140        move second child to first child ( temp 2-component vector of bool)
-0:140          'r040' ( temp 2-component vector of bool)
-0:140          isnan ( temp 2-component vector of bool)
+0:140        move second child to first child ( temp 2-component vector of float)
+0:140          'r038' ( temp 2-component vector of float)
+0:140          fwidth ( temp 2-component vector of float)
 0:140            'inF0' ( in 2-component vector of float)
 0:141      Sequence
-0:141        move second child to first child ( temp 2-component vector of float)
-0:141          'r041' ( temp 2-component vector of float)
-0:141          ldexp ( temp 2-component vector of float)
+0:141        move second child to first child ( temp 2-component vector of bool)
+0:141          'r039' ( temp 2-component vector of bool)
+0:141          isinf ( temp 2-component vector of bool)
 0:141            'inF0' ( in 2-component vector of float)
-0:141            'inF1' ( in 2-component vector of float)
 0:142      Sequence
-0:142        move second child to first child ( temp 2-component vector of float)
-0:142          'r039a' ( temp 2-component vector of float)
-0:142          mix ( temp 2-component vector of float)
+0:142        move second child to first child ( temp 2-component vector of bool)
+0:142          'r040' ( temp 2-component vector of bool)
+0:142          isnan ( temp 2-component vector of bool)
 0:142            'inF0' ( in 2-component vector of float)
-0:142            'inF1' ( in 2-component vector of float)
-0:142            'inF2' ( in 2-component vector of float)
 0:143      Sequence
-0:143        move second child to first child ( temp float)
-0:143          'r042' ( temp float)
-0:143          length ( temp float)
+0:143        move second child to first child ( temp 2-component vector of float)
+0:143          'r041' ( temp 2-component vector of float)
+0:143          ldexp ( temp 2-component vector of float)
 0:143            'inF0' ( in 2-component vector of float)
+0:143            'inF1' ( in 2-component vector of float)
 0:144      Sequence
 0:144        move second child to first child ( temp 2-component vector of float)
-0:144          'r043' ( temp 2-component vector of float)
-0:144          log ( temp 2-component vector of float)
+0:144          'r039a' ( temp 2-component vector of float)
+0:144          mix ( temp 2-component vector of float)
 0:144            'inF0' ( in 2-component vector of float)
+0:144            'inF1' ( in 2-component vector of float)
+0:144            'inF2' ( in 2-component vector of float)
 0:145      Sequence
-0:145        move second child to first child ( temp 2-component vector of float)
-0:145          'r044' ( temp 2-component vector of float)
-0:145          vector-scale ( temp 2-component vector of float)
-0:145            log2 ( temp 2-component vector of float)
-0:145              'inF0' ( in 2-component vector of float)
-0:145            Constant:
-0:145              0.301030
+0:145        move second child to first child ( temp float)
+0:145          'r042' ( temp float)
+0:145          length ( temp float)
+0:145            'inF0' ( in 2-component vector of float)
 0:146      Sequence
 0:146        move second child to first child ( temp 2-component vector of float)
-0:146          'r045' ( temp 2-component vector of float)
-0:146          log2 ( temp 2-component vector of float)
+0:146          'r043' ( temp 2-component vector of float)
+0:146          log ( temp 2-component vector of float)
 0:146            'inF0' ( in 2-component vector of float)
 0:147      Sequence
 0:147        move second child to first child ( temp 2-component vector of float)
-0:147          'r046' ( temp 2-component vector of float)
-0:147          max ( temp 2-component vector of float)
-0:147            'inF0' ( in 2-component vector of float)
-0:147            'inF1' ( in 2-component vector of float)
+0:147          'r044' ( temp 2-component vector of float)
+0:147          vector-scale ( temp 2-component vector of float)
+0:147            log2 ( temp 2-component vector of float)
+0:147              'inF0' ( in 2-component vector of float)
+0:147            Constant:
+0:147              0.301030
 0:148      Sequence
 0:148        move second child to first child ( temp 2-component vector of float)
-0:148          'r047' ( temp 2-component vector of float)
-0:148          min ( temp 2-component vector of float)
+0:148          'r045' ( temp 2-component vector of float)
+0:148          log2 ( temp 2-component vector of float)
 0:148            'inF0' ( in 2-component vector of float)
-0:148            'inF1' ( in 2-component vector of float)
 0:149      Sequence
 0:149        move second child to first child ( temp 2-component vector of float)
-0:149          'r048' ( temp 2-component vector of float)
-0:149          normalize ( temp 2-component vector of float)
+0:149          'r046' ( temp 2-component vector of float)
+0:149          max ( temp 2-component vector of float)
 0:149            'inF0' ( in 2-component vector of float)
+0:149            'inF1' ( in 2-component vector of float)
 0:150      Sequence
 0:150        move second child to first child ( temp 2-component vector of float)
-0:150          'r049' ( temp 2-component vector of float)
-0:150          pow ( temp 2-component vector of float)
+0:150          'r047' ( temp 2-component vector of float)
+0:150          min ( temp 2-component vector of float)
 0:150            'inF0' ( in 2-component vector of float)
 0:150            'inF1' ( in 2-component vector of float)
 0:151      Sequence
 0:151        move second child to first child ( temp 2-component vector of float)
-0:151          'r050' ( temp 2-component vector of float)
-0:151          radians ( temp 2-component vector of float)
+0:151          'r048' ( temp 2-component vector of float)
+0:151          normalize ( temp 2-component vector of float)
 0:151            'inF0' ( in 2-component vector of float)
 0:152      Sequence
 0:152        move second child to first child ( temp 2-component vector of float)
-0:152          'r051' ( temp 2-component vector of float)
-0:152          divide ( temp 2-component vector of float)
-0:152            Constant:
-0:152              1.000000
+0:152          'r049' ( temp 2-component vector of float)
+0:152          pow ( temp 2-component vector of float)
 0:152            'inF0' ( in 2-component vector of float)
+0:152            'inF1' ( in 2-component vector of float)
 0:153      Sequence
 0:153        move second child to first child ( temp 2-component vector of float)
-0:153          'r052' ( temp 2-component vector of float)
-0:153          reflect ( temp 2-component vector of float)
+0:153          'r050' ( temp 2-component vector of float)
+0:153          radians ( temp 2-component vector of float)
 0:153            'inF0' ( in 2-component vector of float)
-0:153            'inF1' ( in 2-component vector of float)
 0:154      Sequence
 0:154        move second child to first child ( temp 2-component vector of float)
-0:154          'r053' ( temp 2-component vector of float)
-0:154          refract ( temp 2-component vector of float)
-0:154            'inF0' ( in 2-component vector of float)
-0:154            'inF1' ( in 2-component vector of float)
+0:154          'r051' ( temp 2-component vector of float)
+0:154          divide ( temp 2-component vector of float)
 0:154            Constant:
-0:154              2.000000
+0:154              1.000000
+0:154            'inF0' ( in 2-component vector of float)
 0:155      Sequence
-0:155        move second child to first child ( temp 2-component vector of uint)
-0:155          'r054' ( temp 2-component vector of uint)
+0:155        move second child to first child ( temp 2-component vector of float)
+0:155          'r052' ( temp 2-component vector of float)
+0:155          reflect ( temp 2-component vector of float)
+0:155            'inF0' ( in 2-component vector of float)
+0:155            'inF1' ( in 2-component vector of float)
+0:156      Sequence
+0:156        move second child to first child ( temp 2-component vector of float)
+0:156          'r053' ( temp 2-component vector of float)
+0:156          refract ( temp 2-component vector of float)
+0:156            'inF0' ( in 2-component vector of float)
+0:156            'inF1' ( in 2-component vector of float)
+0:156            Constant:
+0:156              2.000000
+0:157      Sequence
+0:157        move second child to first child ( temp 2-component vector of uint)
+0:157          'r054' ( temp 2-component vector of uint)
 0:?           bitFieldReverse ( temp 2-component vector of uint)
 0:?             Constant:
 0:?               1 (const uint)
 0:?               2 (const uint)
-0:156      Sequence
-0:156        move second child to first child ( temp 2-component vector of float)
-0:156          'r055' ( temp 2-component vector of float)
-0:156          roundEven ( temp 2-component vector of float)
-0:156            'inF0' ( in 2-component vector of float)
-0:157      Sequence
-0:157        move second child to first child ( temp 2-component vector of float)
-0:157          'r056' ( temp 2-component vector of float)
-0:157          inverse sqrt ( temp 2-component vector of float)
-0:157            'inF0' ( in 2-component vector of float)
 0:158      Sequence
 0:158        move second child to first child ( temp 2-component vector of float)
-0:158          'r057' ( temp 2-component vector of float)
-0:158          clamp ( temp 2-component vector of float)
+0:158          'r055' ( temp 2-component vector of float)
+0:158          roundEven ( temp 2-component vector of float)
 0:158            'inF0' ( in 2-component vector of float)
-0:158            Constant:
-0:158              0.000000
-0:158            Constant:
-0:158              1.000000
 0:159      Sequence
 0:159        move second child to first child ( temp 2-component vector of float)
-0:159          'r058' ( temp 2-component vector of float)
-0:159          Sign ( temp 2-component vector of float)
+0:159          'r056' ( temp 2-component vector of float)
+0:159          inverse sqrt ( temp 2-component vector of float)
 0:159            'inF0' ( in 2-component vector of float)
 0:160      Sequence
 0:160        move second child to first child ( temp 2-component vector of float)
-0:160          'r059' ( temp 2-component vector of float)
-0:160          sine ( temp 2-component vector of float)
+0:160          'r057' ( temp 2-component vector of float)
+0:160          clamp ( temp 2-component vector of float)
 0:160            'inF0' ( in 2-component vector of float)
+0:160            Constant:
+0:160              0.000000
+0:160            Constant:
+0:160              1.000000
 0:161      Sequence
 0:161        move second child to first child ( temp 2-component vector of float)
-0:161          'inF1' ( in 2-component vector of float)
-0:161          sine ( temp 2-component vector of float)
-0:161            'inF0' ( in 2-component vector of float)
-0:161        move second child to first child ( temp 2-component vector of float)
-0:161          'inF2' ( in 2-component vector of float)
-0:161          cosine ( temp 2-component vector of float)
+0:161          'r058' ( temp 2-component vector of float)
+0:161          Sign ( temp 2-component vector of float)
 0:161            'inF0' ( in 2-component vector of float)
 0:162      Sequence
 0:162        move second child to first child ( temp 2-component vector of float)
-0:162          'r060' ( temp 2-component vector of float)
-0:162          hyp. sine ( temp 2-component vector of float)
+0:162          'r059' ( temp 2-component vector of float)
+0:162          sine ( temp 2-component vector of float)
 0:162            'inF0' ( in 2-component vector of float)
 0:163      Sequence
 0:163        move second child to first child ( temp 2-component vector of float)
-0:163          'r061' ( temp 2-component vector of float)
-0:163          smoothstep ( temp 2-component vector of float)
+0:163          'inF1' ( in 2-component vector of float)
+0:163          sine ( temp 2-component vector of float)
 0:163            'inF0' ( in 2-component vector of float)
-0:163            'inF1' ( in 2-component vector of float)
-0:163            'inF2' ( in 2-component vector of float)
+0:163        move second child to first child ( temp 2-component vector of float)
+0:163          'inF2' ( in 2-component vector of float)
+0:163          cosine ( temp 2-component vector of float)
+0:163            'inF0' ( in 2-component vector of float)
 0:164      Sequence
 0:164        move second child to first child ( temp 2-component vector of float)
-0:164          'r062' ( temp 2-component vector of float)
-0:164          sqrt ( temp 2-component vector of float)
+0:164          'r060' ( temp 2-component vector of float)
+0:164          hyp. sine ( temp 2-component vector of float)
 0:164            'inF0' ( in 2-component vector of float)
 0:165      Sequence
 0:165        move second child to first child ( temp 2-component vector of float)
-0:165          'r063' ( temp 2-component vector of float)
-0:165          step ( temp 2-component vector of float)
+0:165          'r061' ( temp 2-component vector of float)
+0:165          smoothstep ( temp 2-component vector of float)
 0:165            'inF0' ( in 2-component vector of float)
 0:165            'inF1' ( in 2-component vector of float)
+0:165            'inF2' ( in 2-component vector of float)
 0:166      Sequence
 0:166        move second child to first child ( temp 2-component vector of float)
-0:166          'r064' ( temp 2-component vector of float)
-0:166          tangent ( temp 2-component vector of float)
+0:166          'r062' ( temp 2-component vector of float)
+0:166          sqrt ( temp 2-component vector of float)
 0:166            'inF0' ( in 2-component vector of float)
 0:167      Sequence
 0:167        move second child to first child ( temp 2-component vector of float)
-0:167          'r065' ( temp 2-component vector of float)
-0:167          hyp. tangent ( temp 2-component vector of float)
+0:167          'r063' ( temp 2-component vector of float)
+0:167          step ( temp 2-component vector of float)
 0:167            'inF0' ( in 2-component vector of float)
+0:167            'inF1' ( in 2-component vector of float)
+0:168      Sequence
+0:168        move second child to first child ( temp 2-component vector of float)
+0:168          'r064' ( temp 2-component vector of float)
+0:168          tangent ( temp 2-component vector of float)
+0:168            'inF0' ( in 2-component vector of float)
 0:169      Sequence
 0:169        move second child to first child ( temp 2-component vector of float)
-0:169          'r066' ( temp 2-component vector of float)
-0:169          trunc ( temp 2-component vector of float)
+0:169          'r065' ( temp 2-component vector of float)
+0:169          hyp. tangent ( temp 2-component vector of float)
 0:169            'inF0' ( in 2-component vector of float)
-0:172      Branch: Return with expression
+0:171      Sequence
+0:171        move second child to first child ( temp 2-component vector of float)
+0:171          'r066' ( temp 2-component vector of float)
+0:171          trunc ( temp 2-component vector of float)
+0:171            'inF0' ( in 2-component vector of float)
+0:174      Branch: Return with expression
 0:?         Constant:
 0:?           1.000000
 0:?           2.000000
-0:176  Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float)
-0:176    Function Parameters: 
-0:176      'inF0' ( in 3-component vector of float)
-0:176      'inF1' ( in 3-component vector of float)
-0:176      'inF2' ( in 3-component vector of float)
-0:176      'inU0' ( in 3-component vector of uint)
-0:176      'inU1' ( in 3-component vector of uint)
+0:178  Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float)
+0:178    Function Parameters: 
+0:178      'inF0' ( in 3-component vector of float)
+0:178      'inF1' ( in 3-component vector of float)
+0:178      'inF2' ( in 3-component vector of float)
+0:178      'inU0' ( in 3-component vector of uint)
+0:178      'inU1' ( in 3-component vector of uint)
 0:?     Sequence
-0:179      Sequence
-0:179        move second child to first child ( temp bool)
-0:179          'r000' ( temp bool)
-0:179          all ( temp bool)
-0:179            Convert float to bool ( temp 3-component vector of bool)
-0:179              'inF0' ( in 3-component vector of float)
-0:180      Sequence
-0:180        move second child to first child ( temp 3-component vector of float)
-0:180          'r001' ( temp 3-component vector of float)
-0:180          Absolute value ( temp 3-component vector of float)
-0:180            'inF0' ( in 3-component vector of float)
 0:181      Sequence
-0:181        move second child to first child ( temp 3-component vector of float)
-0:181          'r002' ( temp 3-component vector of float)
-0:181          arc cosine ( temp 3-component vector of float)
-0:181            'inF0' ( in 3-component vector of float)
+0:181        move second child to first child ( temp bool)
+0:181          'r000' ( temp bool)
+0:181          all ( temp bool)
+0:181            Convert float to bool ( temp 3-component vector of bool)
+0:181              'inF0' ( in 3-component vector of float)
 0:182      Sequence
-0:182        move second child to first child ( temp bool)
-0:182          'r003' ( temp bool)
-0:182          any ( temp bool)
-0:182            Convert float to bool ( temp 3-component vector of bool)
-0:182              'inF0' ( in 3-component vector of float)
+0:182        move second child to first child ( temp 3-component vector of float)
+0:182          'r001' ( temp 3-component vector of float)
+0:182          Absolute value ( temp 3-component vector of float)
+0:182            'inF0' ( in 3-component vector of float)
 0:183      Sequence
 0:183        move second child to first child ( temp 3-component vector of float)
-0:183          'r004' ( temp 3-component vector of float)
-0:183          arc sine ( temp 3-component vector of float)
+0:183          'r002' ( temp 3-component vector of float)
+0:183          arc cosine ( temp 3-component vector of float)
 0:183            'inF0' ( in 3-component vector of float)
 0:184      Sequence
-0:184        move second child to first child ( temp 3-component vector of int)
-0:184          'r005' ( temp 3-component vector of int)
-0:184          floatBitsToInt ( temp 3-component vector of int)
-0:184            'inF0' ( in 3-component vector of float)
+0:184        move second child to first child ( temp bool)
+0:184          'r003' ( temp bool)
+0:184          any ( temp bool)
+0:184            Convert float to bool ( temp 3-component vector of bool)
+0:184              'inF0' ( in 3-component vector of float)
 0:185      Sequence
-0:185        move second child to first child ( temp 3-component vector of uint)
-0:185          'r006' ( temp 3-component vector of uint)
-0:185          floatBitsToUint ( temp 3-component vector of uint)
+0:185        move second child to first child ( temp 3-component vector of float)
+0:185          'r004' ( temp 3-component vector of float)
+0:185          arc sine ( temp 3-component vector of float)
 0:185            'inF0' ( in 3-component vector of float)
 0:186      Sequence
-0:186        move second child to first child ( temp 3-component vector of float)
-0:186          'r007' ( temp 3-component vector of float)
-0:186          intBitsToFloat ( temp 3-component vector of float)
-0:186            'inU0' ( in 3-component vector of uint)
+0:186        move second child to first child ( temp 3-component vector of int)
+0:186          'r005' ( temp 3-component vector of int)
+0:186          floatBitsToInt ( temp 3-component vector of int)
+0:186            'inF0' ( in 3-component vector of float)
+0:187      Sequence
+0:187        move second child to first child ( temp 3-component vector of uint)
+0:187          'r006' ( temp 3-component vector of uint)
+0:187          floatBitsToUint ( temp 3-component vector of uint)
+0:187            'inF0' ( in 3-component vector of float)
 0:188      Sequence
 0:188        move second child to first child ( temp 3-component vector of float)
-0:188          'r009' ( temp 3-component vector of float)
-0:188          arc tangent ( temp 3-component vector of float)
-0:188            'inF0' ( in 3-component vector of float)
-0:189      Sequence
-0:189        move second child to first child ( temp 3-component vector of float)
-0:189          'r010' ( temp 3-component vector of float)
-0:189          arc tangent ( temp 3-component vector of float)
-0:189            'inF0' ( in 3-component vector of float)
-0:189            'inF1' ( in 3-component vector of float)
+0:188          'r007' ( temp 3-component vector of float)
+0:188          intBitsToFloat ( temp 3-component vector of float)
+0:188            'inU0' ( in 3-component vector of uint)
 0:190      Sequence
 0:190        move second child to first child ( temp 3-component vector of float)
-0:190          'r011' ( temp 3-component vector of float)
-0:190          Ceiling ( temp 3-component vector of float)
+0:190          'r009' ( temp 3-component vector of float)
+0:190          arc tangent ( temp 3-component vector of float)
 0:190            'inF0' ( in 3-component vector of float)
 0:191      Sequence
 0:191        move second child to first child ( temp 3-component vector of float)
-0:191          'r012' ( temp 3-component vector of float)
-0:191          clamp ( temp 3-component vector of float)
+0:191          'r010' ( temp 3-component vector of float)
+0:191          arc tangent ( temp 3-component vector of float)
 0:191            'inF0' ( in 3-component vector of float)
 0:191            'inF1' ( in 3-component vector of float)
-0:191            'inF2' ( in 3-component vector of float)
-0:192      Test condition and select ( temp void)
-0:192        Condition
-0:192        any ( temp bool)
-0:192          Compare Less Than ( temp 3-component vector of bool)
+0:192      Sequence
+0:192        move second child to first child ( temp 3-component vector of float)
+0:192          'r011' ( temp 3-component vector of float)
+0:192          Ceiling ( temp 3-component vector of float)
 0:192            'inF0' ( in 3-component vector of float)
-0:192            Constant:
-0:192              0.000000
-0:192              0.000000
-0:192              0.000000
-0:192        true case
-0:192        Branch: Kill
 0:193      Sequence
 0:193        move second child to first child ( temp 3-component vector of float)
-0:193          'r013' ( temp 3-component vector of float)
-0:193          cosine ( temp 3-component vector of float)
+0:193          'r012' ( temp 3-component vector of float)
+0:193          clamp ( temp 3-component vector of float)
 0:193            'inF0' ( in 3-component vector of float)
-0:194      Sequence
-0:194        move second child to first child ( temp 3-component vector of float)
-0:194          'r014' ( temp 3-component vector of float)
-0:194          hyp. cosine ( temp 3-component vector of float)
+0:193            'inF1' ( in 3-component vector of float)
+0:193            'inF2' ( in 3-component vector of float)
+0:194      Test condition and select ( temp void)
+0:194        Condition
+0:194        any ( temp bool)
+0:194          Compare Less Than ( temp 3-component vector of bool)
 0:194            'inF0' ( in 3-component vector of float)
-0:195      Sequence
-0:195        move second child to first child ( temp 3-component vector of uint)
-0:195          'r015' ( temp 3-component vector of uint)
+0:194            Constant:
+0:194              0.000000
+0:194              0.000000
+0:194              0.000000
+0:194        true case
+0:194        Branch: Kill
+0:195      Test condition and select ( temp void)
+0:195        Condition
+0:195        any ( temp bool)
+0:195          Compare Less Than ( temp 3-component vector of bool)
+0:195            'inU0' ( in 3-component vector of uint)
+0:195            Constant:
+0:195              0.000000
+0:195              0.000000
+0:195              0.000000
+0:195        true case
+0:195        Branch: Kill
+0:196      Sequence
+0:196        move second child to first child ( temp 3-component vector of float)
+0:196          'r013' ( temp 3-component vector of float)
+0:196          cosine ( temp 3-component vector of float)
+0:196            'inF0' ( in 3-component vector of float)
+0:197      Sequence
+0:197        move second child to first child ( temp 3-component vector of float)
+0:197          'r014' ( temp 3-component vector of float)
+0:197          hyp. cosine ( temp 3-component vector of float)
+0:197            'inF0' ( in 3-component vector of float)
+0:198      Sequence
+0:198        move second child to first child ( temp 3-component vector of uint)
+0:198          'r015' ( temp 3-component vector of uint)
 0:?           bitCount ( temp 3-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               3 (const uint)
 0:?               5 (const uint)
-0:196      Sequence
-0:196        move second child to first child ( temp 3-component vector of float)
-0:196          'r016' ( temp 3-component vector of float)
-0:196          cross-product ( temp 3-component vector of float)
-0:196            'inF0' ( in 3-component vector of float)
-0:196            'inF1' ( in 3-component vector of float)
-0:197      Sequence
-0:197        move second child to first child ( temp 3-component vector of float)
-0:197          'r017' ( temp 3-component vector of float)
-0:197          dPdx ( temp 3-component vector of float)
-0:197            'inF0' ( in 3-component vector of float)
-0:198      Sequence
-0:198        move second child to first child ( temp 3-component vector of float)
-0:198          'r018' ( temp 3-component vector of float)
-0:198          dPdxCoarse ( temp 3-component vector of float)
-0:198            'inF0' ( in 3-component vector of float)
 0:199      Sequence
 0:199        move second child to first child ( temp 3-component vector of float)
-0:199          'r019' ( temp 3-component vector of float)
-0:199          dPdxFine ( temp 3-component vector of float)
+0:199          'r016' ( temp 3-component vector of float)
+0:199          cross-product ( temp 3-component vector of float)
 0:199            'inF0' ( in 3-component vector of float)
+0:199            'inF1' ( in 3-component vector of float)
 0:200      Sequence
 0:200        move second child to first child ( temp 3-component vector of float)
-0:200          'r020' ( temp 3-component vector of float)
-0:200          dPdy ( temp 3-component vector of float)
+0:200          'r017' ( temp 3-component vector of float)
+0:200          dPdx ( temp 3-component vector of float)
 0:200            'inF0' ( in 3-component vector of float)
 0:201      Sequence
 0:201        move second child to first child ( temp 3-component vector of float)
-0:201          'r021' ( temp 3-component vector of float)
-0:201          dPdyCoarse ( temp 3-component vector of float)
+0:201          'r018' ( temp 3-component vector of float)
+0:201          dPdxCoarse ( temp 3-component vector of float)
 0:201            'inF0' ( in 3-component vector of float)
 0:202      Sequence
 0:202        move second child to first child ( temp 3-component vector of float)
-0:202          'r022' ( temp 3-component vector of float)
-0:202          dPdyFine ( temp 3-component vector of float)
+0:202          'r019' ( temp 3-component vector of float)
+0:202          dPdxFine ( temp 3-component vector of float)
 0:202            'inF0' ( in 3-component vector of float)
 0:203      Sequence
 0:203        move second child to first child ( temp 3-component vector of float)
-0:203          'r023' ( temp 3-component vector of float)
-0:203          degrees ( temp 3-component vector of float)
+0:203          'r020' ( temp 3-component vector of float)
+0:203          dPdy ( temp 3-component vector of float)
 0:203            'inF0' ( in 3-component vector of float)
 0:204      Sequence
-0:204        move second child to first child ( temp float)
-0:204          'r024' ( temp float)
-0:204          distance ( temp float)
+0:204        move second child to first child ( temp 3-component vector of float)
+0:204          'r021' ( temp 3-component vector of float)
+0:204          dPdyCoarse ( temp 3-component vector of float)
 0:204            'inF0' ( in 3-component vector of float)
-0:204            'inF1' ( in 3-component vector of float)
 0:205      Sequence
-0:205        move second child to first child ( temp float)
-0:205          'r025' ( temp float)
-0:205          dot-product ( temp float)
+0:205        move second child to first child ( temp 3-component vector of float)
+0:205          'r022' ( temp 3-component vector of float)
+0:205          dPdyFine ( temp 3-component vector of float)
 0:205            'inF0' ( in 3-component vector of float)
-0:205            'inF1' ( in 3-component vector of float)
-0:209      Sequence
-0:209        move second child to first child ( temp 3-component vector of float)
-0:209          'r029' ( temp 3-component vector of float)
-0:209          exp ( temp 3-component vector of float)
-0:209            'inF0' ( in 3-component vector of float)
-0:210      Sequence
-0:210        move second child to first child ( temp 3-component vector of float)
-0:210          'r030' ( temp 3-component vector of float)
-0:210          exp2 ( temp 3-component vector of float)
-0:210            'inF0' ( in 3-component vector of float)
-0:211      Sequence
-0:211        move second child to first child ( temp 3-component vector of float)
-0:211          'r031' ( temp 3-component vector of float)
-0:211          face-forward ( temp 3-component vector of float)
-0:211            'inF0' ( in 3-component vector of float)
-0:211            'inF1' ( in 3-component vector of float)
-0:211            'inF2' ( in 3-component vector of float)
+0:206      Sequence
+0:206        move second child to first child ( temp 3-component vector of float)
+0:206          'r023' ( temp 3-component vector of float)
+0:206          degrees ( temp 3-component vector of float)
+0:206            'inF0' ( in 3-component vector of float)
+0:207      Sequence
+0:207        move second child to first child ( temp float)
+0:207          'r024' ( temp float)
+0:207          distance ( temp float)
+0:207            'inF0' ( in 3-component vector of float)
+0:207            'inF1' ( in 3-component vector of float)
+0:208      Sequence
+0:208        move second child to first child ( temp float)
+0:208          'r025' ( temp float)
+0:208          dot-product ( temp float)
+0:208            'inF0' ( in 3-component vector of float)
+0:208            'inF1' ( in 3-component vector of float)
 0:212      Sequence
-0:212        move second child to first child ( temp 3-component vector of uint)
-0:212          'r032' ( temp 3-component vector of uint)
+0:212        move second child to first child ( temp 3-component vector of float)
+0:212          'r029' ( temp 3-component vector of float)
+0:212          exp ( temp 3-component vector of float)
+0:212            'inF0' ( in 3-component vector of float)
+0:213      Sequence
+0:213        move second child to first child ( temp 3-component vector of float)
+0:213          'r030' ( temp 3-component vector of float)
+0:213          exp2 ( temp 3-component vector of float)
+0:213            'inF0' ( in 3-component vector of float)
+0:214      Sequence
+0:214        move second child to first child ( temp 3-component vector of float)
+0:214          'r031' ( temp 3-component vector of float)
+0:214          face-forward ( temp 3-component vector of float)
+0:214            'inF0' ( in 3-component vector of float)
+0:214            'inF1' ( in 3-component vector of float)
+0:214            'inF2' ( in 3-component vector of float)
+0:215      Sequence
+0:215        move second child to first child ( temp 3-component vector of uint)
+0:215          'r032' ( temp 3-component vector of uint)
 0:?           findMSB ( temp 3-component vector of uint)
 0:?             Constant:
 0:?               2 (const uint)
 0:?               3 (const uint)
 0:?               4 (const uint)
-0:213      Sequence
-0:213        move second child to first child ( temp 3-component vector of uint)
-0:213          'r033' ( temp 3-component vector of uint)
+0:216      Sequence
+0:216        move second child to first child ( temp 3-component vector of uint)
+0:216          'r033' ( temp 3-component vector of uint)
 0:?           findLSB ( temp 3-component vector of uint)
 0:?             Constant:
 0:?               2 (const uint)
 0:?               3 (const uint)
 0:?               4 (const uint)
-0:214      Sequence
-0:214        move second child to first child ( temp 3-component vector of float)
-0:214          'r034' ( temp 3-component vector of float)
-0:214          Floor ( temp 3-component vector of float)
-0:214            'inF0' ( in 3-component vector of float)
-0:216      Sequence
-0:216        move second child to first child ( temp 3-component vector of float)
-0:216          'r036' ( temp 3-component vector of float)
-0:216          mod ( temp 3-component vector of float)
-0:216            'inF0' ( in 3-component vector of float)
-0:216            'inF1' ( in 3-component vector of float)
 0:217      Sequence
 0:217        move second child to first child ( temp 3-component vector of float)
-0:217          'r037' ( temp 3-component vector of float)
-0:217          Fraction ( temp 3-component vector of float)
+0:217          'r034' ( temp 3-component vector of float)
+0:217          Floor ( temp 3-component vector of float)
 0:217            'inF0' ( in 3-component vector of float)
-0:218      Sequence
-0:218        move second child to first child ( temp 3-component vector of float)
-0:218          'r039' ( temp 3-component vector of float)
-0:218          fwidth ( temp 3-component vector of float)
-0:218            'inF0' ( in 3-component vector of float)
 0:219      Sequence
-0:219        move second child to first child ( temp 3-component vector of bool)
-0:219          'r040' ( temp 3-component vector of bool)
-0:219          isinf ( temp 3-component vector of bool)
+0:219        move second child to first child ( temp 3-component vector of float)
+0:219          'r036' ( temp 3-component vector of float)
+0:219          mod ( temp 3-component vector of float)
 0:219            'inF0' ( in 3-component vector of float)
+0:219            'inF1' ( in 3-component vector of float)
 0:220      Sequence
-0:220        move second child to first child ( temp 3-component vector of bool)
-0:220          'r041' ( temp 3-component vector of bool)
-0:220          isnan ( temp 3-component vector of bool)
+0:220        move second child to first child ( temp 3-component vector of float)
+0:220          'r037' ( temp 3-component vector of float)
+0:220          Fraction ( temp 3-component vector of float)
 0:220            'inF0' ( in 3-component vector of float)
 0:221      Sequence
 0:221        move second child to first child ( temp 3-component vector of float)
-0:221          'r042' ( temp 3-component vector of float)
-0:221          ldexp ( temp 3-component vector of float)
+0:221          'r039' ( temp 3-component vector of float)
+0:221          fwidth ( temp 3-component vector of float)
 0:221            'inF0' ( in 3-component vector of float)
-0:221            'inF1' ( in 3-component vector of float)
 0:222      Sequence
-0:222        move second child to first child ( temp 3-component vector of float)
-0:222          'r039a' ( temp 3-component vector of float)
-0:222          mix ( temp 3-component vector of float)
+0:222        move second child to first child ( temp 3-component vector of bool)
+0:222          'r040' ( temp 3-component vector of bool)
+0:222          isinf ( temp 3-component vector of bool)
 0:222            'inF0' ( in 3-component vector of float)
-0:222            'inF1' ( in 3-component vector of float)
-0:222            'inF2' ( in 3-component vector of float)
 0:223      Sequence
-0:223        move second child to first child ( temp 3-component vector of float)
-0:223          'r039b' ( temp 3-component vector of float)
-0:223          mix ( temp 3-component vector of float)
+0:223        move second child to first child ( temp 3-component vector of bool)
+0:223          'r041' ( temp 3-component vector of bool)
+0:223          isnan ( temp 3-component vector of bool)
 0:223            'inF0' ( in 3-component vector of float)
-0:223            'inF1' ( in 3-component vector of float)
-0:223            Constant:
-0:223              0.300000
 0:224      Sequence
-0:224        move second child to first child ( temp float)
-0:224          'r043' ( temp float)
-0:224          length ( temp float)
+0:224        move second child to first child ( temp 3-component vector of float)
+0:224          'r042' ( temp 3-component vector of float)
+0:224          ldexp ( temp 3-component vector of float)
 0:224            'inF0' ( in 3-component vector of float)
+0:224            'inF1' ( in 3-component vector of float)
 0:225      Sequence
 0:225        move second child to first child ( temp 3-component vector of float)
-0:225          'r044' ( temp 3-component vector of float)
-0:225          log ( temp 3-component vector of float)
+0:225          'r039a' ( temp 3-component vector of float)
+0:225          mix ( temp 3-component vector of float)
 0:225            'inF0' ( in 3-component vector of float)
+0:225            'inF1' ( in 3-component vector of float)
+0:225            'inF2' ( in 3-component vector of float)
 0:226      Sequence
 0:226        move second child to first child ( temp 3-component vector of float)
-0:226          'r045' ( temp 3-component vector of float)
-0:226          vector-scale ( temp 3-component vector of float)
-0:226            log2 ( temp 3-component vector of float)
-0:226              'inF0' ( in 3-component vector of float)
+0:226          'r039b' ( temp 3-component vector of float)
+0:226          mix ( temp 3-component vector of float)
+0:226            'inF0' ( in 3-component vector of float)
+0:226            'inF1' ( in 3-component vector of float)
 0:226            Constant:
-0:226              0.301030
+0:226              0.300000
 0:227      Sequence
-0:227        move second child to first child ( temp 3-component vector of float)
-0:227          'r046' ( temp 3-component vector of float)
-0:227          log2 ( temp 3-component vector of float)
+0:227        move second child to first child ( temp float)
+0:227          'r043' ( temp float)
+0:227          length ( temp float)
 0:227            'inF0' ( in 3-component vector of float)
 0:228      Sequence
 0:228        move second child to first child ( temp 3-component vector of float)
-0:228          'r047' ( temp 3-component vector of float)
-0:228          max ( temp 3-component vector of float)
+0:228          'r044' ( temp 3-component vector of float)
+0:228          log ( temp 3-component vector of float)
 0:228            'inF0' ( in 3-component vector of float)
-0:228            'inF1' ( in 3-component vector of float)
 0:229      Sequence
 0:229        move second child to first child ( temp 3-component vector of float)
-0:229          'r048' ( temp 3-component vector of float)
-0:229          min ( temp 3-component vector of float)
-0:229            'inF0' ( in 3-component vector of float)
-0:229            'inF1' ( in 3-component vector of float)
+0:229          'r045' ( temp 3-component vector of float)
+0:229          vector-scale ( temp 3-component vector of float)
+0:229            log2 ( temp 3-component vector of float)
+0:229              'inF0' ( in 3-component vector of float)
+0:229            Constant:
+0:229              0.301030
 0:230      Sequence
 0:230        move second child to first child ( temp 3-component vector of float)
-0:230          'r049' ( temp 3-component vector of float)
-0:230          normalize ( temp 3-component vector of float)
+0:230          'r046' ( temp 3-component vector of float)
+0:230          log2 ( temp 3-component vector of float)
 0:230            'inF0' ( in 3-component vector of float)
 0:231      Sequence
 0:231        move second child to first child ( temp 3-component vector of float)
-0:231          'r050' ( temp 3-component vector of float)
-0:231          pow ( temp 3-component vector of float)
+0:231          'r047' ( temp 3-component vector of float)
+0:231          max ( temp 3-component vector of float)
 0:231            'inF0' ( in 3-component vector of float)
 0:231            'inF1' ( in 3-component vector of float)
 0:232      Sequence
 0:232        move second child to first child ( temp 3-component vector of float)
-0:232          'r051' ( temp 3-component vector of float)
-0:232          radians ( temp 3-component vector of float)
+0:232          'r048' ( temp 3-component vector of float)
+0:232          min ( temp 3-component vector of float)
 0:232            'inF0' ( in 3-component vector of float)
+0:232            'inF1' ( in 3-component vector of float)
 0:233      Sequence
 0:233        move second child to first child ( temp 3-component vector of float)
-0:233          'r052' ( temp 3-component vector of float)
-0:233          divide ( temp 3-component vector of float)
-0:233            Constant:
-0:233              1.000000
+0:233          'r049' ( temp 3-component vector of float)
+0:233          normalize ( temp 3-component vector of float)
 0:233            'inF0' ( in 3-component vector of float)
 0:234      Sequence
 0:234        move second child to first child ( temp 3-component vector of float)
-0:234          'r053' ( temp 3-component vector of float)
-0:234          reflect ( temp 3-component vector of float)
+0:234          'r050' ( temp 3-component vector of float)
+0:234          pow ( temp 3-component vector of float)
 0:234            'inF0' ( in 3-component vector of float)
 0:234            'inF1' ( in 3-component vector of float)
 0:235      Sequence
 0:235        move second child to first child ( temp 3-component vector of float)
-0:235          'r054' ( temp 3-component vector of float)
-0:235          refract ( temp 3-component vector of float)
+0:235          'r051' ( temp 3-component vector of float)
+0:235          radians ( temp 3-component vector of float)
 0:235            'inF0' ( in 3-component vector of float)
-0:235            'inF1' ( in 3-component vector of float)
-0:235            Constant:
-0:235              2.000000
 0:236      Sequence
-0:236        move second child to first child ( temp 3-component vector of uint)
-0:236          'r055' ( temp 3-component vector of uint)
+0:236        move second child to first child ( temp 3-component vector of float)
+0:236          'r052' ( temp 3-component vector of float)
+0:236          divide ( temp 3-component vector of float)
+0:236            Constant:
+0:236              1.000000
+0:236            'inF0' ( in 3-component vector of float)
+0:237      Sequence
+0:237        move second child to first child ( temp 3-component vector of float)
+0:237          'r053' ( temp 3-component vector of float)
+0:237          reflect ( temp 3-component vector of float)
+0:237            'inF0' ( in 3-component vector of float)
+0:237            'inF1' ( in 3-component vector of float)
+0:238      Sequence
+0:238        move second child to first child ( temp 3-component vector of float)
+0:238          'r054' ( temp 3-component vector of float)
+0:238          refract ( temp 3-component vector of float)
+0:238            'inF0' ( in 3-component vector of float)
+0:238            'inF1' ( in 3-component vector of float)
+0:238            Constant:
+0:238              2.000000
+0:239      Sequence
+0:239        move second child to first child ( temp 3-component vector of uint)
+0:239          'r055' ( temp 3-component vector of uint)
 0:?           bitFieldReverse ( temp 3-component vector of uint)
 0:?             Constant:
 0:?               1 (const uint)
 0:?               2 (const uint)
 0:?               3 (const uint)
-0:237      Sequence
-0:237        move second child to first child ( temp 3-component vector of float)
-0:237          'r056' ( temp 3-component vector of float)
-0:237          roundEven ( temp 3-component vector of float)
-0:237            'inF0' ( in 3-component vector of float)
-0:238      Sequence
-0:238        move second child to first child ( temp 3-component vector of float)
-0:238          'r057' ( temp 3-component vector of float)
-0:238          inverse sqrt ( temp 3-component vector of float)
-0:238            'inF0' ( in 3-component vector of float)
-0:239      Sequence
-0:239        move second child to first child ( temp 3-component vector of float)
-0:239          'r058' ( temp 3-component vector of float)
-0:239          clamp ( temp 3-component vector of float)
-0:239            'inF0' ( in 3-component vector of float)
-0:239            Constant:
-0:239              0.000000
-0:239            Constant:
-0:239              1.000000
 0:240      Sequence
 0:240        move second child to first child ( temp 3-component vector of float)
-0:240          'r059' ( temp 3-component vector of float)
-0:240          Sign ( temp 3-component vector of float)
+0:240          'r056' ( temp 3-component vector of float)
+0:240          roundEven ( temp 3-component vector of float)
 0:240            'inF0' ( in 3-component vector of float)
 0:241      Sequence
 0:241        move second child to first child ( temp 3-component vector of float)
-0:241          'r060' ( temp 3-component vector of float)
-0:241          sine ( temp 3-component vector of float)
+0:241          'r057' ( temp 3-component vector of float)
+0:241          inverse sqrt ( temp 3-component vector of float)
 0:241            'inF0' ( in 3-component vector of float)
 0:242      Sequence
 0:242        move second child to first child ( temp 3-component vector of float)
-0:242          'inF1' ( in 3-component vector of float)
-0:242          sine ( temp 3-component vector of float)
+0:242          'r058' ( temp 3-component vector of float)
+0:242          clamp ( temp 3-component vector of float)
 0:242            'inF0' ( in 3-component vector of float)
-0:242        move second child to first child ( temp 3-component vector of float)
-0:242          'inF2' ( in 3-component vector of float)
-0:242          cosine ( temp 3-component vector of float)
-0:242            'inF0' ( in 3-component vector of float)
+0:242            Constant:
+0:242              0.000000
+0:242            Constant:
+0:242              1.000000
 0:243      Sequence
 0:243        move second child to first child ( temp 3-component vector of float)
-0:243          'r061' ( temp 3-component vector of float)
-0:243          hyp. sine ( temp 3-component vector of float)
+0:243          'r059' ( temp 3-component vector of float)
+0:243          Sign ( temp 3-component vector of float)
 0:243            'inF0' ( in 3-component vector of float)
 0:244      Sequence
 0:244        move second child to first child ( temp 3-component vector of float)
-0:244          'r062' ( temp 3-component vector of float)
-0:244          smoothstep ( temp 3-component vector of float)
+0:244          'r060' ( temp 3-component vector of float)
+0:244          sine ( temp 3-component vector of float)
 0:244            'inF0' ( in 3-component vector of float)
-0:244            'inF1' ( in 3-component vector of float)
-0:244            'inF2' ( in 3-component vector of float)
 0:245      Sequence
 0:245        move second child to first child ( temp 3-component vector of float)
-0:245          'r063' ( temp 3-component vector of float)
-0:245          sqrt ( temp 3-component vector of float)
+0:245          'inF1' ( in 3-component vector of float)
+0:245          sine ( temp 3-component vector of float)
+0:245            'inF0' ( in 3-component vector of float)
+0:245        move second child to first child ( temp 3-component vector of float)
+0:245          'inF2' ( in 3-component vector of float)
+0:245          cosine ( temp 3-component vector of float)
 0:245            'inF0' ( in 3-component vector of float)
 0:246      Sequence
 0:246        move second child to first child ( temp 3-component vector of float)
-0:246          'r064' ( temp 3-component vector of float)
-0:246          step ( temp 3-component vector of float)
+0:246          'r061' ( temp 3-component vector of float)
+0:246          hyp. sine ( temp 3-component vector of float)
 0:246            'inF0' ( in 3-component vector of float)
-0:246            'inF1' ( in 3-component vector of float)
 0:247      Sequence
 0:247        move second child to first child ( temp 3-component vector of float)
-0:247          'r065' ( temp 3-component vector of float)
-0:247          tangent ( temp 3-component vector of float)
+0:247          'r062' ( temp 3-component vector of float)
+0:247          smoothstep ( temp 3-component vector of float)
 0:247            'inF0' ( in 3-component vector of float)
+0:247            'inF1' ( in 3-component vector of float)
+0:247            'inF2' ( in 3-component vector of float)
 0:248      Sequence
 0:248        move second child to first child ( temp 3-component vector of float)
-0:248          'r066' ( temp 3-component vector of float)
-0:248          hyp. tangent ( temp 3-component vector of float)
+0:248          'r063' ( temp 3-component vector of float)
+0:248          sqrt ( temp 3-component vector of float)
 0:248            'inF0' ( in 3-component vector of float)
+0:249      Sequence
+0:249        move second child to first child ( temp 3-component vector of float)
+0:249          'r064' ( temp 3-component vector of float)
+0:249          step ( temp 3-component vector of float)
+0:249            'inF0' ( in 3-component vector of float)
+0:249            'inF1' ( in 3-component vector of float)
 0:250      Sequence
 0:250        move second child to first child ( temp 3-component vector of float)
-0:250          'r067' ( temp 3-component vector of float)
-0:250          trunc ( temp 3-component vector of float)
+0:250          'r065' ( temp 3-component vector of float)
+0:250          tangent ( temp 3-component vector of float)
 0:250            'inF0' ( in 3-component vector of float)
-0:253      Branch: Return with expression
+0:251      Sequence
+0:251        move second child to first child ( temp 3-component vector of float)
+0:251          'r066' ( temp 3-component vector of float)
+0:251          hyp. tangent ( temp 3-component vector of float)
+0:251            'inF0' ( in 3-component vector of float)
+0:253      Sequence
+0:253        move second child to first child ( temp 3-component vector of float)
+0:253          'r067' ( temp 3-component vector of float)
+0:253          trunc ( temp 3-component vector of float)
+0:253            'inF0' ( in 3-component vector of float)
+0:256      Branch: Return with expression
 0:?         Constant:
 0:?           1.000000
 0:?           2.000000
 0:?           3.000000
-0:257  Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float)
-0:257    Function Parameters: 
-0:257      'inF0' ( in 4-component vector of float)
-0:257      'inF1' ( in 4-component vector of float)
-0:257      'inF2' ( in 4-component vector of float)
-0:257      'inU0' ( in 4-component vector of uint)
-0:257      'inU1' ( in 4-component vector of uint)
+0:260  Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float)
+0:260    Function Parameters: 
+0:260      'inF0' ( in 4-component vector of float)
+0:260      'inF1' ( in 4-component vector of float)
+0:260      'inF2' ( in 4-component vector of float)
+0:260      'inU0' ( in 4-component vector of uint)
+0:260      'inU1' ( in 4-component vector of uint)
 0:?     Sequence
-0:260      Sequence
-0:260        move second child to first child ( temp bool)
-0:260          'r000' ( temp bool)
-0:260          all ( temp bool)
-0:260            Convert float to bool ( temp 4-component vector of bool)
-0:260              'inF0' ( in 4-component vector of float)
-0:261      Sequence
-0:261        move second child to first child ( temp 4-component vector of float)
-0:261          'r001' ( temp 4-component vector of float)
-0:261          Absolute value ( temp 4-component vector of float)
-0:261            'inF0' ( in 4-component vector of float)
-0:262      Sequence
-0:262        move second child to first child ( temp 4-component vector of float)
-0:262          'r002' ( temp 4-component vector of float)
-0:262          arc cosine ( temp 4-component vector of float)
-0:262            'inF0' ( in 4-component vector of float)
 0:263      Sequence
 0:263        move second child to first child ( temp bool)
-0:263          'r003' ( temp bool)
-0:263          any ( temp bool)
+0:263          'r000' ( temp bool)
+0:263          all ( temp bool)
 0:263            Convert float to bool ( temp 4-component vector of bool)
 0:263              'inF0' ( in 4-component vector of float)
 0:264      Sequence
 0:264        move second child to first child ( temp 4-component vector of float)
-0:264          'r004' ( temp 4-component vector of float)
-0:264          arc sine ( temp 4-component vector of float)
+0:264          'r001' ( temp 4-component vector of float)
+0:264          Absolute value ( temp 4-component vector of float)
 0:264            'inF0' ( in 4-component vector of float)
 0:265      Sequence
-0:265        move second child to first child ( temp 4-component vector of int)
-0:265          'r005' ( temp 4-component vector of int)
-0:265          floatBitsToInt ( temp 4-component vector of int)
+0:265        move second child to first child ( temp 4-component vector of float)
+0:265          'r002' ( temp 4-component vector of float)
+0:265          arc cosine ( temp 4-component vector of float)
 0:265            'inF0' ( in 4-component vector of float)
 0:266      Sequence
-0:266        move second child to first child ( temp 4-component vector of uint)
-0:266          'r006' ( temp 4-component vector of uint)
-0:266          floatBitsToUint ( temp 4-component vector of uint)
-0:266            'inF0' ( in 4-component vector of float)
+0:266        move second child to first child ( temp bool)
+0:266          'r003' ( temp bool)
+0:266          any ( temp bool)
+0:266            Convert float to bool ( temp 4-component vector of bool)
+0:266              'inF0' ( in 4-component vector of float)
 0:267      Sequence
 0:267        move second child to first child ( temp 4-component vector of float)
-0:267          'r007' ( temp 4-component vector of float)
-0:267          intBitsToFloat ( temp 4-component vector of float)
-0:267            'inU0' ( in 4-component vector of uint)
+0:267          'r004' ( temp 4-component vector of float)
+0:267          arc sine ( temp 4-component vector of float)
+0:267            'inF0' ( in 4-component vector of float)
+0:268      Sequence
+0:268        move second child to first child ( temp 4-component vector of int)
+0:268          'r005' ( temp 4-component vector of int)
+0:268          floatBitsToInt ( temp 4-component vector of int)
+0:268            'inF0' ( in 4-component vector of float)
 0:269      Sequence
-0:269        move second child to first child ( temp 4-component vector of float)
-0:269          'r009' ( temp 4-component vector of float)
-0:269          arc tangent ( temp 4-component vector of float)
+0:269        move second child to first child ( temp 4-component vector of uint)
+0:269          'r006' ( temp 4-component vector of uint)
+0:269          floatBitsToUint ( temp 4-component vector of uint)
 0:269            'inF0' ( in 4-component vector of float)
 0:270      Sequence
 0:270        move second child to first child ( temp 4-component vector of float)
-0:270          'r010' ( temp 4-component vector of float)
-0:270          arc tangent ( temp 4-component vector of float)
-0:270            'inF0' ( in 4-component vector of float)
-0:270            'inF1' ( in 4-component vector of float)
-0:271      Sequence
-0:271        move second child to first child ( temp 4-component vector of float)
-0:271          'r011' ( temp 4-component vector of float)
-0:271          Ceiling ( temp 4-component vector of float)
-0:271            'inF0' ( in 4-component vector of float)
+0:270          'r007' ( temp 4-component vector of float)
+0:270          intBitsToFloat ( temp 4-component vector of float)
+0:270            'inU0' ( in 4-component vector of uint)
 0:272      Sequence
 0:272        move second child to first child ( temp 4-component vector of float)
-0:272          'r012' ( temp 4-component vector of float)
-0:272          clamp ( temp 4-component vector of float)
+0:272          'r009' ( temp 4-component vector of float)
+0:272          arc tangent ( temp 4-component vector of float)
 0:272            'inF0' ( in 4-component vector of float)
-0:272            'inF1' ( in 4-component vector of float)
-0:272            'inF2' ( in 4-component vector of float)
-0:273      Test condition and select ( temp void)
-0:273        Condition
-0:273        any ( temp bool)
-0:273          Compare Less Than ( temp 4-component vector of bool)
+0:273      Sequence
+0:273        move second child to first child ( temp 4-component vector of float)
+0:273          'r010' ( temp 4-component vector of float)
+0:273          arc tangent ( temp 4-component vector of float)
 0:273            'inF0' ( in 4-component vector of float)
-0:273            Constant:
-0:273              0.000000
-0:273              0.000000
-0:273              0.000000
-0:273              0.000000
-0:273        true case
-0:273        Branch: Kill
+0:273            'inF1' ( in 4-component vector of float)
 0:274      Sequence
 0:274        move second child to first child ( temp 4-component vector of float)
-0:274          'r013' ( temp 4-component vector of float)
-0:274          cosine ( temp 4-component vector of float)
+0:274          'r011' ( temp 4-component vector of float)
+0:274          Ceiling ( temp 4-component vector of float)
 0:274            'inF0' ( in 4-component vector of float)
 0:275      Sequence
 0:275        move second child to first child ( temp 4-component vector of float)
-0:275          'r014' ( temp 4-component vector of float)
-0:275          hyp. cosine ( temp 4-component vector of float)
+0:275          'r012' ( temp 4-component vector of float)
+0:275          clamp ( temp 4-component vector of float)
 0:275            'inF0' ( in 4-component vector of float)
-0:276      Sequence
-0:276        move second child to first child ( temp 4-component vector of uint)
-0:276          'r015' ( temp 4-component vector of uint)
+0:275            'inF1' ( in 4-component vector of float)
+0:275            'inF2' ( in 4-component vector of float)
+0:276      Test condition and select ( temp void)
+0:276        Condition
+0:276        any ( temp bool)
+0:276          Compare Less Than ( temp 4-component vector of bool)
+0:276            'inF0' ( in 4-component vector of float)
+0:276            Constant:
+0:276              0.000000
+0:276              0.000000
+0:276              0.000000
+0:276              0.000000
+0:276        true case
+0:276        Branch: Kill
+0:277      Test condition and select ( temp void)
+0:277        Condition
+0:277        any ( temp bool)
+0:277          Compare Less Than ( temp 4-component vector of bool)
+0:277            'inU0' ( in 4-component vector of uint)
+0:277            Constant:
+0:277              0.000000
+0:277              0.000000
+0:277              0.000000
+0:277              0.000000
+0:277        true case
+0:277        Branch: Kill
+0:278      Sequence
+0:278        move second child to first child ( temp 4-component vector of float)
+0:278          'r013' ( temp 4-component vector of float)
+0:278          cosine ( temp 4-component vector of float)
+0:278            'inF0' ( in 4-component vector of float)
+0:279      Sequence
+0:279        move second child to first child ( temp 4-component vector of float)
+0:279          'r014' ( temp 4-component vector of float)
+0:279          hyp. cosine ( temp 4-component vector of float)
+0:279            'inF0' ( in 4-component vector of float)
+0:280      Sequence
+0:280        move second child to first child ( temp 4-component vector of uint)
+0:280          'r015' ( temp 4-component vector of uint)
 0:?           bitCount ( temp 4-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               3 (const uint)
 0:?               5 (const uint)
 0:?               2 (const uint)
-0:277      Sequence
-0:277        move second child to first child ( temp 4-component vector of float)
-0:277          'r016' ( temp 4-component vector of float)
-0:277          dPdx ( temp 4-component vector of float)
-0:277            'inF0' ( in 4-component vector of float)
-0:278      Sequence
-0:278        move second child to first child ( temp 4-component vector of float)
-0:278          'r017' ( temp 4-component vector of float)
-0:278          dPdxCoarse ( temp 4-component vector of float)
-0:278            'inF0' ( in 4-component vector of float)
-0:279      Sequence
-0:279        move second child to first child ( temp 4-component vector of float)
-0:279          'r018' ( temp 4-component vector of float)
-0:279          dPdxFine ( temp 4-component vector of float)
-0:279            'inF0' ( in 4-component vector of float)
-0:280      Sequence
-0:280        move second child to first child ( temp 4-component vector of float)
-0:280          'r019' ( temp 4-component vector of float)
-0:280          dPdy ( temp 4-component vector of float)
-0:280            'inF0' ( in 4-component vector of float)
 0:281      Sequence
 0:281        move second child to first child ( temp 4-component vector of float)
-0:281          'r020' ( temp 4-component vector of float)
-0:281          dPdyCoarse ( temp 4-component vector of float)
+0:281          'r016' ( temp 4-component vector of float)
+0:281          dPdx ( temp 4-component vector of float)
 0:281            'inF0' ( in 4-component vector of float)
 0:282      Sequence
 0:282        move second child to first child ( temp 4-component vector of float)
-0:282          'r021' ( temp 4-component vector of float)
-0:282          dPdyFine ( temp 4-component vector of float)
+0:282          'r017' ( temp 4-component vector of float)
+0:282          dPdxCoarse ( temp 4-component vector of float)
 0:282            'inF0' ( in 4-component vector of float)
 0:283      Sequence
 0:283        move second child to first child ( temp 4-component vector of float)
-0:283          'r022' ( temp 4-component vector of float)
-0:283          degrees ( temp 4-component vector of float)
+0:283          'r018' ( temp 4-component vector of float)
+0:283          dPdxFine ( temp 4-component vector of float)
 0:283            'inF0' ( in 4-component vector of float)
 0:284      Sequence
-0:284        move second child to first child ( temp float)
-0:284          'r023' ( temp float)
-0:284          distance ( temp float)
+0:284        move second child to first child ( temp 4-component vector of float)
+0:284          'r019' ( temp 4-component vector of float)
+0:284          dPdy ( temp 4-component vector of float)
 0:284            'inF0' ( in 4-component vector of float)
-0:284            'inF1' ( in 4-component vector of float)
 0:285      Sequence
-0:285        move second child to first child ( temp float)
-0:285          'r024' ( temp float)
-0:285          dot-product ( temp float)
+0:285        move second child to first child ( temp 4-component vector of float)
+0:285          'r020' ( temp 4-component vector of float)
+0:285          dPdyCoarse ( temp 4-component vector of float)
 0:285            'inF0' ( in 4-component vector of float)
-0:285            'inF1' ( in 4-component vector of float)
 0:286      Sequence
 0:286        move second child to first child ( temp 4-component vector of float)
-0:286          'r025' ( temp 4-component vector of float)
-0:286          Construct vec4 ( temp 4-component vector of float)
-0:286            Constant:
-0:286              1.000000
-0:286            component-wise multiply ( temp float)
-0:286              direct index ( temp float)
-0:286                'inF0' ( in 4-component vector of float)
-0:286                Constant:
-0:286                  1 (const int)
-0:286              direct index ( temp float)
-0:286                'inF1' ( in 4-component vector of float)
-0:286                Constant:
-0:286                  1 (const int)
-0:286            direct index ( temp float)
-0:286              'inF0' ( in 4-component vector of float)
-0:286              Constant:
-0:286                2 (const int)
-0:286            direct index ( temp float)
-0:286              'inF1' ( in 4-component vector of float)
-0:286              Constant:
-0:286                3 (const int)
+0:286          'r021' ( temp 4-component vector of float)
+0:286          dPdyFine ( temp 4-component vector of float)
+0:286            'inF0' ( in 4-component vector of float)
+0:287      Sequence
+0:287        move second child to first child ( temp 4-component vector of float)
+0:287          'r022' ( temp 4-component vector of float)
+0:287          degrees ( temp 4-component vector of float)
+0:287            'inF0' ( in 4-component vector of float)
+0:288      Sequence
+0:288        move second child to first child ( temp float)
+0:288          'r023' ( temp float)
+0:288          distance ( temp float)
+0:288            'inF0' ( in 4-component vector of float)
+0:288            'inF1' ( in 4-component vector of float)
+0:289      Sequence
+0:289        move second child to first child ( temp float)
+0:289          'r024' ( temp float)
+0:289          dot-product ( temp float)
+0:289            'inF0' ( in 4-component vector of float)
+0:289            'inF1' ( in 4-component vector of float)
 0:290      Sequence
 0:290        move second child to first child ( temp 4-component vector of float)
-0:290          'r029' ( temp 4-component vector of float)
-0:290          exp ( temp 4-component vector of float)
-0:290            'inF0' ( in 4-component vector of float)
-0:291      Sequence
-0:291        move second child to first child ( temp 4-component vector of float)
-0:291          'r030' ( temp 4-component vector of float)
-0:291          exp2 ( temp 4-component vector of float)
-0:291            'inF0' ( in 4-component vector of float)
-0:292      Sequence
-0:292        move second child to first child ( temp 4-component vector of float)
-0:292          'r031' ( temp 4-component vector of float)
-0:292          face-forward ( temp 4-component vector of float)
-0:292            'inF0' ( in 4-component vector of float)
-0:292            'inF1' ( in 4-component vector of float)
-0:292            'inF2' ( in 4-component vector of float)
-0:293      Sequence
-0:293        move second child to first child ( temp 4-component vector of uint)
-0:293          'r032' ( temp 4-component vector of uint)
+0:290          'r025' ( temp 4-component vector of float)
+0:290          Construct vec4 ( temp 4-component vector of float)
+0:290            Constant:
+0:290              1.000000
+0:290            component-wise multiply ( temp float)
+0:290              direct index ( temp float)
+0:290                'inF0' ( in 4-component vector of float)
+0:290                Constant:
+0:290                  1 (const int)
+0:290              direct index ( temp float)
+0:290                'inF1' ( in 4-component vector of float)
+0:290                Constant:
+0:290                  1 (const int)
+0:290            direct index ( temp float)
+0:290              'inF0' ( in 4-component vector of float)
+0:290              Constant:
+0:290                2 (const int)
+0:290            direct index ( temp float)
+0:290              'inF1' ( in 4-component vector of float)
+0:290              Constant:
+0:290                3 (const int)
+0:294      Sequence
+0:294        move second child to first child ( temp 4-component vector of float)
+0:294          'r029' ( temp 4-component vector of float)
+0:294          exp ( temp 4-component vector of float)
+0:294            'inF0' ( in 4-component vector of float)
+0:295      Sequence
+0:295        move second child to first child ( temp 4-component vector of float)
+0:295          'r030' ( temp 4-component vector of float)
+0:295          exp2 ( temp 4-component vector of float)
+0:295            'inF0' ( in 4-component vector of float)
+0:296      Sequence
+0:296        move second child to first child ( temp 4-component vector of float)
+0:296          'r031' ( temp 4-component vector of float)
+0:296          face-forward ( temp 4-component vector of float)
+0:296            'inF0' ( in 4-component vector of float)
+0:296            'inF1' ( in 4-component vector of float)
+0:296            'inF2' ( in 4-component vector of float)
+0:297      Sequence
+0:297        move second child to first child ( temp 4-component vector of uint)
+0:297          'r032' ( temp 4-component vector of uint)
 0:?           findMSB ( temp 4-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               8 (const uint)
 0:?               9 (const uint)
 0:?               10 (const uint)
-0:294      Sequence
-0:294        move second child to first child ( temp 4-component vector of uint)
-0:294          'r033' ( temp 4-component vector of uint)
+0:298      Sequence
+0:298        move second child to first child ( temp 4-component vector of uint)
+0:298          'r033' ( temp 4-component vector of uint)
 0:?           findLSB ( temp 4-component vector of uint)
 0:?             Constant:
 0:?               7 (const uint)
 0:?               8 (const uint)
 0:?               9 (const uint)
 0:?               10 (const uint)
-0:295      Sequence
-0:295        move second child to first child ( temp 4-component vector of float)
-0:295          'r034' ( temp 4-component vector of float)
-0:295          Floor ( temp 4-component vector of float)
-0:295            'inF0' ( in 4-component vector of float)
-0:297      Sequence
-0:297        move second child to first child ( temp 4-component vector of float)
-0:297          'r036' ( temp 4-component vector of float)
-0:297          mod ( temp 4-component vector of float)
-0:297            'inF0' ( in 4-component vector of float)
-0:297            'inF1' ( in 4-component vector of float)
-0:298      Sequence
-0:298        move second child to first child ( temp 4-component vector of float)
-0:298          'r037' ( temp 4-component vector of float)
-0:298          Fraction ( temp 4-component vector of float)
-0:298            'inF0' ( in 4-component vector of float)
 0:299      Sequence
 0:299        move second child to first child ( temp 4-component vector of float)
-0:299          'r039' ( temp 4-component vector of float)
-0:299          fwidth ( temp 4-component vector of float)
+0:299          'r034' ( temp 4-component vector of float)
+0:299          Floor ( temp 4-component vector of float)
 0:299            'inF0' ( in 4-component vector of float)
-0:300      Sequence
-0:300        move second child to first child ( temp 4-component vector of bool)
-0:300          'r040' ( temp 4-component vector of bool)
-0:300          isinf ( temp 4-component vector of bool)
-0:300            'inF0' ( in 4-component vector of float)
 0:301      Sequence
-0:301        move second child to first child ( temp 4-component vector of bool)
-0:301          'r041' ( temp 4-component vector of bool)
-0:301          isnan ( temp 4-component vector of bool)
+0:301        move second child to first child ( temp 4-component vector of float)
+0:301          'r036' ( temp 4-component vector of float)
+0:301          mod ( temp 4-component vector of float)
 0:301            'inF0' ( in 4-component vector of float)
+0:301            'inF1' ( in 4-component vector of float)
 0:302      Sequence
 0:302        move second child to first child ( temp 4-component vector of float)
-0:302          'r042' ( temp 4-component vector of float)
-0:302          ldexp ( temp 4-component vector of float)
+0:302          'r037' ( temp 4-component vector of float)
+0:302          Fraction ( temp 4-component vector of float)
 0:302            'inF0' ( in 4-component vector of float)
-0:302            'inF1' ( in 4-component vector of float)
 0:303      Sequence
 0:303        move second child to first child ( temp 4-component vector of float)
-0:303          'r039a' ( temp 4-component vector of float)
-0:303          mix ( temp 4-component vector of float)
+0:303          'r039' ( temp 4-component vector of float)
+0:303          fwidth ( temp 4-component vector of float)
 0:303            'inF0' ( in 4-component vector of float)
-0:303            'inF1' ( in 4-component vector of float)
-0:303            'inF2' ( in 4-component vector of float)
 0:304      Sequence
-0:304        move second child to first child ( temp float)
-0:304          'r043' ( temp float)
-0:304          length ( temp float)
+0:304        move second child to first child ( temp 4-component vector of bool)
+0:304          'r040' ( temp 4-component vector of bool)
+0:304          isinf ( temp 4-component vector of bool)
 0:304            'inF0' ( in 4-component vector of float)
 0:305      Sequence
-0:305        move second child to first child ( temp 4-component vector of float)
-0:305          'r044' ( temp 4-component vector of float)
-0:305          log ( temp 4-component vector of float)
+0:305        move second child to first child ( temp 4-component vector of bool)
+0:305          'r041' ( temp 4-component vector of bool)
+0:305          isnan ( temp 4-component vector of bool)
 0:305            'inF0' ( in 4-component vector of float)
 0:306      Sequence
 0:306        move second child to first child ( temp 4-component vector of float)
-0:306          'r045' ( temp 4-component vector of float)
-0:306          vector-scale ( temp 4-component vector of float)
-0:306            log2 ( temp 4-component vector of float)
-0:306              'inF0' ( in 4-component vector of float)
-0:306            Constant:
-0:306              0.301030
+0:306          'r042' ( temp 4-component vector of float)
+0:306          ldexp ( temp 4-component vector of float)
+0:306            'inF0' ( in 4-component vector of float)
+0:306            'inF1' ( in 4-component vector of float)
 0:307      Sequence
 0:307        move second child to first child ( temp 4-component vector of float)
-0:307          'r046' ( temp 4-component vector of float)
-0:307          log2 ( temp 4-component vector of float)
+0:307          'r039a' ( temp 4-component vector of float)
+0:307          mix ( temp 4-component vector of float)
 0:307            'inF0' ( in 4-component vector of float)
+0:307            'inF1' ( in 4-component vector of float)
+0:307            'inF2' ( in 4-component vector of float)
 0:308      Sequence
-0:308        move second child to first child ( temp 4-component vector of float)
-0:308          'r047' ( temp 4-component vector of float)
-0:308          max ( temp 4-component vector of float)
+0:308        move second child to first child ( temp float)
+0:308          'r043' ( temp float)
+0:308          length ( temp float)
 0:308            'inF0' ( in 4-component vector of float)
-0:308            'inF1' ( in 4-component vector of float)
 0:309      Sequence
 0:309        move second child to first child ( temp 4-component vector of float)
-0:309          'r048' ( temp 4-component vector of float)
-0:309          min ( temp 4-component vector of float)
+0:309          'r044' ( temp 4-component vector of float)
+0:309          log ( temp 4-component vector of float)
 0:309            'inF0' ( in 4-component vector of float)
-0:309            'inF1' ( in 4-component vector of float)
 0:310      Sequence
 0:310        move second child to first child ( temp 4-component vector of float)
-0:310          'r049' ( temp 4-component vector of float)
-0:310          normalize ( temp 4-component vector of float)
-0:310            'inF0' ( in 4-component vector of float)
+0:310          'r045' ( temp 4-component vector of float)
+0:310          vector-scale ( temp 4-component vector of float)
+0:310            log2 ( temp 4-component vector of float)
+0:310              'inF0' ( in 4-component vector of float)
+0:310            Constant:
+0:310              0.301030
 0:311      Sequence
 0:311        move second child to first child ( temp 4-component vector of float)
-0:311          'r050' ( temp 4-component vector of float)
-0:311          pow ( temp 4-component vector of float)
+0:311          'r046' ( temp 4-component vector of float)
+0:311          log2 ( temp 4-component vector of float)
 0:311            'inF0' ( in 4-component vector of float)
-0:311            'inF1' ( in 4-component vector of float)
 0:312      Sequence
 0:312        move second child to first child ( temp 4-component vector of float)
-0:312          'r051' ( temp 4-component vector of float)
-0:312          radians ( temp 4-component vector of float)
+0:312          'r047' ( temp 4-component vector of float)
+0:312          max ( temp 4-component vector of float)
 0:312            'inF0' ( in 4-component vector of float)
+0:312            'inF1' ( in 4-component vector of float)
 0:313      Sequence
 0:313        move second child to first child ( temp 4-component vector of float)
-0:313          'r052' ( temp 4-component vector of float)
-0:313          divide ( temp 4-component vector of float)
-0:313            Constant:
-0:313              1.000000
+0:313          'r048' ( temp 4-component vector of float)
+0:313          min ( temp 4-component vector of float)
 0:313            'inF0' ( in 4-component vector of float)
+0:313            'inF1' ( in 4-component vector of float)
 0:314      Sequence
 0:314        move second child to first child ( temp 4-component vector of float)
-0:314          'r053' ( temp 4-component vector of float)
-0:314          reflect ( temp 4-component vector of float)
+0:314          'r049' ( temp 4-component vector of float)
+0:314          normalize ( temp 4-component vector of float)
 0:314            'inF0' ( in 4-component vector of float)
-0:314            'inF1' ( in 4-component vector of float)
 0:315      Sequence
 0:315        move second child to first child ( temp 4-component vector of float)
-0:315          'r054' ( temp 4-component vector of float)
-0:315          refract ( temp 4-component vector of float)
+0:315          'r050' ( temp 4-component vector of float)
+0:315          pow ( temp 4-component vector of float)
 0:315            'inF0' ( in 4-component vector of float)
 0:315            'inF1' ( in 4-component vector of float)
-0:315            Constant:
-0:315              2.000000
 0:316      Sequence
-0:316        move second child to first child ( temp 4-component vector of uint)
-0:316          'r055' ( temp 4-component vector of uint)
+0:316        move second child to first child ( temp 4-component vector of float)
+0:316          'r051' ( temp 4-component vector of float)
+0:316          radians ( temp 4-component vector of float)
+0:316            'inF0' ( in 4-component vector of float)
+0:317      Sequence
+0:317        move second child to first child ( temp 4-component vector of float)
+0:317          'r052' ( temp 4-component vector of float)
+0:317          divide ( temp 4-component vector of float)
+0:317            Constant:
+0:317              1.000000
+0:317            'inF0' ( in 4-component vector of float)
+0:318      Sequence
+0:318        move second child to first child ( temp 4-component vector of float)
+0:318          'r053' ( temp 4-component vector of float)
+0:318          reflect ( temp 4-component vector of float)
+0:318            'inF0' ( in 4-component vector of float)
+0:318            'inF1' ( in 4-component vector of float)
+0:319      Sequence
+0:319        move second child to first child ( temp 4-component vector of float)
+0:319          'r054' ( temp 4-component vector of float)
+0:319          refract ( temp 4-component vector of float)
+0:319            'inF0' ( in 4-component vector of float)
+0:319            'inF1' ( in 4-component vector of float)
+0:319            Constant:
+0:319              2.000000
+0:320      Sequence
+0:320        move second child to first child ( temp 4-component vector of uint)
+0:320          'r055' ( temp 4-component vector of uint)
 0:?           bitFieldReverse ( temp 4-component vector of uint)
 0:?             Constant:
 0:?               1 (const uint)
 0:?               2 (const uint)
 0:?               3 (const uint)
 0:?               4 (const uint)
-0:317      Sequence
-0:317        move second child to first child ( temp 4-component vector of float)
-0:317          'r056' ( temp 4-component vector of float)
-0:317          roundEven ( temp 4-component vector of float)
-0:317            'inF0' ( in 4-component vector of float)
-0:318      Sequence
-0:318        move second child to first child ( temp 4-component vector of float)
-0:318          'r057' ( temp 4-component vector of float)
-0:318          inverse sqrt ( temp 4-component vector of float)
-0:318            'inF0' ( in 4-component vector of float)
-0:319      Sequence
-0:319        move second child to first child ( temp 4-component vector of float)
-0:319          'r058' ( temp 4-component vector of float)
-0:319          clamp ( temp 4-component vector of float)
-0:319            'inF0' ( in 4-component vector of float)
-0:319            Constant:
-0:319              0.000000
-0:319            Constant:
-0:319              1.000000
-0:320      Sequence
-0:320        move second child to first child ( temp 4-component vector of float)
-0:320          'r059' ( temp 4-component vector of float)
-0:320          Sign ( temp 4-component vector of float)
-0:320            'inF0' ( in 4-component vector of float)
 0:321      Sequence
 0:321        move second child to first child ( temp 4-component vector of float)
-0:321          'r060' ( temp 4-component vector of float)
-0:321          sine ( temp 4-component vector of float)
+0:321          'r056' ( temp 4-component vector of float)
+0:321          roundEven ( temp 4-component vector of float)
 0:321            'inF0' ( in 4-component vector of float)
 0:322      Sequence
 0:322        move second child to first child ( temp 4-component vector of float)
-0:322          'inF1' ( in 4-component vector of float)
-0:322          sine ( temp 4-component vector of float)
-0:322            'inF0' ( in 4-component vector of float)
-0:322        move second child to first child ( temp 4-component vector of float)
-0:322          'inF2' ( in 4-component vector of float)
-0:322          cosine ( temp 4-component vector of float)
+0:322          'r057' ( temp 4-component vector of float)
+0:322          inverse sqrt ( temp 4-component vector of float)
 0:322            'inF0' ( in 4-component vector of float)
 0:323      Sequence
 0:323        move second child to first child ( temp 4-component vector of float)
-0:323          'r061' ( temp 4-component vector of float)
-0:323          hyp. sine ( temp 4-component vector of float)
+0:323          'r058' ( temp 4-component vector of float)
+0:323          clamp ( temp 4-component vector of float)
 0:323            'inF0' ( in 4-component vector of float)
+0:323            Constant:
+0:323              0.000000
+0:323            Constant:
+0:323              1.000000
 0:324      Sequence
 0:324        move second child to first child ( temp 4-component vector of float)
-0:324          'r062' ( temp 4-component vector of float)
-0:324          smoothstep ( temp 4-component vector of float)
+0:324          'r059' ( temp 4-component vector of float)
+0:324          Sign ( temp 4-component vector of float)
 0:324            'inF0' ( in 4-component vector of float)
-0:324            'inF1' ( in 4-component vector of float)
-0:324            'inF2' ( in 4-component vector of float)
 0:325      Sequence
 0:325        move second child to first child ( temp 4-component vector of float)
-0:325          'r063' ( temp 4-component vector of float)
-0:325          sqrt ( temp 4-component vector of float)
+0:325          'r060' ( temp 4-component vector of float)
+0:325          sine ( temp 4-component vector of float)
 0:325            'inF0' ( in 4-component vector of float)
 0:326      Sequence
 0:326        move second child to first child ( temp 4-component vector of float)
-0:326          'r064' ( temp 4-component vector of float)
-0:326          step ( temp 4-component vector of float)
+0:326          'inF1' ( in 4-component vector of float)
+0:326          sine ( temp 4-component vector of float)
 0:326            'inF0' ( in 4-component vector of float)
-0:326            'inF1' ( in 4-component vector of float)
+0:326        move second child to first child ( temp 4-component vector of float)
+0:326          'inF2' ( in 4-component vector of float)
+0:326          cosine ( temp 4-component vector of float)
+0:326            'inF0' ( in 4-component vector of float)
 0:327      Sequence
 0:327        move second child to first child ( temp 4-component vector of float)
-0:327          'r065' ( temp 4-component vector of float)
-0:327          tangent ( temp 4-component vector of float)
+0:327          'r061' ( temp 4-component vector of float)
+0:327          hyp. sine ( temp 4-component vector of float)
 0:327            'inF0' ( in 4-component vector of float)
 0:328      Sequence
 0:328        move second child to first child ( temp 4-component vector of float)
-0:328          'r066' ( temp 4-component vector of float)
-0:328          hyp. tangent ( temp 4-component vector of float)
+0:328          'r062' ( temp 4-component vector of float)
+0:328          smoothstep ( temp 4-component vector of float)
 0:328            'inF0' ( in 4-component vector of float)
+0:328            'inF1' ( in 4-component vector of float)
+0:328            'inF2' ( in 4-component vector of float)
+0:329      Sequence
+0:329        move second child to first child ( temp 4-component vector of float)
+0:329          'r063' ( temp 4-component vector of float)
+0:329          sqrt ( temp 4-component vector of float)
+0:329            'inF0' ( in 4-component vector of float)
 0:330      Sequence
 0:330        move second child to first child ( temp 4-component vector of float)
-0:330          'r067' ( temp 4-component vector of float)
-0:330          trunc ( temp 4-component vector of float)
+0:330          'r064' ( temp 4-component vector of float)
+0:330          step ( temp 4-component vector of float)
 0:330            'inF0' ( in 4-component vector of float)
-0:333      Branch: Return with expression
+0:330            'inF1' ( in 4-component vector of float)
+0:331      Sequence
+0:331        move second child to first child ( temp 4-component vector of float)
+0:331          'r065' ( temp 4-component vector of float)
+0:331          tangent ( temp 4-component vector of float)
+0:331            'inF0' ( in 4-component vector of float)
+0:332      Sequence
+0:332        move second child to first child ( temp 4-component vector of float)
+0:332          'r066' ( temp 4-component vector of float)
+0:332          hyp. tangent ( temp 4-component vector of float)
+0:332            'inF0' ( in 4-component vector of float)
+0:334      Sequence
+0:334        move second child to first child ( temp 4-component vector of float)
+0:334          'r067' ( temp 4-component vector of float)
+0:334          trunc ( temp 4-component vector of float)
+0:334            'inF0' ( in 4-component vector of float)
+0:337      Branch: Return with expression
 0:?         Constant:
 0:?           1.000000
 0:?           2.000000
 0:?           3.000000
 0:?           4.000000
-0:396  Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float)
-0:396    Function Parameters: 
-0:396      'inF0' ( in 2X2 matrix of float)
-0:396      'inF1' ( in 2X2 matrix of float)
-0:396      'inF2' ( in 2X2 matrix of float)
+0:400  Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float)
+0:400    Function Parameters: 
+0:400      'inF0' ( in 2X2 matrix of float)
+0:400      'inF1' ( in 2X2 matrix of float)
+0:400      'inF2' ( in 2X2 matrix of float)
 0:?     Sequence
-0:398      Sequence
-0:398        move second child to first child ( temp bool)
-0:398          'r000' ( temp bool)
-0:398          all ( temp bool)
-0:398            Convert float to bool ( temp 2X2 matrix of bool)
-0:398              'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r001' ( temp 2X2 matrix of float)
-0:398          Absolute value ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      arc cosine ( temp 2X2 matrix of float)
-0:398        'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp bool)
-0:398          'r003' ( temp bool)
-0:398          any ( temp bool)
-0:398            Convert float to bool ( temp 2X2 matrix of bool)
-0:398              'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r004' ( temp 2X2 matrix of float)
-0:398          arc sine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r005' ( temp 2X2 matrix of float)
-0:398          arc tangent ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r006' ( temp 2X2 matrix of float)
-0:398          arc tangent ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r007' ( temp 2X2 matrix of float)
-0:398          Ceiling ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Test condition and select ( temp void)
-0:398        Condition
-0:398        any ( temp bool)
-0:398          Compare Less Than ( temp 2X2 matrix of bool)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            Constant:
-0:398              0.000000
-0:398              0.000000
-0:398              0.000000
-0:398              0.000000
-0:398        true case
-0:398        Branch: Kill
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r008' ( temp 2X2 matrix of float)
-0:398          clamp ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398            'inF2' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r009' ( temp 2X2 matrix of float)
-0:398          cosine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r010' ( temp 2X2 matrix of float)
-0:398          hyp. cosine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r011' ( temp 2X2 matrix of float)
-0:398          dPdx ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r012' ( temp 2X2 matrix of float)
-0:398          dPdxCoarse ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r013' ( temp 2X2 matrix of float)
-0:398          dPdxFine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r014' ( temp 2X2 matrix of float)
-0:398          dPdy ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r015' ( temp 2X2 matrix of float)
-0:398          dPdyCoarse ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r016' ( temp 2X2 matrix of float)
-0:398          dPdyFine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r017' ( temp 2X2 matrix of float)
-0:398          degrees ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp float)
-0:398          'r018' ( temp float)
-0:398          determinant ( temp float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r019' ( temp 2X2 matrix of float)
-0:398          exp ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'R020' ( temp 2X2 matrix of float)
-0:398          exp2 ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r021' ( temp 2X2 matrix of float)
-0:398          Floor ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r022' ( temp 2X2 matrix of float)
-0:398          mod ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r023' ( temp 2X2 matrix of float)
-0:398          Fraction ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r025' ( temp 2X2 matrix of float)
-0:398          fwidth ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r026' ( temp 2X2 matrix of float)
-0:398          ldexp ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r026a' ( temp 2X2 matrix of float)
-0:398          mix ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398            'inF2' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r027' ( temp 2X2 matrix of float)
-0:398          log ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r028' ( temp 2X2 matrix of float)
-0:398          matrix-scale ( temp 2X2 matrix of float)
-0:398            log2 ( temp 2X2 matrix of float)
-0:398              'inF0' ( in 2X2 matrix of float)
-0:398            Constant:
-0:398              0.301030
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r029' ( temp 2X2 matrix of float)
-0:398          log2 ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r030' ( temp 2X2 matrix of float)
-0:398          max ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r031' ( temp 2X2 matrix of float)
-0:398          min ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r032' ( temp 2X2 matrix of float)
-0:398          pow ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r033' ( temp 2X2 matrix of float)
-0:398          radians ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r034' ( temp 2X2 matrix of float)
-0:398          roundEven ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r035' ( temp 2X2 matrix of float)
-0:398          inverse sqrt ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r036' ( temp 2X2 matrix of float)
-0:398          clamp ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            Constant:
-0:398              0.000000
-0:398            Constant:
-0:398              1.000000
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r037' ( temp 2X2 matrix of float)
-0:398          Sign ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r038' ( temp 2X2 matrix of float)
-0:398          sine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'inF1' ( in 2X2 matrix of float)
-0:398          sine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'inF2' ( in 2X2 matrix of float)
-0:398          cosine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r039' ( temp 2X2 matrix of float)
-0:398          hyp. sine ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r049' ( temp 2X2 matrix of float)
-0:398          smoothstep ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398            'inF2' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r041' ( temp 2X2 matrix of float)
-0:398          sqrt ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r042' ( temp 2X2 matrix of float)
-0:398          step ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398            'inF1' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r043' ( temp 2X2 matrix of float)
-0:398          tangent ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r044' ( temp 2X2 matrix of float)
-0:398          hyp. tangent ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:398      transpose ( temp 2X2 matrix of float)
-0:398        'inF0' ( in 2X2 matrix of float)
-0:398      Sequence
-0:398        move second child to first child ( temp 2X2 matrix of float)
-0:398          'r046' ( temp 2X2 matrix of float)
-0:398          trunc ( temp 2X2 matrix of float)
-0:398            'inF0' ( in 2X2 matrix of float)
-0:401      Branch: Return with expression
+0:402      Sequence
+0:402        move second child to first child ( temp bool)
+0:402          'r000' ( temp bool)
+0:402          all ( temp bool)
+0:402            Convert float to bool ( temp 2X2 matrix of bool)
+0:402              'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r001' ( temp 2X2 matrix of float)
+0:402          Absolute value ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      arc cosine ( temp 2X2 matrix of float)
+0:402        'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp bool)
+0:402          'r003' ( temp bool)
+0:402          any ( temp bool)
+0:402            Convert float to bool ( temp 2X2 matrix of bool)
+0:402              'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r004' ( temp 2X2 matrix of float)
+0:402          arc sine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r005' ( temp 2X2 matrix of float)
+0:402          arc tangent ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r006' ( temp 2X2 matrix of float)
+0:402          arc tangent ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r007' ( temp 2X2 matrix of float)
+0:402          Ceiling ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Test condition and select ( temp void)
+0:402        Condition
+0:402        any ( temp bool)
+0:402          Compare Less Than ( temp 2X2 matrix of bool)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            Constant:
+0:402              0.000000
+0:402              0.000000
+0:402              0.000000
+0:402              0.000000
+0:402        true case
+0:402        Branch: Kill
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r008' ( temp 2X2 matrix of float)
+0:402          clamp ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402            'inF2' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r009' ( temp 2X2 matrix of float)
+0:402          cosine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r010' ( temp 2X2 matrix of float)
+0:402          hyp. cosine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r011' ( temp 2X2 matrix of float)
+0:402          dPdx ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r012' ( temp 2X2 matrix of float)
+0:402          dPdxCoarse ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r013' ( temp 2X2 matrix of float)
+0:402          dPdxFine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r014' ( temp 2X2 matrix of float)
+0:402          dPdy ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r015' ( temp 2X2 matrix of float)
+0:402          dPdyCoarse ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r016' ( temp 2X2 matrix of float)
+0:402          dPdyFine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r017' ( temp 2X2 matrix of float)
+0:402          degrees ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp float)
+0:402          'r018' ( temp float)
+0:402          determinant ( temp float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r019' ( temp 2X2 matrix of float)
+0:402          exp ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'R020' ( temp 2X2 matrix of float)
+0:402          exp2 ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r021' ( temp 2X2 matrix of float)
+0:402          Floor ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r022' ( temp 2X2 matrix of float)
+0:402          mod ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r023' ( temp 2X2 matrix of float)
+0:402          Fraction ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r025' ( temp 2X2 matrix of float)
+0:402          fwidth ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r026' ( temp 2X2 matrix of float)
+0:402          ldexp ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r026a' ( temp 2X2 matrix of float)
+0:402          mix ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402            'inF2' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r027' ( temp 2X2 matrix of float)
+0:402          log ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r028' ( temp 2X2 matrix of float)
+0:402          matrix-scale ( temp 2X2 matrix of float)
+0:402            log2 ( temp 2X2 matrix of float)
+0:402              'inF0' ( in 2X2 matrix of float)
+0:402            Constant:
+0:402              0.301030
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r029' ( temp 2X2 matrix of float)
+0:402          log2 ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r030' ( temp 2X2 matrix of float)
+0:402          max ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r031' ( temp 2X2 matrix of float)
+0:402          min ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r032' ( temp 2X2 matrix of float)
+0:402          pow ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r033' ( temp 2X2 matrix of float)
+0:402          radians ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r034' ( temp 2X2 matrix of float)
+0:402          roundEven ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r035' ( temp 2X2 matrix of float)
+0:402          inverse sqrt ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r036' ( temp 2X2 matrix of float)
+0:402          clamp ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            Constant:
+0:402              0.000000
+0:402            Constant:
+0:402              1.000000
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r037' ( temp 2X2 matrix of float)
+0:402          Sign ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r038' ( temp 2X2 matrix of float)
+0:402          sine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'inF1' ( in 2X2 matrix of float)
+0:402          sine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'inF2' ( in 2X2 matrix of float)
+0:402          cosine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r039' ( temp 2X2 matrix of float)
+0:402          hyp. sine ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r049' ( temp 2X2 matrix of float)
+0:402          smoothstep ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402            'inF2' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r041' ( temp 2X2 matrix of float)
+0:402          sqrt ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r042' ( temp 2X2 matrix of float)
+0:402          step ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402            'inF1' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r043' ( temp 2X2 matrix of float)
+0:402          tangent ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r044' ( temp 2X2 matrix of float)
+0:402          hyp. tangent ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:402      transpose ( temp 2X2 matrix of float)
+0:402        'inF0' ( in 2X2 matrix of float)
+0:402      Sequence
+0:402        move second child to first child ( temp 2X2 matrix of float)
+0:402          'r046' ( temp 2X2 matrix of float)
+0:402          trunc ( temp 2X2 matrix of float)
+0:402            'inF0' ( in 2X2 matrix of float)
+0:405      Branch: Return with expression
 0:?         Constant:
 0:?           2.000000
 0:?           2.000000
 0:?           2.000000
 0:?           2.000000
-0:405  Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float)
-0:405    Function Parameters: 
-0:405      'inF0' ( in 3X3 matrix of float)
-0:405      'inF1' ( in 3X3 matrix of float)
-0:405      'inF2' ( in 3X3 matrix of float)
+0:409  Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float)
+0:409    Function Parameters: 
+0:409      'inF0' ( in 3X3 matrix of float)
+0:409      'inF1' ( in 3X3 matrix of float)
+0:409      'inF2' ( in 3X3 matrix of float)
 0:?     Sequence
-0:407      Sequence
-0:407        move second child to first child ( temp bool)
-0:407          'r000' ( temp bool)
-0:407          all ( temp bool)
-0:407            Convert float to bool ( temp 3X3 matrix of bool)
-0:407              'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r001' ( temp 3X3 matrix of float)
-0:407          Absolute value ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      arc cosine ( temp 3X3 matrix of float)
-0:407        'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp bool)
-0:407          'r003' ( temp bool)
-0:407          any ( temp bool)
-0:407            Convert float to bool ( temp 3X3 matrix of bool)
-0:407              'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r004' ( temp 3X3 matrix of float)
-0:407          arc sine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r005' ( temp 3X3 matrix of float)
-0:407          arc tangent ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r006' ( temp 3X3 matrix of float)
-0:407          arc tangent ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r007' ( temp 3X3 matrix of float)
-0:407          Ceiling ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Test condition and select ( temp void)
-0:407        Condition
-0:407        any ( temp bool)
-0:407          Compare Less Than ( temp 3X3 matrix of bool)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            Constant:
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407              0.000000
-0:407        true case
-0:407        Branch: Kill
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r008' ( temp 3X3 matrix of float)
-0:407          clamp ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407            'inF2' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r009' ( temp 3X3 matrix of float)
-0:407          cosine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r010' ( temp 3X3 matrix of float)
-0:407          hyp. cosine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r011' ( temp 3X3 matrix of float)
-0:407          dPdx ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r012' ( temp 3X3 matrix of float)
-0:407          dPdxCoarse ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r013' ( temp 3X3 matrix of float)
-0:407          dPdxFine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r014' ( temp 3X3 matrix of float)
-0:407          dPdy ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r015' ( temp 3X3 matrix of float)
-0:407          dPdyCoarse ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r016' ( temp 3X3 matrix of float)
-0:407          dPdyFine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r017' ( temp 3X3 matrix of float)
-0:407          degrees ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp float)
-0:407          'r018' ( temp float)
-0:407          determinant ( temp float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r019' ( temp 3X3 matrix of float)
-0:407          exp ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'R020' ( temp 3X3 matrix of float)
-0:407          exp2 ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r021' ( temp 3X3 matrix of float)
-0:407          Floor ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r022' ( temp 3X3 matrix of float)
-0:407          mod ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r023' ( temp 3X3 matrix of float)
-0:407          Fraction ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r025' ( temp 3X3 matrix of float)
-0:407          fwidth ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r026' ( temp 3X3 matrix of float)
-0:407          ldexp ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r026a' ( temp 3X3 matrix of float)
-0:407          mix ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407            'inF2' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r027' ( temp 3X3 matrix of float)
-0:407          log ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r028' ( temp 3X3 matrix of float)
-0:407          matrix-scale ( temp 3X3 matrix of float)
-0:407            log2 ( temp 3X3 matrix of float)
-0:407              'inF0' ( in 3X3 matrix of float)
-0:407            Constant:
-0:407              0.301030
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r029' ( temp 3X3 matrix of float)
-0:407          log2 ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r030' ( temp 3X3 matrix of float)
-0:407          max ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r031' ( temp 3X3 matrix of float)
-0:407          min ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r032' ( temp 3X3 matrix of float)
-0:407          pow ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r033' ( temp 3X3 matrix of float)
-0:407          radians ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r034' ( temp 3X3 matrix of float)
-0:407          roundEven ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r035' ( temp 3X3 matrix of float)
-0:407          inverse sqrt ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r036' ( temp 3X3 matrix of float)
-0:407          clamp ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            Constant:
-0:407              0.000000
-0:407            Constant:
-0:407              1.000000
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r037' ( temp 3X3 matrix of float)
-0:407          Sign ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r038' ( temp 3X3 matrix of float)
-0:407          sine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'inF1' ( in 3X3 matrix of float)
-0:407          sine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'inF2' ( in 3X3 matrix of float)
-0:407          cosine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r039' ( temp 3X3 matrix of float)
-0:407          hyp. sine ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r049' ( temp 3X3 matrix of float)
-0:407          smoothstep ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407            'inF2' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r041' ( temp 3X3 matrix of float)
-0:407          sqrt ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r042' ( temp 3X3 matrix of float)
-0:407          step ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407            'inF1' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r043' ( temp 3X3 matrix of float)
-0:407          tangent ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r044' ( temp 3X3 matrix of float)
-0:407          hyp. tangent ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:407      transpose ( temp 3X3 matrix of float)
-0:407        'inF0' ( in 3X3 matrix of float)
-0:407      Sequence
-0:407        move second child to first child ( temp 3X3 matrix of float)
-0:407          'r046' ( temp 3X3 matrix of float)
-0:407          trunc ( temp 3X3 matrix of float)
-0:407            'inF0' ( in 3X3 matrix of float)
-0:410      Branch: Return with expression
+0:411      Sequence
+0:411        move second child to first child ( temp bool)
+0:411          'r000' ( temp bool)
+0:411          all ( temp bool)
+0:411            Convert float to bool ( temp 3X3 matrix of bool)
+0:411              'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r001' ( temp 3X3 matrix of float)
+0:411          Absolute value ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      arc cosine ( temp 3X3 matrix of float)
+0:411        'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp bool)
+0:411          'r003' ( temp bool)
+0:411          any ( temp bool)
+0:411            Convert float to bool ( temp 3X3 matrix of bool)
+0:411              'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r004' ( temp 3X3 matrix of float)
+0:411          arc sine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r005' ( temp 3X3 matrix of float)
+0:411          arc tangent ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r006' ( temp 3X3 matrix of float)
+0:411          arc tangent ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r007' ( temp 3X3 matrix of float)
+0:411          Ceiling ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Test condition and select ( temp void)
+0:411        Condition
+0:411        any ( temp bool)
+0:411          Compare Less Than ( temp 3X3 matrix of bool)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            Constant:
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411              0.000000
+0:411        true case
+0:411        Branch: Kill
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r008' ( temp 3X3 matrix of float)
+0:411          clamp ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411            'inF2' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r009' ( temp 3X3 matrix of float)
+0:411          cosine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r010' ( temp 3X3 matrix of float)
+0:411          hyp. cosine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r011' ( temp 3X3 matrix of float)
+0:411          dPdx ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r012' ( temp 3X3 matrix of float)
+0:411          dPdxCoarse ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r013' ( temp 3X3 matrix of float)
+0:411          dPdxFine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r014' ( temp 3X3 matrix of float)
+0:411          dPdy ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r015' ( temp 3X3 matrix of float)
+0:411          dPdyCoarse ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r016' ( temp 3X3 matrix of float)
+0:411          dPdyFine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r017' ( temp 3X3 matrix of float)
+0:411          degrees ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp float)
+0:411          'r018' ( temp float)
+0:411          determinant ( temp float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r019' ( temp 3X3 matrix of float)
+0:411          exp ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'R020' ( temp 3X3 matrix of float)
+0:411          exp2 ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r021' ( temp 3X3 matrix of float)
+0:411          Floor ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r022' ( temp 3X3 matrix of float)
+0:411          mod ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r023' ( temp 3X3 matrix of float)
+0:411          Fraction ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r025' ( temp 3X3 matrix of float)
+0:411          fwidth ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r026' ( temp 3X3 matrix of float)
+0:411          ldexp ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r026a' ( temp 3X3 matrix of float)
+0:411          mix ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411            'inF2' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r027' ( temp 3X3 matrix of float)
+0:411          log ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r028' ( temp 3X3 matrix of float)
+0:411          matrix-scale ( temp 3X3 matrix of float)
+0:411            log2 ( temp 3X3 matrix of float)
+0:411              'inF0' ( in 3X3 matrix of float)
+0:411            Constant:
+0:411              0.301030
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r029' ( temp 3X3 matrix of float)
+0:411          log2 ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r030' ( temp 3X3 matrix of float)
+0:411          max ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r031' ( temp 3X3 matrix of float)
+0:411          min ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r032' ( temp 3X3 matrix of float)
+0:411          pow ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r033' ( temp 3X3 matrix of float)
+0:411          radians ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r034' ( temp 3X3 matrix of float)
+0:411          roundEven ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r035' ( temp 3X3 matrix of float)
+0:411          inverse sqrt ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r036' ( temp 3X3 matrix of float)
+0:411          clamp ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            Constant:
+0:411              0.000000
+0:411            Constant:
+0:411              1.000000
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r037' ( temp 3X3 matrix of float)
+0:411          Sign ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r038' ( temp 3X3 matrix of float)
+0:411          sine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'inF1' ( in 3X3 matrix of float)
+0:411          sine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'inF2' ( in 3X3 matrix of float)
+0:411          cosine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r039' ( temp 3X3 matrix of float)
+0:411          hyp. sine ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r049' ( temp 3X3 matrix of float)
+0:411          smoothstep ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411            'inF2' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r041' ( temp 3X3 matrix of float)
+0:411          sqrt ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r042' ( temp 3X3 matrix of float)
+0:411          step ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411            'inF1' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r043' ( temp 3X3 matrix of float)
+0:411          tangent ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r044' ( temp 3X3 matrix of float)
+0:411          hyp. tangent ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:411      transpose ( temp 3X3 matrix of float)
+0:411        'inF0' ( in 3X3 matrix of float)
+0:411      Sequence
+0:411        move second child to first child ( temp 3X3 matrix of float)
+0:411          'r046' ( temp 3X3 matrix of float)
+0:411          trunc ( temp 3X3 matrix of float)
+0:411            'inF0' ( in 3X3 matrix of float)
+0:414      Branch: Return with expression
 0:?         Constant:
 0:?           3.000000
 0:?           3.000000
@@ -2121,297 +2162,297 @@
 0:?           3.000000
 0:?           3.000000
 0:?           3.000000
-0:414  Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float)
-0:414    Function Parameters: 
-0:414      'inF0' ( in 4X4 matrix of float)
-0:414      'inF1' ( in 4X4 matrix of float)
-0:414      'inF2' ( in 4X4 matrix of float)
+0:418  Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float)
+0:418    Function Parameters: 
+0:418      'inF0' ( in 4X4 matrix of float)
+0:418      'inF1' ( in 4X4 matrix of float)
+0:418      'inF2' ( in 4X4 matrix of float)
 0:?     Sequence
-0:416      Sequence
-0:416        move second child to first child ( temp bool)
-0:416          'r000' ( temp bool)
-0:416          all ( temp bool)
-0:416            Convert float to bool ( temp 4X4 matrix of bool)
-0:416              'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r001' ( temp 4X4 matrix of float)
-0:416          Absolute value ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      arc cosine ( temp 4X4 matrix of float)
-0:416        'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp bool)
-0:416          'r003' ( temp bool)
-0:416          any ( temp bool)
-0:416            Convert float to bool ( temp 4X4 matrix of bool)
-0:416              'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r004' ( temp 4X4 matrix of float)
-0:416          arc sine ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r005' ( temp 4X4 matrix of float)
-0:416          arc tangent ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r006' ( temp 4X4 matrix of float)
-0:416          arc tangent ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416            'inF1' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r007' ( temp 4X4 matrix of float)
-0:416          Ceiling ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Test condition and select ( temp void)
-0:416        Condition
-0:416        any ( temp bool)
-0:416          Compare Less Than ( temp 4X4 matrix of bool)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416            Constant:
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416              0.000000
-0:416        true case
-0:416        Branch: Kill
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r008' ( temp 4X4 matrix of float)
-0:416          clamp ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416            'inF1' ( in 4X4 matrix of float)
-0:416            'inF2' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r009' ( temp 4X4 matrix of float)
-0:416          cosine ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r010' ( temp 4X4 matrix of float)
-0:416          hyp. cosine ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r011' ( temp 4X4 matrix of float)
-0:416          dPdx ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r012' ( temp 4X4 matrix of float)
-0:416          dPdxCoarse ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r013' ( temp 4X4 matrix of float)
-0:416          dPdxFine ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r014' ( temp 4X4 matrix of float)
-0:416          dPdy ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r015' ( temp 4X4 matrix of float)
-0:416          dPdyCoarse ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r016' ( temp 4X4 matrix of float)
-0:416          dPdyFine ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r017' ( temp 4X4 matrix of float)
-0:416          degrees ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp float)
-0:416          'r018' ( temp float)
-0:416          determinant ( temp float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r019' ( temp 4X4 matrix of float)
-0:416          exp ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'R020' ( temp 4X4 matrix of float)
-0:416          exp2 ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r021' ( temp 4X4 matrix of float)
-0:416          Floor ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r022' ( temp 4X4 matrix of float)
-0:416          mod ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416            'inF1' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r023' ( temp 4X4 matrix of float)
-0:416          Fraction ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r025' ( temp 4X4 matrix of float)
-0:416          fwidth ( temp 4X4 matrix of float)
-0:416            'inF0' ( in 4X4 matrix of float)
-0:416      Sequence
-0:416        move second child to first child ( temp 4X4 matrix of float)
-0:416          'r026' ( temp 4X4 matrix of float)
-0:416          ldexp ( temp 4X4 matrix of