Revert "Disallow matrix ctors which overflow a column."

This reverts commit eb68973c2f5ac8f8dd169037cfc32885a024448d.

Reason for revert: ES2 conformance test checks this

Original change's description:
> Disallow matrix ctors which overflow a column.
>
> The GLSL spec allows matrix constructors containing vectors that would
> split between multiple columns of the matrix. However, in practice, this
> does not actually work well on a lot of GPUs!
>
> - "cast not allowed", "internal error":
> 	Tegra 3
> 	Quadro P400
> 	GTX 660
> 	GTX 960
> - Compiles, but generates wrong result:
> 	RadeonR9M470X
> 	RadeonHD7770
>
> Since this isn't a pattern we expect to see in user code, we now report
> it as an error at compile time. mat2(vec4) is treated as an exceptional
> case and still allowed.
>
> Change-Id: Id6925984a2d1ec948aec4defcc790a197a96cf86
> Bug: skia:12443
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449518
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:12443
Change-Id: I5a32744c88b9b830ad657488824c8c7dd0b0a652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458056
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni
index b357734..8cdce01 100644
--- a/gn/sksl_tests.gni
+++ b/gn/sksl_tests.gni
@@ -72,7 +72,6 @@
   "/sksl/errors/LastFragColorWithoutCaps.sksl",
   "/sksl/errors/LayoutInFunctions.sksl",
   "/sksl/errors/LayoutRepeatedQualifiers.sksl",
-  "/sksl/errors/MatrixColumnOverflow.sksl",
   "/sksl/errors/MatrixToVectorCast3x3.sksl",
   "/sksl/errors/MatrixToVectorCastBoolean.sksl",
   "/sksl/errors/MatrixToVectorCastInteger.sksl",
@@ -380,6 +379,8 @@
   "/sksl/shared/InterfaceBlockNamedArray.sksl",
   "/sksl/shared/Matrices.sksl",
   "/sksl/shared/MatricesNonsquare.sksl",
+  "/sksl/shared/MatrixConstructorsES2.sksl",
+  "/sksl/shared/MatrixConstructorsES3.sksl",
   "/sksl/shared/MatrixEquality.sksl",
   "/sksl/shared/MatrixScalarSplat.sksl",
   "/sksl/shared/MatrixToVectorCast.sksl",
diff --git a/resources/sksl/errors/MatrixColumnOverflow.sksl b/resources/sksl/errors/MatrixColumnOverflow.sksl
deleted file mode 100644
index 6d1edfc..0000000
--- a/resources/sksl/errors/MatrixColumnOverflow.sksl
+++ /dev/null
@@ -1,11 +0,0 @@
-uniform float4 f4;
-
-void f22() { float2x2(1, f4.xyz); }
-void f23() { float2x3(f4.xyzw, f4.xy); }
-void f24() { float2x4(f4.xyz, f4.wxyz, f4.w); }
-void f32() { float3x2(f4.xy, f4.zwxy); }
-void f33() { float3x3(f4.xy, f4.zw, f4.xyzw, f4.x); }
-void f34() { float3x4(f4, f4.xyz, f4.wxyz, 1); }
-void f42() { float4x2(f4.xyz, f4.wxyz, f4.w); }
-void f43() { float4x3(f4.x, f4.yzwx, f4.yzwx, f4.yzw); }
-void f44() { float4x4(f4.xy, f4.zwxy, f4.zwx, f4.yz, f4.wxyz, f4.w); }
diff --git a/resources/sksl/intrinsics/MatrixCompMultES3.sksl b/resources/sksl/intrinsics/MatrixCompMultES3.sksl
index 97daf1f..edea42a 100644
--- a/resources/sksl/intrinsics/MatrixCompMultES3.sksl
+++ b/resources/sksl/intrinsics/MatrixCompMultES3.sksl
@@ -6,7 +6,7 @@
     half2x4 h24 = matrixCompMult(half2x4(9, 9, 9, 9, 9, 9, 9, 9),
                                  half2x4(colorRed, colorGreen));
     half4x2 h42 = matrixCompMult(half4x2(1, 2, 3, 4, 5, 6, 7, 8),
-                                 half4x2(colorRed.xy, colorRed.zw, colorGreen.xy, colorGreen.zw));
+                                 half4x2(colorRed, colorGreen));
     const float3x4 f34 = matrixCompMult(float3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
                                         float3x4(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1));
     float4x3 f43 = matrixCompMult(float4x3(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
diff --git a/resources/sksl/shared/Matrices.sksl b/resources/sksl/shared/Matrices.sksl
index b3051f4..f625437 100644
--- a/resources/sksl/shared/Matrices.sksl
+++ b/resources/sksl/shared/Matrices.sksl
@@ -1,10 +1,9 @@
 uniform half4 colorGreen, colorRed;
-uniform float2x2 testMatrix2x2;
 
 bool test_float() {
     bool ok = true;
 
-    float2x2 m1 = testMatrix2x2;
+    float2x2 m1 = float2x2(float4(1, 2, 3, 4));
     ok = ok && (m1 == float2x2(1, 2, 3, 4));
 
     // This generates {5, 0, 0, 5} on some Radeon GPUs.
@@ -26,7 +25,7 @@
     m1 += m5;
     ok = ok && (m1 == float2x2(5, 2, 3, 8));
 
-    float2x2 m7 = float2x2(5, 6, float2(7, 8));
+    float2x2 m7 = float2x2(5, float3(6, 7, 8));
     ok = ok && (m7 == float2x2(5, 6, 7, 8));
 
     float3x3 m9 = float3x3(9);
@@ -39,20 +38,13 @@
     m11 -= m10;
     ok = ok && (m11 == float4x4(9, 20, 20, 20, 20, 9, 20, 20, 20, 20, 9, 20, 20, 20, 20, 9));
 
-    float4 f4 = float4(testMatrix2x2);
-    ok = ok && float2x2(f4.xy, f4.z, 4) ==
-               float2x2(1, 2, 3, 4);
-    ok = ok && float3x3(f4.xy, f4.z, f4.w, f4.xy, f4.zw, f4.x) ==
-               float3x3(1, 2, 3, 4, 1, 2, 3, 4, 1);
-    ok = ok && float4x4(f4.xy, f4.zw, f4.xyz, f4.w, f4.xyzw, 1, f4.yzw) ==
-               float4x4(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
     return ok;
 }
 
 bool test_half() {
     bool ok = true;
 
-    half2x2 m1 = half2x2(testMatrix2x2);
+    half2x2 m1 = half2x2(half4(1, 2, 3, 4));
     ok = ok && (m1 == half2x2(1, 2, 3, 4));
 
     // This generates {5, 0, 0, 5} on some Radeon GPUs.
@@ -74,7 +66,7 @@
     m1 += m5;
     ok = ok && (m1 == half2x2(5, 2, 3, 8));
 
-    half2x2 m7 = half2x2(5, 6, half2(7, 8));
+    half2x2 m7 = half2x2(5, half3(6, 7, 8));
     ok = ok && (m7 == half2x2(5, 6, 7, 8));
 
     half3x3 m9 = half3x3(9);
@@ -87,13 +79,6 @@
     m11 -= m10;
     ok = ok && (m11 == half4x4(9, 20, 20, 20, 20, 9, 20, 20, 20, 20, 9, 20, 20, 20, 20, 9));
 
-    half4 h4 = half4(testMatrix2x2);
-    ok = ok && half2x2(h4.xy, h4.z, 4) ==
-               half2x2(1, 2, 3, 4);
-    ok = ok && half3x3(h4.xy, h4.z, h4.w, h4.xy, h4.zw, h4.x) ==
-               half3x3(1, 2, 3, 4, 1, 2, 3, 4, 1);
-    ok = ok && half4x4(h4.xy, h4.zw, h4.xyz, h4.w, h4.xyzw, 1, h4.yzw) ==
-               half4x4(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
     return ok;
 }
 
diff --git a/resources/sksl/shared/MatricesNonsquare.sksl b/resources/sksl/shared/MatricesNonsquare.sksl
index 03298a1..8620734 100644
--- a/resources/sksl/shared/MatricesNonsquare.sksl
+++ b/resources/sksl/shared/MatricesNonsquare.sksl
@@ -1,5 +1,4 @@
 uniform half4 colorGreen, colorRed;
-uniform float2x2 testMatrix2x2;
 
 bool test_float() {
     bool ok = true;
@@ -44,21 +43,6 @@
     m24 /= 4;
     ok = ok && (m24 == float2x4(0.75, 0, 0, 0,
                                 0, 0.75, 0, 0));
-
-    float4 f4 = float4(testMatrix2x2);
-    ok = ok && float2x3(f4.xyz, f4.w, f4.xy) ==
-               float2x3(1, 2, 3, 4, 1, 2);
-    ok = ok && float2x4(f4.xyz, f4.w, f4.x, f4.yzw) ==
-               float2x4(1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float3x2(f4.xy, f4.zw, f4.x, f4.y) ==
-               float3x2(1, 2, 3, 4, 1, 2);
-    ok = ok && float3x4(f4.xy, f4.zw, f4.xyzw, f4.x, f4.yz, f4.w) ==
-               float3x4(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float4x2(f4.xy, f4.z, f4.w, f4.xy, f4.z, f4.w) ==
-               float4x2(1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float4x3(f4.x, f4.yz, f4.wx, f4.y, f4.zwx, f4.yzw) ==
-               float4x3(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
-
     return ok;
 }
 
@@ -105,21 +89,6 @@
     m24 /= 4;
     ok = ok && (m24 == half2x4(0.75, 0, 0, 0,
                                0, 0.75, 0, 0));
-
-    half4 h4 = half4(testMatrix2x2);
-    ok = ok && float2x3(h4.xyz, h4.w, h4.xy) ==
-               float2x3(1, 2, 3, 4, 1, 2);
-    ok = ok && float2x4(h4.xyz, h4.w, h4.x, h4.yzw) ==
-               float2x4(1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float3x2(h4.xy, h4.zw, h4.x, h4.y) ==
-               float3x2(1, 2, 3, 4, 1, 2);
-    ok = ok && float3x4(h4.xy, h4.zw, h4.xyzw, h4.x, h4.yz, h4.w) ==
-               float3x4(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float4x2(h4.xy, h4.z, h4.w, h4.xy, h4.z, h4.w) ==
-               float4x2(1, 2, 3, 4, 1, 2, 3, 4);
-    ok = ok && float4x3(h4.x, h4.yz, h4.wx, h4.y, h4.zwx, h4.yzw) ==
-               float4x3(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4);
-
     return ok;
 }
 
diff --git a/resources/sksl/shared/MatrixConstructorsES2.sksl b/resources/sksl/shared/MatrixConstructorsES2.sksl
new file mode 100644
index 0000000..857bd21
--- /dev/null
+++ b/resources/sksl/shared/MatrixConstructorsES2.sksl
@@ -0,0 +1,16 @@
+uniform half4 colorGreen, colorRed;
+uniform float2x2 testMatrix2x2;  // equals (1, 2, 3, 4)
+
+half4 main(float2 coords) {
+    float4 f4 = float4(testMatrix2x2);
+
+    // These matrices are intentionally assembled off-kilter; the vectors shouldn't line up with the
+    // natural matrix stride. Metal and SPIR-V will need to reorder the data to make it fit.
+    bool ok = float2x2(f4.xyz, 4)                       == float2x2(1, 2, 3, 4);
+    ok = ok && float3x3(f4.xy, f4.zw, f4.xyzw, f4.x)    == float3x3(1, 2, 3, 4, 1, 2, 3, 4, 1);
+    ok = ok && float4x4(f4.xyz, f4.wxy, f4.zwxy, f4.zw, f4.xyzw) == float4x4(1, 2, 3, 4,
+                                                                             1, 2, 3, 4,
+                                                                             1, 2, 3, 4,
+                                                                             1, 2, 3, 4);
+    return ok ? colorGreen : colorRed;
+}
diff --git a/resources/sksl/shared/MatrixConstructorsES3.sksl b/resources/sksl/shared/MatrixConstructorsES3.sksl
new file mode 100644
index 0000000..7a7c0f9
--- /dev/null
+++ b/resources/sksl/shared/MatrixConstructorsES3.sksl
@@ -0,0 +1,18 @@
+uniform half4 colorGreen, colorRed;
+uniform float2x2 testMatrix2x2;  // equals (1, 2, 3, 4)
+
+half4 main(float2 coords) {
+    float4 f4 = float4(testMatrix2x2);
+
+    // These matrices are intentionally assembled off-kilter; the vectors shouldn't line up with the
+    // natural matrix stride. Metal and SPIR-V will need to reorder the data to make it fit.
+    bool ok =  float2x3(f4.xyzw, f4.xy)                 == float2x3(1, 2, 3, 4, 1, 2);
+    ok = ok && float2x4(f4.xyz, f4.wxyz, f4.w)          == float2x4(1, 2, 3, 4, 1, 2, 3, 4);
+    ok = ok && float3x3(f4.xy, f4.zw, f4.xyzw, f4.x)    == float3x3(1, 2, 3, 4, 1, 2, 3, 4, 1);
+    ok = ok && float4x2(f4.xyz, f4.wxyz, f4.w)          == float4x2(1, 2, 3, 4, 1, 2, 3, 4);
+    ok = ok && float4x3(f4.x, f4.yzwx, f4.yzwx, f4.yzw) == float4x3(1, 2, 3,
+                                                                    4, 1, 2,
+                                                                    3, 4, 1,
+                                                                    2, 3, 4);
+    return ok ? colorGreen : colorRed;
+}
diff --git a/src/sksl/ir/SkSLConstructor.cpp b/src/sksl/ir/SkSLConstructor.cpp
index 6ac7375..9042c5e 100644
--- a/src/sksl/ir/SkSLConstructor.cpp
+++ b/src/sksl/ir/SkSLConstructor.cpp
@@ -108,8 +108,7 @@
     // For more complex cases, we walk the argument list and fix up the arguments as needed.
     int expected = type.rows() * type.columns();
     int actual = 0;
-    for (size_t index = 0; index < args.size(); ++index) {
-        std::unique_ptr<Expression>& arg = args[index];
+    for (std::unique_ptr<Expression>& arg : args) {
         if (!arg->type().isScalar() && !arg->type().isVector()) {
             context.fErrors->error(line, "'" + arg->type().displayName() +
                                          "' is not a valid parameter to '" + type.displayName() +
@@ -117,25 +116,6 @@
             return nullptr;
         }
 
-        if (type.isMatrix()) {
-            if (type.slotCount() == 4 && arg->type().slotCount() == 4) {
-                // Allow mat2(vec4) constructors. These have real-world utility.
-            } else {
-                // Disallow arguments which split across multiple matrix columns. The GLSL spec
-                // technically allows it, but it's rarely useful, and several GPU drivers fail in
-                // practice.
-                int limit = type.rows() - (actual % type.rows());
-                if (arg->type().columns() > limit) {
-                    context.fErrors->error(line,
-                            "argument " + std::to_string(index + 1) + " to '" + type.displayName() +
-                            "' constructor is '" + arg->type().displayName() + "', but matrix "
-                            "column only has " + std::to_string(limit) + " slot" +
-                            ((limit != 1) ? "s" : "") + " left");
-                    return nullptr;
-                }
-            }
-        }
-
         // Rely on Constructor::Convert to force this subexpression to the proper type. If it's a
         // literal, this will make sure it's the right type of literal. If an expression of matching
         // type, the expression will be returned as-is. If it's an expression of mismatched type,
diff --git a/tests/SkSLDSLTest.cpp b/tests/SkSLDSLTest.cpp
index 6d31185..db37a76 100644
--- a/tests/SkSLDSLTest.cpp
+++ b/tests/SkSLDSLTest.cpp
@@ -583,7 +583,7 @@
     EXPECT_EQUAL(f32 = Float3x2(1, 2, 3, 4, 5, 6),
                  "(f32 = float3x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0))");
     Var f42(kFloat4x2_Type, "f42");
-    EXPECT_EQUAL(f42 = Float4x2(Float2(1, 2), Float2(3, 4), 5, 6, 7, 8),
+    EXPECT_EQUAL(f42 = Float4x2(Float4(1, 2, 3, 4), 5, 6, 7, 8),
                  "(f42 = float4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0))");
     Var f23(kFloat2x3_Type, "f23");
     EXPECT_EQUAL(f23 = Float2x3(1, Float2(2, 3), 4, Float2(5, 6)),
@@ -592,14 +592,13 @@
     EXPECT_EQUAL(f33 = Float3x3(Float3(1, 2, 3), 4, Float2(5, 6), 7, 8, 9),
                  "(f33 = float3x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0))");
     Var f43(kFloat4x3_Type, "f43");
-    EXPECT_EQUAL(
-            f43 = Float4x3(Float3(1, 2, 3), Float3(4, 5, 6), Float3(7, 8, 9), Float3(10, 11, 12)),
-            "(f43 = float4x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0))");
+    EXPECT_EQUAL(f43 = Float4x3(Float4(1, 2, 3, 4), Float4(5, 6, 7, 8), Float4(9, 10, 11, 12)),
+                 "(f43 = float4x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0))");
     Var f24(kFloat2x4_Type, "f24");
     EXPECT_EQUAL(f24 = Float2x4(1, 2, 3, 4, 5, 6, 7, 8),
                  "(f24 = float2x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0))");
     Var f34(kFloat3x4_Type, "f34");
-    EXPECT_EQUAL(f34 = Float3x4(1, 2, 3, 4, 5, 6, 7, 8, Float4(9, 10, 11, 12)),
+    EXPECT_EQUAL(f34 = Float3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, Float3(10, 11, 12)),
                  "(f34 = float3x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0))");
     Var f44(kFloat4x4_Type, "f44");
     EXPECT_EQUAL(f44 = Float4x4(1), "(f44 = float4x4(1.0))");
@@ -610,7 +609,7 @@
     EXPECT_EQUAL(h32 = Half3x2(1, 2, 3, 4, 5, 6),
                  "(h32 = half3x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0))");
     Var h42(kHalf4x2_Type, "h42");
-    EXPECT_EQUAL(h42 = Half4x2(Half2(1, 2), Half2(3, 4), 5, 6, 7, 8),
+    EXPECT_EQUAL(h42 = Half4x2(Half4(1, 2, 3, 4), 5, 6, 7, 8),
                  "(h42 = half4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0))");
     Var h23(kHalf2x3_Type, "h23");
     EXPECT_EQUAL(h23 = Half2x3(1, Half2(2, 3), 4, Half2(5, 6)),
@@ -619,13 +618,13 @@
     EXPECT_EQUAL(h33 = Half3x3(Half3(1, 2, 3), 4, Half2(5, 6), 7, 8, 9),
                  "(h33 = half3x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0))");
     Var h43(kHalf4x3_Type, "h43");
-    EXPECT_EQUAL(h43 = Half4x3(Half3(1, 2, 3), Half3(4, 5, 6), Half3(7, 8, 9), Half3(10, 11, 12)),
+    EXPECT_EQUAL(h43 = Half4x3(Half4(1, 2, 3, 4), Half4(5, 6, 7, 8), Half4(9, 10, 11, 12)),
                  "(h43 = half4x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0))");
     Var h24(kHalf2x4_Type, "h24");
     EXPECT_EQUAL(h24 = Half2x4(1, 2, 3, 4, 5, 6, 7, 8),
                  "(h24 = half2x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0))");
     Var h34(kHalf3x4_Type, "h34");
-    EXPECT_EQUAL(h34 = Half3x4(1, 2, 3, 4, 5, 6, 7, 8, Half4(9, 10, 11, 12)),
+    EXPECT_EQUAL(h34 = Half3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, Half3(10, 11, 12)),
                  "(h34 = half3x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0))");
     Var h44(kHalf4x4_Type, "h44");
     EXPECT_EQUAL(h44 = Half4x4(1), "(h44 = half4x4(1.0))");
diff --git a/tests/SkSLTest.cpp b/tests/SkSLTest.cpp
index 626bf47..83f4602 100644
--- a/tests/SkSLTest.cpp
+++ b/tests/SkSLTest.cpp
@@ -313,6 +313,9 @@
 SKSL_TEST(SkSLHex,                             "shared/Hex.sksl")
 SKSL_TEST(SkSLMatrices,                        "shared/Matrices.sksl")
 SKSL_TEST_ES3(SkSLMatricesNonsquare,           "shared/MatricesNonsquare.sksl")
+// TODO(skia:12443): Quadro P400 on Ubuntu fails to compile this test
+// SKSL_TEST(SkSLMatrixConstructorsES2,           "shared/MatrixConstructorsES2.sksl")
+// SKSL_TEST_ES3(SkSLMatrixConstructorsES3,       "shared/MatrixConstructorsES3.sksl")
 SKSL_TEST(SkSLMatrixEquality,                  "shared/MatrixEquality.sksl")
 SKSL_TEST(SkSLMatrixScalarSplat,               "shared/MatrixScalarSplat.sksl")
 SKSL_TEST(SkSLMatrixToVectorCast,              "shared/MatrixToVectorCast.sksl")
diff --git a/tests/sksl/errors/MatrixColumnOverflow.glsl b/tests/sksl/errors/MatrixColumnOverflow.glsl
deleted file mode 100644
index 43fae55..0000000
--- a/tests/sksl/errors/MatrixColumnOverflow.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-### Compilation failed:
-
-error: 3: argument 2 to 'float2x2' constructor is 'float3', but matrix column only has 1 slot left
-error: 4: argument 1 to 'float2x3' constructor is 'float4', but matrix column only has 3 slots left
-error: 5: argument 2 to 'float2x4' constructor is 'float4', but matrix column only has 1 slot left
-error: 6: argument 2 to 'float3x2' constructor is 'float4', but matrix column only has 2 slots left
-error: 7: argument 2 to 'float3x3' constructor is 'float2', but matrix column only has 1 slot left
-error: 8: argument 3 to 'float3x4' constructor is 'float4', but matrix column only has 1 slot left
-error: 9: argument 1 to 'float4x2' constructor is 'float3', but matrix column only has 2 slots left
-error: 10: argument 2 to 'float4x3' constructor is 'float4', but matrix column only has 2 slots left
-error: 11: argument 2 to 'float4x4' constructor is 'float4', but matrix column only has 2 slots left
-9 errors
diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
index b55c470..9d6c417 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
+++ b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
@@ -45,11 +45,13 @@
 OpDecorate %65 RelaxedPrecision
 OpDecorate %66 RelaxedPrecision
 OpDecorate %68 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
 OpDecorate %71 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
 OpDecorate %74 RelaxedPrecision
 OpDecorate %75 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
 OpDecorate %78 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
@@ -66,19 +68,23 @@
 OpDecorate %90 RelaxedPrecision
 OpDecorate %91 RelaxedPrecision
 OpDecorate %92 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
-OpDecorate %187 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
+OpDecorate %131 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %134 RelaxedPrecision
+OpDecorate %191 RelaxedPrecision
+OpDecorate %193 RelaxedPrecision
+OpDecorate %194 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -141,7 +147,7 @@
 %h24 = OpVariable %_ptr_Function_mat2v4float Function
 %h42 = OpVariable %_ptr_Function_mat4v2float Function
 %f43 = OpVariable %_ptr_Function_mat4v3float Function
-%181 = OpVariable %_ptr_Function_v4float Function
+%185 = OpVariable %_ptr_Function_v4float Function
 %31 = OpCompositeConstruct %v4float %float_9 %float_9 %float_9 %float_9
 %32 = OpCompositeConstruct %v4float %float_9 %float_9 %float_9 %float_9
 %33 = OpCompositeConstruct %mat2v4float %31 %32
@@ -165,125 +171,129 @@
 %66 = OpCompositeConstruct %mat4v2float %62 %63 %64 %65
 %67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %68 = OpLoad %v4float %67
-%69 = OpVectorShuffle %v2float %68 %68 0 1
-%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%71 = OpLoad %v4float %70
-%72 = OpVectorShuffle %v2float %71 %71 2 3
-%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%74 = OpLoad %v4float %73
-%75 = OpVectorShuffle %v2float %74 %74 0 1
-%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%77 = OpLoad %v4float %76
-%78 = OpVectorShuffle %v2float %77 %77 2 3
-%79 = OpCompositeConstruct %mat4v2float %69 %72 %75 %78
-%80 = OpCompositeExtract %v2float %66 0
-%81 = OpCompositeExtract %v2float %79 0
-%82 = OpFMul %v2float %80 %81
-%83 = OpCompositeExtract %v2float %66 1
-%84 = OpCompositeExtract %v2float %79 1
-%85 = OpFMul %v2float %83 %84
-%86 = OpCompositeExtract %v2float %66 2
-%87 = OpCompositeExtract %v2float %79 2
-%88 = OpFMul %v2float %86 %87
-%89 = OpCompositeExtract %v2float %66 3
-%90 = OpCompositeExtract %v2float %79 3
-%91 = OpFMul %v2float %89 %90
-%92 = OpCompositeConstruct %mat4v2float %82 %85 %88 %91
-OpStore %h42 %92
-%103 = OpCompositeConstruct %v3float %float_12 %float_22 %float_30
-%104 = OpCompositeConstruct %v3float %float_36 %float_40 %float_42
-%105 = OpCompositeConstruct %v3float %float_42 %float_40 %float_36
-%106 = OpCompositeConstruct %v3float %float_30 %float_22 %float_12
-%107 = OpCompositeConstruct %mat4v3float %103 %104 %105 %106
-OpStore %f43 %107
-%109 = OpLoad %mat2v4float %h24
-%110 = OpCompositeConstruct %v4float %float_9 %float_0 %float_0 %float_9
-%111 = OpCompositeConstruct %v4float %float_0 %float_9 %float_0 %float_9
-%112 = OpCompositeConstruct %mat2v4float %110 %111
-%114 = OpCompositeExtract %v4float %109 0
-%115 = OpCompositeExtract %v4float %112 0
-%116 = OpFOrdEqual %v4bool %114 %115
-%117 = OpAll %bool %116
-%118 = OpCompositeExtract %v4float %109 1
-%119 = OpCompositeExtract %v4float %112 1
+%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%70 = OpLoad %v4float %69
+%71 = OpCompositeExtract %float %68 0
+%72 = OpCompositeExtract %float %68 1
+%73 = OpCompositeConstruct %v2float %71 %72
+%74 = OpCompositeExtract %float %68 2
+%75 = OpCompositeExtract %float %68 3
+%76 = OpCompositeConstruct %v2float %74 %75
+%77 = OpCompositeExtract %float %70 0
+%78 = OpCompositeExtract %float %70 1
+%79 = OpCompositeConstruct %v2float %77 %78
+%80 = OpCompositeExtract %float %70 2
+%81 = OpCompositeExtract %float %70 3
+%82 = OpCompositeConstruct %v2float %80 %81
+%83 = OpCompositeConstruct %mat4v2float %73 %76 %79 %82
+%84 = OpCompositeExtract %v2float %66 0
+%85 = OpCompositeExtract %v2float %83 0
+%86 = OpFMul %v2float %84 %85
+%87 = OpCompositeExtract %v2float %66 1
+%88 = OpCompositeExtract %v2float %83 1
+%89 = OpFMul %v2float %87 %88
+%90 = OpCompositeExtract %v2float %66 2
+%91 = OpCompositeExtract %v2float %83 2
+%92 = OpFMul %v2float %90 %91
+%93 = OpCompositeExtract %v2float %66 3
+%94 = OpCompositeExtract %v2float %83 3
+%95 = OpFMul %v2float %93 %94
+%96 = OpCompositeConstruct %mat4v2float %86 %89 %92 %95
+OpStore %h42 %96
+%107 = OpCompositeConstruct %v3float %float_12 %float_22 %float_30
+%108 = OpCompositeConstruct %v3float %float_36 %float_40 %float_42
+%109 = OpCompositeConstruct %v3float %float_42 %float_40 %float_36
+%110 = OpCompositeConstruct %v3float %float_30 %float_22 %float_12
+%111 = OpCompositeConstruct %mat4v3float %107 %108 %109 %110
+OpStore %f43 %111
+%113 = OpLoad %mat2v4float %h24
+%114 = OpCompositeConstruct %v4float %float_9 %float_0 %float_0 %float_9
+%115 = OpCompositeConstruct %v4float %float_0 %float_9 %float_0 %float_9
+%116 = OpCompositeConstruct %mat2v4float %114 %115
+%118 = OpCompositeExtract %v4float %113 0
+%119 = OpCompositeExtract %v4float %116 0
 %120 = OpFOrdEqual %v4bool %118 %119
 %121 = OpAll %bool %120
-%122 = OpLogicalAnd %bool %117 %121
-OpSelectionMerge %124 None
-OpBranchConditional %122 %123 %124
-%123 = OpLabel
-%125 = OpLoad %mat4v2float %h42
-%126 = OpCompositeConstruct %v2float %float_1 %float_0
-%127 = OpCompositeConstruct %v2float %float_0 %float_4
-%128 = OpCompositeConstruct %v2float %float_0 %float_6
-%129 = OpCompositeConstruct %v2float %float_0 %float_8
-%130 = OpCompositeConstruct %mat4v2float %126 %127 %128 %129
-%132 = OpCompositeExtract %v2float %125 0
-%133 = OpCompositeExtract %v2float %130 0
-%134 = OpFOrdEqual %v2bool %132 %133
-%135 = OpAll %bool %134
-%136 = OpCompositeExtract %v2float %125 1
-%137 = OpCompositeExtract %v2float %130 1
+%122 = OpCompositeExtract %v4float %113 1
+%123 = OpCompositeExtract %v4float %116 1
+%124 = OpFOrdEqual %v4bool %122 %123
+%125 = OpAll %bool %124
+%126 = OpLogicalAnd %bool %121 %125
+OpSelectionMerge %128 None
+OpBranchConditional %126 %127 %128
+%127 = OpLabel
+%129 = OpLoad %mat4v2float %h42
+%130 = OpCompositeConstruct %v2float %float_1 %float_0
+%131 = OpCompositeConstruct %v2float %float_0 %float_4
+%132 = OpCompositeConstruct %v2float %float_0 %float_6
+%133 = OpCompositeConstruct %v2float %float_0 %float_8
+%134 = OpCompositeConstruct %mat4v2float %130 %131 %132 %133
+%136 = OpCompositeExtract %v2float %129 0
+%137 = OpCompositeExtract %v2float %134 0
 %138 = OpFOrdEqual %v2bool %136 %137
 %139 = OpAll %bool %138
-%140 = OpLogicalAnd %bool %135 %139
-%141 = OpCompositeExtract %v2float %125 2
-%142 = OpCompositeExtract %v2float %130 2
-%143 = OpFOrdEqual %v2bool %141 %142
-%144 = OpAll %bool %143
-%145 = OpLogicalAnd %bool %140 %144
-%146 = OpCompositeExtract %v2float %125 3
-%147 = OpCompositeExtract %v2float %130 3
-%148 = OpFOrdEqual %v2bool %146 %147
-%149 = OpAll %bool %148
-%150 = OpLogicalAnd %bool %145 %149
-OpBranch %124
-%124 = OpLabel
-%151 = OpPhi %bool %false %25 %150 %123
-OpSelectionMerge %153 None
-OpBranchConditional %151 %152 %153
-%152 = OpLabel
-%154 = OpLoad %mat4v3float %f43
-%155 = OpCompositeConstruct %v3float %float_12 %float_22 %float_30
-%156 = OpCompositeConstruct %v3float %float_36 %float_40 %float_42
-%157 = OpCompositeConstruct %v3float %float_42 %float_40 %float_36
-%158 = OpCompositeConstruct %v3float %float_30 %float_22 %float_12
-%159 = OpCompositeConstruct %mat4v3float %155 %156 %157 %158
-%161 = OpCompositeExtract %v3float %154 0
-%162 = OpCompositeExtract %v3float %159 0
-%163 = OpFOrdEqual %v3bool %161 %162
-%164 = OpAll %bool %163
-%165 = OpCompositeExtract %v3float %154 1
-%166 = OpCompositeExtract %v3float %159 1
+%140 = OpCompositeExtract %v2float %129 1
+%141 = OpCompositeExtract %v2float %134 1
+%142 = OpFOrdEqual %v2bool %140 %141
+%143 = OpAll %bool %142
+%144 = OpLogicalAnd %bool %139 %143
+%145 = OpCompositeExtract %v2float %129 2
+%146 = OpCompositeExtract %v2float %134 2
+%147 = OpFOrdEqual %v2bool %145 %146
+%148 = OpAll %bool %147
+%149 = OpLogicalAnd %bool %144 %148
+%150 = OpCompositeExtract %v2float %129 3
+%151 = OpCompositeExtract %v2float %134 3
+%152 = OpFOrdEqual %v2bool %150 %151
+%153 = OpAll %bool %152
+%154 = OpLogicalAnd %bool %149 %153
+OpBranch %128
+%128 = OpLabel
+%155 = OpPhi %bool %false %25 %154 %127
+OpSelectionMerge %157 None
+OpBranchConditional %155 %156 %157
+%156 = OpLabel
+%158 = OpLoad %mat4v3float %f43
+%159 = OpCompositeConstruct %v3float %float_12 %float_22 %float_30
+%160 = OpCompositeConstruct %v3float %float_36 %float_40 %float_42
+%161 = OpCompositeConstruct %v3float %float_42 %float_40 %float_36
+%162 = OpCompositeConstruct %v3float %float_30 %float_22 %float_12
+%163 = OpCompositeConstruct %mat4v3float %159 %160 %161 %162
+%165 = OpCompositeExtract %v3float %158 0
+%166 = OpCompositeExtract %v3float %163 0
 %167 = OpFOrdEqual %v3bool %165 %166
 %168 = OpAll %bool %167
-%169 = OpLogicalAnd %bool %164 %168
-%170 = OpCompositeExtract %v3float %154 2
-%171 = OpCompositeExtract %v3float %159 2
-%172 = OpFOrdEqual %v3bool %170 %171
-%173 = OpAll %bool %172
-%174 = OpLogicalAnd %bool %169 %173
-%175 = OpCompositeExtract %v3float %154 3
-%176 = OpCompositeExtract %v3float %159 3
-%177 = OpFOrdEqual %v3bool %175 %176
-%178 = OpAll %bool %177
-%179 = OpLogicalAnd %bool %174 %178
-OpBranch %153
-%153 = OpLabel
-%180 = OpPhi %bool %false %124 %179 %152
-OpSelectionMerge %185 None
-OpBranchConditional %180 %183 %184
-%183 = OpLabel
-%186 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%187 = OpLoad %v4float %186
-OpStore %181 %187
-OpBranch %185
-%184 = OpLabel
-%188 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%189 = OpLoad %v4float %188
-OpStore %181 %189
-OpBranch %185
-%185 = OpLabel
-%190 = OpLoad %v4float %181
-OpReturnValue %190
+%169 = OpCompositeExtract %v3float %158 1
+%170 = OpCompositeExtract %v3float %163 1
+%171 = OpFOrdEqual %v3bool %169 %170
+%172 = OpAll %bool %171
+%173 = OpLogicalAnd %bool %168 %172
+%174 = OpCompositeExtract %v3float %158 2
+%175 = OpCompositeExtract %v3float %163 2
+%176 = OpFOrdEqual %v3bool %174 %175
+%177 = OpAll %bool %176
+%178 = OpLogicalAnd %bool %173 %177
+%179 = OpCompositeExtract %v3float %158 3
+%180 = OpCompositeExtract %v3float %163 3
+%181 = OpFOrdEqual %v3bool %179 %180
+%182 = OpAll %bool %181
+%183 = OpLogicalAnd %bool %178 %182
+OpBranch %157
+%157 = OpLabel
+%184 = OpPhi %bool %false %128 %183 %156
+OpSelectionMerge %189 None
+OpBranchConditional %184 %187 %188
+%187 = OpLabel
+%190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%191 = OpLoad %v4float %190
+OpStore %185 %191
+OpBranch %189
+%188 = OpLabel
+%192 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%193 = OpLoad %v4float %192
+OpStore %185 %193
+OpBranch %189
+%189 = OpLabel
+%194 = OpLoad %v4float %185
+OpReturnValue %194
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.glsl b/tests/sksl/intrinsics/MatrixCompMultES3.glsl
index 4747128..0e25874 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES3.glsl
+++ b/tests/sksl/intrinsics/MatrixCompMultES3.glsl
@@ -4,7 +4,7 @@
 uniform vec4 colorRed;
 vec4 main() {
     mat2x4 h24 = matrixCompMult(mat2x4(9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0), mat2x4(colorRed, colorGreen));
-    mat4x2 h42 = matrixCompMult(mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0), mat4x2(colorRed.xy, colorRed.zw, colorGreen.xy, colorGreen.zw));
+    mat4x2 h42 = matrixCompMult(mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0), mat4x2(colorRed, colorGreen));
     mat4x3 f43 = mat4x3(12.0, 22.0, 30.0, 36.0, 40.0, 42.0, 42.0, 40.0, 36.0, 30.0, 22.0, 12.0);
     return (h24 == mat2x4(9.0, 0.0, 0.0, 9.0, 0.0, 9.0, 0.0, 9.0) && h42 == mat4x2(1.0, 0.0, 0.0, 4.0, 0.0, 6.0, 0.0, 8.0)) && f43 == mat4x3(12.0, 22.0, 30.0, 36.0, 40.0, 42.0, 42.0, 40.0, 36.0, 30.0, 22.0, 12.0) ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.metal b/tests/sksl/intrinsics/MatrixCompMultES3.metal
index 40922db..c552435 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES3.metal
+++ b/tests/sksl/intrinsics/MatrixCompMultES3.metal
@@ -27,6 +27,9 @@
     }
     return a;
 }
+float4x2 float4x2_from_float4_float4(float4 x0, float4 x1) {
+    return float4x2(float2(x0.xy), float2(x0.zw), float2(x1.xy), float2(x1.zw));
+}
 thread bool operator==(const float2x4 left, const float2x4 right) {
     return all(left[0] == right[0]) &&
            all(left[1] == right[1]);
@@ -56,7 +59,7 @@
     Outputs _out;
     (void)_out;
     float2x4 h24 = matrixCompMult(float2x4(float4(9.0, 9.0, 9.0, 9.0), float4(9.0, 9.0, 9.0, 9.0)), float2x4(_uniforms.colorRed, _uniforms.colorGreen));
-    float4x2 h42 = matrixCompMult(float4x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(5.0, 6.0), float2(7.0, 8.0)), float4x2(_uniforms.colorRed.xy, _uniforms.colorRed.zw, _uniforms.colorGreen.xy, _uniforms.colorGreen.zw));
+    float4x2 h42 = matrixCompMult(float4x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(5.0, 6.0), float2(7.0, 8.0)), float4x2_from_float4_float4(_uniforms.colorRed, _uniforms.colorGreen));
     float4x3 f43 = float4x3(float3(12.0, 22.0, 30.0), float3(36.0, 40.0, 42.0), float3(42.0, 40.0, 36.0), float3(30.0, 22.0, 12.0));
     _out.sk_FragColor = (h24 == float2x4(float4(9.0, 0.0, 0.0, 9.0), float4(0.0, 9.0, 0.0, 9.0)) && h42 == float4x2(float2(1.0, 0.0), float2(0.0, 4.0), float2(0.0, 6.0), float2(0.0, 8.0))) && f43 == float4x3(float3(12.0, 22.0, 30.0), float3(36.0, 40.0, 42.0), float3(42.0, 40.0, 36.0), float3(30.0, 22.0, 12.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
diff --git a/tests/sksl/shared/Matrices.asm.frag b/tests/sksl/shared/Matrices.asm.frag
index 5b9efd4..b6aabc7 100644
--- a/tests/sksl/shared/Matrices.asm.frag
+++ b/tests/sksl/shared/Matrices.asm.frag
@@ -8,7 +8,6 @@
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
-OpMemberName %_UniformBuffer 2 "testMatrix2x2"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %test_half_b "test_half_b"
 OpName %ok "ok"
@@ -20,7 +19,6 @@
 OpName %m9 "m9"
 OpName %m10 "m10"
 OpName %m11 "m11"
-OpName %h4 "h4"
 OpName %test_comma_b "test_comma_b"
 OpName %x "x"
 OpName %y "y"
@@ -34,7 +32,6 @@
 OpName %_6_m9 "_6_m9"
 OpName %_7_m10 "_7_m10"
 OpName %_8_m11 "_8_m11"
-OpName %_9_f4 "_9_f4"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -43,53 +40,54 @@
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
-OpMemberDecorate %_UniformBuffer 2 Offset 32
-OpMemberDecorate %_UniformBuffer 2 ColMajor
-OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
 OpDecorate %_UniformBuffer Block
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
 OpDecorate %m1 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
 OpDecorate %39 RelaxedPrecision
-OpDecorate %42 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
 OpDecorate %47 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
 OpDecorate %m3 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
-OpDecorate %63 RelaxedPrecision
+OpDecorate %60 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
+OpDecorate %64 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
 OpDecorate %66 RelaxedPrecision
 OpDecorate %67 RelaxedPrecision
-OpDecorate %68 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
 OpDecorate %m4 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
 OpDecorate %82 RelaxedPrecision
 OpDecorate %83 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
-OpDecorate %85 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
 OpDecorate %102 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
 OpDecorate %m5 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
 OpDecorate %132 RelaxedPrecision
-OpDecorate %133 RelaxedPrecision
+OpDecorate %135 RelaxedPrecision
 OpDecorate %136 RelaxedPrecision
 OpDecorate %137 RelaxedPrecision
 OpDecorate %138 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
+OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
 OpDecorate %151 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
@@ -99,45 +97,45 @@
 OpDecorate %156 RelaxedPrecision
 OpDecorate %157 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %162 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
 OpDecorate %166 RelaxedPrecision
-OpDecorate %167 RelaxedPrecision
 OpDecorate %m7 RelaxedPrecision
+OpDecorate %179 RelaxedPrecision
 OpDecorate %180 RelaxedPrecision
 OpDecorate %181 RelaxedPrecision
 OpDecorate %182 RelaxedPrecision
-OpDecorate %183 RelaxedPrecision
+OpDecorate %185 RelaxedPrecision
 OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
 OpDecorate %188 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
 OpDecorate %m9 RelaxedPrecision
+OpDecorate %204 RelaxedPrecision
 OpDecorate %205 RelaxedPrecision
 OpDecorate %206 RelaxedPrecision
 OpDecorate %207 RelaxedPrecision
 OpDecorate %208 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
+OpDecorate %211 RelaxedPrecision
 OpDecorate %212 RelaxedPrecision
 OpDecorate %213 RelaxedPrecision
 OpDecorate %214 RelaxedPrecision
 OpDecorate %215 RelaxedPrecision
-OpDecorate %216 RelaxedPrecision
 OpDecorate %m10 RelaxedPrecision
+OpDecorate %236 RelaxedPrecision
 OpDecorate %237 RelaxedPrecision
 OpDecorate %238 RelaxedPrecision
 OpDecorate %239 RelaxedPrecision
 OpDecorate %240 RelaxedPrecision
 OpDecorate %241 RelaxedPrecision
-OpDecorate %242 RelaxedPrecision
+OpDecorate %244 RelaxedPrecision
 OpDecorate %245 RelaxedPrecision
 OpDecorate %246 RelaxedPrecision
 OpDecorate %247 RelaxedPrecision
 OpDecorate %248 RelaxedPrecision
 OpDecorate %249 RelaxedPrecision
-OpDecorate %250 RelaxedPrecision
 OpDecorate %m11 RelaxedPrecision
+OpDecorate %273 RelaxedPrecision
 OpDecorate %274 RelaxedPrecision
 OpDecorate %275 RelaxedPrecision
 OpDecorate %276 RelaxedPrecision
@@ -158,100 +156,27 @@
 OpDecorate %291 RelaxedPrecision
 OpDecorate %292 RelaxedPrecision
 OpDecorate %293 RelaxedPrecision
-OpDecorate %294 RelaxedPrecision
+OpDecorate %296 RelaxedPrecision
 OpDecorate %297 RelaxedPrecision
 OpDecorate %298 RelaxedPrecision
 OpDecorate %299 RelaxedPrecision
 OpDecorate %300 RelaxedPrecision
 OpDecorate %301 RelaxedPrecision
-OpDecorate %302 RelaxedPrecision
-OpDecorate %h4 RelaxedPrecision
-OpDecorate %332 RelaxedPrecision
-OpDecorate %335 RelaxedPrecision
-OpDecorate %336 RelaxedPrecision
-OpDecorate %337 RelaxedPrecision
-OpDecorate %338 RelaxedPrecision
-OpDecorate %339 RelaxedPrecision
-OpDecorate %340 RelaxedPrecision
-OpDecorate %341 RelaxedPrecision
-OpDecorate %342 RelaxedPrecision
-OpDecorate %343 RelaxedPrecision
-OpDecorate %354 RelaxedPrecision
-OpDecorate %357 RelaxedPrecision
-OpDecorate %358 RelaxedPrecision
-OpDecorate %359 RelaxedPrecision
-OpDecorate %360 RelaxedPrecision
-OpDecorate %361 RelaxedPrecision
-OpDecorate %362 RelaxedPrecision
-OpDecorate %363 RelaxedPrecision
-OpDecorate %364 RelaxedPrecision
-OpDecorate %365 RelaxedPrecision
-OpDecorate %366 RelaxedPrecision
-OpDecorate %367 RelaxedPrecision
-OpDecorate %368 RelaxedPrecision
-OpDecorate %369 RelaxedPrecision
-OpDecorate %370 RelaxedPrecision
-OpDecorate %371 RelaxedPrecision
+OpDecorate %322 RelaxedPrecision
+OpDecorate %353 RelaxedPrecision
 OpDecorate %372 RelaxedPrecision
-OpDecorate %373 RelaxedPrecision
-OpDecorate %374 RelaxedPrecision
-OpDecorate %375 RelaxedPrecision
-OpDecorate %376 RelaxedPrecision
-OpDecorate %377 RelaxedPrecision
-OpDecorate %378 RelaxedPrecision
-OpDecorate %379 RelaxedPrecision
-OpDecorate %380 RelaxedPrecision
-OpDecorate %381 RelaxedPrecision
-OpDecorate %382 RelaxedPrecision
-OpDecorate %398 RelaxedPrecision
-OpDecorate %401 RelaxedPrecision
-OpDecorate %402 RelaxedPrecision
-OpDecorate %403 RelaxedPrecision
-OpDecorate %404 RelaxedPrecision
-OpDecorate %405 RelaxedPrecision
-OpDecorate %406 RelaxedPrecision
-OpDecorate %407 RelaxedPrecision
-OpDecorate %408 RelaxedPrecision
-OpDecorate %409 RelaxedPrecision
-OpDecorate %410 RelaxedPrecision
-OpDecorate %411 RelaxedPrecision
-OpDecorate %412 RelaxedPrecision
+OpDecorate %393 RelaxedPrecision
 OpDecorate %413 RelaxedPrecision
-OpDecorate %414 RelaxedPrecision
-OpDecorate %415 RelaxedPrecision
-OpDecorate %416 RelaxedPrecision
-OpDecorate %417 RelaxedPrecision
-OpDecorate %418 RelaxedPrecision
-OpDecorate %419 RelaxedPrecision
-OpDecorate %420 RelaxedPrecision
-OpDecorate %421 RelaxedPrecision
-OpDecorate %422 RelaxedPrecision
-OpDecorate %423 RelaxedPrecision
-OpDecorate %424 RelaxedPrecision
-OpDecorate %425 RelaxedPrecision
-OpDecorate %426 RelaxedPrecision
-OpDecorate %427 RelaxedPrecision
-OpDecorate %428 RelaxedPrecision
-OpDecorate %429 RelaxedPrecision
-OpDecorate %430 RelaxedPrecision
-OpDecorate %451 RelaxedPrecision
-OpDecorate %481 RelaxedPrecision
-OpDecorate %500 RelaxedPrecision
-OpDecorate %521 RelaxedPrecision
-OpDecorate %541 RelaxedPrecision
-OpDecorate %565 RelaxedPrecision
-OpDecorate %591 RelaxedPrecision
-OpDecorate %612 RelaxedPrecision
+OpDecorate %437 RelaxedPrecision
+OpDecorate %463 RelaxedPrecision
+OpDecorate %484 RelaxedPrecision
+OpDecorate %506 RelaxedPrecision
+OpDecorate %535 RelaxedPrecision
+OpDecorate %585 RelaxedPrecision
+OpDecorate %614 RelaxedPrecision
+OpDecorate %631 RelaxedPrecision
+OpDecorate %633 RelaxedPrecision
 OpDecorate %634 RelaxedPrecision
-OpDecorate %663 RelaxedPrecision
-OpDecorate %713 RelaxedPrecision
-OpDecorate %750 RelaxedPrecision
-OpDecorate %772 RelaxedPrecision
-OpDecorate %816 RelaxedPrecision
-OpDecorate %869 RelaxedPrecision
-OpDecorate %885 RelaxedPrecision
-OpDecorate %887 RelaxedPrecision
-OpDecorate %888 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -259,33 +184,31 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%v2float = OpTypeVector %float 2
-%mat2v2float = OpTypeMatrix %v2float 2
-%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
+%_UniformBuffer = OpTypeStruct %v4float %v4float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%19 = OpTypeFunction %void
+%17 = OpTypeFunction %void
+%v2float = OpTypeVector %float 2
 %float_0 = OpConstant %float 0
-%22 = OpConstantComposite %v2float %float_0 %float_0
+%21 = OpConstantComposite %v2float %float_0 %float_0
 %_ptr_Function_v2float = OpTypePointer Function %v2float
-%26 = OpTypeFunction %bool
+%25 = OpTypeFunction %bool
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
+%mat2v2float = OpTypeMatrix %v2float 2
 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
-%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
-%int = OpTypeInt 32 1
-%int_2 = OpConstant %int 2
-%false = OpConstantFalse %bool
 %float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
+%false = OpConstantFalse %bool
 %v2bool = OpTypeVector %bool 2
 %float_6 = OpConstant %float 6
 %float_12 = OpConstant %float 12
 %float_18 = OpConstant %float 18
 %float_24 = OpConstant %float 24
+%int = OpTypeInt 32 1
 %int_1 = OpConstant %int 1
 %float_5 = OpConstant %float 5
 %float_8 = OpConstant %float 8
@@ -300,21 +223,21 @@
 %float_11 = OpConstant %float 11
 %v4bool = OpTypeVector %bool 4
 %float_20 = OpConstant %float 20
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %float_0_5 = OpConstant %float 0.5
-%474 = OpTypeFunction %v4float %_ptr_Function_v2float
+%345 = OpTypeFunction %v4float %_ptr_Function_v2float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
-%_entrypoint_v = OpFunction %void None %19
-%20 = OpLabel
-%23 = OpVariable %_ptr_Function_v2float Function
-OpStore %23 %22
-%25 = OpFunctionCall %v4float %main %23
-OpStore %sk_FragColor %25
+%_entrypoint_v = OpFunction %void None %17
+%18 = OpLabel
+%22 = OpVariable %_ptr_Function_v2float Function
+OpStore %22 %21
+%24 = OpFunctionCall %v4float %main %22
+OpStore %sk_FragColor %24
 OpReturn
 OpFunctionEnd
-%test_half_b = OpFunction %bool None %26
-%27 = OpLabel
+%test_half_b = OpFunction %bool None %25
+%26 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
 %m1 = OpVariable %_ptr_Function_mat2v2float Function
 %m3 = OpVariable %_ptr_Function_mat2v2float Function
@@ -324,486 +247,347 @@
 %m9 = OpVariable %_ptr_Function_mat3v3float Function
 %m10 = OpVariable %_ptr_Function_mat4v4float Function
 %m11 = OpVariable %_ptr_Function_mat4v4float Function
-%h4 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
-%33 = OpAccessChain %_ptr_Uniform_mat2v2float %12 %int_2
-%37 = OpLoad %mat2v2float %33
-OpStore %m1 %37
-%39 = OpLoad %bool %ok
-OpSelectionMerge %41 None
-OpBranchConditional %39 %40 %41
-%40 = OpLabel
-%42 = OpLoad %mat2v2float %m1
-%47 = OpCompositeConstruct %v2float %float_1 %float_2
-%48 = OpCompositeConstruct %v2float %float_3 %float_4
-%49 = OpCompositeConstruct %mat2v2float %47 %48
-%51 = OpCompositeExtract %v2float %42 0
-%52 = OpCompositeExtract %v2float %49 0
-%53 = OpFOrdEqual %v2bool %51 %52
-%54 = OpAll %bool %53
-%55 = OpCompositeExtract %v2float %42 1
-%56 = OpCompositeExtract %v2float %49 1
-%57 = OpFOrdEqual %v2bool %55 %56
-%58 = OpAll %bool %57
-%59 = OpLogicalAnd %bool %54 %58
-OpBranch %41
-%41 = OpLabel
-%60 = OpPhi %bool %false %27 %59 %40
-OpStore %ok %60
-%62 = OpLoad %mat2v2float %m1
-OpStore %m3 %62
-%63 = OpLoad %bool %ok
-OpSelectionMerge %65 None
-OpBranchConditional %63 %64 %65
-%64 = OpLabel
-%66 = OpLoad %mat2v2float %m3
-%67 = OpCompositeConstruct %v2float %float_1 %float_2
-%68 = OpCompositeConstruct %v2float %float_3 %float_4
-%69 = OpCompositeConstruct %mat2v2float %67 %68
-%70 = OpCompositeExtract %v2float %66 0
-%71 = OpCompositeExtract %v2float %69 0
-%72 = OpFOrdEqual %v2bool %70 %71
-%73 = OpAll %bool %72
-%74 = OpCompositeExtract %v2float %66 1
-%75 = OpCompositeExtract %v2float %69 1
-%76 = OpFOrdEqual %v2bool %74 %75
-%77 = OpAll %bool %76
-%78 = OpLogicalAnd %bool %73 %77
-OpBranch %65
-%65 = OpLabel
-%79 = OpPhi %bool %false %41 %78 %64
-OpStore %ok %79
-%83 = OpCompositeConstruct %v2float %float_6 %float_0
-%84 = OpCompositeConstruct %v2float %float_0 %float_6
-%82 = OpCompositeConstruct %mat2v2float %83 %84
-OpStore %m4 %82
-%85 = OpLoad %bool %ok
-OpSelectionMerge %87 None
-OpBranchConditional %85 %86 %87
-%86 = OpLabel
-%88 = OpLoad %mat2v2float %m4
-%89 = OpCompositeConstruct %v2float %float_6 %float_0
-%90 = OpCompositeConstruct %v2float %float_0 %float_6
-%91 = OpCompositeConstruct %mat2v2float %89 %90
-%92 = OpCompositeExtract %v2float %88 0
-%93 = OpCompositeExtract %v2float %91 0
-%94 = OpFOrdEqual %v2bool %92 %93
-%95 = OpAll %bool %94
-%96 = OpCompositeExtract %v2float %88 1
-%97 = OpCompositeExtract %v2float %91 1
-%98 = OpFOrdEqual %v2bool %96 %97
-%99 = OpAll %bool %98
-%100 = OpLogicalAnd %bool %95 %99
-OpBranch %87
-%87 = OpLabel
-%101 = OpPhi %bool %false %65 %100 %86
-OpStore %ok %101
-%102 = OpLoad %mat2v2float %m3
-%103 = OpLoad %mat2v2float %m4
-%104 = OpMatrixTimesMatrix %mat2v2float %102 %103
-OpStore %m3 %104
-%105 = OpLoad %bool %ok
-OpSelectionMerge %107 None
-OpBranchConditional %105 %106 %107
-%106 = OpLabel
-%108 = OpLoad %mat2v2float %m3
-%112 = OpCompositeConstruct %v2float %float_6 %float_12
-%113 = OpCompositeConstruct %v2float %float_18 %float_24
-%114 = OpCompositeConstruct %mat2v2float %112 %113
-%115 = OpCompositeExtract %v2float %108 0
-%116 = OpCompositeExtract %v2float %114 0
-%117 = OpFOrdEqual %v2bool %115 %116
-%118 = OpAll %bool %117
-%119 = OpCompositeExtract %v2float %108 1
-%120 = OpCompositeExtract %v2float %114 1
-%121 = OpFOrdEqual %v2bool %119 %120
-%122 = OpAll %bool %121
-%123 = OpLogicalAnd %bool %118 %122
-OpBranch %107
-%107 = OpLabel
-%124 = OpPhi %bool %false %87 %123 %106
-OpStore %ok %124
-%127 = OpAccessChain %_ptr_Function_v2float %m1 %int_1
-%128 = OpLoad %v2float %127
-%129 = OpCompositeExtract %float %128 1
-%131 = OpCompositeConstruct %v2float %129 %float_0
-%132 = OpCompositeConstruct %v2float %float_0 %129
-%130 = OpCompositeConstruct %mat2v2float %131 %132
-OpStore %m5 %130
-%133 = OpLoad %bool %ok
-OpSelectionMerge %135 None
-OpBranchConditional %133 %134 %135
+%37 = OpCompositeConstruct %v2float %float_1 %float_2
+%38 = OpCompositeConstruct %v2float %float_3 %float_4
+%39 = OpCompositeConstruct %mat2v2float %37 %38
+OpStore %m1 %39
+%41 = OpLoad %bool %ok
+OpSelectionMerge %43 None
+OpBranchConditional %41 %42 %43
+%42 = OpLabel
+%44 = OpLoad %mat2v2float %m1
+%45 = OpCompositeConstruct %v2float %float_1 %float_2
+%46 = OpCompositeConstruct %v2float %float_3 %float_4
+%47 = OpCompositeConstruct %mat2v2float %45 %46
+%49 = OpCompositeExtract %v2float %44 0
+%50 = OpCompositeExtract %v2float %47 0
+%51 = OpFOrdEqual %v2bool %49 %50
+%52 = OpAll %bool %51
+%53 = OpCompositeExtract %v2float %44 1
+%54 = OpCompositeExtract %v2float %47 1
+%55 = OpFOrdEqual %v2bool %53 %54
+%56 = OpAll %bool %55
+%57 = OpLogicalAnd %bool %52 %56
+OpBranch %43
+%43 = OpLabel
+%58 = OpPhi %bool %false %26 %57 %42
+OpStore %ok %58
+%60 = OpLoad %mat2v2float %m1
+OpStore %m3 %60
+%61 = OpLoad %bool %ok
+OpSelectionMerge %63 None
+OpBranchConditional %61 %62 %63
+%62 = OpLabel
+%64 = OpLoad %mat2v2float %m3
+%65 = OpCompositeConstruct %v2float %float_1 %float_2
+%66 = OpCompositeConstruct %v2float %float_3 %float_4
+%67 = OpCompositeConstruct %mat2v2float %65 %66
+%68 = OpCompositeExtract %v2float %64 0
+%69 = OpCompositeExtract %v2float %67 0
+%70 = OpFOrdEqual %v2bool %68 %69
+%71 = OpAll %bool %70
+%72 = OpCompositeExtract %v2float %64 1
+%73 = OpCompositeExtract %v2float %67 1
+%74 = OpFOrdEqual %v2bool %72 %73
+%75 = OpAll %bool %74
+%76 = OpLogicalAnd %bool %71 %75
+OpBranch %63
+%63 = OpLabel
+%77 = OpPhi %bool %false %43 %76 %62
+OpStore %ok %77
+%81 = OpCompositeConstruct %v2float %float_6 %float_0
+%82 = OpCompositeConstruct %v2float %float_0 %float_6
+%80 = OpCompositeConstruct %mat2v2float %81 %82
+OpStore %m4 %80
+%83 = OpLoad %bool %ok
+OpSelectionMerge %85 None
+OpBranchConditional %83 %84 %85
+%84 = OpLabel
+%86 = OpLoad %mat2v2float %m4
+%87 = OpCompositeConstruct %v2float %float_6 %float_0
+%88 = OpCompositeConstruct %v2float %float_0 %float_6
+%89 = OpCompositeConstruct %mat2v2float %87 %88
+%90 = OpCompositeExtract %v2float %86 0
+%91 = OpCompositeExtract %v2float %89 0
+%92 = OpFOrdEqual %v2bool %90 %91
+%93 = OpAll %bool %92
+%94 = OpCompositeExtract %v2float %86 1
+%95 = OpCompositeExtract %v2float %89 1
+%96 = OpFOrdEqual %v2bool %94 %95
+%97 = OpAll %bool %96
+%98 = OpLogicalAnd %bool %93 %97
+OpBranch %85
+%85 = OpLabel
+%99 = OpPhi %bool %false %63 %98 %84
+OpStore %ok %99
+%100 = OpLoad %mat2v2float %m3
+%101 = OpLoad %mat2v2float %m4
+%102 = OpMatrixTimesMatrix %mat2v2float %100 %101
+OpStore %m3 %102
+%103 = OpLoad %bool %ok
+OpSelectionMerge %105 None
+OpBranchConditional %103 %104 %105
+%104 = OpLabel
+%106 = OpLoad %mat2v2float %m3
+%110 = OpCompositeConstruct %v2float %float_6 %float_12
+%111 = OpCompositeConstruct %v2float %float_18 %float_24
+%112 = OpCompositeConstruct %mat2v2float %110 %111
+%113 = OpCompositeExtract %v2float %106 0
+%114 = OpCompositeExtract %v2float %112 0
+%115 = OpFOrdEqual %v2bool %113 %114
+%116 = OpAll %bool %115
+%117 = OpCompositeExtract %v2float %106 1
+%118 = OpCompositeExtract %v2float %112 1
+%119 = OpFOrdEqual %v2bool %117 %118
+%120 = OpAll %bool %119
+%121 = OpLogicalAnd %bool %116 %120
+OpBranch %105
+%105 = OpLabel
+%122 = OpPhi %bool %false %85 %121 %104
+OpStore %ok %122
+%126 = OpAccessChain %_ptr_Function_v2float %m1 %int_1
+%127 = OpLoad %v2float %126
+%128 = OpCompositeExtract %float %127 1
+%130 = OpCompositeConstruct %v2float %128 %float_0
+%131 = OpCompositeConstruct %v2float %float_0 %128
+%129 = OpCompositeConstruct %mat2v2float %130 %131
+OpStore %m5 %129
+%132 = OpLoad %bool %ok
+OpSelectionMerge %134 None
+OpBranchConditional %132 %133 %134
+%133 = OpLabel
+%135 = OpLoad %mat2v2float %m5
+%136 = OpCompositeConstruct %v2float %float_4 %float_0
+%137 = OpCompositeConstruct %v2float %float_0 %float_4
+%138 = OpCompositeConstruct %mat2v2float %136 %137
+%139 = OpCompositeExtract %v2float %135 0
+%140 = OpCompositeExtract %v2float %138 0
+%141 = OpFOrdEqual %v2bool %139 %140
+%142 = OpAll %bool %141
+%143 = OpCompositeExtract %v2float %135 1
+%144 = OpCompositeExtract %v2float %138 1
+%145 = OpFOrdEqual %v2bool %143 %144
+%146 = OpAll %bool %145
+%147 = OpLogicalAnd %bool %142 %146
+OpBranch %134
 %134 = OpLabel
-%136 = OpLoad %mat2v2float %m5
-%137 = OpCompositeConstruct %v2float %float_4 %float_0
-%138 = OpCompositeConstruct %v2float %float_0 %float_4
-%139 = OpCompositeConstruct %mat2v2float %137 %138
-%140 = OpCompositeExtract %v2float %136 0
-%141 = OpCompositeExtract %v2float %139 0
-%142 = OpFOrdEqual %v2bool %140 %141
-%143 = OpAll %bool %142
-%144 = OpCompositeExtract %v2float %136 1
-%145 = OpCompositeExtract %v2float %139 1
-%146 = OpFOrdEqual %v2bool %144 %145
-%147 = OpAll %bool %146
-%148 = OpLogicalAnd %bool %143 %147
-OpBranch %135
-%135 = OpLabel
-%149 = OpPhi %bool %false %107 %148 %134
-OpStore %ok %149
-%150 = OpLoad %mat2v2float %m1
-%151 = OpLoad %mat2v2float %m5
+%148 = OpPhi %bool %false %105 %147 %133
+OpStore %ok %148
+%149 = OpLoad %mat2v2float %m1
+%150 = OpLoad %mat2v2float %m5
+%151 = OpCompositeExtract %v2float %149 0
 %152 = OpCompositeExtract %v2float %150 0
-%153 = OpCompositeExtract %v2float %151 0
-%154 = OpFAdd %v2float %152 %153
+%153 = OpFAdd %v2float %151 %152
+%154 = OpCompositeExtract %v2float %149 1
 %155 = OpCompositeExtract %v2float %150 1
-%156 = OpCompositeExtract %v2float %151 1
-%157 = OpFAdd %v2float %155 %156
-%158 = OpCompositeConstruct %mat2v2float %154 %157
-OpStore %m1 %158
-%159 = OpLoad %bool %ok
-OpSelectionMerge %161 None
-OpBranchConditional %159 %160 %161
+%156 = OpFAdd %v2float %154 %155
+%157 = OpCompositeConstruct %mat2v2float %153 %156
+OpStore %m1 %157
+%158 = OpLoad %bool %ok
+OpSelectionMerge %160 None
+OpBranchConditional %158 %159 %160
+%159 = OpLabel
+%161 = OpLoad %mat2v2float %m1
+%164 = OpCompositeConstruct %v2float %float_5 %float_2
+%165 = OpCompositeConstruct %v2float %float_3 %float_8
+%166 = OpCompositeConstruct %mat2v2float %164 %165
+%167 = OpCompositeExtract %v2float %161 0
+%168 = OpCompositeExtract %v2float %166 0
+%169 = OpFOrdEqual %v2bool %167 %168
+%170 = OpAll %bool %169
+%171 = OpCompositeExtract %v2float %161 1
+%172 = OpCompositeExtract %v2float %166 1
+%173 = OpFOrdEqual %v2bool %171 %172
+%174 = OpAll %bool %173
+%175 = OpLogicalAnd %bool %170 %174
+OpBranch %160
 %160 = OpLabel
-%162 = OpLoad %mat2v2float %m1
-%165 = OpCompositeConstruct %v2float %float_5 %float_2
-%166 = OpCompositeConstruct %v2float %float_3 %float_8
-%167 = OpCompositeConstruct %mat2v2float %165 %166
-%168 = OpCompositeExtract %v2float %162 0
-%169 = OpCompositeExtract %v2float %167 0
-%170 = OpFOrdEqual %v2bool %168 %169
-%171 = OpAll %bool %170
-%172 = OpCompositeExtract %v2float %162 1
-%173 = OpCompositeExtract %v2float %167 1
-%174 = OpFOrdEqual %v2bool %172 %173
-%175 = OpAll %bool %174
-%176 = OpLogicalAnd %bool %171 %175
-OpBranch %161
-%161 = OpLabel
-%177 = OpPhi %bool %false %135 %176 %160
-OpStore %ok %177
-%180 = OpCompositeConstruct %v2float %float_5 %float_6
-%181 = OpCompositeConstruct %v2float %float_7 %float_8
-%182 = OpCompositeConstruct %mat2v2float %180 %181
-OpStore %m7 %182
-%183 = OpLoad %bool %ok
-OpSelectionMerge %185 None
-OpBranchConditional %183 %184 %185
+%176 = OpPhi %bool %false %134 %175 %159
+OpStore %ok %176
+%179 = OpCompositeConstruct %v2float %float_5 %float_6
+%180 = OpCompositeConstruct %v2float %float_7 %float_8
+%181 = OpCompositeConstruct %mat2v2float %179 %180
+OpStore %m7 %181
+%182 = OpLoad %bool %ok
+OpSelectionMerge %184 None
+OpBranchConditional %182 %183 %184
+%183 = OpLabel
+%185 = OpLoad %mat2v2float %m7
+%186 = OpCompositeConstruct %v2float %float_5 %float_6
+%187 = OpCompositeConstruct %v2float %float_7 %float_8
+%188 = OpCompositeConstruct %mat2v2float %186 %187
+%189 = OpCompositeExtract %v2float %185 0
+%190 = OpCompositeExtract %v2float %188 0
+%191 = OpFOrdEqual %v2bool %189 %190
+%192 = OpAll %bool %191
+%193 = OpCompositeExtract %v2float %185 1
+%194 = OpCompositeExtract %v2float %188 1
+%195 = OpFOrdEqual %v2bool %193 %194
+%196 = OpAll %bool %195
+%197 = OpLogicalAnd %bool %192 %196
+OpBranch %184
 %184 = OpLabel
-%186 = OpLoad %mat2v2float %m7
-%187 = OpCompositeConstruct %v2float %float_5 %float_6
-%188 = OpCompositeConstruct %v2float %float_7 %float_8
-%189 = OpCompositeConstruct %mat2v2float %187 %188
-%190 = OpCompositeExtract %v2float %186 0
-%191 = OpCompositeExtract %v2float %189 0
-%192 = OpFOrdEqual %v2bool %190 %191
-%193 = OpAll %bool %192
-%194 = OpCompositeExtract %v2float %186 1
-%195 = OpCompositeExtract %v2float %189 1
-%196 = OpFOrdEqual %v2bool %194 %195
-%197 = OpAll %bool %196
-%198 = OpLogicalAnd %bool %193 %197
-OpBranch %185
-%185 = OpLabel
-%199 = OpPhi %bool %false %161 %198 %184
-OpStore %ok %199
-%206 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
-%207 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
-%208 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
-%205 = OpCompositeConstruct %mat3v3float %206 %207 %208
-OpStore %m9 %205
-%209 = OpLoad %bool %ok
-OpSelectionMerge %211 None
-OpBranchConditional %209 %210 %211
+%198 = OpPhi %bool %false %160 %197 %183
+OpStore %ok %198
+%205 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
+%206 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
+%207 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
+%204 = OpCompositeConstruct %mat3v3float %205 %206 %207
+OpStore %m9 %204
+%208 = OpLoad %bool %ok
+OpSelectionMerge %210 None
+OpBranchConditional %208 %209 %210
+%209 = OpLabel
+%211 = OpLoad %mat3v3float %m9
+%212 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
+%213 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
+%214 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
+%215 = OpCompositeConstruct %mat3v3float %212 %213 %214
+%217 = OpCompositeExtract %v3float %211 0
+%218 = OpCompositeExtract %v3float %215 0
+%219 = OpFOrdEqual %v3bool %217 %218
+%220 = OpAll %bool %219
+%221 = OpCompositeExtract %v3float %211 1
+%222 = OpCompositeExtract %v3float %215 1
+%223 = OpFOrdEqual %v3bool %221 %222
+%224 = OpAll %bool %223
+%225 = OpLogicalAnd %bool %220 %224
+%226 = OpCompositeExtract %v3float %211 2
+%227 = OpCompositeExtract %v3float %215 2
+%228 = OpFOrdEqual %v3bool %226 %227
+%229 = OpAll %bool %228
+%230 = OpLogicalAnd %bool %225 %229
+OpBranch %210
 %210 = OpLabel
-%212 = OpLoad %mat3v3float %m9
-%213 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
-%214 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
-%215 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
-%216 = OpCompositeConstruct %mat3v3float %213 %214 %215
-%218 = OpCompositeExtract %v3float %212 0
-%219 = OpCompositeExtract %v3float %216 0
-%220 = OpFOrdEqual %v3bool %218 %219
-%221 = OpAll %bool %220
-%222 = OpCompositeExtract %v3float %212 1
-%223 = OpCompositeExtract %v3float %216 1
-%224 = OpFOrdEqual %v3bool %222 %223
-%225 = OpAll %bool %224
-%226 = OpLogicalAnd %bool %221 %225
-%227 = OpCompositeExtract %v3float %212 2
-%228 = OpCompositeExtract %v3float %216 2
-%229 = OpFOrdEqual %v3bool %227 %228
-%230 = OpAll %bool %229
-%231 = OpLogicalAnd %bool %226 %230
-OpBranch %211
-%211 = OpLabel
-%232 = OpPhi %bool %false %185 %231 %210
-OpStore %ok %232
-%238 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
-%239 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
-%240 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
-%241 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
-%237 = OpCompositeConstruct %mat4v4float %238 %239 %240 %241
-OpStore %m10 %237
-%242 = OpLoad %bool %ok
-OpSelectionMerge %244 None
-OpBranchConditional %242 %243 %244
+%231 = OpPhi %bool %false %184 %230 %209
+OpStore %ok %231
+%237 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
+%238 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
+%239 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
+%240 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
+%236 = OpCompositeConstruct %mat4v4float %237 %238 %239 %240
+OpStore %m10 %236
+%241 = OpLoad %bool %ok
+OpSelectionMerge %243 None
+OpBranchConditional %241 %242 %243
+%242 = OpLabel
+%244 = OpLoad %mat4v4float %m10
+%245 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
+%246 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
+%247 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
+%248 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
+%249 = OpCompositeConstruct %mat4v4float %245 %246 %247 %248
+%251 = OpCompositeExtract %v4float %244 0
+%252 = OpCompositeExtract %v4float %249 0
+%253 = OpFOrdEqual %v4bool %251 %252
+%254 = OpAll %bool %253
+%255 = OpCompositeExtract %v4float %244 1
+%256 = OpCompositeExtract %v4float %249 1
+%257 = OpFOrdEqual %v4bool %255 %256
+%258 = OpAll %bool %257
+%259 = OpLogicalAnd %bool %254 %258
+%260 = OpCompositeExtract %v4float %244 2
+%261 = OpCompositeExtract %v4float %249 2
+%262 = OpFOrdEqual %v4bool %260 %261
+%263 = OpAll %bool %262
+%264 = OpLogicalAnd %bool %259 %263
+%265 = OpCompositeExtract %v4float %244 3
+%266 = OpCompositeExtract %v4float %249 3
+%267 = OpFOrdEqual %v4bool %265 %266
+%268 = OpAll %bool %267
+%269 = OpLogicalAnd %bool %264 %268
+OpBranch %243
 %243 = OpLabel
-%245 = OpLoad %mat4v4float %m10
-%246 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
-%247 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
-%248 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
-%249 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
-%250 = OpCompositeConstruct %mat4v4float %246 %247 %248 %249
-%252 = OpCompositeExtract %v4float %245 0
-%253 = OpCompositeExtract %v4float %250 0
-%254 = OpFOrdEqual %v4bool %252 %253
-%255 = OpAll %bool %254
-%256 = OpCompositeExtract %v4float %245 1
-%257 = OpCompositeExtract %v4float %250 1
-%258 = OpFOrdEqual %v4bool %256 %257
-%259 = OpAll %bool %258
-%260 = OpLogicalAnd %bool %255 %259
-%261 = OpCompositeExtract %v4float %245 2
-%262 = OpCompositeExtract %v4float %250 2
-%263 = OpFOrdEqual %v4bool %261 %262
-%264 = OpAll %bool %263
-%265 = OpLogicalAnd %bool %260 %264
-%266 = OpCompositeExtract %v4float %245 3
-%267 = OpCompositeExtract %v4float %250 3
-%268 = OpFOrdEqual %v4bool %266 %267
-%269 = OpAll %bool %268
-%270 = OpLogicalAnd %bool %265 %269
-OpBranch %244
-%244 = OpLabel
-%271 = OpPhi %bool %false %211 %270 %243
-OpStore %ok %271
+%270 = OpPhi %bool %false %210 %269 %242
+OpStore %ok %270
+%273 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
 %274 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
 %275 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
 %276 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%277 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%278 = OpCompositeConstruct %mat4v4float %274 %275 %276 %277
-OpStore %m11 %278
-%279 = OpLoad %mat4v4float %m11
-%280 = OpLoad %mat4v4float %m10
+%277 = OpCompositeConstruct %mat4v4float %273 %274 %275 %276
+OpStore %m11 %277
+%278 = OpLoad %mat4v4float %m11
+%279 = OpLoad %mat4v4float %m10
+%280 = OpCompositeExtract %v4float %278 0
 %281 = OpCompositeExtract %v4float %279 0
-%282 = OpCompositeExtract %v4float %280 0
-%283 = OpFSub %v4float %281 %282
+%282 = OpFSub %v4float %280 %281
+%283 = OpCompositeExtract %v4float %278 1
 %284 = OpCompositeExtract %v4float %279 1
-%285 = OpCompositeExtract %v4float %280 1
-%286 = OpFSub %v4float %284 %285
+%285 = OpFSub %v4float %283 %284
+%286 = OpCompositeExtract %v4float %278 2
 %287 = OpCompositeExtract %v4float %279 2
-%288 = OpCompositeExtract %v4float %280 2
-%289 = OpFSub %v4float %287 %288
+%288 = OpFSub %v4float %286 %287
+%289 = OpCompositeExtract %v4float %278 3
 %290 = OpCompositeExtract %v4float %279 3
-%291 = OpCompositeExtract %v4float %280 3
-%292 = OpFSub %v4float %290 %291
-%293 = OpCompositeConstruct %mat4v4float %283 %286 %289 %292
-OpStore %m11 %293
-%294 = OpLoad %bool %ok
-OpSelectionMerge %296 None
-OpBranchConditional %294 %295 %296
+%291 = OpFSub %v4float %289 %290
+%292 = OpCompositeConstruct %mat4v4float %282 %285 %288 %291
+OpStore %m11 %292
+%293 = OpLoad %bool %ok
+OpSelectionMerge %295 None
+OpBranchConditional %293 %294 %295
+%294 = OpLabel
+%296 = OpLoad %mat4v4float %m11
+%297 = OpCompositeConstruct %v4float %float_9 %float_20 %float_20 %float_20
+%298 = OpCompositeConstruct %v4float %float_20 %float_9 %float_20 %float_20
+%299 = OpCompositeConstruct %v4float %float_20 %float_20 %float_9 %float_20
+%300 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_9
+%301 = OpCompositeConstruct %mat4v4float %297 %298 %299 %300
+%302 = OpCompositeExtract %v4float %296 0
+%303 = OpCompositeExtract %v4float %301 0
+%304 = OpFOrdEqual %v4bool %302 %303
+%305 = OpAll %bool %304
+%306 = OpCompositeExtract %v4float %296 1
+%307 = OpCompositeExtract %v4float %301 1
+%308 = OpFOrdEqual %v4bool %306 %307
+%309 = OpAll %bool %308
+%310 = OpLogicalAnd %bool %305 %309
+%311 = OpCompositeExtract %v4float %296 2
+%312 = OpCompositeExtract %v4float %301 2
+%313 = OpFOrdEqual %v4bool %311 %312
+%314 = OpAll %bool %313
+%315 = OpLogicalAnd %bool %310 %314
+%316 = OpCompositeExtract %v4float %296 3
+%317 = OpCompositeExtract %v4float %301 3
+%318 = OpFOrdEqual %v4bool %316 %317
+%319 = OpAll %bool %318
+%320 = OpLogicalAnd %bool %315 %319
+OpBranch %295
 %295 = OpLabel
-%297 = OpLoad %mat4v4float %m11
-%298 = OpCompositeConstruct %v4float %float_9 %float_20 %float_20 %float_20
-%299 = OpCompositeConstruct %v4float %float_20 %float_9 %float_20 %float_20
-%300 = OpCompositeConstruct %v4float %float_20 %float_20 %float_9 %float_20
-%301 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_9
-%302 = OpCompositeConstruct %mat4v4float %298 %299 %300 %301
-%303 = OpCompositeExtract %v4float %297 0
-%304 = OpCompositeExtract %v4float %302 0
-%305 = OpFOrdEqual %v4bool %303 %304
-%306 = OpAll %bool %305
-%307 = OpCompositeExtract %v4float %297 1
-%308 = OpCompositeExtract %v4float %302 1
-%309 = OpFOrdEqual %v4bool %307 %308
-%310 = OpAll %bool %309
-%311 = OpLogicalAnd %bool %306 %310
-%312 = OpCompositeExtract %v4float %297 2
-%313 = OpCompositeExtract %v4float %302 2
-%314 = OpFOrdEqual %v4bool %312 %313
-%315 = OpAll %bool %314
-%316 = OpLogicalAnd %bool %311 %315
-%317 = OpCompositeExtract %v4float %297 3
-%318 = OpCompositeExtract %v4float %302 3
-%319 = OpFOrdEqual %v4bool %317 %318
-%320 = OpAll %bool %319
-%321 = OpLogicalAnd %bool %316 %320
-OpBranch %296
-%296 = OpLabel
-%322 = OpPhi %bool %false %244 %321 %295
-OpStore %ok %322
-%325 = OpAccessChain %_ptr_Uniform_mat2v2float %12 %int_2
-%326 = OpLoad %mat2v2float %325
-%327 = OpCompositeExtract %float %326 0 0
-%328 = OpCompositeExtract %float %326 0 1
-%329 = OpCompositeExtract %float %326 1 0
-%330 = OpCompositeExtract %float %326 1 1
-%331 = OpCompositeConstruct %v4float %327 %328 %329 %330
-OpStore %h4 %331
-%332 = OpLoad %bool %ok
-OpSelectionMerge %334 None
-OpBranchConditional %332 %333 %334
-%333 = OpLabel
-%335 = OpLoad %v4float %h4
-%336 = OpVectorShuffle %v2float %335 %335 0 1
-%337 = OpLoad %v4float %h4
-%338 = OpCompositeExtract %float %337 2
-%339 = OpCompositeConstruct %v2float %338 %float_4
-%340 = OpCompositeConstruct %mat2v2float %336 %339
-%341 = OpCompositeConstruct %v2float %float_1 %float_2
-%342 = OpCompositeConstruct %v2float %float_3 %float_4
-%343 = OpCompositeConstruct %mat2v2float %341 %342
-%344 = OpCompositeExtract %v2float %340 0
-%345 = OpCompositeExtract %v2float %343 0
-%346 = OpFOrdEqual %v2bool %344 %345
-%347 = OpAll %bool %346
-%348 = OpCompositeExtract %v2float %340 1
-%349 = OpCompositeExtract %v2float %343 1
-%350 = OpFOrdEqual %v2bool %348 %349
-%351 = OpAll %bool %350
-%352 = OpLogicalAnd %bool %347 %351
-OpBranch %334
-%334 = OpLabel
-%353 = OpPhi %bool %false %296 %352 %333
-OpStore %ok %353
-%354 = OpLoad %bool %ok
-OpSelectionMerge %356 None
-OpBranchConditional %354 %355 %356
-%355 = OpLabel
-%357 = OpLoad %v4float %h4
-%358 = OpVectorShuffle %v2float %357 %357 0 1
-%359 = OpLoad %v4float %h4
-%360 = OpCompositeExtract %float %359 2
-%361 = OpLoad %v4float %h4
-%362 = OpCompositeExtract %float %361 3
-%363 = OpLoad %v4float %h4
-%364 = OpVectorShuffle %v2float %363 %363 0 1
-%365 = OpLoad %v4float %h4
-%366 = OpVectorShuffle %v2float %365 %365 2 3
-%367 = OpLoad %v4float %h4
-%368 = OpCompositeExtract %float %367 0
-%369 = OpCompositeExtract %float %358 0
-%370 = OpCompositeExtract %float %358 1
-%371 = OpCompositeConstruct %v3float %369 %370 %360
-%372 = OpCompositeExtract %float %364 0
-%373 = OpCompositeExtract %float %364 1
-%374 = OpCompositeConstruct %v3float %362 %372 %373
-%375 = OpCompositeExtract %float %366 0
-%376 = OpCompositeExtract %float %366 1
-%377 = OpCompositeConstruct %v3float %375 %376 %368
-%378 = OpCompositeConstruct %mat3v3float %371 %374 %377
-%379 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%380 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%381 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
-%382 = OpCompositeConstruct %mat3v3float %379 %380 %381
-%383 = OpCompositeExtract %v3float %378 0
-%384 = OpCompositeExtract %v3float %382 0
-%385 = OpFOrdEqual %v3bool %383 %384
-%386 = OpAll %bool %385
-%387 = OpCompositeExtract %v3float %378 1
-%388 = OpCompositeExtract %v3float %382 1
-%389 = OpFOrdEqual %v3bool %387 %388
-%390 = OpAll %bool %389
-%391 = OpLogicalAnd %bool %386 %390
-%392 = OpCompositeExtract %v3float %378 2
-%393 = OpCompositeExtract %v3float %382 2
-%394 = OpFOrdEqual %v3bool %392 %393
-%395 = OpAll %bool %394
-%396 = OpLogicalAnd %bool %391 %395
-OpBranch %356
-%356 = OpLabel
-%397 = OpPhi %bool %false %334 %396 %355
-OpStore %ok %397
-%398 = OpLoad %bool %ok
-OpSelectionMerge %400 None
-OpBranchConditional %398 %399 %400
-%399 = OpLabel
-%401 = OpLoad %v4float %h4
-%402 = OpVectorShuffle %v2float %401 %401 0 1
-%403 = OpLoad %v4float %h4
-%404 = OpVectorShuffle %v2float %403 %403 2 3
-%405 = OpLoad %v4float %h4
-%406 = OpVectorShuffle %v3float %405 %405 0 1 2
-%407 = OpLoad %v4float %h4
-%408 = OpCompositeExtract %float %407 3
-%409 = OpLoad %v4float %h4
-%410 = OpLoad %v4float %h4
-%411 = OpVectorShuffle %v3float %410 %410 1 2 3
-%412 = OpCompositeExtract %float %402 0
-%413 = OpCompositeExtract %float %402 1
-%414 = OpCompositeExtract %float %404 0
-%415 = OpCompositeExtract %float %404 1
-%416 = OpCompositeConstruct %v4float %412 %413 %414 %415
-%417 = OpCompositeExtract %float %406 0
-%418 = OpCompositeExtract %float %406 1
-%419 = OpCompositeExtract %float %406 2
-%420 = OpCompositeConstruct %v4float %417 %418 %419 %408
-%421 = OpCompositeExtract %float %411 0
-%422 = OpCompositeExtract %float %411 1
-%423 = OpCompositeExtract %float %411 2
-%424 = OpCompositeConstruct %v4float %float_1 %421 %422 %423
-%425 = OpCompositeConstruct %mat4v4float %416 %420 %409 %424
-%426 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%427 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%428 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%429 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%430 = OpCompositeConstruct %mat4v4float %426 %427 %428 %429
-%431 = OpCompositeExtract %v4float %425 0
-%432 = OpCompositeExtract %v4float %430 0
-%433 = OpFOrdEqual %v4bool %431 %432
-%434 = OpAll %bool %433
-%435 = OpCompositeExtract %v4float %425 1
-%436 = OpCompositeExtract %v4float %430 1
-%437 = OpFOrdEqual %v4bool %435 %436
-%438 = OpAll %bool %437
-%439 = OpLogicalAnd %bool %434 %438
-%440 = OpCompositeExtract %v4float %425 2
-%441 = OpCompositeExtract %v4float %430 2
-%442 = OpFOrdEqual %v4bool %440 %441
-%443 = OpAll %bool %442
-%444 = OpLogicalAnd %bool %439 %443
-%445 = OpCompositeExtract %v4float %425 3
-%446 = OpCompositeExtract %v4float %430 3
-%447 = OpFOrdEqual %v4bool %445 %446
-%448 = OpAll %bool %447
-%449 = OpLogicalAnd %bool %444 %448
-OpBranch %400
-%400 = OpLabel
-%450 = OpPhi %bool %false %356 %449 %399
-OpStore %ok %450
-%451 = OpLoad %bool %ok
-OpReturnValue %451
+%321 = OpPhi %bool %false %243 %320 %294
+OpStore %ok %321
+%322 = OpLoad %bool %ok
+OpReturnValue %322
 OpFunctionEnd
-%test_comma_b = OpFunction %bool None %26
-%452 = OpLabel
+%test_comma_b = OpFunction %bool None %25
+%323 = OpLabel
 %x = OpVariable %_ptr_Function_mat2v2float Function
 %y = OpVariable %_ptr_Function_mat2v2float Function
-%455 = OpCompositeConstruct %v2float %float_1 %float_2
-%456 = OpCompositeConstruct %v2float %float_3 %float_4
-%457 = OpCompositeConstruct %mat2v2float %455 %456
-OpStore %x %457
-%459 = OpCompositeConstruct %v2float %float_2 %float_4
-%460 = OpCompositeConstruct %v2float %float_6 %float_8
-%461 = OpCompositeConstruct %mat2v2float %459 %460
-%462 = OpMatrixTimesScalar %mat2v2float %461 %float_0_5
-OpStore %y %462
-%463 = OpLoad %mat2v2float %x
-%464 = OpLoad %mat2v2float %y
-%465 = OpCompositeExtract %v2float %463 0
-%466 = OpCompositeExtract %v2float %464 0
-%467 = OpFOrdEqual %v2bool %465 %466
-%468 = OpAll %bool %467
-%469 = OpCompositeExtract %v2float %463 1
-%470 = OpCompositeExtract %v2float %464 1
-%471 = OpFOrdEqual %v2bool %469 %470
-%472 = OpAll %bool %471
-%473 = OpLogicalAnd %bool %468 %472
-OpReturnValue %473
+%326 = OpCompositeConstruct %v2float %float_1 %float_2
+%327 = OpCompositeConstruct %v2float %float_3 %float_4
+%328 = OpCompositeConstruct %mat2v2float %326 %327
+OpStore %x %328
+%330 = OpCompositeConstruct %v2float %float_2 %float_4
+%331 = OpCompositeConstruct %v2float %float_6 %float_8
+%332 = OpCompositeConstruct %mat2v2float %330 %331
+%333 = OpMatrixTimesScalar %mat2v2float %332 %float_0_5
+OpStore %y %333
+%334 = OpLoad %mat2v2float %x
+%335 = OpLoad %mat2v2float %y
+%336 = OpCompositeExtract %v2float %334 0
+%337 = OpCompositeExtract %v2float %335 0
+%338 = OpFOrdEqual %v2bool %336 %337
+%339 = OpAll %bool %338
+%340 = OpCompositeExtract %v2float %334 1
+%341 = OpCompositeExtract %v2float %335 1
+%342 = OpFOrdEqual %v2bool %340 %341
+%343 = OpAll %bool %342
+%344 = OpLogicalAnd %bool %339 %343
+OpReturnValue %344
 OpFunctionEnd
-%main = OpFunction %v4float None %474
-%475 = OpFunctionParameter %_ptr_Function_v2float
-%476 = OpLabel
+%main = OpFunction %v4float None %345
+%346 = OpFunctionParameter %_ptr_Function_v2float
+%347 = OpLabel
 %_0_ok = OpVariable %_ptr_Function_bool Function
 %_1_m1 = OpVariable %_ptr_Function_mat2v2float Function
 %_2_m3 = OpVariable %_ptr_Function_mat2v2float Function
@@ -813,483 +597,344 @@
 %_6_m9 = OpVariable %_ptr_Function_mat3v3float Function
 %_7_m10 = OpVariable %_ptr_Function_mat4v4float Function
 %_8_m11 = OpVariable %_ptr_Function_mat4v4float Function
-%_9_f4 = OpVariable %_ptr_Function_v4float Function
-%878 = OpVariable %_ptr_Function_v4float Function
+%623 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
-%479 = OpAccessChain %_ptr_Uniform_mat2v2float %12 %int_2
-%480 = OpLoad %mat2v2float %479
-OpStore %_1_m1 %480
-%481 = OpLoad %bool %_0_ok
-OpSelectionMerge %483 None
-OpBranchConditional %481 %482 %483
-%482 = OpLabel
-%484 = OpLoad %mat2v2float %_1_m1
-%485 = OpCompositeConstruct %v2float %float_1 %float_2
-%486 = OpCompositeConstruct %v2float %float_3 %float_4
-%487 = OpCompositeConstruct %mat2v2float %485 %486
-%488 = OpCompositeExtract %v2float %484 0
-%489 = OpCompositeExtract %v2float %487 0
-%490 = OpFOrdEqual %v2bool %488 %489
-%491 = OpAll %bool %490
-%492 = OpCompositeExtract %v2float %484 1
-%493 = OpCompositeExtract %v2float %487 1
-%494 = OpFOrdEqual %v2bool %492 %493
-%495 = OpAll %bool %494
-%496 = OpLogicalAnd %bool %491 %495
-OpBranch %483
-%483 = OpLabel
-%497 = OpPhi %bool %false %476 %496 %482
-OpStore %_0_ok %497
-%499 = OpLoad %mat2v2float %_1_m1
-OpStore %_2_m3 %499
-%500 = OpLoad %bool %_0_ok
-OpSelectionMerge %502 None
-OpBranchConditional %500 %501 %502
-%501 = OpLabel
-%503 = OpLoad %mat2v2float %_2_m3
-%504 = OpCompositeConstruct %v2float %float_1 %float_2
-%505 = OpCompositeConstruct %v2float %float_3 %float_4
-%506 = OpCompositeConstruct %mat2v2float %504 %505
-%507 = OpCompositeExtract %v2float %503 0
-%508 = OpCompositeExtract %v2float %506 0
-%509 = OpFOrdEqual %v2bool %507 %508
-%510 = OpAll %bool %509
-%511 = OpCompositeExtract %v2float %503 1
-%512 = OpCompositeExtract %v2float %506 1
-%513 = OpFOrdEqual %v2bool %511 %512
-%514 = OpAll %bool %513
-%515 = OpLogicalAnd %bool %510 %514
-OpBranch %502
-%502 = OpLabel
-%516 = OpPhi %bool %false %483 %515 %501
-OpStore %_0_ok %516
-%519 = OpCompositeConstruct %v2float %float_6 %float_0
-%520 = OpCompositeConstruct %v2float %float_0 %float_6
-%518 = OpCompositeConstruct %mat2v2float %519 %520
-OpStore %_3_m4 %518
-%521 = OpLoad %bool %_0_ok
-OpSelectionMerge %523 None
-OpBranchConditional %521 %522 %523
-%522 = OpLabel
-%524 = OpLoad %mat2v2float %_3_m4
-%525 = OpCompositeConstruct %v2float %float_6 %float_0
-%526 = OpCompositeConstruct %v2float %float_0 %float_6
-%527 = OpCompositeConstruct %mat2v2float %525 %526
-%528 = OpCompositeExtract %v2float %524 0
-%529 = OpCompositeExtract %v2float %527 0
-%530 = OpFOrdEqual %v2bool %528 %529
-%531 = OpAll %bool %530
-%532 = OpCompositeExtract %v2float %524 1
-%533 = OpCompositeExtract %v2float %527 1
-%534 = OpFOrdEqual %v2bool %532 %533
-%535 = OpAll %bool %534
-%536 = OpLogicalAnd %bool %531 %535
-OpBranch %523
-%523 = OpLabel
-%537 = OpPhi %bool %false %502 %536 %522
-OpStore %_0_ok %537
-%538 = OpLoad %mat2v2float %_2_m3
-%539 = OpLoad %mat2v2float %_3_m4
-%540 = OpMatrixTimesMatrix %mat2v2float %538 %539
-OpStore %_2_m3 %540
-%541 = OpLoad %bool %_0_ok
-OpSelectionMerge %543 None
-OpBranchConditional %541 %542 %543
-%542 = OpLabel
-%544 = OpLoad %mat2v2float %_2_m3
-%545 = OpCompositeConstruct %v2float %float_6 %float_12
-%546 = OpCompositeConstruct %v2float %float_18 %float_24
-%547 = OpCompositeConstruct %mat2v2float %545 %546
-%548 = OpCompositeExtract %v2float %544 0
-%549 = OpCompositeExtract %v2float %547 0
-%550 = OpFOrdEqual %v2bool %548 %549
+%350 = OpCompositeConstruct %v2float %float_1 %float_2
+%351 = OpCompositeConstruct %v2float %float_3 %float_4
+%352 = OpCompositeConstruct %mat2v2float %350 %351
+OpStore %_1_m1 %352
+%353 = OpLoad %bool %_0_ok
+OpSelectionMerge %355 None
+OpBranchConditional %353 %354 %355
+%354 = OpLabel
+%356 = OpLoad %mat2v2float %_1_m1
+%357 = OpCompositeConstruct %v2float %float_1 %float_2
+%358 = OpCompositeConstruct %v2float %float_3 %float_4
+%359 = OpCompositeConstruct %mat2v2float %357 %358
+%360 = OpCompositeExtract %v2float %356 0
+%361 = OpCompositeExtract %v2float %359 0
+%362 = OpFOrdEqual %v2bool %360 %361
+%363 = OpAll %bool %362
+%364 = OpCompositeExtract %v2float %356 1
+%365 = OpCompositeExtract %v2float %359 1
+%366 = OpFOrdEqual %v2bool %364 %365
+%367 = OpAll %bool %366
+%368 = OpLogicalAnd %bool %363 %367
+OpBranch %355
+%355 = OpLabel
+%369 = OpPhi %bool %false %347 %368 %354
+OpStore %_0_ok %369
+%371 = OpLoad %mat2v2float %_1_m1
+OpStore %_2_m3 %371
+%372 = OpLoad %bool %_0_ok
+OpSelectionMerge %374 None
+OpBranchConditional %372 %373 %374
+%373 = OpLabel
+%375 = OpLoad %mat2v2float %_2_m3
+%376 = OpCompositeConstruct %v2float %float_1 %float_2
+%377 = OpCompositeConstruct %v2float %float_3 %float_4
+%378 = OpCompositeConstruct %mat2v2float %376 %377
+%379 = OpCompositeExtract %v2float %375 0
+%380 = OpCompositeExtract %v2float %378 0
+%381 = OpFOrdEqual %v2bool %379 %380
+%382 = OpAll %bool %381
+%383 = OpCompositeExtract %v2float %375 1
+%384 = OpCompositeExtract %v2float %378 1
+%385 = OpFOrdEqual %v2bool %383 %384
+%386 = OpAll %bool %385
+%387 = OpLogicalAnd %bool %382 %386
+OpBranch %374
+%374 = OpLabel
+%388 = OpPhi %bool %false %355 %387 %373
+OpStore %_0_ok %388
+%391 = OpCompositeConstruct %v2float %float_6 %float_0
+%392 = OpCompositeConstruct %v2float %float_0 %float_6
+%390 = OpCompositeConstruct %mat2v2float %391 %392
+OpStore %_3_m4 %390
+%393 = OpLoad %bool %_0_ok
+OpSelectionMerge %395 None
+OpBranchConditional %393 %394 %395
+%394 = OpLabel
+%396 = OpLoad %mat2v2float %_3_m4
+%397 = OpCompositeConstruct %v2float %float_6 %float_0
+%398 = OpCompositeConstruct %v2float %float_0 %float_6
+%399 = OpCompositeConstruct %mat2v2float %397 %398
+%400 = OpCompositeExtract %v2float %396 0
+%401 = OpCompositeExtract %v2float %399 0
+%402 = OpFOrdEqual %v2bool %400 %401
+%403 = OpAll %bool %402
+%404 = OpCompositeExtract %v2float %396 1
+%405 = OpCompositeExtract %v2float %399 1
+%406 = OpFOrdEqual %v2bool %404 %405
+%407 = OpAll %bool %406
+%408 = OpLogicalAnd %bool %403 %407
+OpBranch %395
+%395 = OpLabel
+%409 = OpPhi %bool %false %374 %408 %394
+OpStore %_0_ok %409
+%410 = OpLoad %mat2v2float %_2_m3
+%411 = OpLoad %mat2v2float %_3_m4
+%412 = OpMatrixTimesMatrix %mat2v2float %410 %411
+OpStore %_2_m3 %412
+%413 = OpLoad %bool %_0_ok
+OpSelectionMerge %415 None
+OpBranchConditional %413 %414 %415
+%414 = OpLabel
+%416 = OpLoad %mat2v2float %_2_m3
+%417 = OpCompositeConstruct %v2float %float_6 %float_12
+%418 = OpCompositeConstruct %v2float %float_18 %float_24
+%419 = OpCompositeConstruct %mat2v2float %417 %418
+%420 = OpCompositeExtract %v2float %416 0
+%421 = OpCompositeExtract %v2float %419 0
+%422 = OpFOrdEqual %v2bool %420 %421
+%423 = OpAll %bool %422
+%424 = OpCompositeExtract %v2float %416 1
+%425 = OpCompositeExtract %v2float %419 1
+%426 = OpFOrdEqual %v2bool %424 %425
+%427 = OpAll %bool %426
+%428 = OpLogicalAnd %bool %423 %427
+OpBranch %415
+%415 = OpLabel
+%429 = OpPhi %bool %false %395 %428 %414
+OpStore %_0_ok %429
+%431 = OpAccessChain %_ptr_Function_v2float %_1_m1 %int_1
+%432 = OpLoad %v2float %431
+%433 = OpCompositeExtract %float %432 1
+%435 = OpCompositeConstruct %v2float %433 %float_0
+%436 = OpCompositeConstruct %v2float %float_0 %433
+%434 = OpCompositeConstruct %mat2v2float %435 %436
+OpStore %_4_m5 %434
+%437 = OpLoad %bool %_0_ok
+OpSelectionMerge %439 None
+OpBranchConditional %437 %438 %439
+%438 = OpLabel
+%440 = OpLoad %mat2v2float %_4_m5
+%441 = OpCompositeConstruct %v2float %float_4 %float_0
+%442 = OpCompositeConstruct %v2float %float_0 %float_4
+%443 = OpCompositeConstruct %mat2v2float %441 %442
+%444 = OpCompositeExtract %v2float %440 0
+%445 = OpCompositeExtract %v2float %443 0
+%446 = OpFOrdEqual %v2bool %444 %445
+%447 = OpAll %bool %446
+%448 = OpCompositeExtract %v2float %440 1
+%449 = OpCompositeExtract %v2float %443 1
+%450 = OpFOrdEqual %v2bool %448 %449
+%451 = OpAll %bool %450
+%452 = OpLogicalAnd %bool %447 %451
+OpBranch %439
+%439 = OpLabel
+%453 = OpPhi %bool %false %415 %452 %438
+OpStore %_0_ok %453
+%454 = OpLoad %mat2v2float %_1_m1
+%455 = OpLoad %mat2v2float %_4_m5
+%456 = OpCompositeExtract %v2float %454 0
+%457 = OpCompositeExtract %v2float %455 0
+%458 = OpFAdd %v2float %456 %457
+%459 = OpCompositeExtract %v2float %454 1
+%460 = OpCompositeExtract %v2float %455 1
+%461 = OpFAdd %v2float %459 %460
+%462 = OpCompositeConstruct %mat2v2float %458 %461
+OpStore %_1_m1 %462
+%463 = OpLoad %bool %_0_ok
+OpSelectionMerge %465 None
+OpBranchConditional %463 %464 %465
+%464 = OpLabel
+%466 = OpLoad %mat2v2float %_1_m1
+%467 = OpCompositeConstruct %v2float %float_5 %float_2
+%468 = OpCompositeConstruct %v2float %float_3 %float_8
+%469 = OpCompositeConstruct %mat2v2float %467 %468
+%470 = OpCompositeExtract %v2float %466 0
+%471 = OpCompositeExtract %v2float %469 0
+%472 = OpFOrdEqual %v2bool %470 %471
+%473 = OpAll %bool %472
+%474 = OpCompositeExtract %v2float %466 1
+%475 = OpCompositeExtract %v2float %469 1
+%476 = OpFOrdEqual %v2bool %474 %475
+%477 = OpAll %bool %476
+%478 = OpLogicalAnd %bool %473 %477
+OpBranch %465
+%465 = OpLabel
+%479 = OpPhi %bool %false %439 %478 %464
+OpStore %_0_ok %479
+%481 = OpCompositeConstruct %v2float %float_5 %float_6
+%482 = OpCompositeConstruct %v2float %float_7 %float_8
+%483 = OpCompositeConstruct %mat2v2float %481 %482
+OpStore %_5_m7 %483
+%484 = OpLoad %bool %_0_ok
+OpSelectionMerge %486 None
+OpBranchConditional %484 %485 %486
+%485 = OpLabel
+%487 = OpLoad %mat2v2float %_5_m7
+%488 = OpCompositeConstruct %v2float %float_5 %float_6
+%489 = OpCompositeConstruct %v2float %float_7 %float_8
+%490 = OpCompositeConstruct %mat2v2float %488 %489
+%491 = OpCompositeExtract %v2float %487 0
+%492 = OpCompositeExtract %v2float %490 0
+%493 = OpFOrdEqual %v2bool %491 %492
+%494 = OpAll %bool %493
+%495 = OpCompositeExtract %v2float %487 1
+%496 = OpCompositeExtract %v2float %490 1
+%497 = OpFOrdEqual %v2bool %495 %496
+%498 = OpAll %bool %497
+%499 = OpLogicalAnd %bool %494 %498
+OpBranch %486
+%486 = OpLabel
+%500 = OpPhi %bool %false %465 %499 %485
+OpStore %_0_ok %500
+%503 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
+%504 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
+%505 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
+%502 = OpCompositeConstruct %mat3v3float %503 %504 %505
+OpStore %_6_m9 %502
+%506 = OpLoad %bool %_0_ok
+OpSelectionMerge %508 None
+OpBranchConditional %506 %507 %508
+%507 = OpLabel
+%509 = OpLoad %mat3v3float %_6_m9
+%510 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
+%511 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
+%512 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
+%513 = OpCompositeConstruct %mat3v3float %510 %511 %512
+%514 = OpCompositeExtract %v3float %509 0
+%515 = OpCompositeExtract %v3float %513 0
+%516 = OpFOrdEqual %v3bool %514 %515
+%517 = OpAll %bool %516
+%518 = OpCompositeExtract %v3float %509 1
+%519 = OpCompositeExtract %v3float %513 1
+%520 = OpFOrdEqual %v3bool %518 %519
+%521 = OpAll %bool %520
+%522 = OpLogicalAnd %bool %517 %521
+%523 = OpCompositeExtract %v3float %509 2
+%524 = OpCompositeExtract %v3float %513 2
+%525 = OpFOrdEqual %v3bool %523 %524
+%526 = OpAll %bool %525
+%527 = OpLogicalAnd %bool %522 %526
+OpBranch %508
+%508 = OpLabel
+%528 = OpPhi %bool %false %486 %527 %507
+OpStore %_0_ok %528
+%531 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
+%532 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
+%533 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
+%534 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
+%530 = OpCompositeConstruct %mat4v4float %531 %532 %533 %534
+OpStore %_7_m10 %530
+%535 = OpLoad %bool %_0_ok
+OpSelectionMerge %537 None
+OpBranchConditional %535 %536 %537
+%536 = OpLabel
+%538 = OpLoad %mat4v4float %_7_m10
+%539 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
+%540 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
+%541 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
+%542 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
+%543 = OpCompositeConstruct %mat4v4float %539 %540 %541 %542
+%544 = OpCompositeExtract %v4float %538 0
+%545 = OpCompositeExtract %v4float %543 0
+%546 = OpFOrdEqual %v4bool %544 %545
+%547 = OpAll %bool %546
+%548 = OpCompositeExtract %v4float %538 1
+%549 = OpCompositeExtract %v4float %543 1
+%550 = OpFOrdEqual %v4bool %548 %549
 %551 = OpAll %bool %550
-%552 = OpCompositeExtract %v2float %544 1
-%553 = OpCompositeExtract %v2float %547 1
-%554 = OpFOrdEqual %v2bool %552 %553
-%555 = OpAll %bool %554
-%556 = OpLogicalAnd %bool %551 %555
-OpBranch %543
-%543 = OpLabel
-%557 = OpPhi %bool %false %523 %556 %542
-OpStore %_0_ok %557
-%559 = OpAccessChain %_ptr_Function_v2float %_1_m1 %int_1
-%560 = OpLoad %v2float %559
-%561 = OpCompositeExtract %float %560 1
-%563 = OpCompositeConstruct %v2float %561 %float_0
-%564 = OpCompositeConstruct %v2float %float_0 %561
-%562 = OpCompositeConstruct %mat2v2float %563 %564
-OpStore %_4_m5 %562
-%565 = OpLoad %bool %_0_ok
-OpSelectionMerge %567 None
-OpBranchConditional %565 %566 %567
-%566 = OpLabel
-%568 = OpLoad %mat2v2float %_4_m5
-%569 = OpCompositeConstruct %v2float %float_4 %float_0
-%570 = OpCompositeConstruct %v2float %float_0 %float_4
-%571 = OpCompositeConstruct %mat2v2float %569 %570
-%572 = OpCompositeExtract %v2float %568 0
-%573 = OpCompositeExtract %v2float %571 0
-%574 = OpFOrdEqual %v2bool %572 %573
-%575 = OpAll %bool %574
-%576 = OpCompositeExtract %v2float %568 1
-%577 = OpCompositeExtract %v2float %571 1
-%578 = OpFOrdEqual %v2bool %576 %577
-%579 = OpAll %bool %578
-%580 = OpLogicalAnd %bool %575 %579
-OpBranch %567
-%567 = OpLabel
-%581 = OpPhi %bool %false %543 %580 %566
-OpStore %_0_ok %581
-%582 = OpLoad %mat2v2float %_1_m1
-%583 = OpLoad %mat2v2float %_4_m5
-%584 = OpCompositeExtract %v2float %582 0
-%585 = OpCompositeExtract %v2float %583 0
-%586 = OpFAdd %v2float %584 %585
-%587 = OpCompositeExtract %v2float %582 1
-%588 = OpCompositeExtract %v2float %583 1
-%589 = OpFAdd %v2float %587 %588
-%590 = OpCompositeConstruct %mat2v2float %586 %589
-OpStore %_1_m1 %590
-%591 = OpLoad %bool %_0_ok
-OpSelectionMerge %593 None
-OpBranchConditional %591 %592 %593
-%592 = OpLabel
-%594 = OpLoad %mat2v2float %_1_m1
-%595 = OpCompositeConstruct %v2float %float_5 %float_2
-%596 = OpCompositeConstruct %v2float %float_3 %float_8
-%597 = OpCompositeConstruct %mat2v2float %595 %596
-%598 = OpCompositeExtract %v2float %594 0
-%599 = OpCompositeExtract %v2float %597 0
-%600 = OpFOrdEqual %v2bool %598 %599
+%552 = OpLogicalAnd %bool %547 %551
+%553 = OpCompositeExtract %v4float %538 2
+%554 = OpCompositeExtract %v4float %543 2
+%555 = OpFOrdEqual %v4bool %553 %554
+%556 = OpAll %bool %555
+%557 = OpLogicalAnd %bool %552 %556
+%558 = OpCompositeExtract %v4float %538 3
+%559 = OpCompositeExtract %v4float %543 3
+%560 = OpFOrdEqual %v4bool %558 %559
+%561 = OpAll %bool %560
+%562 = OpLogicalAnd %bool %557 %561
+OpBranch %537
+%537 = OpLabel
+%563 = OpPhi %bool %false %508 %562 %536
+OpStore %_0_ok %563
+%565 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
+%566 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
+%567 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
+%568 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
+%569 = OpCompositeConstruct %mat4v4float %565 %566 %567 %568
+OpStore %_8_m11 %569
+%570 = OpLoad %mat4v4float %_8_m11
+%571 = OpLoad %mat4v4float %_7_m10
+%572 = OpCompositeExtract %v4float %570 0
+%573 = OpCompositeExtract %v4float %571 0
+%574 = OpFSub %v4float %572 %573
+%575 = OpCompositeExtract %v4float %570 1
+%576 = OpCompositeExtract %v4float %571 1
+%577 = OpFSub %v4float %575 %576
+%578 = OpCompositeExtract %v4float %570 2
+%579 = OpCompositeExtract %v4float %571 2
+%580 = OpFSub %v4float %578 %579
+%581 = OpCompositeExtract %v4float %570 3
+%582 = OpCompositeExtract %v4float %571 3
+%583 = OpFSub %v4float %581 %582
+%584 = OpCompositeConstruct %mat4v4float %574 %577 %580 %583
+OpStore %_8_m11 %584
+%585 = OpLoad %bool %_0_ok
+OpSelectionMerge %587 None
+OpBranchConditional %585 %586 %587
+%586 = OpLabel
+%588 = OpLoad %mat4v4float %_8_m11
+%589 = OpCompositeConstruct %v4float %float_9 %float_20 %float_20 %float_20
+%590 = OpCompositeConstruct %v4float %float_20 %float_9 %float_20 %float_20
+%591 = OpCompositeConstruct %v4float %float_20 %float_20 %float_9 %float_20
+%592 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_9
+%593 = OpCompositeConstruct %mat4v4float %589 %590 %591 %592
+%594 = OpCompositeExtract %v4float %588 0
+%595 = OpCompositeExtract %v4float %593 0
+%596 = OpFOrdEqual %v4bool %594 %595
+%597 = OpAll %bool %596
+%598 = OpCompositeExtract %v4float %588 1
+%599 = OpCompositeExtract %v4float %593 1
+%600 = OpFOrdEqual %v4bool %598 %599
 %601 = OpAll %bool %600
-%602 = OpCompositeExtract %v2float %594 1
-%603 = OpCompositeExtract %v2float %597 1
-%604 = OpFOrdEqual %v2bool %602 %603
-%605 = OpAll %bool %604
-%606 = OpLogicalAnd %bool %601 %605
-OpBranch %593
-%593 = OpLabel
-%607 = OpPhi %bool %false %567 %606 %592
-OpStore %_0_ok %607
-%609 = OpCompositeConstruct %v2float %float_5 %float_6
-%610 = OpCompositeConstruct %v2float %float_7 %float_8
-%611 = OpCompositeConstruct %mat2v2float %609 %610
-OpStore %_5_m7 %611
-%612 = OpLoad %bool %_0_ok
-OpSelectionMerge %614 None
-OpBranchConditional %612 %613 %614
-%613 = OpLabel
-%615 = OpLoad %mat2v2float %_5_m7
-%616 = OpCompositeConstruct %v2float %float_5 %float_6
-%617 = OpCompositeConstruct %v2float %float_7 %float_8
-%618 = OpCompositeConstruct %mat2v2float %616 %617
-%619 = OpCompositeExtract %v2float %615 0
-%620 = OpCompositeExtract %v2float %618 0
-%621 = OpFOrdEqual %v2bool %619 %620
-%622 = OpAll %bool %621
-%623 = OpCompositeExtract %v2float %615 1
-%624 = OpCompositeExtract %v2float %618 1
-%625 = OpFOrdEqual %v2bool %623 %624
-%626 = OpAll %bool %625
-%627 = OpLogicalAnd %bool %622 %626
-OpBranch %614
-%614 = OpLabel
-%628 = OpPhi %bool %false %593 %627 %613
-OpStore %_0_ok %628
-%631 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
-%632 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
-%633 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
-%630 = OpCompositeConstruct %mat3v3float %631 %632 %633
-OpStore %_6_m9 %630
-%634 = OpLoad %bool %_0_ok
-OpSelectionMerge %636 None
-OpBranchConditional %634 %635 %636
-%635 = OpLabel
-%637 = OpLoad %mat3v3float %_6_m9
-%638 = OpCompositeConstruct %v3float %float_9 %float_0 %float_0
-%639 = OpCompositeConstruct %v3float %float_0 %float_9 %float_0
-%640 = OpCompositeConstruct %v3float %float_0 %float_0 %float_9
-%641 = OpCompositeConstruct %mat3v3float %638 %639 %640
-%642 = OpCompositeExtract %v3float %637 0
-%643 = OpCompositeExtract %v3float %641 0
-%644 = OpFOrdEqual %v3bool %642 %643
-%645 = OpAll %bool %644
-%646 = OpCompositeExtract %v3float %637 1
-%647 = OpCompositeExtract %v3float %641 1
-%648 = OpFOrdEqual %v3bool %646 %647
-%649 = OpAll %bool %648
-%650 = OpLogicalAnd %bool %645 %649
-%651 = OpCompositeExtract %v3float %637 2
-%652 = OpCompositeExtract %v3float %641 2
-%653 = OpFOrdEqual %v3bool %651 %652
-%654 = OpAll %bool %653
-%655 = OpLogicalAnd %bool %650 %654
-OpBranch %636
-%636 = OpLabel
-%656 = OpPhi %bool %false %614 %655 %635
-OpStore %_0_ok %656
-%659 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
-%660 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
-%661 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
-%662 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
-%658 = OpCompositeConstruct %mat4v4float %659 %660 %661 %662
-OpStore %_7_m10 %658
-%663 = OpLoad %bool %_0_ok
-OpSelectionMerge %665 None
-OpBranchConditional %663 %664 %665
-%664 = OpLabel
-%666 = OpLoad %mat4v4float %_7_m10
-%667 = OpCompositeConstruct %v4float %float_11 %float_0 %float_0 %float_0
-%668 = OpCompositeConstruct %v4float %float_0 %float_11 %float_0 %float_0
-%669 = OpCompositeConstruct %v4float %float_0 %float_0 %float_11 %float_0
-%670 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_11
-%671 = OpCompositeConstruct %mat4v4float %667 %668 %669 %670
-%672 = OpCompositeExtract %v4float %666 0
-%673 = OpCompositeExtract %v4float %671 0
-%674 = OpFOrdEqual %v4bool %672 %673
-%675 = OpAll %bool %674
-%676 = OpCompositeExtract %v4float %666 1
-%677 = OpCompositeExtract %v4float %671 1
-%678 = OpFOrdEqual %v4bool %676 %677
-%679 = OpAll %bool %678
-%680 = OpLogicalAnd %bool %675 %679
-%681 = OpCompositeExtract %v4float %666 2
-%682 = OpCompositeExtract %v4float %671 2
-%683 = OpFOrdEqual %v4bool %681 %682
-%684 = OpAll %bool %683
-%685 = OpLogicalAnd %bool %680 %684
-%686 = OpCompositeExtract %v4float %666 3
-%687 = OpCompositeExtract %v4float %671 3
-%688 = OpFOrdEqual %v4bool %686 %687
-%689 = OpAll %bool %688
-%690 = OpLogicalAnd %bool %685 %689
-OpBranch %665
-%665 = OpLabel
-%691 = OpPhi %bool %false %636 %690 %664
-OpStore %_0_ok %691
-%693 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%694 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%695 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%696 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_20
-%697 = OpCompositeConstruct %mat4v4float %693 %694 %695 %696
-OpStore %_8_m11 %697
-%698 = OpLoad %mat4v4float %_8_m11
-%699 = OpLoad %mat4v4float %_7_m10
-%700 = OpCompositeExtract %v4float %698 0
-%701 = OpCompositeExtract %v4float %699 0
-%702 = OpFSub %v4float %700 %701
-%703 = OpCompositeExtract %v4float %698 1
-%704 = OpCompositeExtract %v4float %699 1
-%705 = OpFSub %v4float %703 %704
-%706 = OpCompositeExtract %v4float %698 2
-%707 = OpCompositeExtract %v4float %699 2
-%708 = OpFSub %v4float %706 %707
-%709 = OpCompositeExtract %v4float %698 3
-%710 = OpCompositeExtract %v4float %699 3
-%711 = OpFSub %v4float %709 %710
-%712 = OpCompositeConstruct %mat4v4float %702 %705 %708 %711
-OpStore %_8_m11 %712
-%713 = OpLoad %bool %_0_ok
-OpSelectionMerge %715 None
-OpBranchConditional %713 %714 %715
-%714 = OpLabel
-%716 = OpLoad %mat4v4float %_8_m11
-%717 = OpCompositeConstruct %v4float %float_9 %float_20 %float_20 %float_20
-%718 = OpCompositeConstruct %v4float %float_20 %float_9 %float_20 %float_20
-%719 = OpCompositeConstruct %v4float %float_20 %float_20 %float_9 %float_20
-%720 = OpCompositeConstruct %v4float %float_20 %float_20 %float_20 %float_9
-%721 = OpCompositeConstruct %mat4v4float %717 %718 %719 %720
-%722 = OpCompositeExtract %v4float %716 0
-%723 = OpCompositeExtract %v4float %721 0
-%724 = OpFOrdEqual %v4bool %722 %723
-%725 = OpAll %bool %724
-%726 = OpCompositeExtract %v4float %716 1
-%727 = OpCompositeExtract %v4float %721 1
-%728 = OpFOrdEqual %v4bool %726 %727
-%729 = OpAll %bool %728
-%730 = OpLogicalAnd %bool %725 %729
-%731 = OpCompositeExtract %v4float %716 2
-%732 = OpCompositeExtract %v4float %721 2
-%733 = OpFOrdEqual %v4bool %731 %732
-%734 = OpAll %bool %733
-%735 = OpLogicalAnd %bool %730 %734
-%736 = OpCompositeExtract %v4float %716 3
-%737 = OpCompositeExtract %v4float %721 3
-%738 = OpFOrdEqual %v4bool %736 %737
-%739 = OpAll %bool %738
-%740 = OpLogicalAnd %bool %735 %739
-OpBranch %715
-%715 = OpLabel
-%741 = OpPhi %bool %false %665 %740 %714
-OpStore %_0_ok %741
-%743 = OpAccessChain %_ptr_Uniform_mat2v2float %12 %int_2
-%744 = OpLoad %mat2v2float %743
-%745 = OpCompositeExtract %float %744 0 0
-%746 = OpCompositeExtract %float %744 0 1
-%747 = OpCompositeExtract %float %744 1 0
-%748 = OpCompositeExtract %float %744 1 1
-%749 = OpCompositeConstruct %v4float %745 %746 %747 %748
-OpStore %_9_f4 %749
-%750 = OpLoad %bool %_0_ok
-OpSelectionMerge %752 None
-OpBranchConditional %750 %751 %752
-%751 = OpLabel
-%753 = OpLoad %v4float %_9_f4
-%754 = OpVectorShuffle %v2float %753 %753 0 1
-%755 = OpLoad %v4float %_9_f4
-%756 = OpCompositeExtract %float %755 2
-%757 = OpCompositeConstruct %v2float %756 %float_4
-%758 = OpCompositeConstruct %mat2v2float %754 %757
-%759 = OpCompositeConstruct %v2float %float_1 %float_2
-%760 = OpCompositeConstruct %v2float %float_3 %float_4
-%761 = OpCompositeConstruct %mat2v2float %759 %760
-%762 = OpCompositeExtract %v2float %758 0
-%763 = OpCompositeExtract %v2float %761 0
-%764 = OpFOrdEqual %v2bool %762 %763
-%765 = OpAll %bool %764
-%766 = OpCompositeExtract %v2float %758 1
-%767 = OpCompositeExtract %v2float %761 1
-%768 = OpFOrdEqual %v2bool %766 %767
-%769 = OpAll %bool %768
-%770 = OpLogicalAnd %bool %765 %769
-OpBranch %752
-%752 = OpLabel
-%771 = OpPhi %bool %false %715 %770 %751
-OpStore %_0_ok %771
-%772 = OpLoad %bool %_0_ok
-OpSelectionMerge %774 None
-OpBranchConditional %772 %773 %774
-%773 = OpLabel
-%775 = OpLoad %v4float %_9_f4
-%776 = OpVectorShuffle %v2float %775 %775 0 1
-%777 = OpLoad %v4float %_9_f4
-%778 = OpCompositeExtract %float %777 2
-%779 = OpLoad %v4float %_9_f4
-%780 = OpCompositeExtract %float %779 3
-%781 = OpLoad %v4float %_9_f4
-%782 = OpVectorShuffle %v2float %781 %781 0 1
-%783 = OpLoad %v4float %_9_f4
-%784 = OpVectorShuffle %v2float %783 %783 2 3
-%785 = OpLoad %v4float %_9_f4
-%786 = OpCompositeExtract %float %785 0
-%787 = OpCompositeExtract %float %776 0
-%788 = OpCompositeExtract %float %776 1
-%789 = OpCompositeConstruct %v3float %787 %788 %778
-%790 = OpCompositeExtract %float %782 0
-%791 = OpCompositeExtract %float %782 1
-%792 = OpCompositeConstruct %v3float %780 %790 %791
-%793 = OpCompositeExtract %float %784 0
-%794 = OpCompositeExtract %float %784 1
-%795 = OpCompositeConstruct %v3float %793 %794 %786
-%796 = OpCompositeConstruct %mat3v3float %789 %792 %795
-%797 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%798 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%799 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
-%800 = OpCompositeConstruct %mat3v3float %797 %798 %799
-%801 = OpCompositeExtract %v3float %796 0
-%802 = OpCompositeExtract %v3float %800 0
-%803 = OpFOrdEqual %v3bool %801 %802
-%804 = OpAll %bool %803
-%805 = OpCompositeExtract %v3float %796 1
-%806 = OpCompositeExtract %v3float %800 1
-%807 = OpFOrdEqual %v3bool %805 %806
-%808 = OpAll %bool %807
-%809 = OpLogicalAnd %bool %804 %808
-%810 = OpCompositeExtract %v3float %796 2
-%811 = OpCompositeExtract %v3float %800 2
-%812 = OpFOrdEqual %v3bool %810 %811
-%813 = OpAll %bool %812
-%814 = OpLogicalAnd %bool %809 %813
-OpBranch %774
-%774 = OpLabel
-%815 = OpPhi %bool %false %752 %814 %773
-OpStore %_0_ok %815
-%816 = OpLoad %bool %_0_ok
-OpSelectionMerge %818 None
-OpBranchConditional %816 %817 %818
-%817 = OpLabel
-%819 = OpLoad %v4float %_9_f4
-%820 = OpVectorShuffle %v2float %819 %819 0 1
-%821 = OpLoad %v4float %_9_f4
-%822 = OpVectorShuffle %v2float %821 %821 2 3
-%823 = OpLoad %v4float %_9_f4
-%824 = OpVectorShuffle %v3float %823 %823 0 1 2
-%825 = OpLoad %v4float %_9_f4
-%826 = OpCompositeExtract %float %825 3
-%827 = OpLoad %v4float %_9_f4
-%828 = OpLoad %v4float %_9_f4
-%829 = OpVectorShuffle %v3float %828 %828 1 2 3
-%830 = OpCompositeExtract %float %820 0
-%831 = OpCompositeExtract %float %820 1
-%832 = OpCompositeExtract %float %822 0
-%833 = OpCompositeExtract %float %822 1
-%834 = OpCompositeConstruct %v4float %830 %831 %832 %833
-%835 = OpCompositeExtract %float %824 0
-%836 = OpCompositeExtract %float %824 1
-%837 = OpCompositeExtract %float %824 2
-%838 = OpCompositeConstruct %v4float %835 %836 %837 %826
-%839 = OpCompositeExtract %float %829 0
-%840 = OpCompositeExtract %float %829 1
-%841 = OpCompositeExtract %float %829 2
-%842 = OpCompositeConstruct %v4float %float_1 %839 %840 %841
-%843 = OpCompositeConstruct %mat4v4float %834 %838 %827 %842
-%844 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%845 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%846 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%847 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%848 = OpCompositeConstruct %mat4v4float %844 %845 %846 %847
-%849 = OpCompositeExtract %v4float %843 0
-%850 = OpCompositeExtract %v4float %848 0
-%851 = OpFOrdEqual %v4bool %849 %850
-%852 = OpAll %bool %851
-%853 = OpCompositeExtract %v4float %843 1
-%854 = OpCompositeExtract %v4float %848 1
-%855 = OpFOrdEqual %v4bool %853 %854
-%856 = OpAll %bool %855
-%857 = OpLogicalAnd %bool %852 %856
-%858 = OpCompositeExtract %v4float %843 2
-%859 = OpCompositeExtract %v4float %848 2
-%860 = OpFOrdEqual %v4bool %858 %859
-%861 = OpAll %bool %860
-%862 = OpLogicalAnd %bool %857 %861
-%863 = OpCompositeExtract %v4float %843 3
-%864 = OpCompositeExtract %v4float %848 3
-%865 = OpFOrdEqual %v4bool %863 %864
-%866 = OpAll %bool %865
-%867 = OpLogicalAnd %bool %862 %866
-OpBranch %818
-%818 = OpLabel
-%868 = OpPhi %bool %false %774 %867 %817
-OpStore %_0_ok %868
-%869 = OpLoad %bool %_0_ok
-OpSelectionMerge %871 None
-OpBranchConditional %869 %870 %871
-%870 = OpLabel
-%872 = OpFunctionCall %bool %test_half_b
-OpBranch %871
-%871 = OpLabel
-%873 = OpPhi %bool %false %818 %872 %870
-OpSelectionMerge %875 None
-OpBranchConditional %873 %874 %875
-%874 = OpLabel
-%876 = OpFunctionCall %bool %test_comma_b
-OpBranch %875
-%875 = OpLabel
-%877 = OpPhi %bool %false %871 %876 %874
-OpSelectionMerge %881 None
-OpBranchConditional %877 %879 %880
-%879 = OpLabel
-%882 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%885 = OpLoad %v4float %882
-OpStore %878 %885
-OpBranch %881
-%880 = OpLabel
-%886 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%887 = OpLoad %v4float %886
-OpStore %878 %887
-OpBranch %881
-%881 = OpLabel
-%888 = OpLoad %v4float %878
-OpReturnValue %888
+%602 = OpLogicalAnd %bool %597 %601
+%603 = OpCompositeExtract %v4float %588 2
+%604 = OpCompositeExtract %v4float %593 2
+%605 = OpFOrdEqual %v4bool %603 %604
+%606 = OpAll %bool %605
+%607 = OpLogicalAnd %bool %602 %606
+%608 = OpCompositeExtract %v4float %588 3
+%609 = OpCompositeExtract %v4float %593 3
+%610 = OpFOrdEqual %v4bool %608 %609
+%611 = OpAll %bool %610
+%612 = OpLogicalAnd %bool %607 %611
+OpBranch %587
+%587 = OpLabel
+%613 = OpPhi %bool %false %537 %612 %586
+OpStore %_0_ok %613
+%614 = OpLoad %bool %_0_ok
+OpSelectionMerge %616 None
+OpBranchConditional %614 %615 %616
+%615 = OpLabel
+%617 = OpFunctionCall %bool %test_half_b
+OpBranch %616
+%616 = OpLabel
+%618 = OpPhi %bool %false %587 %617 %615
+OpSelectionMerge %620 None
+OpBranchConditional %618 %619 %620
+%619 = OpLabel
+%621 = OpFunctionCall %bool %test_comma_b
+OpBranch %620
+%620 = OpLabel
+%622 = OpPhi %bool %false %616 %621 %619
+OpSelectionMerge %627 None
+OpBranchConditional %622 %625 %626
+%625 = OpLabel
+%628 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%631 = OpLoad %v4float %628
+OpStore %623 %631
+OpBranch %627
+%626 = OpLabel
+%632 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%633 = OpLoad %v4float %632
+OpStore %623 %633
+OpBranch %627
+%627 = OpLabel
+%634 = OpLoad %v4float %623
+OpReturnValue %634
 OpFunctionEnd
diff --git a/tests/sksl/shared/Matrices.glsl b/tests/sksl/shared/Matrices.glsl
index 3ac8cff..3cf9fb7 100644
--- a/tests/sksl/shared/Matrices.glsl
+++ b/tests/sksl/shared/Matrices.glsl
@@ -2,10 +2,9 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
-uniform mat2 testMatrix2x2;
 bool test_half_b() {
     bool ok = true;
-    mat2 m1 = testMatrix2x2;
+    mat2 m1 = mat2(1.0, 2.0, 3.0, 4.0);
     ok = ok && m1 == mat2(1.0, 2.0, 3.0, 4.0);
     mat2 m3 = m1;
     ok = ok && m3 == mat2(1.0, 2.0, 3.0, 4.0);
@@ -26,10 +25,6 @@
     mat4 m11 = mat4(20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0);
     m11 -= m10;
     ok = ok && m11 == mat4(9.0, 20.0, 20.0, 20.0, 20.0, 9.0, 20.0, 20.0, 20.0, 20.0, 9.0, 20.0, 20.0, 20.0, 20.0, 9.0);
-    vec4 h4 = vec4(testMatrix2x2);
-    ok = ok && mat2(h4.xy, h4.z, 4.0) == mat2(1.0, 2.0, 3.0, 4.0);
-    ok = ok && mat3(h4.xy, h4.z, h4.w, h4.xy, h4.zw, h4.x) == mat3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0);
-    ok = ok && mat4(h4.xy, h4.zw, h4.xyz, h4.w, h4, 1.0, h4.yzw) == mat4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
     return ok;
 }
 bool test_comma_b() {
@@ -39,7 +34,7 @@
 }
 vec4 main() {
     bool _0_ok = true;
-    mat2 _1_m1 = testMatrix2x2;
+    mat2 _1_m1 = mat2(1.0, 2.0, 3.0, 4.0);
     _0_ok = _0_ok && _1_m1 == mat2(1.0, 2.0, 3.0, 4.0);
     mat2 _2_m3 = _1_m1;
     _0_ok = _0_ok && _2_m3 == mat2(1.0, 2.0, 3.0, 4.0);
@@ -60,9 +55,5 @@
     mat4 _8_m11 = mat4(20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0);
     _8_m11 -= _7_m10;
     _0_ok = _0_ok && _8_m11 == mat4(9.0, 20.0, 20.0, 20.0, 20.0, 9.0, 20.0, 20.0, 20.0, 20.0, 9.0, 20.0, 20.0, 20.0, 20.0, 9.0);
-    vec4 _9_f4 = vec4(testMatrix2x2);
-    _0_ok = _0_ok && mat2(_9_f4.xy, _9_f4.z, 4.0) == mat2(1.0, 2.0, 3.0, 4.0);
-    _0_ok = _0_ok && mat3(_9_f4.xy, _9_f4.z, _9_f4.w, _9_f4.xy, _9_f4.zw, _9_f4.x) == mat3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0);
-    _0_ok = _0_ok && mat4(_9_f4.xy, _9_f4.zw, _9_f4.xyz, _9_f4.w, _9_f4, 1.0, _9_f4.yzw) == mat4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
     return (_0_ok && test_half_b()) && test_comma_b() ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/Matrices.metal b/tests/sksl/shared/Matrices.metal
index 54b19d2..b9e47f6 100644
--- a/tests/sksl/shared/Matrices.metal
+++ b/tests/sksl/shared/Matrices.metal
@@ -4,7 +4,6 @@
 struct Uniforms {
     float4 colorGreen;
     float4 colorRed;
-    float2x2 testMatrix2x2;
 };
 struct Inputs {
 };
@@ -48,13 +47,9 @@
 thread bool operator!=(const float4x4 left, const float4x4 right) {
     return !(left == right);
 }
-
-float4 float4_from_float2x2(float2x2 x) {
-    return float4(x[0].xy, x[1].xy);
-}
-bool test_half_b(Uniforms _uniforms) {
+bool test_half_b() {
     bool ok = true;
-    float2x2 m1 = _uniforms.testMatrix2x2;
+    float2x2 m1 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
     ok = ok && m1 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
     float2x2 m3 = m1;
     ok = ok && m3 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
@@ -75,10 +70,6 @@
     float4x4 m11 = float4x4(float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0));
     m11 -= m10;
     ok = ok && m11 == float4x4(float4(9.0, 20.0, 20.0, 20.0), float4(20.0, 9.0, 20.0, 20.0), float4(20.0, 20.0, 9.0, 20.0), float4(20.0, 20.0, 20.0, 9.0));
-    float4 h4 = float4_from_float2x2(_uniforms.testMatrix2x2);
-    ok = ok && float2x2(h4.xy, float2(h4.z, 4.0)) == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    ok = ok && float3x3(float3(h4.xy, h4.z), float3(h4.w, h4.xy), float3(h4.zw, h4.x)) == float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0));
-    ok = ok && float4x4(float4(h4.xy, h4.zw), float4(h4.xyz, h4.w), h4, float4(1.0, h4.yzw)) == float4x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
     return ok;
 }
 bool test_comma_b() {
@@ -90,7 +81,7 @@
     Outputs _out;
     (void)_out;
     bool _0_ok = true;
-    float2x2 _1_m1 = _uniforms.testMatrix2x2;
+    float2x2 _1_m1 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
     _0_ok = _0_ok && _1_m1 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
     float2x2 _2_m3 = _1_m1;
     _0_ok = _0_ok && _2_m3 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
@@ -111,10 +102,6 @@
     float4x4 _8_m11 = float4x4(float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0), float4(20.0, 20.0, 20.0, 20.0));
     _8_m11 -= _7_m10;
     _0_ok = _0_ok && _8_m11 == float4x4(float4(9.0, 20.0, 20.0, 20.0), float4(20.0, 9.0, 20.0, 20.0), float4(20.0, 20.0, 9.0, 20.0), float4(20.0, 20.0, 20.0, 9.0));
-    float4 _9_f4 = float4_from_float2x2(_uniforms.testMatrix2x2);
-    _0_ok = _0_ok && float2x2(_9_f4.xy, float2(_9_f4.z, 4.0)) == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    _0_ok = _0_ok && float3x3(float3(_9_f4.xy, _9_f4.z), float3(_9_f4.w, _9_f4.xy), float3(_9_f4.zw, _9_f4.x)) == float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0));
-    _0_ok = _0_ok && float4x4(float4(_9_f4.xy, _9_f4.zw), float4(_9_f4.xyz, _9_f4.w), _9_f4, float4(1.0, _9_f4.yzw)) == float4x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
-    _out.sk_FragColor = (_0_ok && test_half_b(_uniforms)) && test_comma_b() ? _uniforms.colorGreen : _uniforms.colorRed;
+    _out.sk_FragColor = (_0_ok && test_half_b()) && test_comma_b() ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/MatricesNonsquare.asm.frag b/tests/sksl/shared/MatricesNonsquare.asm.frag
index dbbce0b..c9d4128 100644
--- a/tests/sksl/shared/MatricesNonsquare.asm.frag
+++ b/tests/sksl/shared/MatricesNonsquare.asm.frag
@@ -8,7 +8,6 @@
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
-OpMemberName %_UniformBuffer 2 "testMatrix2x2"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %test_half_b "test_half_b"
 OpName %ok "ok"
@@ -20,7 +19,6 @@
 OpName %m43 "m43"
 OpName %m22 "m22"
 OpName %m33 "m33"
-OpName %h4 "h4"
 OpName %main "main"
 OpName %_0_ok "_0_ok"
 OpName %_1_m23 "_1_m23"
@@ -31,7 +29,6 @@
 OpName %_6_m43 "_6_m43"
 OpName %_7_m22 "_7_m22"
 OpName %_8_m33 "_8_m33"
-OpName %_10_f4 "_10_f4"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -40,78 +37,75 @@
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
-OpMemberDecorate %_UniformBuffer 2 Offset 32
-OpMemberDecorate %_UniformBuffer 2 ColMajor
-OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
 OpDecorate %m23 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 OpDecorate %35 RelaxedPrecision
 OpDecorate %36 RelaxedPrecision
-OpDecorate %37 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
 OpDecorate %43 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %45 RelaxedPrecision
 OpDecorate %m24 RelaxedPrecision
+OpDecorate %60 RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
 OpDecorate %63 RelaxedPrecision
-OpDecorate %64 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
 OpDecorate %67 RelaxedPrecision
 OpDecorate %68 RelaxedPrecision
 OpDecorate %69 RelaxedPrecision
-OpDecorate %70 RelaxedPrecision
 OpDecorate %m32 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
 OpDecorate %86 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
 OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
 OpDecorate %96 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
 OpDecorate %m34 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
 OpDecorate %120 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
 OpDecorate %127 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
 OpDecorate %m42 RelaxedPrecision
+OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
 OpDecorate %151 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
 OpDecorate %153 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
+OpDecorate %156 RelaxedPrecision
 OpDecorate %157 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
 OpDecorate %159 RelaxedPrecision
 OpDecorate %160 RelaxedPrecision
 OpDecorate %161 RelaxedPrecision
-OpDecorate %162 RelaxedPrecision
 OpDecorate %m43 RelaxedPrecision
+OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
 OpDecorate %188 RelaxedPrecision
 OpDecorate %189 RelaxedPrecision
 OpDecorate %190 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
+OpDecorate %194 RelaxedPrecision
 OpDecorate %195 RelaxedPrecision
 OpDecorate %196 RelaxedPrecision
 OpDecorate %197 RelaxedPrecision
 OpDecorate %198 RelaxedPrecision
 OpDecorate %199 RelaxedPrecision
-OpDecorate %200 RelaxedPrecision
 OpDecorate %m22 RelaxedPrecision
 OpDecorate %223 RelaxedPrecision
 OpDecorate %224 RelaxedPrecision
@@ -180,92 +174,22 @@
 OpDecorate %354 RelaxedPrecision
 OpDecorate %355 RelaxedPrecision
 OpDecorate %356 RelaxedPrecision
-OpDecorate %h4 RelaxedPrecision
-OpDecorate %379 RelaxedPrecision
-OpDecorate %382 RelaxedPrecision
-OpDecorate %383 RelaxedPrecision
-OpDecorate %384 RelaxedPrecision
-OpDecorate %385 RelaxedPrecision
-OpDecorate %386 RelaxedPrecision
-OpDecorate %387 RelaxedPrecision
-OpDecorate %405 RelaxedPrecision
-OpDecorate %408 RelaxedPrecision
-OpDecorate %409 RelaxedPrecision
-OpDecorate %410 RelaxedPrecision
-OpDecorate %411 RelaxedPrecision
-OpDecorate %412 RelaxedPrecision
-OpDecorate %413 RelaxedPrecision
-OpDecorate %414 RelaxedPrecision
-OpDecorate %415 RelaxedPrecision
-OpDecorate %438 RelaxedPrecision
-OpDecorate %441 RelaxedPrecision
-OpDecorate %442 RelaxedPrecision
-OpDecorate %443 RelaxedPrecision
-OpDecorate %444 RelaxedPrecision
-OpDecorate %445 RelaxedPrecision
-OpDecorate %446 RelaxedPrecision
+OpDecorate %367 RelaxedPrecision
+OpDecorate %376 RelaxedPrecision
+OpDecorate %397 RelaxedPrecision
+OpDecorate %419 RelaxedPrecision
 OpDecorate %447 RelaxedPrecision
-OpDecorate %448 RelaxedPrecision
-OpDecorate %470 RelaxedPrecision
-OpDecorate %473 RelaxedPrecision
-OpDecorate %474 RelaxedPrecision
-OpDecorate %475 RelaxedPrecision
 OpDecorate %476 RelaxedPrecision
-OpDecorate %477 RelaxedPrecision
-OpDecorate %478 RelaxedPrecision
-OpDecorate %479 RelaxedPrecision
-OpDecorate %480 RelaxedPrecision
-OpDecorate %481 RelaxedPrecision
-OpDecorate %482 RelaxedPrecision
-OpDecorate %483 RelaxedPrecision
-OpDecorate %512 RelaxedPrecision
-OpDecorate %515 RelaxedPrecision
-OpDecorate %516 RelaxedPrecision
-OpDecorate %517 RelaxedPrecision
-OpDecorate %518 RelaxedPrecision
-OpDecorate %519 RelaxedPrecision
-OpDecorate %520 RelaxedPrecision
-OpDecorate %521 RelaxedPrecision
-OpDecorate %522 RelaxedPrecision
-OpDecorate %523 RelaxedPrecision
-OpDecorate %524 RelaxedPrecision
-OpDecorate %525 RelaxedPrecision
-OpDecorate %526 RelaxedPrecision
-OpDecorate %555 RelaxedPrecision
-OpDecorate %558 RelaxedPrecision
-OpDecorate %559 RelaxedPrecision
-OpDecorate %560 RelaxedPrecision
-OpDecorate %561 RelaxedPrecision
-OpDecorate %562 RelaxedPrecision
-OpDecorate %563 RelaxedPrecision
-OpDecorate %564 RelaxedPrecision
+OpDecorate %511 RelaxedPrecision
+OpDecorate %544 RelaxedPrecision
 OpDecorate %565 RelaxedPrecision
-OpDecorate %566 RelaxedPrecision
-OpDecorate %567 RelaxedPrecision
-OpDecorate %568 RelaxedPrecision
-OpDecorate %569 RelaxedPrecision
-OpDecorate %602 RelaxedPrecision
-OpDecorate %611 RelaxedPrecision
-OpDecorate %632 RelaxedPrecision
-OpDecorate %654 RelaxedPrecision
-OpDecorate %682 RelaxedPrecision
-OpDecorate %711 RelaxedPrecision
-OpDecorate %746 RelaxedPrecision
-OpDecorate %779 RelaxedPrecision
-OpDecorate %800 RelaxedPrecision
-OpDecorate %833 RelaxedPrecision
-OpDecorate %863 RelaxedPrecision
-OpDecorate %896 RelaxedPrecision
-OpDecorate %921 RelaxedPrecision
-OpDecorate %947 RelaxedPrecision
-OpDecorate %980 RelaxedPrecision
-OpDecorate %1012 RelaxedPrecision
-OpDecorate %1054 RelaxedPrecision
-OpDecorate %1097 RelaxedPrecision
-OpDecorate %1144 RelaxedPrecision
-OpDecorate %1156 RelaxedPrecision
-OpDecorate %1159 RelaxedPrecision
-OpDecorate %1160 RelaxedPrecision
+OpDecorate %598 RelaxedPrecision
+OpDecorate %628 RelaxedPrecision
+OpDecorate %661 RelaxedPrecision
+OpDecorate %678 RelaxedPrecision
+OpDecorate %692 RelaxedPrecision
+OpDecorate %695 RelaxedPrecision
+OpDecorate %696 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -273,17 +197,16 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%v2float = OpTypeVector %float 2
-%mat2v2float = OpTypeMatrix %v2float 2
-%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
+%_UniformBuffer = OpTypeStruct %v4float %v4float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%18 = OpTypeFunction %void
+%16 = OpTypeFunction %void
+%v2float = OpTypeVector %float 2
 %float_0 = OpConstant %float 0
-%21 = OpConstantComposite %v2float %float_0 %float_0
+%20 = OpConstantComposite %v2float %float_0 %float_0
 %_ptr_Function_v2float = OpTypePointer Function %v2float
-%25 = OpTypeFunction %bool
+%24 = OpTypeFunction %bool
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
 %v3float = OpTypeVector %float 3
@@ -309,6 +232,7 @@
 %mat4v3float = OpTypeMatrix %v3float 4
 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
 %float_7 = OpConstant %float 7
+%mat2v2float = OpTypeMatrix %v2float 2
 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
 %float_8 = OpConstant %float 8
 %mat3v3float = OpTypeMatrix %v3float 3
@@ -317,24 +241,22 @@
 %float_1 = OpConstant %float 1
 %float_n2 = OpConstant %float -2
 %float_0_75 = OpConstant %float 0.75
+%368 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
-%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
-%int = OpTypeInt 32 1
-%int_2 = OpConstant %int 2
-%603 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
-%_entrypoint_v = OpFunction %void None %18
-%19 = OpLabel
-%22 = OpVariable %_ptr_Function_v2float Function
-OpStore %22 %21
-%24 = OpFunctionCall %v4float %main %22
-OpStore %sk_FragColor %24
+%_entrypoint_v = OpFunction %void None %16
+%17 = OpLabel
+%21 = OpVariable %_ptr_Function_v2float Function
+OpStore %21 %20
+%23 = OpFunctionCall %v4float %main %21
+OpStore %sk_FragColor %23
 OpReturn
 OpFunctionEnd
-%test_half_b = OpFunction %bool None %25
-%26 = OpLabel
+%test_half_b = OpFunction %bool None %24
+%25 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
 %m23 = OpVariable %_ptr_Function_mat2v3float Function
 %m24 = OpVariable %_ptr_Function_mat2v4float Function
@@ -344,200 +266,199 @@
 %m43 = OpVariable %_ptr_Function_mat4v3float Function
 %m22 = OpVariable %_ptr_Function_mat2v2float Function
 %m33 = OpVariable %_ptr_Function_mat3v3float Function
-%h4 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
-%36 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
-%37 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
-%35 = OpCompositeConstruct %mat2v3float %36 %37
-OpStore %m23 %35
-%39 = OpLoad %bool %ok
-OpSelectionMerge %41 None
-OpBranchConditional %39 %40 %41
+%35 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
+%36 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
+%34 = OpCompositeConstruct %mat2v3float %35 %36
+OpStore %m23 %34
+%38 = OpLoad %bool %ok
+OpSelectionMerge %40 None
+OpBranchConditional %38 %39 %40
+%39 = OpLabel
+%41 = OpLoad %mat2v3float %m23
+%42 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
+%43 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
+%44 = OpCompositeConstruct %mat2v3float %42 %43
+%46 = OpCompositeExtract %v3float %41 0
+%47 = OpCompositeExtract %v3float %44 0
+%48 = OpFOrdEqual %v3bool %46 %47
+%49 = OpAll %bool %48
+%50 = OpCompositeExtract %v3float %41 1
+%51 = OpCompositeExtract %v3float %44 1
+%52 = OpFOrdEqual %v3bool %50 %51
+%53 = OpAll %bool %52
+%54 = OpLogicalAnd %bool %49 %53
+OpBranch %40
 %40 = OpLabel
-%42 = OpLoad %mat2v3float %m23
-%43 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
-%44 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
-%45 = OpCompositeConstruct %mat2v3float %43 %44
-%47 = OpCompositeExtract %v3float %42 0
-%48 = OpCompositeExtract %v3float %45 0
-%49 = OpFOrdEqual %v3bool %47 %48
-%50 = OpAll %bool %49
-%51 = OpCompositeExtract %v3float %42 1
-%52 = OpCompositeExtract %v3float %45 1
-%53 = OpFOrdEqual %v3bool %51 %52
-%54 = OpAll %bool %53
-%55 = OpLogicalAnd %bool %50 %54
-OpBranch %41
-%41 = OpLabel
-%56 = OpPhi %bool %false %26 %55 %40
-OpStore %ok %56
-%62 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
-%63 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
-%61 = OpCompositeConstruct %mat2v4float %62 %63
-OpStore %m24 %61
-%64 = OpLoad %bool %ok
-OpSelectionMerge %66 None
-OpBranchConditional %64 %65 %66
+%55 = OpPhi %bool %false %25 %54 %39
+OpStore %ok %55
+%61 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
+%62 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
+%60 = OpCompositeConstruct %mat2v4float %61 %62
+OpStore %m24 %60
+%63 = OpLoad %bool %ok
+OpSelectionMerge %65 None
+OpBranchConditional %63 %64 %65
+%64 = OpLabel
+%66 = OpLoad %mat2v4float %m24
+%67 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
+%68 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
+%69 = OpCompositeConstruct %mat2v4float %67 %68
+%71 = OpCompositeExtract %v4float %66 0
+%72 = OpCompositeExtract %v4float %69 0
+%73 = OpFOrdEqual %v4bool %71 %72
+%74 = OpAll %bool %73
+%75 = OpCompositeExtract %v4float %66 1
+%76 = OpCompositeExtract %v4float %69 1
+%77 = OpFOrdEqual %v4bool %75 %76
+%78 = OpAll %bool %77
+%79 = OpLogicalAnd %bool %74 %78
+OpBranch %65
 %65 = OpLabel
-%67 = OpLoad %mat2v4float %m24
-%68 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
-%69 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
-%70 = OpCompositeConstruct %mat2v4float %68 %69
-%72 = OpCompositeExtract %v4float %67 0
-%73 = OpCompositeExtract %v4float %70 0
-%74 = OpFOrdEqual %v4bool %72 %73
-%75 = OpAll %bool %74
-%76 = OpCompositeExtract %v4float %67 1
-%77 = OpCompositeExtract %v4float %70 1
-%78 = OpFOrdEqual %v4bool %76 %77
-%79 = OpAll %bool %78
-%80 = OpLogicalAnd %bool %75 %79
-OpBranch %66
-%66 = OpLabel
-%81 = OpPhi %bool %false %41 %80 %65
-OpStore %ok %81
-%87 = OpCompositeConstruct %v2float %float_4 %float_0
-%88 = OpCompositeConstruct %v2float %float_0 %float_4
-%89 = OpCompositeConstruct %v2float %float_0 %float_0
-%86 = OpCompositeConstruct %mat3v2float %87 %88 %89
-OpStore %m32 %86
-%90 = OpLoad %bool %ok
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
+%80 = OpPhi %bool %false %40 %79 %64
+OpStore %ok %80
+%86 = OpCompositeConstruct %v2float %float_4 %float_0
+%87 = OpCompositeConstruct %v2float %float_0 %float_4
+%88 = OpCompositeConstruct %v2float %float_0 %float_0
+%85 = OpCompositeConstruct %mat3v2float %86 %87 %88
+OpStore %m32 %85
+%89 = OpLoad %bool %ok
+OpSelectionMerge %91 None
+OpBranchConditional %89 %90 %91
+%90 = OpLabel
+%92 = OpLoad %mat3v2float %m32
+%93 = OpCompositeConstruct %v2float %float_4 %float_0
+%94 = OpCompositeConstruct %v2float %float_0 %float_4
+%95 = OpCompositeConstruct %v2float %float_0 %float_0
+%96 = OpCompositeConstruct %mat3v2float %93 %94 %95
+%98 = OpCompositeExtract %v2float %92 0
+%99 = OpCompositeExtract %v2float %96 0
+%100 = OpFOrdEqual %v2bool %98 %99
+%101 = OpAll %bool %100
+%102 = OpCompositeExtract %v2float %92 1
+%103 = OpCompositeExtract %v2float %96 1
+%104 = OpFOrdEqual %v2bool %102 %103
+%105 = OpAll %bool %104
+%106 = OpLogicalAnd %bool %101 %105
+%107 = OpCompositeExtract %v2float %92 2
+%108 = OpCompositeExtract %v2float %96 2
+%109 = OpFOrdEqual %v2bool %107 %108
+%110 = OpAll %bool %109
+%111 = OpLogicalAnd %bool %106 %110
+OpBranch %91
 %91 = OpLabel
-%93 = OpLoad %mat3v2float %m32
-%94 = OpCompositeConstruct %v2float %float_4 %float_0
-%95 = OpCompositeConstruct %v2float %float_0 %float_4
-%96 = OpCompositeConstruct %v2float %float_0 %float_0
-%97 = OpCompositeConstruct %mat3v2float %94 %95 %96
-%99 = OpCompositeExtract %v2float %93 0
-%100 = OpCompositeExtract %v2float %97 0
-%101 = OpFOrdEqual %v2bool %99 %100
-%102 = OpAll %bool %101
-%103 = OpCompositeExtract %v2float %93 1
-%104 = OpCompositeExtract %v2float %97 1
-%105 = OpFOrdEqual %v2bool %103 %104
-%106 = OpAll %bool %105
-%107 = OpLogicalAnd %bool %102 %106
-%108 = OpCompositeExtract %v2float %93 2
-%109 = OpCompositeExtract %v2float %97 2
-%110 = OpFOrdEqual %v2bool %108 %109
-%111 = OpAll %bool %110
-%112 = OpLogicalAnd %bool %107 %111
-OpBranch %92
-%92 = OpLabel
-%113 = OpPhi %bool %false %66 %112 %91
-OpStore %ok %113
-%119 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
-%120 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
-%121 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
-%118 = OpCompositeConstruct %mat3v4float %119 %120 %121
-OpStore %m34 %118
-%122 = OpLoad %bool %ok
-OpSelectionMerge %124 None
-OpBranchConditional %122 %123 %124
+%112 = OpPhi %bool %false %65 %111 %90
+OpStore %ok %112
+%118 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
+%119 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
+%120 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
+%117 = OpCompositeConstruct %mat3v4float %118 %119 %120
+OpStore %m34 %117
+%121 = OpLoad %bool %ok
+OpSelectionMerge %123 None
+OpBranchConditional %121 %122 %123
+%122 = OpLabel
+%124 = OpLoad %mat3v4float %m34
+%125 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
+%126 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
+%127 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
+%128 = OpCompositeConstruct %mat3v4float %125 %126 %127
+%129 = OpCompositeExtract %v4float %124 0
+%130 = OpCompositeExtract %v4float %128 0
+%131 = OpFOrdEqual %v4bool %129 %130
+%132 = OpAll %bool %131
+%133 = OpCompositeExtract %v4float %124 1
+%134 = OpCompositeExtract %v4float %128 1
+%135 = OpFOrdEqual %v4bool %133 %134
+%136 = OpAll %bool %135
+%137 = OpLogicalAnd %bool %132 %136
+%138 = OpCompositeExtract %v4float %124 2
+%139 = OpCompositeExtract %v4float %128 2
+%140 = OpFOrdEqual %v4bool %138 %139
+%141 = OpAll %bool %140
+%142 = OpLogicalAnd %bool %137 %141
+OpBranch %123
 %123 = OpLabel
-%125 = OpLoad %mat3v4float %m34
-%126 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
-%127 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
-%128 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
-%129 = OpCompositeConstruct %mat3v4float %126 %127 %128
-%130 = OpCompositeExtract %v4float %125 0
-%131 = OpCompositeExtract %v4float %129 0
-%132 = OpFOrdEqual %v4bool %130 %131
-%133 = OpAll %bool %132
-%134 = OpCompositeExtract %v4float %125 1
-%135 = OpCompositeExtract %v4float %129 1
-%136 = OpFOrdEqual %v4bool %134 %135
-%137 = OpAll %bool %136
-%138 = OpLogicalAnd %bool %133 %137
-%139 = OpCompositeExtract %v4float %125 2
-%140 = OpCompositeExtract %v4float %129 2
-%141 = OpFOrdEqual %v4bool %139 %140
-%142 = OpAll %bool %141
-%143 = OpLogicalAnd %bool %138 %142
-OpBranch %124
-%124 = OpLabel
-%144 = OpPhi %bool %false %92 %143 %123
-OpStore %ok %144
-%150 = OpCompositeConstruct %v2float %float_6 %float_0
-%151 = OpCompositeConstruct %v2float %float_0 %float_6
+%143 = OpPhi %bool %false %91 %142 %122
+OpStore %ok %143
+%149 = OpCompositeConstruct %v2float %float_6 %float_0
+%150 = OpCompositeConstruct %v2float %float_0 %float_6
+%151 = OpCompositeConstruct %v2float %float_0 %float_0
 %152 = OpCompositeConstruct %v2float %float_0 %float_0
-%153 = OpCompositeConstruct %v2float %float_0 %float_0
-%149 = OpCompositeConstruct %mat4v2float %150 %151 %152 %153
-OpStore %m42 %149
-%154 = OpLoad %bool %ok
-OpSelectionMerge %156 None
-OpBranchConditional %154 %155 %156
-%155 = OpLabel
-%157 = OpLoad %mat4v2float %m42
-%158 = OpCompositeConstruct %v2float %float_6 %float_0
-%159 = OpCompositeConstruct %v2float %float_0 %float_6
+%148 = OpCompositeConstruct %mat4v2float %149 %150 %151 %152
+OpStore %m42 %148
+%153 = OpLoad %bool %ok
+OpSelectionMerge %155 None
+OpBranchConditional %153 %154 %155
+%154 = OpLabel
+%156 = OpLoad %mat4v2float %m42
+%157 = OpCompositeConstruct %v2float %float_6 %float_0
+%158 = OpCompositeConstruct %v2float %float_0 %float_6
+%159 = OpCompositeConstruct %v2float %float_0 %float_0
 %160 = OpCompositeConstruct %v2float %float_0 %float_0
-%161 = OpCompositeConstruct %v2float %float_0 %float_0
-%162 = OpCompositeConstruct %mat4v2float %158 %159 %160 %161
-%163 = OpCompositeExtract %v2float %157 0
-%164 = OpCompositeExtract %v2float %162 0
-%165 = OpFOrdEqual %v2bool %163 %164
-%166 = OpAll %bool %165
-%167 = OpCompositeExtract %v2float %157 1
-%168 = OpCompositeExtract %v2float %162 1
-%169 = OpFOrdEqual %v2bool %167 %168
-%170 = OpAll %bool %169
-%171 = OpLogicalAnd %bool %166 %170
-%172 = OpCompositeExtract %v2float %157 2
-%173 = OpCompositeExtract %v2float %162 2
-%174 = OpFOrdEqual %v2bool %172 %173
-%175 = OpAll %bool %174
-%176 = OpLogicalAnd %bool %171 %175
-%177 = OpCompositeExtract %v2float %157 3
-%178 = OpCompositeExtract %v2float %162 3
-%179 = OpFOrdEqual %v2bool %177 %178
-%180 = OpAll %bool %179
-%181 = OpLogicalAnd %bool %176 %180
-OpBranch %156
-%156 = OpLabel
-%182 = OpPhi %bool %false %124 %181 %155
-OpStore %ok %182
-%188 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
-%189 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
-%190 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
-%191 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%187 = OpCompositeConstruct %mat4v3float %188 %189 %190 %191
-OpStore %m43 %187
-%192 = OpLoad %bool %ok
-OpSelectionMerge %194 None
-OpBranchConditional %192 %193 %194
+%161 = OpCompositeConstruct %mat4v2float %157 %158 %159 %160
+%162 = OpCompositeExtract %v2float %156 0
+%163 = OpCompositeExtract %v2float %161 0
+%164 = OpFOrdEqual %v2bool %162 %163
+%165 = OpAll %bool %164
+%166 = OpCompositeExtract %v2float %156 1
+%167 = OpCompositeExtract %v2float %161 1
+%168 = OpFOrdEqual %v2bool %166 %167
+%169 = OpAll %bool %168
+%170 = OpLogicalAnd %bool %165 %169
+%171 = OpCompositeExtract %v2float %156 2
+%172 = OpCompositeExtract %v2float %161 2
+%173 = OpFOrdEqual %v2bool %171 %172
+%174 = OpAll %bool %173
+%175 = OpLogicalAnd %bool %170 %174
+%176 = OpCompositeExtract %v2float %156 3
+%177 = OpCompositeExtract %v2float %161 3
+%178 = OpFOrdEqual %v2bool %176 %177
+%179 = OpAll %bool %178
+%180 = OpLogicalAnd %bool %175 %179
+OpBranch %155
+%155 = OpLabel
+%181 = OpPhi %bool %false %123 %180 %154
+OpStore %ok %181
+%187 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
+%188 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
+%189 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
+%190 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%186 = OpCompositeConstruct %mat4v3float %187 %188 %189 %190
+OpStore %m43 %186
+%191 = OpLoad %bool %ok
+OpSelectionMerge %193 None
+OpBranchConditional %191 %192 %193
+%192 = OpLabel
+%194 = OpLoad %mat4v3float %m43
+%195 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
+%196 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
+%197 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
+%198 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%199 = OpCompositeConstruct %mat4v3float %195 %196 %197 %198
+%200 = OpCompositeExtract %v3float %194 0
+%201 = OpCompositeExtract %v3float %199 0
+%202 = OpFOrdEqual %v3bool %200 %201
+%203 = OpAll %bool %202
+%204 = OpCompositeExtract %v3float %194 1
+%205 = OpCompositeExtract %v3float %199 1
+%206 = OpFOrdEqual %v3bool %204 %205
+%207 = OpAll %bool %206
+%208 = OpLogicalAnd %bool %203 %207
+%209 = OpCompositeExtract %v3float %194 2
+%210 = OpCompositeExtract %v3float %199 2
+%211 = OpFOrdEqual %v3bool %209 %210
+%212 = OpAll %bool %211
+%213 = OpLogicalAnd %bool %208 %212
+%214 = OpCompositeExtract %v3float %194 3
+%215 = OpCompositeExtract %v3float %199 3
+%216 = OpFOrdEqual %v3bool %214 %215
+%217 = OpAll %bool %216
+%218 = OpLogicalAnd %bool %213 %217
+OpBranch %193
 %193 = OpLabel
-%195 = OpLoad %mat4v3float %m43
-%196 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
-%197 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
-%198 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
-%199 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%200 = OpCompositeConstruct %mat4v3float %196 %197 %198 %199
-%201 = OpCompositeExtract %v3float %195 0
-%202 = OpCompositeExtract %v3float %200 0
-%203 = OpFOrdEqual %v3bool %201 %202
-%204 = OpAll %bool %203
-%205 = OpCompositeExtract %v3float %195 1
-%206 = OpCompositeExtract %v3float %200 1
-%207 = OpFOrdEqual %v3bool %205 %206
-%208 = OpAll %bool %207
-%209 = OpLogicalAnd %bool %204 %208
-%210 = OpCompositeExtract %v3float %195 2
-%211 = OpCompositeExtract %v3float %200 2
-%212 = OpFOrdEqual %v3bool %210 %211
-%213 = OpAll %bool %212
-%214 = OpLogicalAnd %bool %209 %213
-%215 = OpCompositeExtract %v3float %195 3
-%216 = OpCompositeExtract %v3float %200 3
-%217 = OpFOrdEqual %v3bool %215 %216
-%218 = OpAll %bool %217
-%219 = OpLogicalAnd %bool %214 %218
-OpBranch %194
-%194 = OpLabel
-%220 = OpPhi %bool %false %156 %219 %193
-OpStore %ok %220
+%219 = OpPhi %bool %false %155 %218 %192
+OpStore %ok %219
 %223 = OpLoad %mat3v2float %m32
 %224 = OpLoad %mat2v3float %m23
 %225 = OpMatrixTimesMatrix %mat2v2float %223 %224
@@ -561,7 +482,7 @@
 %242 = OpLogicalAnd %bool %237 %241
 OpBranch %228
 %228 = OpLabel
-%243 = OpPhi %bool %false %194 %242 %227
+%243 = OpPhi %bool %false %193 %242 %227
 OpStore %ok %243
 %247 = OpLoad %mat4v3float %m43
 %248 = OpLoad %mat3v4float %m34
@@ -699,267 +620,12 @@
 %351 = OpLabel
 %366 = OpPhi %bool %false %317 %365 %350
 OpStore %ok %366
-%369 = OpAccessChain %_ptr_Uniform_mat2v2float %11 %int_2
-%373 = OpLoad %mat2v2float %369
-%374 = OpCompositeExtract %float %373 0 0
-%375 = OpCompositeExtract %float %373 0 1
-%376 = OpCompositeExtract %float %373 1 0
-%377 = OpCompositeExtract %float %373 1 1
-%378 = OpCompositeConstruct %v4float %374 %375 %376 %377
-OpStore %h4 %378
-%379 = OpLoad %bool %ok
-OpSelectionMerge %381 None
-OpBranchConditional %379 %380 %381
-%380 = OpLabel
-%382 = OpLoad %v4float %h4
-%383 = OpVectorShuffle %v3float %382 %382 0 1 2
-%384 = OpLoad %v4float %h4
-%385 = OpCompositeExtract %float %384 3
-%386 = OpLoad %v4float %h4
-%387 = OpVectorShuffle %v2float %386 %386 0 1
-%388 = OpCompositeExtract %float %387 0
-%389 = OpCompositeExtract %float %387 1
-%390 = OpCompositeConstruct %v3float %385 %388 %389
-%391 = OpCompositeConstruct %mat2v3float %383 %390
-%392 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%393 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%394 = OpCompositeConstruct %mat2v3float %392 %393
-%395 = OpCompositeExtract %v3float %391 0
-%396 = OpCompositeExtract %v3float %394 0
-%397 = OpFOrdEqual %v3bool %395 %396
-%398 = OpAll %bool %397
-%399 = OpCompositeExtract %v3float %391 1
-%400 = OpCompositeExtract %v3float %394 1
-%401 = OpFOrdEqual %v3bool %399 %400
-%402 = OpAll %bool %401
-%403 = OpLogicalAnd %bool %398 %402
-OpBranch %381
-%381 = OpLabel
-%404 = OpPhi %bool %false %351 %403 %380
-OpStore %ok %404
-%405 = OpLoad %bool %ok
-OpSelectionMerge %407 None
-OpBranchConditional %405 %406 %407
-%406 = OpLabel
-%408 = OpLoad %v4float %h4
-%409 = OpVectorShuffle %v3float %408 %408 0 1 2
-%410 = OpLoad %v4float %h4
-%411 = OpCompositeExtract %float %410 3
-%412 = OpLoad %v4float %h4
-%413 = OpCompositeExtract %float %412 0
-%414 = OpLoad %v4float %h4
-%415 = OpVectorShuffle %v3float %414 %414 1 2 3
-%416 = OpCompositeExtract %float %409 0
-%417 = OpCompositeExtract %float %409 1
-%418 = OpCompositeExtract %float %409 2
-%419 = OpCompositeConstruct %v4float %416 %417 %418 %411
-%420 = OpCompositeExtract %float %415 0
-%421 = OpCompositeExtract %float %415 1
-%422 = OpCompositeExtract %float %415 2
-%423 = OpCompositeConstruct %v4float %413 %420 %421 %422
-%424 = OpCompositeConstruct %mat2v4float %419 %423
-%425 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%426 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%427 = OpCompositeConstruct %mat2v4float %425 %426
-%428 = OpCompositeExtract %v4float %424 0
-%429 = OpCompositeExtract %v4float %427 0
-%430 = OpFOrdEqual %v4bool %428 %429
-%431 = OpAll %bool %430
-%432 = OpCompositeExtract %v4float %424 1
-%433 = OpCompositeExtract %v4float %427 1
-%434 = OpFOrdEqual %v4bool %432 %433
-%435 = OpAll %bool %434
-%436 = OpLogicalAnd %bool %431 %435
-OpBranch %407
-%407 = OpLabel
-%437 = OpPhi %bool %false %381 %436 %406
-OpStore %ok %437
-%438 = OpLoad %bool %ok
-OpSelectionMerge %440 None
-OpBranchConditional %438 %439 %440
-%439 = OpLabel
-%441 = OpLoad %v4float %h4
-%442 = OpVectorShuffle %v2float %441 %441 0 1
-%443 = OpLoad %v4float %h4
-%444 = OpVectorShuffle %v2float %443 %443 2 3
-%445 = OpLoad %v4float %h4
-%446 = OpCompositeExtract %float %445 0
-%447 = OpLoad %v4float %h4
-%448 = OpCompositeExtract %float %447 1
-%449 = OpCompositeConstruct %v2float %446 %448
-%450 = OpCompositeConstruct %mat3v2float %442 %444 %449
-%451 = OpCompositeConstruct %v2float %float_1 %float_2
-%452 = OpCompositeConstruct %v2float %float_3 %float_4
-%453 = OpCompositeConstruct %v2float %float_1 %float_2
-%454 = OpCompositeConstruct %mat3v2float %451 %452 %453
-%455 = OpCompositeExtract %v2float %450 0
-%456 = OpCompositeExtract %v2float %454 0
-%457 = OpFOrdEqual %v2bool %455 %456
-%458 = OpAll %bool %457
-%459 = OpCompositeExtract %v2float %450 1
-%460 = OpCompositeExtract %v2float %454 1
-%461 = OpFOrdEqual %v2bool %459 %460
-%462 = OpAll %bool %461
-%463 = OpLogicalAnd %bool %458 %462
-%464 = OpCompositeExtract %v2float %450 2
-%465 = OpCompositeExtract %v2float %454 2
-%466 = OpFOrdEqual %v2bool %464 %465
-%467 = OpAll %bool %466
-%468 = OpLogicalAnd %bool %463 %467
-OpBranch %440
-%440 = OpLabel
-%469 = OpPhi %bool %false %407 %468 %439
-OpStore %ok %469
-%470 = OpLoad %bool %ok
-OpSelectionMerge %472 None
-OpBranchConditional %470 %471 %472
-%471 = OpLabel
-%473 = OpLoad %v4float %h4
-%474 = OpVectorShuffle %v2float %473 %473 0 1
-%475 = OpLoad %v4float %h4
-%476 = OpVectorShuffle %v2float %475 %475 2 3
-%477 = OpLoad %v4float %h4
-%478 = OpLoad %v4float %h4
-%479 = OpCompositeExtract %float %478 0
-%480 = OpLoad %v4float %h4
-%481 = OpVectorShuffle %v2float %480 %480 1 2
-%482 = OpLoad %v4float %h4
-%483 = OpCompositeExtract %float %482 3
-%484 = OpCompositeExtract %float %474 0
-%485 = OpCompositeExtract %float %474 1
-%486 = OpCompositeExtract %float %476 0
-%487 = OpCompositeExtract %float %476 1
-%488 = OpCompositeConstruct %v4float %484 %485 %486 %487
-%489 = OpCompositeExtract %float %481 0
-%490 = OpCompositeExtract %float %481 1
-%491 = OpCompositeConstruct %v4float %479 %489 %490 %483
-%492 = OpCompositeConstruct %mat3v4float %488 %477 %491
-%493 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%494 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%495 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%496 = OpCompositeConstruct %mat3v4float %493 %494 %495
-%497 = OpCompositeExtract %v4float %492 0
-%498 = OpCompositeExtract %v4float %496 0
-%499 = OpFOrdEqual %v4bool %497 %498
-%500 = OpAll %bool %499
-%501 = OpCompositeExtract %v4float %492 1
-%502 = OpCompositeExtract %v4float %496 1
-%503 = OpFOrdEqual %v4bool %501 %502
-%504 = OpAll %bool %503
-%505 = OpLogicalAnd %bool %500 %504
-%506 = OpCompositeExtract %v4float %492 2
-%507 = OpCompositeExtract %v4float %496 2
-%508 = OpFOrdEqual %v4bool %506 %507
-%509 = OpAll %bool %508
-%510 = OpLogicalAnd %bool %505 %509
-OpBranch %472
-%472 = OpLabel
-%511 = OpPhi %bool %false %440 %510 %471
-OpStore %ok %511
-%512 = OpLoad %bool %ok
-OpSelectionMerge %514 None
-OpBranchConditional %512 %513 %514
-%513 = OpLabel
-%515 = OpLoad %v4float %h4
-%516 = OpVectorShuffle %v2float %515 %515 0 1
-%517 = OpLoad %v4float %h4
-%518 = OpCompositeExtract %float %517 2
-%519 = OpLoad %v4float %h4
-%520 = OpCompositeExtract %float %519 3
-%521 = OpLoad %v4float %h4
-%522 = OpVectorShuffle %v2float %521 %521 0 1
-%523 = OpLoad %v4float %h4
-%524 = OpCompositeExtract %float %523 2
-%525 = OpLoad %v4float %h4
-%526 = OpCompositeExtract %float %525 3
-%527 = OpCompositeConstruct %v2float %518 %520
-%528 = OpCompositeConstruct %v2float %524 %526
-%529 = OpCompositeConstruct %mat4v2float %516 %527 %522 %528
-%530 = OpCompositeConstruct %v2float %float_1 %float_2
-%531 = OpCompositeConstruct %v2float %float_3 %float_4
-%532 = OpCompositeConstruct %v2float %float_1 %float_2
-%533 = OpCompositeConstruct %v2float %float_3 %float_4
-%534 = OpCompositeConstruct %mat4v2float %530 %531 %532 %533
-%535 = OpCompositeExtract %v2float %529 0
-%536 = OpCompositeExtract %v2float %534 0
-%537 = OpFOrdEqual %v2bool %535 %536
-%538 = OpAll %bool %537
-%539 = OpCompositeExtract %v2float %529 1
-%540 = OpCompositeExtract %v2float %534 1
-%541 = OpFOrdEqual %v2bool %539 %540
-%542 = OpAll %bool %541
-%543 = OpLogicalAnd %bool %538 %542
-%544 = OpCompositeExtract %v2float %529 2
-%545 = OpCompositeExtract %v2float %534 2
-%546 = OpFOrdEqual %v2bool %544 %545
-%547 = OpAll %bool %546
-%548 = OpLogicalAnd %bool %543 %547
-%549 = OpCompositeExtract %v2float %529 3
-%550 = OpCompositeExtract %v2float %534 3
-%551 = OpFOrdEqual %v2bool %549 %550
-%552 = OpAll %bool %551
-%553 = OpLogicalAnd %bool %548 %552
-OpBranch %514
-%514 = OpLabel
-%554 = OpPhi %bool %false %472 %553 %513
-OpStore %ok %554
-%555 = OpLoad %bool %ok
-OpSelectionMerge %557 None
-OpBranchConditional %555 %556 %557
-%556 = OpLabel
-%558 = OpLoad %v4float %h4
-%559 = OpCompositeExtract %float %558 0
-%560 = OpLoad %v4float %h4
-%561 = OpVectorShuffle %v2float %560 %560 1 2
-%562 = OpLoad %v4float %h4
-%563 = OpVectorShuffle %v2float %562 %562 3 0
-%564 = OpLoad %v4float %h4
-%565 = OpCompositeExtract %float %564 1
-%566 = OpLoad %v4float %h4
-%567 = OpVectorShuffle %v3float %566 %566 2 3 0
-%568 = OpLoad %v4float %h4
-%569 = OpVectorShuffle %v3float %568 %568 1 2 3
-%570 = OpCompositeExtract %float %561 0
-%571 = OpCompositeExtract %float %561 1
-%572 = OpCompositeConstruct %v3float %559 %570 %571
-%573 = OpCompositeExtract %float %563 0
-%574 = OpCompositeExtract %float %563 1
-%575 = OpCompositeConstruct %v3float %573 %574 %565
-%576 = OpCompositeConstruct %mat4v3float %572 %575 %567 %569
-%577 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%578 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%579 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
-%580 = OpCompositeConstruct %v3float %float_2 %float_3 %float_4
-%581 = OpCompositeConstruct %mat4v3float %577 %578 %579 %580
-%582 = OpCompositeExtract %v3float %576 0
-%583 = OpCompositeExtract %v3float %581 0
-%584 = OpFOrdEqual %v3bool %582 %583
-%585 = OpAll %bool %584
-%586 = OpCompositeExtract %v3float %576 1
-%587 = OpCompositeExtract %v3float %581 1
-%588 = OpFOrdEqual %v3bool %586 %587
-%589 = OpAll %bool %588
-%590 = OpLogicalAnd %bool %585 %589
-%591 = OpCompositeExtract %v3float %576 2
-%592 = OpCompositeExtract %v3float %581 2
-%593 = OpFOrdEqual %v3bool %591 %592
-%594 = OpAll %bool %593
-%595 = OpLogicalAnd %bool %590 %594
-%596 = OpCompositeExtract %v3float %576 3
-%597 = OpCompositeExtract %v3float %581 3
-%598 = OpFOrdEqual %v3bool %596 %597
-%599 = OpAll %bool %598
-%600 = OpLogicalAnd %bool %595 %599
-OpBranch %557
-%557 = OpLabel
-%601 = OpPhi %bool %false %514 %600 %556
-OpStore %ok %601
-%602 = OpLoad %bool %ok
-OpReturnValue %602
+%367 = OpLoad %bool %ok
+OpReturnValue %367
 OpFunctionEnd
-%main = OpFunction %v4float None %603
-%604 = OpFunctionParameter %_ptr_Function_v2float
-%605 = OpLabel
+%main = OpFunction %v4float None %368
+%369 = OpFunctionParameter %_ptr_Function_v2float
+%370 = OpLabel
 %_0_ok = OpVariable %_ptr_Function_bool Function
 %_1_m23 = OpVariable %_ptr_Function_mat2v3float Function
 %_2_m24 = OpVariable %_ptr_Function_mat2v4float Function
@@ -969,638 +635,382 @@
 %_6_m43 = OpVariable %_ptr_Function_mat4v3float Function
 %_7_m22 = OpVariable %_ptr_Function_mat2v2float Function
 %_8_m33 = OpVariable %_ptr_Function_mat3v3float Function
-%_10_f4 = OpVariable %_ptr_Function_v4float Function
-%1149 = OpVariable %_ptr_Function_v4float Function
+%683 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
-%609 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
-%610 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
-%608 = OpCompositeConstruct %mat2v3float %609 %610
-OpStore %_1_m23 %608
-%611 = OpLoad %bool %_0_ok
-OpSelectionMerge %613 None
-OpBranchConditional %611 %612 %613
-%612 = OpLabel
-%614 = OpLoad %mat2v3float %_1_m23
-%615 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
-%616 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
-%617 = OpCompositeConstruct %mat2v3float %615 %616
-%618 = OpCompositeExtract %v3float %614 0
-%619 = OpCompositeExtract %v3float %617 0
-%620 = OpFOrdEqual %v3bool %618 %619
-%621 = OpAll %bool %620
-%622 = OpCompositeExtract %v3float %614 1
-%623 = OpCompositeExtract %v3float %617 1
-%624 = OpFOrdEqual %v3bool %622 %623
-%625 = OpAll %bool %624
-%626 = OpLogicalAnd %bool %621 %625
-OpBranch %613
-%613 = OpLabel
-%627 = OpPhi %bool %false %605 %626 %612
-OpStore %_0_ok %627
-%630 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
-%631 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
-%629 = OpCompositeConstruct %mat2v4float %630 %631
-OpStore %_2_m24 %629
-%632 = OpLoad %bool %_0_ok
-OpSelectionMerge %634 None
-OpBranchConditional %632 %633 %634
-%633 = OpLabel
-%635 = OpLoad %mat2v4float %_2_m24
-%636 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
-%637 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
-%638 = OpCompositeConstruct %mat2v4float %636 %637
-%639 = OpCompositeExtract %v4float %635 0
-%640 = OpCompositeExtract %v4float %638 0
-%641 = OpFOrdEqual %v4bool %639 %640
-%642 = OpAll %bool %641
-%643 = OpCompositeExtract %v4float %635 1
-%644 = OpCompositeExtract %v4float %638 1
-%645 = OpFOrdEqual %v4bool %643 %644
-%646 = OpAll %bool %645
-%647 = OpLogicalAnd %bool %642 %646
-OpBranch %634
-%634 = OpLabel
-%648 = OpPhi %bool %false %613 %647 %633
-OpStore %_0_ok %648
-%651 = OpCompositeConstruct %v2float %float_4 %float_0
-%652 = OpCompositeConstruct %v2float %float_0 %float_4
-%653 = OpCompositeConstruct %v2float %float_0 %float_0
-%650 = OpCompositeConstruct %mat3v2float %651 %652 %653
-OpStore %_3_m32 %650
-%654 = OpLoad %bool %_0_ok
-OpSelectionMerge %656 None
-OpBranchConditional %654 %655 %656
-%655 = OpLabel
-%657 = OpLoad %mat3v2float %_3_m32
-%658 = OpCompositeConstruct %v2float %float_4 %float_0
-%659 = OpCompositeConstruct %v2float %float_0 %float_4
-%660 = OpCompositeConstruct %v2float %float_0 %float_0
-%661 = OpCompositeConstruct %mat3v2float %658 %659 %660
-%662 = OpCompositeExtract %v2float %657 0
-%663 = OpCompositeExtract %v2float %661 0
-%664 = OpFOrdEqual %v2bool %662 %663
-%665 = OpAll %bool %664
-%666 = OpCompositeExtract %v2float %657 1
-%667 = OpCompositeExtract %v2float %661 1
-%668 = OpFOrdEqual %v2bool %666 %667
-%669 = OpAll %bool %668
-%670 = OpLogicalAnd %bool %665 %669
-%671 = OpCompositeExtract %v2float %657 2
-%672 = OpCompositeExtract %v2float %661 2
-%673 = OpFOrdEqual %v2bool %671 %672
-%674 = OpAll %bool %673
-%675 = OpLogicalAnd %bool %670 %674
-OpBranch %656
-%656 = OpLabel
-%676 = OpPhi %bool %false %634 %675 %655
-OpStore %_0_ok %676
-%679 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
-%680 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
-%681 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
-%678 = OpCompositeConstruct %mat3v4float %679 %680 %681
-OpStore %_4_m34 %678
-%682 = OpLoad %bool %_0_ok
-OpSelectionMerge %684 None
-OpBranchConditional %682 %683 %684
-%683 = OpLabel
-%685 = OpLoad %mat3v4float %_4_m34
-%686 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
-%687 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
-%688 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
-%689 = OpCompositeConstruct %mat3v4float %686 %687 %688
-%690 = OpCompositeExtract %v4float %685 0
-%691 = OpCompositeExtract %v4float %689 0
-%692 = OpFOrdEqual %v4bool %690 %691
-%693 = OpAll %bool %692
-%694 = OpCompositeExtract %v4float %685 1
-%695 = OpCompositeExtract %v4float %689 1
-%696 = OpFOrdEqual %v4bool %694 %695
-%697 = OpAll %bool %696
-%698 = OpLogicalAnd %bool %693 %697
-%699 = OpCompositeExtract %v4float %685 2
-%700 = OpCompositeExtract %v4float %689 2
-%701 = OpFOrdEqual %v4bool %699 %700
-%702 = OpAll %bool %701
-%703 = OpLogicalAnd %bool %698 %702
-OpBranch %684
-%684 = OpLabel
-%704 = OpPhi %bool %false %656 %703 %683
-OpStore %_0_ok %704
-%707 = OpCompositeConstruct %v2float %float_6 %float_0
-%708 = OpCompositeConstruct %v2float %float_0 %float_6
-%709 = OpCompositeConstruct %v2float %float_0 %float_0
-%710 = OpCompositeConstruct %v2float %float_0 %float_0
-%706 = OpCompositeConstruct %mat4v2float %707 %708 %709 %710
-OpStore %_5_m42 %706
-%711 = OpLoad %bool %_0_ok
-OpSelectionMerge %713 None
-OpBranchConditional %711 %712 %713
-%712 = OpLabel
-%714 = OpLoad %mat4v2float %_5_m42
-%715 = OpCompositeConstruct %v2float %float_6 %float_0
-%716 = OpCompositeConstruct %v2float %float_0 %float_6
-%717 = OpCompositeConstruct %v2float %float_0 %float_0
-%718 = OpCompositeConstruct %v2float %float_0 %float_0
-%719 = OpCompositeConstruct %mat4v2float %715 %716 %717 %718
-%720 = OpCompositeExtract %v2float %714 0
-%721 = OpCompositeExtract %v2float %719 0
-%722 = OpFOrdEqual %v2bool %720 %721
-%723 = OpAll %bool %722
-%724 = OpCompositeExtract %v2float %714 1
-%725 = OpCompositeExtract %v2float %719 1
-%726 = OpFOrdEqual %v2bool %724 %725
-%727 = OpAll %bool %726
-%728 = OpLogicalAnd %bool %723 %727
-%729 = OpCompositeExtract %v2float %714 2
-%730 = OpCompositeExtract %v2float %719 2
-%731 = OpFOrdEqual %v2bool %729 %730
-%732 = OpAll %bool %731
-%733 = OpLogicalAnd %bool %728 %732
-%734 = OpCompositeExtract %v2float %714 3
-%735 = OpCompositeExtract %v2float %719 3
-%736 = OpFOrdEqual %v2bool %734 %735
-%737 = OpAll %bool %736
-%738 = OpLogicalAnd %bool %733 %737
-OpBranch %713
-%713 = OpLabel
-%739 = OpPhi %bool %false %684 %738 %712
-OpStore %_0_ok %739
-%742 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
-%743 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
-%744 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
-%745 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%741 = OpCompositeConstruct %mat4v3float %742 %743 %744 %745
-OpStore %_6_m43 %741
-%746 = OpLoad %bool %_0_ok
-OpSelectionMerge %748 None
-OpBranchConditional %746 %747 %748
-%747 = OpLabel
-%749 = OpLoad %mat4v3float %_6_m43
-%750 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
-%751 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
-%752 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
-%753 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%754 = OpCompositeConstruct %mat4v3float %750 %751 %752 %753
-%755 = OpCompositeExtract %v3float %749 0
-%756 = OpCompositeExtract %v3float %754 0
-%757 = OpFOrdEqual %v3bool %755 %756
-%758 = OpAll %bool %757
-%759 = OpCompositeExtract %v3float %749 1
-%760 = OpCompositeExtract %v3float %754 1
-%761 = OpFOrdEqual %v3bool %759 %760
-%762 = OpAll %bool %761
-%763 = OpLogicalAnd %bool %758 %762
-%764 = OpCompositeExtract %v3float %749 2
-%765 = OpCompositeExtract %v3float %754 2
-%766 = OpFOrdEqual %v3bool %764 %765
-%767 = OpAll %bool %766
-%768 = OpLogicalAnd %bool %763 %767
-%769 = OpCompositeExtract %v3float %749 3
-%770 = OpCompositeExtract %v3float %754 3
-%771 = OpFOrdEqual %v3bool %769 %770
-%772 = OpAll %bool %771
-%773 = OpLogicalAnd %bool %768 %772
-OpBranch %748
-%748 = OpLabel
-%774 = OpPhi %bool %false %713 %773 %747
-OpStore %_0_ok %774
-%776 = OpLoad %mat3v2float %_3_m32
-%777 = OpLoad %mat2v3float %_1_m23
-%778 = OpMatrixTimesMatrix %mat2v2float %776 %777
-OpStore %_7_m22 %778
-%779 = OpLoad %bool %_0_ok
-OpSelectionMerge %781 None
-OpBranchConditional %779 %780 %781
-%780 = OpLabel
-%782 = OpLoad %mat2v2float %_7_m22
-%784 = OpCompositeConstruct %v2float %float_8 %float_0
-%785 = OpCompositeConstruct %v2float %float_0 %float_8
-%783 = OpCompositeConstruct %mat2v2float %784 %785
-%786 = OpCompositeExtract %v2float %782 0
-%787 = OpCompositeExtract %v2float %783 0
-%788 = OpFOrdEqual %v2bool %786 %787
-%789 = OpAll %bool %788
-%790 = OpCompositeExtract %v2float %782 1
-%791 = OpCompositeExtract %v2float %783 1
-%792 = OpFOrdEqual %v2bool %790 %791
-%793 = OpAll %bool %792
-%794 = OpLogicalAnd %bool %789 %793
-OpBranch %781
-%781 = OpLabel
-%795 = OpPhi %bool %false %748 %794 %780
-OpStore %_0_ok %795
-%797 = OpLoad %mat4v3float %_6_m43
-%798 = OpLoad %mat3v4float %_4_m34
-%799 = OpMatrixTimesMatrix %mat3v3float %797 %798
-OpStore %_8_m33 %799
-%800 = OpLoad %bool %_0_ok
-OpSelectionMerge %802 None
-OpBranchConditional %800 %801 %802
-%801 = OpLabel
-%803 = OpLoad %mat3v3float %_8_m33
-%805 = OpCompositeConstruct %v3float %float_35 %float_0 %float_0
-%806 = OpCompositeConstruct %v3float %float_0 %float_35 %float_0
-%807 = OpCompositeConstruct %v3float %float_0 %float_0 %float_35
-%804 = OpCompositeConstruct %mat3v3float %805 %806 %807
-%808 = OpCompositeExtract %v3float %803 0
-%809 = OpCompositeExtract %v3float %804 0
-%810 = OpFOrdEqual %v3bool %808 %809
-%811 = OpAll %bool %810
-%812 = OpCompositeExtract %v3float %803 1
-%813 = OpCompositeExtract %v3float %804 1
-%814 = OpFOrdEqual %v3bool %812 %813
-%815 = OpAll %bool %814
-%816 = OpLogicalAnd %bool %811 %815
-%817 = OpCompositeExtract %v3float %803 2
-%818 = OpCompositeExtract %v3float %804 2
-%819 = OpFOrdEqual %v3bool %817 %818
-%820 = OpAll %bool %819
-%821 = OpLogicalAnd %bool %816 %820
-OpBranch %802
-%802 = OpLabel
-%822 = OpPhi %bool %false %781 %821 %801
-OpStore %_0_ok %822
-%823 = OpLoad %mat2v3float %_1_m23
-%824 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1
-%825 = OpCompositeConstruct %mat2v3float %824 %824
-%826 = OpCompositeExtract %v3float %823 0
-%827 = OpCompositeExtract %v3float %825 0
-%828 = OpFAdd %v3float %826 %827
-%829 = OpCompositeExtract %v3float %823 1
-%830 = OpCompositeExtract %v3float %825 1
-%831 = OpFAdd %v3float %829 %830
-%832 = OpCompositeConstruct %mat2v3float %828 %831
-OpStore %_1_m23 %832
-%833 = OpLoad %bool %_0_ok
-OpSelectionMerge %835 None
-OpBranchConditional %833 %834 %835
-%834 = OpLabel
-%836 = OpLoad %mat2v3float %_1_m23
-%837 = OpCompositeConstruct %v3float %float_3 %float_1 %float_1
-%838 = OpCompositeConstruct %v3float %float_1 %float_3 %float_1
-%839 = OpCompositeConstruct %mat2v3float %837 %838
-%840 = OpCompositeExtract %v3float %836 0
-%841 = OpCompositeExtract %v3float %839 0
-%842 = OpFOrdEqual %v3bool %840 %841
-%843 = OpAll %bool %842
-%844 = OpCompositeExtract %v3float %836 1
-%845 = OpCompositeExtract %v3float %839 1
-%846 = OpFOrdEqual %v3bool %844 %845
-%847 = OpAll %bool %846
-%848 = OpLogicalAnd %bool %843 %847
-OpBranch %835
-%835 = OpLabel
-%849 = OpPhi %bool %false %802 %848 %834
-OpStore %_0_ok %849
-%850 = OpLoad %mat3v2float %_3_m32
-%851 = OpCompositeConstruct %v2float %float_2 %float_2
-%852 = OpCompositeConstruct %mat3v2float %851 %851 %851
-%853 = OpCompositeExtract %v2float %850 0
-%854 = OpCompositeExtract %v2float %852 0
-%855 = OpFSub %v2float %853 %854
-%856 = OpCompositeExtract %v2float %850 1
-%857 = OpCompositeExtract %v2float %852 1
-%858 = OpFSub %v2float %856 %857
-%859 = OpCompositeExtract %v2float %850 2
-%860 = OpCompositeExtract %v2float %852 2
-%861 = OpFSub %v2float %859 %860
-%862 = OpCompositeConstruct %mat3v2float %855 %858 %861
-OpStore %_3_m32 %862
-%863 = OpLoad %bool %_0_ok
-OpSelectionMerge %865 None
-OpBranchConditional %863 %864 %865
-%864 = OpLabel
-%866 = OpLoad %mat3v2float %_3_m32
-%867 = OpCompositeConstruct %v2float %float_2 %float_n2
-%868 = OpCompositeConstruct %v2float %float_n2 %float_2
-%869 = OpCompositeConstruct %v2float %float_n2 %float_n2
-%870 = OpCompositeConstruct %mat3v2float %867 %868 %869
-%871 = OpCompositeExtract %v2float %866 0
-%872 = OpCompositeExtract %v2float %870 0
-%873 = OpFOrdEqual %v2bool %871 %872
-%874 = OpAll %bool %873
-%875 = OpCompositeExtract %v2float %866 1
-%876 = OpCompositeExtract %v2float %870 1
-%877 = OpFOrdEqual %v2bool %875 %876
-%878 = OpAll %bool %877
-%879 = OpLogicalAnd %bool %874 %878
-%880 = OpCompositeExtract %v2float %866 2
-%881 = OpCompositeExtract %v2float %870 2
-%882 = OpFOrdEqual %v2bool %880 %881
-%883 = OpAll %bool %882
-%884 = OpLogicalAnd %bool %879 %883
-OpBranch %865
-%865 = OpLabel
-%885 = OpPhi %bool %false %835 %884 %864
-OpStore %_0_ok %885
-%886 = OpLoad %mat2v4float %_2_m24
-%887 = OpCompositeConstruct %v4float %float_4 %float_4 %float_4 %float_4
-%888 = OpCompositeConstruct %mat2v4float %887 %887
-%889 = OpCompositeExtract %v4float %886 0
-%890 = OpCompositeExtract %v4float %888 0
-%891 = OpFDiv %v4float %889 %890
-%892 = OpCompositeExtract %v4float %886 1
-%893 = OpCompositeExtract %v4float %888 1
-%894 = OpFDiv %v4float %892 %893
-%895 = OpCompositeConstruct %mat2v4float %891 %894
-OpStore %_2_m24 %895
-%896 = OpLoad %bool %_0_ok
-OpSelectionMerge %898 None
-OpBranchConditional %896 %897 %898
-%897 = OpLabel
-%899 = OpLoad %mat2v4float %_2_m24
-%900 = OpCompositeConstruct %v4float %float_0_75 %float_0 %float_0 %float_0
-%901 = OpCompositeConstruct %v4float %float_0 %float_0_75 %float_0 %float_0
-%902 = OpCompositeConstruct %mat2v4float %900 %901
-%903 = OpCompositeExtract %v4float %899 0
-%904 = OpCompositeExtract %v4float %902 0
-%905 = OpFOrdEqual %v4bool %903 %904
-%906 = OpAll %bool %905
-%907 = OpCompositeExtract %v4float %899 1
-%908 = OpCompositeExtract %v4float %902 1
-%909 = OpFOrdEqual %v4bool %907 %908
-%910 = OpAll %bool %909
-%911 = OpLogicalAnd %bool %906 %910
-OpBranch %898
-%898 = OpLabel
-%912 = OpPhi %bool %false %865 %911 %897
-OpStore %_0_ok %912
-%914 = OpAccessChain %_ptr_Uniform_mat2v2float %11 %int_2
-%915 = OpLoad %mat2v2float %914
-%916 = OpCompositeExtract %float %915 0 0
-%917 = OpCompositeExtract %float %915 0 1
-%918 = OpCompositeExtract %float %915 1 0
-%919 = OpCompositeExtract %float %915 1 1
-%920 = OpCompositeConstruct %v4float %916 %917 %918 %919
-OpStore %_10_f4 %920
-%921 = OpLoad %bool %_0_ok
-OpSelectionMerge %923 None
-OpBranchConditional %921 %922 %923
-%922 = OpLabel
-%924 = OpLoad %v4float %_10_f4
-%925 = OpVectorShuffle %v3float %924 %924 0 1 2
-%926 = OpLoad %v4float %_10_f4
-%927 = OpCompositeExtract %float %926 3
-%928 = OpLoad %v4float %_10_f4
-%929 = OpVectorShuffle %v2float %928 %928 0 1
-%930 = OpCompositeExtract %float %929 0
-%931 = OpCompositeExtract %float %929 1
-%932 = OpCompositeConstruct %v3float %927 %930 %931
-%933 = OpCompositeConstruct %mat2v3float %925 %932
-%934 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%935 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%936 = OpCompositeConstruct %mat2v3float %934 %935
-%937 = OpCompositeExtract %v3float %933 0
-%938 = OpCompositeExtract %v3float %936 0
-%939 = OpFOrdEqual %v3bool %937 %938
-%940 = OpAll %bool %939
-%941 = OpCompositeExtract %v3float %933 1
-%942 = OpCompositeExtract %v3float %936 1
-%943 = OpFOrdEqual %v3bool %941 %942
-%944 = OpAll %bool %943
-%945 = OpLogicalAnd %bool %940 %944
-OpBranch %923
-%923 = OpLabel
-%946 = OpPhi %bool %false %898 %945 %922
-OpStore %_0_ok %946
-%947 = OpLoad %bool %_0_ok
-OpSelectionMerge %949 None
-OpBranchConditional %947 %948 %949
-%948 = OpLabel
-%950 = OpLoad %v4float %_10_f4
-%951 = OpVectorShuffle %v3float %950 %950 0 1 2
-%952 = OpLoad %v4float %_10_f4
-%953 = OpCompositeExtract %float %952 3
-%954 = OpLoad %v4float %_10_f4
-%955 = OpCompositeExtract %float %954 0
-%956 = OpLoad %v4float %_10_f4
-%957 = OpVectorShuffle %v3float %956 %956 1 2 3
-%958 = OpCompositeExtract %float %951 0
-%959 = OpCompositeExtract %float %951 1
-%960 = OpCompositeExtract %float %951 2
-%961 = OpCompositeConstruct %v4float %958 %959 %960 %953
-%962 = OpCompositeExtract %float %957 0
-%963 = OpCompositeExtract %float %957 1
-%964 = OpCompositeExtract %float %957 2
-%965 = OpCompositeConstruct %v4float %955 %962 %963 %964
-%966 = OpCompositeConstruct %mat2v4float %961 %965
-%967 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%968 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%969 = OpCompositeConstruct %mat2v4float %967 %968
-%970 = OpCompositeExtract %v4float %966 0
-%971 = OpCompositeExtract %v4float %969 0
-%972 = OpFOrdEqual %v4bool %970 %971
-%973 = OpAll %bool %972
-%974 = OpCompositeExtract %v4float %966 1
-%975 = OpCompositeExtract %v4float %969 1
-%976 = OpFOrdEqual %v4bool %974 %975
-%977 = OpAll %bool %976
-%978 = OpLogicalAnd %bool %973 %977
-OpBranch %949
-%949 = OpLabel
-%979 = OpPhi %bool %false %923 %978 %948
-OpStore %_0_ok %979
-%980 = OpLoad %bool %_0_ok
-OpSelectionMerge %982 None
-OpBranchConditional %980 %981 %982
-%981 = OpLabel
-%983 = OpLoad %v4float %_10_f4
-%984 = OpVectorShuffle %v2float %983 %983 0 1
-%985 = OpLoad %v4float %_10_f4
-%986 = OpVectorShuffle %v2float %985 %985 2 3
-%987 = OpLoad %v4float %_10_f4
-%988 = OpCompositeExtract %float %987 0
-%989 = OpLoad %v4float %_10_f4
-%990 = OpCompositeExtract %float %989 1
-%991 = OpCompositeConstruct %v2float %988 %990
-%992 = OpCompositeConstruct %mat3v2float %984 %986 %991
-%993 = OpCompositeConstruct %v2float %float_1 %float_2
-%994 = OpCompositeConstruct %v2float %float_3 %float_4
-%995 = OpCompositeConstruct %v2float %float_1 %float_2
-%996 = OpCompositeConstruct %mat3v2float %993 %994 %995
-%997 = OpCompositeExtract %v2float %992 0
-%998 = OpCompositeExtract %v2float %996 0
-%999 = OpFOrdEqual %v2bool %997 %998
-%1000 = OpAll %bool %999
-%1001 = OpCompositeExtract %v2float %992 1
-%1002 = OpCompositeExtract %v2float %996 1
-%1003 = OpFOrdEqual %v2bool %1001 %1002
-%1004 = OpAll %bool %1003
-%1005 = OpLogicalAnd %bool %1000 %1004
-%1006 = OpCompositeExtract %v2float %992 2
-%1007 = OpCompositeExtract %v2float %996 2
-%1008 = OpFOrdEqual %v2bool %1006 %1007
-%1009 = OpAll %bool %1008
-%1010 = OpLogicalAnd %bool %1005 %1009
-OpBranch %982
-%982 = OpLabel
-%1011 = OpPhi %bool %false %949 %1010 %981
-OpStore %_0_ok %1011
-%1012 = OpLoad %bool %_0_ok
-OpSelectionMerge %1014 None
-OpBranchConditional %1012 %1013 %1014
-%1013 = OpLabel
-%1015 = OpLoad %v4float %_10_f4
-%1016 = OpVectorShuffle %v2float %1015 %1015 0 1
-%1017 = OpLoad %v4float %_10_f4
-%1018 = OpVectorShuffle %v2float %1017 %1017 2 3
-%1019 = OpLoad %v4float %_10_f4
-%1020 = OpLoad %v4float %_10_f4
-%1021 = OpCompositeExtract %float %1020 0
-%1022 = OpLoad %v4float %_10_f4
-%1023 = OpVectorShuffle %v2float %1022 %1022 1 2
-%1024 = OpLoad %v4float %_10_f4
-%1025 = OpCompositeExtract %float %1024 3
-%1026 = OpCompositeExtract %float %1016 0
-%1027 = OpCompositeExtract %float %1016 1
-%1028 = OpCompositeExtract %float %1018 0
-%1029 = OpCompositeExtract %float %1018 1
-%1030 = OpCompositeConstruct %v4float %1026 %1027 %1028 %1029
-%1031 = OpCompositeExtract %float %1023 0
-%1032 = OpCompositeExtract %float %1023 1
-%1033 = OpCompositeConstruct %v4float %1021 %1031 %1032 %1025
-%1034 = OpCompositeConstruct %mat3v4float %1030 %1019 %1033
-%1035 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%1036 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%1037 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
-%1038 = OpCompositeConstruct %mat3v4float %1035 %1036 %1037
-%1039 = OpCompositeExtract %v4float %1034 0
-%1040 = OpCompositeExtract %v4float %1038 0
-%1041 = OpFOrdEqual %v4bool %1039 %1040
-%1042 = OpAll %bool %1041
-%1043 = OpCompositeExtract %v4float %1034 1
-%1044 = OpCompositeExtract %v4float %1038 1
-%1045 = OpFOrdEqual %v4bool %1043 %1044
-%1046 = OpAll %bool %1045
-%1047 = OpLogicalAnd %bool %1042 %1046
-%1048 = OpCompositeExtract %v4float %1034 2
-%1049 = OpCompositeExtract %v4float %1038 2
-%1050 = OpFOrdEqual %v4bool %1048 %1049
-%1051 = OpAll %bool %1050
-%1052 = OpLogicalAnd %bool %1047 %1051
-OpBranch %1014
-%1014 = OpLabel
-%1053 = OpPhi %bool %false %982 %1052 %1013
-OpStore %_0_ok %1053
-%1054 = OpLoad %bool %_0_ok
-OpSelectionMerge %1056 None
-OpBranchConditional %1054 %1055 %1056
-%1055 = OpLabel
-%1057 = OpLoad %v4float %_10_f4
-%1058 = OpVectorShuffle %v2float %1057 %1057 0 1
-%1059 = OpLoad %v4float %_10_f4
-%1060 = OpCompositeExtract %float %1059 2
-%1061 = OpLoad %v4float %_10_f4
-%1062 = OpCompositeExtract %float %1061 3
-%1063 = OpLoad %v4float %_10_f4
-%1064 = OpVectorShuffle %v2float %1063 %1063 0 1
-%1065 = OpLoad %v4float %_10_f4
-%1066 = OpCompositeExtract %float %1065 2
-%1067 = OpLoad %v4float %_10_f4
-%1068 = OpCompositeExtract %float %1067 3
-%1069 = OpCompositeConstruct %v2float %1060 %1062
-%1070 = OpCompositeConstruct %v2float %1066 %1068
-%1071 = OpCompositeConstruct %mat4v2float %1058 %1069 %1064 %1070
-%1072 = OpCompositeConstruct %v2float %float_1 %float_2
-%1073 = OpCompositeConstruct %v2float %float_3 %float_4
-%1074 = OpCompositeConstruct %v2float %float_1 %float_2
-%1075 = OpCompositeConstruct %v2float %float_3 %float_4
-%1076 = OpCompositeConstruct %mat4v2float %1072 %1073 %1074 %1075
-%1077 = OpCompositeExtract %v2float %1071 0
-%1078 = OpCompositeExtract %v2float %1076 0
-%1079 = OpFOrdEqual %v2bool %1077 %1078
-%1080 = OpAll %bool %1079
-%1081 = OpCompositeExtract %v2float %1071 1
-%1082 = OpCompositeExtract %v2float %1076 1
-%1083 = OpFOrdEqual %v2bool %1081 %1082
-%1084 = OpAll %bool %1083
-%1085 = OpLogicalAnd %bool %1080 %1084
-%1086 = OpCompositeExtract %v2float %1071 2
-%1087 = OpCompositeExtract %v2float %1076 2
-%1088 = OpFOrdEqual %v2bool %1086 %1087
-%1089 = OpAll %bool %1088
-%1090 = OpLogicalAnd %bool %1085 %1089
-%1091 = OpCompositeExtract %v2float %1071 3
-%1092 = OpCompositeExtract %v2float %1076 3
-%1093 = OpFOrdEqual %v2bool %1091 %1092
-%1094 = OpAll %bool %1093
-%1095 = OpLogicalAnd %bool %1090 %1094
-OpBranch %1056
-%1056 = OpLabel
-%1096 = OpPhi %bool %false %1014 %1095 %1055
-OpStore %_0_ok %1096
-%1097 = OpLoad %bool %_0_ok
-OpSelectionMerge %1099 None
-OpBranchConditional %1097 %1098 %1099
-%1098 = OpLabel
-%1100 = OpLoad %v4float %_10_f4
-%1101 = OpCompositeExtract %float %1100 0
-%1102 = OpLoad %v4float %_10_f4
-%1103 = OpVectorShuffle %v2float %1102 %1102 1 2
-%1104 = OpLoad %v4float %_10_f4
-%1105 = OpVectorShuffle %v2float %1104 %1104 3 0
-%1106 = OpLoad %v4float %_10_f4
-%1107 = OpCompositeExtract %float %1106 1
-%1108 = OpLoad %v4float %_10_f4
-%1109 = OpVectorShuffle %v3float %1108 %1108 2 3 0
-%1110 = OpLoad %v4float %_10_f4
-%1111 = OpVectorShuffle %v3float %1110 %1110 1 2 3
-%1112 = OpCompositeExtract %float %1103 0
-%1113 = OpCompositeExtract %float %1103 1
-%1114 = OpCompositeConstruct %v3float %1101 %1112 %1113
-%1115 = OpCompositeExtract %float %1105 0
-%1116 = OpCompositeExtract %float %1105 1
-%1117 = OpCompositeConstruct %v3float %1115 %1116 %1107
-%1118 = OpCompositeConstruct %mat4v3float %1114 %1117 %1109 %1111
-%1119 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%1120 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
-%1121 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
-%1122 = OpCompositeConstruct %v3float %float_2 %float_3 %float_4
-%1123 = OpCompositeConstruct %mat4v3float %1119 %1120 %1121 %1122
-%1124 = OpCompositeExtract %v3float %1118 0
-%1125 = OpCompositeExtract %v3float %1123 0
-%1126 = OpFOrdEqual %v3bool %1124 %1125
-%1127 = OpAll %bool %1126
-%1128 = OpCompositeExtract %v3float %1118 1
-%1129 = OpCompositeExtract %v3float %1123 1
-%1130 = OpFOrdEqual %v3bool %1128 %1129
-%1131 = OpAll %bool %1130
-%1132 = OpLogicalAnd %bool %1127 %1131
-%1133 = OpCompositeExtract %v3float %1118 2
-%1134 = OpCompositeExtract %v3float %1123 2
-%1135 = OpFOrdEqual %v3bool %1133 %1134
-%1136 = OpAll %bool %1135
-%1137 = OpLogicalAnd %bool %1132 %1136
-%1138 = OpCompositeExtract %v3float %1118 3
-%1139 = OpCompositeExtract %v3float %1123 3
-%1140 = OpFOrdEqual %v3bool %1138 %1139
-%1141 = OpAll %bool %1140
-%1142 = OpLogicalAnd %bool %1137 %1141
-OpBranch %1099
-%1099 = OpLabel
-%1143 = OpPhi %bool %false %1056 %1142 %1098
-OpStore %_0_ok %1143
-%1144 = OpLoad %bool %_0_ok
-OpSelectionMerge %1146 None
-OpBranchConditional %1144 %1145 %1146
-%1145 = OpLabel
-%1147 = OpFunctionCall %bool %test_half_b
-OpBranch %1146
-%1146 = OpLabel
-%1148 = OpPhi %bool %false %1099 %1147 %1145
-OpSelectionMerge %1152 None
-OpBranchConditional %1148 %1150 %1151
-%1150 = OpLabel
-%1153 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%1156 = OpLoad %v4float %1153
-OpStore %1149 %1156
-OpBranch %1152
-%1151 = OpLabel
-%1157 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%1159 = OpLoad %v4float %1157
-OpStore %1149 %1159
-OpBranch %1152
-%1152 = OpLabel
-%1160 = OpLoad %v4float %1149
-OpReturnValue %1160
+%374 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
+%375 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
+%373 = OpCompositeConstruct %mat2v3float %374 %375
+OpStore %_1_m23 %373
+%376 = OpLoad %bool %_0_ok
+OpSelectionMerge %378 None
+OpBranchConditional %376 %377 %378
+%377 = OpLabel
+%379 = OpLoad %mat2v3float %_1_m23
+%380 = OpCompositeConstruct %v3float %float_2 %float_0 %float_0
+%381 = OpCompositeConstruct %v3float %float_0 %float_2 %float_0
+%382 = OpCompositeConstruct %mat2v3float %380 %381
+%383 = OpCompositeExtract %v3float %379 0
+%384 = OpCompositeExtract %v3float %382 0
+%385 = OpFOrdEqual %v3bool %383 %384
+%386 = OpAll %bool %385
+%387 = OpCompositeExtract %v3float %379 1
+%388 = OpCompositeExtract %v3float %382 1
+%389 = OpFOrdEqual %v3bool %387 %388
+%390 = OpAll %bool %389
+%391 = OpLogicalAnd %bool %386 %390
+OpBranch %378
+%378 = OpLabel
+%392 = OpPhi %bool %false %370 %391 %377
+OpStore %_0_ok %392
+%395 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
+%396 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
+%394 = OpCompositeConstruct %mat2v4float %395 %396
+OpStore %_2_m24 %394
+%397 = OpLoad %bool %_0_ok
+OpSelectionMerge %399 None
+OpBranchConditional %397 %398 %399
+%398 = OpLabel
+%400 = OpLoad %mat2v4float %_2_m24
+%401 = OpCompositeConstruct %v4float %float_3 %float_0 %float_0 %float_0
+%402 = OpCompositeConstruct %v4float %float_0 %float_3 %float_0 %float_0
+%403 = OpCompositeConstruct %mat2v4float %401 %402
+%404 = OpCompositeExtract %v4float %400 0
+%405 = OpCompositeExtract %v4float %403 0
+%406 = OpFOrdEqual %v4bool %404 %405
+%407 = OpAll %bool %406
+%408 = OpCompositeExtract %v4float %400 1
+%409 = OpCompositeExtract %v4float %403 1
+%410 = OpFOrdEqual %v4bool %408 %409
+%411 = OpAll %bool %410
+%412 = OpLogicalAnd %bool %407 %411
+OpBranch %399
+%399 = OpLabel
+%413 = OpPhi %bool %false %378 %412 %398
+OpStore %_0_ok %413
+%416 = OpCompositeConstruct %v2float %float_4 %float_0
+%417 = OpCompositeConstruct %v2float %float_0 %float_4
+%418 = OpCompositeConstruct %v2float %float_0 %float_0
+%415 = OpCompositeConstruct %mat3v2float %416 %417 %418
+OpStore %_3_m32 %415
+%419 = OpLoad %bool %_0_ok
+OpSelectionMerge %421 None
+OpBranchConditional %419 %420 %421
+%420 = OpLabel
+%422 = OpLoad %mat3v2float %_3_m32
+%423 = OpCompositeConstruct %v2float %float_4 %float_0
+%424 = OpCompositeConstruct %v2float %float_0 %float_4
+%425 = OpCompositeConstruct %v2float %float_0 %float_0
+%426 = OpCompositeConstruct %mat3v2float %423 %424 %425
+%427 = OpCompositeExtract %v2float %422 0
+%428 = OpCompositeExtract %v2float %426 0
+%429 = OpFOrdEqual %v2bool %427 %428
+%430 = OpAll %bool %429
+%431 = OpCompositeExtract %v2float %422 1
+%432 = OpCompositeExtract %v2float %426 1
+%433 = OpFOrdEqual %v2bool %431 %432
+%434 = OpAll %bool %433
+%435 = OpLogicalAnd %bool %430 %434
+%436 = OpCompositeExtract %v2float %422 2
+%437 = OpCompositeExtract %v2float %426 2
+%438 = OpFOrdEqual %v2bool %436 %437
+%439 = OpAll %bool %438
+%440 = OpLogicalAnd %bool %435 %439
+OpBranch %421
+%421 = OpLabel
+%441 = OpPhi %bool %false %399 %440 %420
+OpStore %_0_ok %441
+%444 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
+%445 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
+%446 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
+%443 = OpCompositeConstruct %mat3v4float %444 %445 %446
+OpStore %_4_m34 %443
+%447 = OpLoad %bool %_0_ok
+OpSelectionMerge %449 None
+OpBranchConditional %447 %448 %449
+%448 = OpLabel
+%450 = OpLoad %mat3v4float %_4_m34
+%451 = OpCompositeConstruct %v4float %float_5 %float_0 %float_0 %float_0
+%452 = OpCompositeConstruct %v4float %float_0 %float_5 %float_0 %float_0
+%453 = OpCompositeConstruct %v4float %float_0 %float_0 %float_5 %float_0
+%454 = OpCompositeConstruct %mat3v4float %451 %452 %453
+%455 = OpCompositeExtract %v4float %450 0
+%456 = OpCompositeExtract %v4float %454 0
+%457 = OpFOrdEqual %v4bool %455 %456
+%458 = OpAll %bool %457
+%459 = OpCompositeExtract %v4float %450 1
+%460 = OpCompositeExtract %v4float %454 1
+%461 = OpFOrdEqual %v4bool %459 %460
+%462 = OpAll %bool %461
+%463 = OpLogicalAnd %bool %458 %462
+%464 = OpCompositeExtract %v4float %450 2
+%465 = OpCompositeExtract %v4float %454 2
+%466 = OpFOrdEqual %v4bool %464 %465
+%467 = OpAll %bool %466
+%468 = OpLogicalAnd %bool %463 %467
+OpBranch %449
+%449 = OpLabel
+%469 = OpPhi %bool %false %421 %468 %448
+OpStore %_0_ok %469
+%472 = OpCompositeConstruct %v2float %float_6 %float_0
+%473 = OpCompositeConstruct %v2float %float_0 %float_6
+%474 = OpCompositeConstruct %v2float %float_0 %float_0
+%475 = OpCompositeConstruct %v2float %float_0 %float_0
+%471 = OpCompositeConstruct %mat4v2float %472 %473 %474 %475
+OpStore %_5_m42 %471
+%476 = OpLoad %bool %_0_ok
+OpSelectionMerge %478 None
+OpBranchConditional %476 %477 %478
+%477 = OpLabel
+%479 = OpLoad %mat4v2float %_5_m42
+%480 = OpCompositeConstruct %v2float %float_6 %float_0
+%481 = OpCompositeConstruct %v2float %float_0 %float_6
+%482 = OpCompositeConstruct %v2float %float_0 %float_0
+%483 = OpCompositeConstruct %v2float %float_0 %float_0
+%484 = OpCompositeConstruct %mat4v2float %480 %481 %482 %483
+%485 = OpCompositeExtract %v2float %479 0
+%486 = OpCompositeExtract %v2float %484 0
+%487 = OpFOrdEqual %v2bool %485 %486
+%488 = OpAll %bool %487
+%489 = OpCompositeExtract %v2float %479 1
+%490 = OpCompositeExtract %v2float %484 1
+%491 = OpFOrdEqual %v2bool %489 %490
+%492 = OpAll %bool %491
+%493 = OpLogicalAnd %bool %488 %492
+%494 = OpCompositeExtract %v2float %479 2
+%495 = OpCompositeExtract %v2float %484 2
+%496 = OpFOrdEqual %v2bool %494 %495
+%497 = OpAll %bool %496
+%498 = OpLogicalAnd %bool %493 %497
+%499 = OpCompositeExtract %v2float %479 3
+%500 = OpCompositeExtract %v2float %484 3
+%501 = OpFOrdEqual %v2bool %499 %500
+%502 = OpAll %bool %501
+%503 = OpLogicalAnd %bool %498 %502
+OpBranch %478
+%478 = OpLabel
+%504 = OpPhi %bool %false %449 %503 %477
+OpStore %_0_ok %504
+%507 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
+%508 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
+%509 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
+%510 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%506 = OpCompositeConstruct %mat4v3float %507 %508 %509 %510
+OpStore %_6_m43 %506
+%511 = OpLoad %bool %_0_ok
+OpSelectionMerge %513 None
+OpBranchConditional %511 %512 %513
+%512 = OpLabel
+%514 = OpLoad %mat4v3float %_6_m43
+%515 = OpCompositeConstruct %v3float %float_7 %float_0 %float_0
+%516 = OpCompositeConstruct %v3float %float_0 %float_7 %float_0
+%517 = OpCompositeConstruct %v3float %float_0 %float_0 %float_7
+%518 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%519 = OpCompositeConstruct %mat4v3float %515 %516 %517 %518
+%520 = OpCompositeExtract %v3float %514 0
+%521 = OpCompositeExtract %v3float %519 0
+%522 = OpFOrdEqual %v3bool %520 %521
+%523 = OpAll %bool %522
+%524 = OpCompositeExtract %v3float %514 1
+%525 = OpCompositeExtract %v3float %519 1
+%526 = OpFOrdEqual %v3bool %524 %525
+%527 = OpAll %bool %526
+%528 = OpLogicalAnd %bool %523 %527
+%529 = OpCompositeExtract %v3float %514 2
+%530 = OpCompositeExtract %v3float %519 2
+%531 = OpFOrdEqual %v3bool %529 %530
+%532 = OpAll %bool %531
+%533 = OpLogicalAnd %bool %528 %532
+%534 = OpCompositeExtract %v3float %514 3
+%535 = OpCompositeExtract %v3float %519 3
+%536 = OpFOrdEqual %v3bool %534 %535
+%537 = OpAll %bool %536
+%538 = OpLogicalAnd %bool %533 %537
+OpBranch %513
+%513 = OpLabel
+%539 = OpPhi %bool %false %478 %538 %512
+OpStore %_0_ok %539
+%541 = OpLoad %mat3v2float %_3_m32
+%542 = OpLoad %mat2v3float %_1_m23
+%543 = OpMatrixTimesMatrix %mat2v2float %541 %542
+OpStore %_7_m22 %543
+%544 = OpLoad %bool %_0_ok
+OpSelectionMerge %546 None
+OpBranchConditional %544 %545 %546
+%545 = OpLabel
+%547 = OpLoad %mat2v2float %_7_m22
+%549 = OpCompositeConstruct %v2float %float_8 %float_0
+%550 = OpCompositeConstruct %v2float %float_0 %float_8
+%548 = OpCompositeConstruct %mat2v2float %549 %550
+%551 = OpCompositeExtract %v2float %547 0
+%552 = OpCompositeExtract %v2float %548 0
+%553 = OpFOrdEqual %v2bool %551 %552
+%554 = OpAll %bool %553
+%555 = OpCompositeExtract %v2float %547 1
+%556 = OpCompositeExtract %v2float %548 1
+%557 = OpFOrdEqual %v2bool %555 %556
+%558 = OpAll %bool %557
+%559 = OpLogicalAnd %bool %554 %558
+OpBranch %546
+%546 = OpLabel
+%560 = OpPhi %bool %false %513 %559 %545
+OpStore %_0_ok %560
+%562 = OpLoad %mat4v3float %_6_m43
+%563 = OpLoad %mat3v4float %_4_m34
+%564 = OpMatrixTimesMatrix %mat3v3float %562 %563
+OpStore %_8_m33 %564
+%565 = OpLoad %bool %_0_ok
+OpSelectionMerge %567 None
+OpBranchConditional %565 %566 %567
+%566 = OpLabel
+%568 = OpLoad %mat3v3float %_8_m33
+%570 = OpCompositeConstruct %v3float %float_35 %float_0 %float_0
+%571 = OpCompositeConstruct %v3float %float_0 %float_35 %float_0
+%572 = OpCompositeConstruct %v3float %float_0 %float_0 %float_35
+%569 = OpCompositeConstruct %mat3v3float %570 %571 %572
+%573 = OpCompositeExtract %v3float %568 0
+%574 = OpCompositeExtract %v3float %569 0
+%575 = OpFOrdEqual %v3bool %573 %574
+%576 = OpAll %bool %575
+%577 = OpCompositeExtract %v3float %568 1
+%578 = OpCompositeExtract %v3float %569 1
+%579 = OpFOrdEqual %v3bool %577 %578
+%580 = OpAll %bool %579
+%581 = OpLogicalAnd %bool %576 %580
+%582 = OpCompositeExtract %v3float %568 2
+%583 = OpCompositeExtract %v3float %569 2
+%584 = OpFOrdEqual %v3bool %582 %583
+%585 = OpAll %bool %584
+%586 = OpLogicalAnd %bool %581 %585
+OpBranch %567
+%567 = OpLabel
+%587 = OpPhi %bool %false %546 %586 %566
+OpStore %_0_ok %587
+%588 = OpLoad %mat2v3float %_1_m23
+%589 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1
+%590 = OpCompositeConstruct %mat2v3float %589 %589
+%591 = OpCompositeExtract %v3float %588 0
+%592 = OpCompositeExtract %v3float %590 0
+%593 = OpFAdd %v3float %591 %592
+%594 = OpCompositeExtract %v3float %588 1
+%595 = OpCompositeExtract %v3float %590 1
+%596 = OpFAdd %v3float %594 %595
+%597 = OpCompositeConstruct %mat2v3float %593 %596
+OpStore %_1_m23 %597
+%598 = OpLoad %bool %_0_ok
+OpSelectionMerge %600 None
+OpBranchConditional %598 %599 %600
+%599 = OpLabel
+%601 = OpLoad %mat2v3float %_1_m23
+%602 = OpCompositeConstruct %v3float %float_3 %float_1 %float_1
+%603 = OpCompositeConstruct %v3float %float_1 %float_3 %float_1
+%604 = OpCompositeConstruct %mat2v3float %602 %603
+%605 = OpCompositeExtract %v3float %601 0
+%606 = OpCompositeExtract %v3float %604 0
+%607 = OpFOrdEqual %v3bool %605 %606
+%608 = OpAll %bool %607
+%609 = OpCompositeExtract %v3float %601 1
+%610 = OpCompositeExtract %v3float %604 1
+%611 = OpFOrdEqual %v3bool %609 %610
+%612 = OpAll %bool %611
+%613 = OpLogicalAnd %bool %608 %612
+OpBranch %600
+%600 = OpLabel
+%614 = OpPhi %bool %false %567 %613 %599
+OpStore %_0_ok %614
+%615 = OpLoad %mat3v2float %_3_m32
+%616 = OpCompositeConstruct %v2float %float_2 %float_2
+%617 = OpCompositeConstruct %mat3v2float %616 %616 %616
+%618 = OpCompositeExtract %v2float %615 0
+%619 = OpCompositeExtract %v2float %617 0
+%620 = OpFSub %v2float %618 %619
+%621 = OpCompositeExtract %v2float %615 1
+%622 = OpCompositeExtract %v2float %617 1
+%623 = OpFSub %v2float %621 %622
+%624 = OpCompositeExtract %v2float %615 2
+%625 = OpCompositeExtract %v2float %617 2
+%626 = OpFSub %v2float %624 %625
+%627 = OpCompositeConstruct %mat3v2float %620 %623 %626
+OpStore %_3_m32 %627
+%628 = OpLoad %bool %_0_ok
+OpSelectionMerge %630 None
+OpBranchConditional %628 %629 %630
+%629 = OpLabel
+%631 = OpLoad %mat3v2float %_3_m32
+%632 = OpCompositeConstruct %v2float %float_2 %float_n2
+%633 = OpCompositeConstruct %v2float %float_n2 %float_2
+%634 = OpCompositeConstruct %v2float %float_n2 %float_n2
+%635 = OpCompositeConstruct %mat3v2float %632 %633 %634
+%636 = OpCompositeExtract %v2float %631 0
+%637 = OpCompositeExtract %v2float %635 0
+%638 = OpFOrdEqual %v2bool %636 %637
+%639 = OpAll %bool %638
+%640 = OpCompositeExtract %v2float %631 1
+%641 = OpCompositeExtract %v2float %635 1
+%642 = OpFOrdEqual %v2bool %640 %641
+%643 = OpAll %bool %642
+%644 = OpLogicalAnd %bool %639 %643
+%645 = OpCompositeExtract %v2float %631 2
+%646 = OpCompositeExtract %v2float %635 2
+%647 = OpFOrdEqual %v2bool %645 %646
+%648 = OpAll %bool %647
+%649 = OpLogicalAnd %bool %644 %648
+OpBranch %630
+%630 = OpLabel
+%650 = OpPhi %bool %false %600 %649 %629
+OpStore %_0_ok %650
+%651 = OpLoad %mat2v4float %_2_m24
+%652 = OpCompositeConstruct %v4float %float_4 %float_4 %float_4 %float_4
+%653 = OpCompositeConstruct %mat2v4float %652 %652
+%654 = OpCompositeExtract %v4float %651 0
+%655 = OpCompositeExtract %v4float %653 0
+%656 = OpFDiv %v4float %654 %655
+%657 = OpCompositeExtract %v4float %651 1
+%658 = OpCompositeExtract %v4float %653 1
+%659 = OpFDiv %v4float %657 %658
+%660 = OpCompositeConstruct %mat2v4float %656 %659
+OpStore %_2_m24 %660
+%661 = OpLoad %bool %_0_ok
+OpSelectionMerge %663 None
+OpBranchConditional %661 %662 %663
+%662 = OpLabel
+%664 = OpLoad %mat2v4float %_2_m24
+%665 = OpCompositeConstruct %v4float %float_0_75 %float_0 %float_0 %float_0
+%666 = OpCompositeConstruct %v4float %float_0 %float_0_75 %float_0 %float_0
+%667 = OpCompositeConstruct %mat2v4float %665 %666
+%668 = OpCompositeExtract %v4float %664 0
+%669 = OpCompositeExtract %v4float %667 0
+%670 = OpFOrdEqual %v4bool %668 %669
+%671 = OpAll %bool %670
+%672 = OpCompositeExtract %v4float %664 1
+%673 = OpCompositeExtract %v4float %667 1
+%674 = OpFOrdEqual %v4bool %672 %673
+%675 = OpAll %bool %674
+%676 = OpLogicalAnd %bool %671 %675
+OpBranch %663
+%663 = OpLabel
+%677 = OpPhi %bool %false %630 %676 %662
+OpStore %_0_ok %677
+%678 = OpLoad %bool %_0_ok
+OpSelectionMerge %680 None
+OpBranchConditional %678 %679 %680
+%679 = OpLabel
+%681 = OpFunctionCall %bool %test_half_b
+OpBranch %680
+%680 = OpLabel
+%682 = OpPhi %bool %false %663 %681 %679
+OpSelectionMerge %687 None
+OpBranchConditional %682 %685 %686
+%685 = OpLabel
+%688 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%692 = OpLoad %v4float %688
+OpStore %683 %692
+OpBranch %687
+%686 = OpLabel
+%693 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%695 = OpLoad %v4float %693
+OpStore %683 %695
+OpBranch %687
+%687 = OpLabel
+%696 = OpLoad %v4float %683
+OpReturnValue %696
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatricesNonsquare.glsl b/tests/sksl/shared/MatricesNonsquare.glsl
index b9550dc..c6a1301 100644
--- a/tests/sksl/shared/MatricesNonsquare.glsl
+++ b/tests/sksl/shared/MatricesNonsquare.glsl
@@ -2,7 +2,6 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
-uniform mat2 testMatrix2x2;
 bool test_half_b() {
     bool ok = true;
     mat2x3 m23 = mat2x3(2.0);
@@ -27,13 +26,6 @@
     ok = ok && m32 == mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0);
     m24 /= 4.0;
     ok = ok && m24 == mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0);
-    vec4 h4 = vec4(testMatrix2x2);
-    ok = ok && mat2x3(h4.xyz, h4.w, h4.xy) == mat2x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0);
-    ok = ok && mat2x4(h4.xyz, h4.w, h4.x, h4.yzw) == mat2x4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    ok = ok && mat3x2(h4.xy, h4.zw, h4.x, h4.y) == mat3x2(1.0, 2.0, 3.0, 4.0, 1.0, 2.0);
-    ok = ok && mat3x4(h4.xy, h4.zw, h4, h4.x, h4.yz, h4.w) == mat3x4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    ok = ok && mat4x2(h4.xy, h4.z, h4.w, h4.xy, h4.z, h4.w) == mat4x2(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    ok = ok && mat4x3(h4.x, h4.yz, h4.wx, h4.y, h4.zwx, h4.yzw) == mat4x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
     return ok;
 }
 vec4 main() {
@@ -60,12 +52,5 @@
     _0_ok = _0_ok && _3_m32 == mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0);
     _2_m24 /= 4.0;
     _0_ok = _0_ok && _2_m24 == mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0);
-    vec4 _10_f4 = vec4(testMatrix2x2);
-    _0_ok = _0_ok && mat2x3(_10_f4.xyz, _10_f4.w, _10_f4.xy) == mat2x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0);
-    _0_ok = _0_ok && mat2x4(_10_f4.xyz, _10_f4.w, _10_f4.x, _10_f4.yzw) == mat2x4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    _0_ok = _0_ok && mat3x2(_10_f4.xy, _10_f4.zw, _10_f4.x, _10_f4.y) == mat3x2(1.0, 2.0, 3.0, 4.0, 1.0, 2.0);
-    _0_ok = _0_ok && mat3x4(_10_f4.xy, _10_f4.zw, _10_f4, _10_f4.x, _10_f4.yz, _10_f4.w) == mat3x4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    _0_ok = _0_ok && mat4x2(_10_f4.xy, _10_f4.z, _10_f4.w, _10_f4.xy, _10_f4.z, _10_f4.w) == mat4x2(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
-    _0_ok = _0_ok && mat4x3(_10_f4.x, _10_f4.yz, _10_f4.wx, _10_f4.y, _10_f4.zwx, _10_f4.yzw) == mat4x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
     return _0_ok && test_half_b() ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/MatricesNonsquare.metal b/tests/sksl/shared/MatricesNonsquare.metal
index 0ae1d6f..72a3ece 100644
--- a/tests/sksl/shared/MatricesNonsquare.metal
+++ b/tests/sksl/shared/MatricesNonsquare.metal
@@ -4,7 +4,6 @@
 struct Uniforms {
     float4 colorGreen;
     float4 colorRed;
-    float2x2 testMatrix2x2;
 };
 struct Inputs {
 };
@@ -105,11 +104,7 @@
     left = left / right;
     return left;
 }
-
-float4 float4_from_float2x2(float2x2 x) {
-    return float4(x[0].xy, x[1].xy);
-}
-bool test_half_b(Uniforms _uniforms) {
+bool test_half_b() {
     bool ok = true;
     float2x3 m23 = float2x3(2.0);
     ok = ok && m23 == float2x3(float3(2.0, 0.0, 0.0), float3(0.0, 2.0, 0.0));
@@ -133,13 +128,6 @@
     ok = ok && m32 == float3x2(float2(2.0, -2.0), float2(-2.0, 2.0), float2(-2.0, -2.0));
     m24 /= (float2x4(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) * 4.0);
     ok = ok && m24 == float2x4(float4(0.75, 0.0, 0.0, 0.0), float4(0.0, 0.75, 0.0, 0.0));
-    float4 h4 = float4_from_float2x2(_uniforms.testMatrix2x2);
-    ok = ok && float2x3(h4.xyz, float3(h4.w, h4.xy)) == float2x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0));
-    ok = ok && float2x4(float4(h4.xyz, h4.w), float4(h4.x, h4.yzw)) == float2x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
-    ok = ok && float3x2(h4.xy, h4.zw, float2(h4.x, h4.y)) == float3x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(1.0, 2.0));
-    ok = ok && float3x4(float4(h4.xy, h4.zw), h4, float4(h4.x, h4.yz, h4.w)) == float3x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
-    ok = ok && float4x2(h4.xy, float2(h4.z, h4.w), h4.xy, float2(h4.z, h4.w)) == float4x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(1.0, 2.0), float2(3.0, 4.0));
-    ok = ok && float4x3(float3(h4.x, h4.yz), float3(h4.wx, h4.y), h4.zwx, h4.yzw) == float4x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0), float3(2.0, 3.0, 4.0));
     return ok;
 }
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
@@ -168,13 +156,6 @@
     _0_ok = _0_ok && _3_m32 == float3x2(float2(2.0, -2.0), float2(-2.0, 2.0), float2(-2.0, -2.0));
     _2_m24 /= (float2x4(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) * 4.0);
     _0_ok = _0_ok && _2_m24 == float2x4(float4(0.75, 0.0, 0.0, 0.0), float4(0.0, 0.75, 0.0, 0.0));
-    float4 _10_f4 = float4_from_float2x2(_uniforms.testMatrix2x2);
-    _0_ok = _0_ok && float2x3(_10_f4.xyz, float3(_10_f4.w, _10_f4.xy)) == float2x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0));
-    _0_ok = _0_ok && float2x4(float4(_10_f4.xyz, _10_f4.w), float4(_10_f4.x, _10_f4.yzw)) == float2x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
-    _0_ok = _0_ok && float3x2(_10_f4.xy, _10_f4.zw, float2(_10_f4.x, _10_f4.y)) == float3x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(1.0, 2.0));
-    _0_ok = _0_ok && float3x4(float4(_10_f4.xy, _10_f4.zw), _10_f4, float4(_10_f4.x, _10_f4.yz, _10_f4.w)) == float3x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
-    _0_ok = _0_ok && float4x2(_10_f4.xy, float2(_10_f4.z, _10_f4.w), _10_f4.xy, float2(_10_f4.z, _10_f4.w)) == float4x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(1.0, 2.0), float2(3.0, 4.0));
-    _0_ok = _0_ok && float4x3(float3(_10_f4.x, _10_f4.yz), float3(_10_f4.wx, _10_f4.y), _10_f4.zwx, _10_f4.yzw) == float4x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0), float3(2.0, 3.0, 4.0));
-    _out.sk_FragColor = _0_ok && test_half_b(_uniforms) ? _uniforms.colorGreen : _uniforms.colorRed;
+    _out.sk_FragColor = _0_ok && test_half_b() ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/MatrixConstructorsES2.asm.frag b/tests/sksl/shared/MatrixConstructorsES2.asm.frag
new file mode 100644
index 0000000..ef6437c
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES2.asm.frag
@@ -0,0 +1,234 @@
+OpCapability Shader
+%1 = OpExtInstImport "GLSL.std.450"
+OpMemoryModel Logical GLSL450
+OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
+OpExecutionMode %_entrypoint_v OriginUpperLeft
+OpName %sk_FragColor "sk_FragColor"
+OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "colorGreen"
+OpMemberName %_UniformBuffer 1 "colorRed"
+OpMemberName %_UniformBuffer 2 "testMatrix2x2"
+OpName %_entrypoint_v "_entrypoint_v"
+OpName %main "main"
+OpName %f4 "f4"
+OpName %ok "ok"
+OpDecorate %sk_FragColor RelaxedPrecision
+OpDecorate %sk_FragColor Location 0
+OpDecorate %sk_FragColor Index 0
+OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
+OpMemberDecorate %_UniformBuffer 2 ColMajor
+OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %68 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %166 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
+OpDecorate %177 RelaxedPrecision
+OpDecorate %178 RelaxedPrecision
+%float = OpTypeFloat 32
+%v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%sk_FragColor = OpVariable %_ptr_Output_v4float Output
+%bool = OpTypeBool
+%_ptr_Input_bool = OpTypePointer Input %bool
+%sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%v2float = OpTypeVector %float 2
+%mat2v2float = OpTypeMatrix %v2float 2
+%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%void = OpTypeVoid
+%17 = OpTypeFunction %void
+%float_0 = OpConstant %float 0
+%20 = OpConstantComposite %v2float %float_0 %float_0
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+%24 = OpTypeFunction %v4float %_ptr_Function_v2float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
+%int = OpTypeInt 32 1
+%int_2 = OpConstant %int 2
+%_ptr_Function_bool = OpTypePointer Function %bool
+%v3float = OpTypeVector %float 3
+%float_4 = OpConstant %float 4
+%float_1 = OpConstant %float 1
+%float_2 = OpConstant %float 2
+%float_3 = OpConstant %float 3
+%v2bool = OpTypeVector %bool 2
+%false = OpConstantFalse %bool
+%mat3v3float = OpTypeMatrix %v3float 3
+%v3bool = OpTypeVector %bool 3
+%mat4v4float = OpTypeMatrix %v4float 4
+%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%_entrypoint_v = OpFunction %void None %17
+%18 = OpLabel
+%21 = OpVariable %_ptr_Function_v2float Function
+OpStore %21 %20
+%23 = OpFunctionCall %v4float %main %21
+OpStore %sk_FragColor %23
+OpReturn
+OpFunctionEnd
+%main = OpFunction %v4float None %24
+%25 = OpFunctionParameter %_ptr_Function_v2float
+%26 = OpLabel
+%f4 = OpVariable %_ptr_Function_v4float Function
+%ok = OpVariable %_ptr_Function_bool Function
+%167 = OpVariable %_ptr_Function_v4float Function
+%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
+%33 = OpLoad %mat2v2float %29
+%34 = OpCompositeExtract %float %33 0 0
+%35 = OpCompositeExtract %float %33 0 1
+%36 = OpCompositeExtract %float %33 1 0
+%37 = OpCompositeExtract %float %33 1 1
+%38 = OpCompositeConstruct %v4float %34 %35 %36 %37
+OpStore %f4 %38
+%41 = OpLoad %v4float %f4
+%42 = OpVectorShuffle %v3float %41 %41 0 1 2
+%45 = OpCompositeExtract %float %42 0
+%46 = OpCompositeExtract %float %42 1
+%47 = OpCompositeConstruct %v2float %45 %46
+%48 = OpCompositeExtract %float %42 2
+%49 = OpCompositeConstruct %v2float %48 %float_4
+%50 = OpCompositeConstruct %mat2v2float %47 %49
+%54 = OpCompositeConstruct %v2float %float_1 %float_2
+%55 = OpCompositeConstruct %v2float %float_3 %float_4
+%56 = OpCompositeConstruct %mat2v2float %54 %55
+%58 = OpCompositeExtract %v2float %50 0
+%59 = OpCompositeExtract %v2float %56 0
+%60 = OpFOrdEqual %v2bool %58 %59
+%61 = OpAll %bool %60
+%62 = OpCompositeExtract %v2float %50 1
+%63 = OpCompositeExtract %v2float %56 1
+%64 = OpFOrdEqual %v2bool %62 %63
+%65 = OpAll %bool %64
+%66 = OpLogicalAnd %bool %61 %65
+OpStore %ok %66
+%68 = OpLoad %bool %ok
+OpSelectionMerge %70 None
+OpBranchConditional %68 %69 %70
+%69 = OpLabel
+%71 = OpLoad %v4float %f4
+%72 = OpVectorShuffle %v2float %71 %71 0 1
+%73 = OpLoad %v4float %f4
+%74 = OpVectorShuffle %v2float %73 %73 2 3
+%75 = OpLoad %v4float %f4
+%76 = OpLoad %v4float %f4
+%77 = OpCompositeExtract %float %76 0
+%78 = OpCompositeExtract %float %72 0
+%79 = OpCompositeExtract %float %72 1
+%80 = OpCompositeExtract %float %74 0
+%81 = OpCompositeConstruct %v3float %78 %79 %80
+%82 = OpCompositeExtract %float %74 1
+%83 = OpCompositeExtract %float %75 0
+%84 = OpCompositeExtract %float %75 1
+%85 = OpCompositeConstruct %v3float %82 %83 %84
+%86 = OpCompositeExtract %float %75 2
+%87 = OpCompositeExtract %float %75 3
+%88 = OpCompositeConstruct %v3float %86 %87 %77
+%89 = OpCompositeConstruct %mat3v3float %81 %85 %88
+%91 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%92 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
+%93 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
+%94 = OpCompositeConstruct %mat3v3float %91 %92 %93
+%96 = OpCompositeExtract %v3float %89 0
+%97 = OpCompositeExtract %v3float %94 0
+%98 = OpFOrdEqual %v3bool %96 %97
+%99 = OpAll %bool %98
+%100 = OpCompositeExtract %v3float %89 1
+%101 = OpCompositeExtract %v3float %94 1
+%102 = OpFOrdEqual %v3bool %100 %101
+%103 = OpAll %bool %102
+%104 = OpLogicalAnd %bool %99 %103
+%105 = OpCompositeExtract %v3float %89 2
+%106 = OpCompositeExtract %v3float %94 2
+%107 = OpFOrdEqual %v3bool %105 %106
+%108 = OpAll %bool %107
+%109 = OpLogicalAnd %bool %104 %108
+OpBranch %70
+%70 = OpLabel
+%110 = OpPhi %bool %false %26 %109 %69
+OpStore %ok %110
+%111 = OpLoad %bool %ok
+OpSelectionMerge %113 None
+OpBranchConditional %111 %112 %113
+%112 = OpLabel
+%114 = OpLoad %v4float %f4
+%115 = OpVectorShuffle %v3float %114 %114 0 1 2
+%116 = OpLoad %v4float %f4
+%117 = OpVectorShuffle %v3float %116 %116 3 0 1
+%118 = OpLoad %v4float %f4
+%119 = OpVectorShuffle %v4float %118 %118 2 3 0 1
+%120 = OpLoad %v4float %f4
+%121 = OpVectorShuffle %v2float %120 %120 2 3
+%122 = OpLoad %v4float %f4
+%123 = OpCompositeExtract %float %115 0
+%124 = OpCompositeExtract %float %115 1
+%125 = OpCompositeExtract %float %115 2
+%126 = OpCompositeExtract %float %117 0
+%127 = OpCompositeConstruct %v4float %123 %124 %125 %126
+%128 = OpCompositeExtract %float %117 1
+%129 = OpCompositeExtract %float %117 2
+%130 = OpCompositeExtract %float %119 0
+%131 = OpCompositeExtract %float %119 1
+%132 = OpCompositeConstruct %v4float %128 %129 %130 %131
+%133 = OpCompositeExtract %float %119 2
+%134 = OpCompositeExtract %float %119 3
+%135 = OpCompositeExtract %float %121 0
+%136 = OpCompositeExtract %float %121 1
+%137 = OpCompositeConstruct %v4float %133 %134 %135 %136
+%138 = OpCompositeConstruct %mat4v4float %127 %132 %137 %122
+%140 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%141 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%142 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%143 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%144 = OpCompositeConstruct %mat4v4float %140 %141 %142 %143
+%146 = OpCompositeExtract %v4float %138 0
+%147 = OpCompositeExtract %v4float %144 0
+%148 = OpFOrdEqual %v4bool %146 %147
+%149 = OpAll %bool %148
+%150 = OpCompositeExtract %v4float %138 1
+%151 = OpCompositeExtract %v4float %144 1
+%152 = OpFOrdEqual %v4bool %150 %151
+%153 = OpAll %bool %152
+%154 = OpLogicalAnd %bool %149 %153
+%155 = OpCompositeExtract %v4float %138 2
+%156 = OpCompositeExtract %v4float %144 2
+%157 = OpFOrdEqual %v4bool %155 %156
+%158 = OpAll %bool %157
+%159 = OpLogicalAnd %bool %154 %158
+%160 = OpCompositeExtract %v4float %138 3
+%161 = OpCompositeExtract %v4float %144 3
+%162 = OpFOrdEqual %v4bool %160 %161
+%163 = OpAll %bool %162
+%164 = OpLogicalAnd %bool %159 %163
+OpBranch %113
+%113 = OpLabel
+%165 = OpPhi %bool %false %70 %164 %112
+OpStore %ok %165
+%166 = OpLoad %bool %ok
+OpSelectionMerge %170 None
+OpBranchConditional %166 %168 %169
+%168 = OpLabel
+%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%174 = OpLoad %v4float %171
+OpStore %167 %174
+OpBranch %170
+%169 = OpLabel
+%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%177 = OpLoad %v4float %175
+OpStore %167 %177
+OpBranch %170
+%170 = OpLabel
+%178 = OpLoad %v4float %167
+OpReturnValue %178
+OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixConstructorsES2.glsl b/tests/sksl/shared/MatrixConstructorsES2.glsl
new file mode 100644
index 0000000..c4015a6
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES2.glsl
@@ -0,0 +1,12 @@
+
+out vec4 sk_FragColor;
+uniform vec4 colorGreen;
+uniform vec4 colorRed;
+uniform mat2 testMatrix2x2;
+vec4 main() {
+    vec4 f4 = vec4(testMatrix2x2);
+    bool ok = mat2(f4.xyz, 4.0) == mat2(1.0, 2.0, 3.0, 4.0);
+    ok = ok && mat3(f4.xy, f4.zw, f4, f4.x) == mat3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0);
+    ok = ok && mat4(f4.xyz, f4.wxy, f4.zwxy, f4.zw, f4) == mat4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
+    return ok ? colorGreen : colorRed;
+}
diff --git a/tests/sksl/shared/MatrixConstructorsES2.metal b/tests/sksl/shared/MatrixConstructorsES2.metal
new file mode 100644
index 0000000..a673643
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES2.metal
@@ -0,0 +1,69 @@
+#include <metal_stdlib>
+#include <simd/simd.h>
+using namespace metal;
+struct Uniforms {
+    float4 colorGreen;
+    float4 colorRed;
+    float2x2 testMatrix2x2;
+};
+struct Inputs {
+};
+struct Outputs {
+    float4 sk_FragColor [[color(0)]];
+};
+
+thread bool operator==(const float2x2 left, const float2x2 right);
+thread bool operator!=(const float2x2 left, const float2x2 right);
+
+thread bool operator==(const float3x3 left, const float3x3 right);
+thread bool operator!=(const float3x3 left, const float3x3 right);
+
+thread bool operator==(const float4x4 left, const float4x4 right);
+thread bool operator!=(const float4x4 left, const float4x4 right);
+
+float4 float4_from_float2x2(float2x2 x) {
+    return float4(x[0].xy, x[1].xy);
+}
+thread bool operator==(const float2x2 left, const float2x2 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]);
+}
+thread bool operator!=(const float2x2 left, const float2x2 right) {
+    return !(left == right);
+}
+float2x2 float2x2_from_float3_float(float3 x0, float x1) {
+    return float2x2(float2(x0.xy), float2(x0.z, x1));
+}
+thread bool operator==(const float3x3 left, const float3x3 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]) &&
+           all(left[2] == right[2]);
+}
+thread bool operator!=(const float3x3 left, const float3x3 right) {
+    return !(left == right);
+}
+float3x3 float3x3_from_float2_float2_float4_float(float2 x0, float2 x1, float4 x2, float x3) {
+    return float3x3(float3(x0.xy, x1.x), float3(x1.y, x2.xy), float3(x2.zw, x3));
+}
+thread bool operator==(const float4x4 left, const float4x4 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]) &&
+           all(left[2] == right[2]) &&
+           all(left[3] == right[3]);
+}
+thread bool operator!=(const float4x4 left, const float4x4 right) {
+    return !(left == right);
+}
+float4x4 float4x4_from_float3_float3_float4_float2_float4(float3 x0, float3 x1, float4 x2, float2 x3, float4 x4) {
+    return float4x4(float4(x0.xyz, x1.x), float4(x1.yz, x2.xy), float4(x2.zw, x3.xy), float4(x4.xyzw));
+}
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+    Outputs _out;
+    (void)_out;
+    float4 f4 = float4_from_float2x2(_uniforms.testMatrix2x2);
+    bool ok = float2x2_from_float3_float(f4.xyz, 4.0) == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    ok = ok && float3x3_from_float2_float2_float4_float(f4.xy, f4.zw, f4, f4.x) == float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0));
+    ok = ok && float4x4_from_float3_float3_float4_float2_float4(f4.xyz, f4.wxy, f4.zwxy, f4.zw, f4) == float4x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
+    _out.sk_FragColor = ok ? _uniforms.colorGreen : _uniforms.colorRed;
+    return _out;
+}
diff --git a/tests/sksl/shared/MatrixConstructorsES3.asm.frag b/tests/sksl/shared/MatrixConstructorsES3.asm.frag
new file mode 100644
index 0000000..079b6d0
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES3.asm.frag
@@ -0,0 +1,324 @@
+OpCapability Shader
+%1 = OpExtInstImport "GLSL.std.450"
+OpMemoryModel Logical GLSL450
+OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
+OpExecutionMode %_entrypoint_v OriginUpperLeft
+OpName %sk_FragColor "sk_FragColor"
+OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "colorGreen"
+OpMemberName %_UniformBuffer 1 "colorRed"
+OpMemberName %_UniformBuffer 2 "testMatrix2x2"
+OpName %_entrypoint_v "_entrypoint_v"
+OpName %main "main"
+OpName %f4 "f4"
+OpName %ok "ok"
+OpDecorate %sk_FragColor RelaxedPrecision
+OpDecorate %sk_FragColor Location 0
+OpDecorate %sk_FragColor Index 0
+OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
+OpMemberDecorate %_UniformBuffer 2 ColMajor
+OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %73 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %149 RelaxedPrecision
+OpDecorate %197 RelaxedPrecision
+OpDecorate %246 RelaxedPrecision
+OpDecorate %254 RelaxedPrecision
+OpDecorate %257 RelaxedPrecision
+OpDecorate %258 RelaxedPrecision
+%float = OpTypeFloat 32
+%v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%sk_FragColor = OpVariable %_ptr_Output_v4float Output
+%bool = OpTypeBool
+%_ptr_Input_bool = OpTypePointer Input %bool
+%sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%v2float = OpTypeVector %float 2
+%mat2v2float = OpTypeMatrix %v2float 2
+%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%void = OpTypeVoid
+%17 = OpTypeFunction %void
+%float_0 = OpConstant %float 0
+%20 = OpConstantComposite %v2float %float_0 %float_0
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+%24 = OpTypeFunction %v4float %_ptr_Function_v2float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
+%int = OpTypeInt 32 1
+%int_2 = OpConstant %int 2
+%_ptr_Function_bool = OpTypePointer Function %bool
+%v3float = OpTypeVector %float 3
+%mat2v3float = OpTypeMatrix %v3float 2
+%float_1 = OpConstant %float 1
+%float_2 = OpConstant %float 2
+%float_3 = OpConstant %float 3
+%float_4 = OpConstant %float 4
+%v3bool = OpTypeVector %bool 3
+%false = OpConstantFalse %bool
+%mat2v4float = OpTypeMatrix %v4float 2
+%v4bool = OpTypeVector %bool 4
+%mat3v3float = OpTypeMatrix %v3float 3
+%mat4v2float = OpTypeMatrix %v2float 4
+%v2bool = OpTypeVector %bool 2
+%mat4v3float = OpTypeMatrix %v3float 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%_entrypoint_v = OpFunction %void None %17
+%18 = OpLabel
+%21 = OpVariable %_ptr_Function_v2float Function
+OpStore %21 %20
+%23 = OpFunctionCall %v4float %main %21
+OpStore %sk_FragColor %23
+OpReturn
+OpFunctionEnd
+%main = OpFunction %v4float None %24
+%25 = OpFunctionParameter %_ptr_Function_v2float
+%26 = OpLabel
+%f4 = OpVariable %_ptr_Function_v4float Function
+%ok = OpVariable %_ptr_Function_bool Function
+%247 = OpVariable %_ptr_Function_v4float Function
+%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
+%33 = OpLoad %mat2v2float %29
+%34 = OpCompositeExtract %float %33 0 0
+%35 = OpCompositeExtract %float %33 0 1
+%36 = OpCompositeExtract %float %33 1 0
+%37 = OpCompositeExtract %float %33 1 1
+%38 = OpCompositeConstruct %v4float %34 %35 %36 %37
+OpStore %f4 %38
+%41 = OpLoad %v4float %f4
+%42 = OpLoad %v4float %f4
+%43 = OpVectorShuffle %v2float %42 %42 0 1
+%44 = OpCompositeExtract %float %41 0
+%45 = OpCompositeExtract %float %41 1
+%46 = OpCompositeExtract %float %41 2
+%47 = OpCompositeConstruct %v3float %44 %45 %46
+%49 = OpCompositeExtract %float %41 3
+%50 = OpCompositeExtract %float %43 0
+%51 = OpCompositeExtract %float %43 1
+%52 = OpCompositeConstruct %v3float %49 %50 %51
+%53 = OpCompositeConstruct %mat2v3float %47 %52
+%59 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%60 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
+%61 = OpCompositeConstruct %mat2v3float %59 %60
+%63 = OpCompositeExtract %v3float %53 0
+%64 = OpCompositeExtract %v3float %61 0
+%65 = OpFOrdEqual %v3bool %63 %64
+%66 = OpAll %bool %65
+%67 = OpCompositeExtract %v3float %53 1
+%68 = OpCompositeExtract %v3float %61 1
+%69 = OpFOrdEqual %v3bool %67 %68
+%70 = OpAll %bool %69
+%71 = OpLogicalAnd %bool %66 %70
+OpStore %ok %71
+%73 = OpLoad %bool %ok
+OpSelectionMerge %75 None
+OpBranchConditional %73 %74 %75
+%74 = OpLabel
+%76 = OpLoad %v4float %f4
+%77 = OpVectorShuffle %v3float %76 %76 0 1 2
+%78 = OpLoad %v4float %f4
+%79 = OpVectorShuffle %v4float %78 %78 3 0 1 2
+%80 = OpLoad %v4float %f4
+%81 = OpCompositeExtract %float %80 3
+%82 = OpCompositeExtract %float %77 0
+%83 = OpCompositeExtract %float %77 1
+%84 = OpCompositeExtract %float %77 2
+%85 = OpCompositeExtract %float %79 0
+%86 = OpCompositeConstruct %v4float %82 %83 %84 %85
+%87 = OpCompositeExtract %float %79 1
+%88 = OpCompositeExtract %float %79 2
+%89 = OpCompositeExtract %float %79 3
+%90 = OpCompositeConstruct %v4float %87 %88 %89 %81
+%91 = OpCompositeConstruct %mat2v4float %86 %90
+%93 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%94 = OpCompositeConstruct %v4float %float_1 %float_2 %float_3 %float_4
+%95 = OpCompositeConstruct %mat2v4float %93 %94
+%97 = OpCompositeExtract %v4float %91 0
+%98 = OpCompositeExtract %v4float %95 0
+%99 = OpFOrdEqual %v4bool %97 %98
+%100 = OpAll %bool %99
+%101 = OpCompositeExtract %v4float %91 1
+%102 = OpCompositeExtract %v4float %95 1
+%103 = OpFOrdEqual %v4bool %101 %102
+%104 = OpAll %bool %103
+%105 = OpLogicalAnd %bool %100 %104
+OpBranch %75
+%75 = OpLabel
+%106 = OpPhi %bool %false %26 %105 %74
+OpStore %ok %106
+%107 = OpLoad %bool %ok
+OpSelectionMerge %109 None
+OpBranchConditional %107 %108 %109
+%108 = OpLabel
+%110 = OpLoad %v4float %f4
+%111 = OpVectorShuffle %v2float %110 %110 0 1
+%112 = OpLoad %v4float %f4
+%113 = OpVectorShuffle %v2float %112 %112 2 3
+%114 = OpLoad %v4float %f4
+%115 = OpLoad %v4float %f4
+%116 = OpCompositeExtract %float %115 0
+%117 = OpCompositeExtract %float %111 0
+%118 = OpCompositeExtract %float %111 1
+%119 = OpCompositeExtract %float %113 0
+%120 = OpCompositeConstruct %v3float %117 %118 %119
+%121 = OpCompositeExtract %float %113 1
+%122 = OpCompositeExtract %float %114 0
+%123 = OpCompositeExtract %float %114 1
+%124 = OpCompositeConstruct %v3float %121 %122 %123
+%125 = OpCompositeExtract %float %114 2
+%126 = OpCompositeExtract %float %114 3
+%127 = OpCompositeConstruct %v3float %125 %126 %116
+%128 = OpCompositeConstruct %mat3v3float %120 %124 %127
+%130 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%131 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
+%132 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
+%133 = OpCompositeConstruct %mat3v3float %130 %131 %132
+%134 = OpCompositeExtract %v3float %128 0
+%135 = OpCompositeExtract %v3float %133 0
+%136 = OpFOrdEqual %v3bool %134 %135
+%137 = OpAll %bool %136
+%138 = OpCompositeExtract %v3float %128 1
+%139 = OpCompositeExtract %v3float %133 1
+%140 = OpFOrdEqual %v3bool %138 %139
+%141 = OpAll %bool %140
+%142 = OpLogicalAnd %bool %137 %141
+%143 = OpCompositeExtract %v3float %128 2
+%144 = OpCompositeExtract %v3float %133 2
+%145 = OpFOrdEqual %v3bool %143 %144
+%146 = OpAll %bool %145
+%147 = OpLogicalAnd %bool %142 %146
+OpBranch %109
+%109 = OpLabel
+%148 = OpPhi %bool %false %75 %147 %108
+OpStore %ok %148
+%149 = OpLoad %bool %ok
+OpSelectionMerge %151 None
+OpBranchConditional %149 %150 %151
+%150 = OpLabel
+%152 = OpLoad %v4float %f4
+%153 = OpVectorShuffle %v3float %152 %152 0 1 2
+%154 = OpLoad %v4float %f4
+%155 = OpVectorShuffle %v4float %154 %154 3 0 1 2
+%156 = OpLoad %v4float %f4
+%157 = OpCompositeExtract %float %156 3
+%158 = OpCompositeExtract %float %153 0
+%159 = OpCompositeExtract %float %153 1
+%160 = OpCompositeConstruct %v2float %158 %159
+%161 = OpCompositeExtract %float %153 2
+%162 = OpCompositeExtract %float %155 0
+%163 = OpCompositeConstruct %v2float %161 %162
+%164 = OpCompositeExtract %float %155 1
+%165 = OpCompositeExtract %float %155 2
+%166 = OpCompositeConstruct %v2float %164 %165
+%167 = OpCompositeExtract %float %155 3
+%168 = OpCompositeConstruct %v2float %167 %157
+%169 = OpCompositeConstruct %mat4v2float %160 %163 %166 %168
+%171 = OpCompositeConstruct %v2float %float_1 %float_2
+%172 = OpCompositeConstruct %v2float %float_3 %float_4
+%173 = OpCompositeConstruct %v2float %float_1 %float_2
+%174 = OpCompositeConstruct %v2float %float_3 %float_4
+%175 = OpCompositeConstruct %mat4v2float %171 %172 %173 %174
+%177 = OpCompositeExtract %v2float %169 0
+%178 = OpCompositeExtract %v2float %175 0
+%179 = OpFOrdEqual %v2bool %177 %178
+%180 = OpAll %bool %179
+%181 = OpCompositeExtract %v2float %169 1
+%182 = OpCompositeExtract %v2float %175 1
+%183 = OpFOrdEqual %v2bool %181 %182
+%184 = OpAll %bool %183
+%185 = OpLogicalAnd %bool %180 %184
+%186 = OpCompositeExtract %v2float %169 2
+%187 = OpCompositeExtract %v2float %175 2
+%188 = OpFOrdEqual %v2bool %186 %187
+%189 = OpAll %bool %188
+%190 = OpLogicalAnd %bool %185 %189
+%191 = OpCompositeExtract %v2float %169 3
+%192 = OpCompositeExtract %v2float %175 3
+%193 = OpFOrdEqual %v2bool %191 %192
+%194 = OpAll %bool %193
+%195 = OpLogicalAnd %bool %190 %194
+OpBranch %151
+%151 = OpLabel
+%196 = OpPhi %bool %false %109 %195 %150
+OpStore %ok %196
+%197 = OpLoad %bool %ok
+OpSelectionMerge %199 None
+OpBranchConditional %197 %198 %199
+%198 = OpLabel
+%200 = OpLoad %v4float %f4
+%201 = OpCompositeExtract %float %200 0
+%202 = OpLoad %v4float %f4
+%203 = OpVectorShuffle %v4float %202 %202 1 2 3 0
+%204 = OpLoad %v4float %f4
+%205 = OpVectorShuffle %v4float %204 %204 1 2 3 0
+%206 = OpLoad %v4float %f4
+%207 = OpVectorShuffle %v3float %206 %206 1 2 3
+%208 = OpCompositeExtract %float %203 0
+%209 = OpCompositeExtract %float %203 1
+%210 = OpCompositeConstruct %v3float %201 %208 %209
+%211 = OpCompositeExtract %float %203 2
+%212 = OpCompositeExtract %float %203 3
+%213 = OpCompositeExtract %float %205 0
+%214 = OpCompositeConstruct %v3float %211 %212 %213
+%215 = OpCompositeExtract %float %205 1
+%216 = OpCompositeExtract %float %205 2
+%217 = OpCompositeExtract %float %205 3
+%218 = OpCompositeConstruct %v3float %215 %216 %217
+%219 = OpCompositeConstruct %mat4v3float %210 %214 %218 %207
+%221 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%222 = OpCompositeConstruct %v3float %float_4 %float_1 %float_2
+%223 = OpCompositeConstruct %v3float %float_3 %float_4 %float_1
+%224 = OpCompositeConstruct %v3float %float_2 %float_3 %float_4
+%225 = OpCompositeConstruct %mat4v3float %221 %222 %223 %224
+%226 = OpCompositeExtract %v3float %219 0
+%227 = OpCompositeExtract %v3float %225 0
+%228 = OpFOrdEqual %v3bool %226 %227
+%229 = OpAll %bool %228
+%230 = OpCompositeExtract %v3float %219 1
+%231 = OpCompositeExtract %v3float %225 1
+%232 = OpFOrdEqual %v3bool %230 %231
+%233 = OpAll %bool %232
+%234 = OpLogicalAnd %bool %229 %233
+%235 = OpCompositeExtract %v3float %219 2
+%236 = OpCompositeExtract %v3float %225 2
+%237 = OpFOrdEqual %v3bool %235 %236
+%238 = OpAll %bool %237
+%239 = OpLogicalAnd %bool %234 %238
+%240 = OpCompositeExtract %v3float %219 3
+%241 = OpCompositeExtract %v3float %225 3
+%242 = OpFOrdEqual %v3bool %240 %241
+%243 = OpAll %bool %242
+%244 = OpLogicalAnd %bool %239 %243
+OpBranch %199
+%199 = OpLabel
+%245 = OpPhi %bool %false %151 %244 %198
+OpStore %ok %245
+%246 = OpLoad %bool %ok
+OpSelectionMerge %250 None
+OpBranchConditional %246 %248 %249
+%248 = OpLabel
+%251 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%254 = OpLoad %v4float %251
+OpStore %247 %254
+OpBranch %250
+%249 = OpLabel
+%255 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%257 = OpLoad %v4float %255
+OpStore %247 %257
+OpBranch %250
+%250 = OpLabel
+%258 = OpLoad %v4float %247
+OpReturnValue %258
+OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixConstructorsES3.glsl b/tests/sksl/shared/MatrixConstructorsES3.glsl
new file mode 100644
index 0000000..c7aa4d5
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES3.glsl
@@ -0,0 +1,14 @@
+
+out vec4 sk_FragColor;
+uniform vec4 colorGreen;
+uniform vec4 colorRed;
+uniform mat2 testMatrix2x2;
+vec4 main() {
+    vec4 f4 = vec4(testMatrix2x2);
+    bool ok = mat2x3(f4, f4.xy) == mat2x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0);
+    ok = ok && mat2x4(f4.xyz, f4.wxyz, f4.w) == mat2x4(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
+    ok = ok && mat3(f4.xy, f4.zw, f4, f4.x) == mat3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0);
+    ok = ok && mat4x2(f4.xyz, f4.wxyz, f4.w) == mat4x2(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
+    ok = ok && mat4x3(f4.x, f4.yzwx, f4.yzwx, f4.yzw) == mat4x3(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
+    return ok ? colorGreen : colorRed;
+}
diff --git a/tests/sksl/shared/MatrixConstructorsES3.metal b/tests/sksl/shared/MatrixConstructorsES3.metal
new file mode 100644
index 0000000..ab0d975
--- /dev/null
+++ b/tests/sksl/shared/MatrixConstructorsES3.metal
@@ -0,0 +1,99 @@
+#include <metal_stdlib>
+#include <simd/simd.h>
+using namespace metal;
+struct Uniforms {
+    float4 colorGreen;
+    float4 colorRed;
+    float2x2 testMatrix2x2;
+};
+struct Inputs {
+};
+struct Outputs {
+    float4 sk_FragColor [[color(0)]];
+};
+
+thread bool operator==(const float2x3 left, const float2x3 right);
+thread bool operator!=(const float2x3 left, const float2x3 right);
+
+thread bool operator==(const float2x4 left, const float2x4 right);
+thread bool operator!=(const float2x4 left, const float2x4 right);
+
+thread bool operator==(const float3x3 left, const float3x3 right);
+thread bool operator!=(const float3x3 left, const float3x3 right);
+
+thread bool operator==(const float4x2 left, const float4x2 right);
+thread bool operator!=(const float4x2 left, const float4x2 right);
+
+thread bool operator==(const float4x3 left, const float4x3 right);
+thread bool operator!=(const float4x3 left, const float4x3 right);
+
+float4 float4_from_float2x2(float2x2 x) {
+    return float4(x[0].xy, x[1].xy);
+}
+thread bool operator==(const float2x3 left, const float2x3 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]);
+}
+thread bool operator!=(const float2x3 left, const float2x3 right) {
+    return !(left == right);
+}
+float2x3 float2x3_from_float4_float2(float4 x0, float2 x1) {
+    return float2x3(float3(x0.xyz), float3(x0.w, x1.xy));
+}
+thread bool operator==(const float2x4 left, const float2x4 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]);
+}
+thread bool operator!=(const float2x4 left, const float2x4 right) {
+    return !(left == right);
+}
+float2x4 float2x4_from_float3_float4_float(float3 x0, float4 x1, float x2) {
+    return float2x4(float4(x0.xyz, x1.x), float4(x1.yzw, x2));
+}
+thread bool operator==(const float3x3 left, const float3x3 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]) &&
+           all(left[2] == right[2]);
+}
+thread bool operator!=(const float3x3 left, const float3x3 right) {
+    return !(left == right);
+}
+float3x3 float3x3_from_float2_float2_float4_float(float2 x0, float2 x1, float4 x2, float x3) {
+    return float3x3(float3(x0.xy, x1.x), float3(x1.y, x2.xy), float3(x2.zw, x3));
+}
+thread bool operator==(const float4x2 left, const float4x2 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]) &&
+           all(left[2] == right[2]) &&
+           all(left[3] == right[3]);
+}
+thread bool operator!=(const float4x2 left, const float4x2 right) {
+    return !(left == right);
+}
+float4x2 float4x2_from_float3_float4_float(float3 x0, float4 x1, float x2) {
+    return float4x2(float2(x0.xy), float2(x0.z, x1.x), float2(x1.yz), float2(x1.w, x2));
+}
+thread bool operator==(const float4x3 left, const float4x3 right) {
+    return all(left[0] == right[0]) &&
+           all(left[1] == right[1]) &&
+           all(left[2] == right[2]) &&
+           all(left[3] == right[3]);
+}
+thread bool operator!=(const float4x3 left, const float4x3 right) {
+    return !(left == right);
+}
+float4x3 float4x3_from_float_float4_float4_float3(float x0, float4 x1, float4 x2, float3 x3) {
+    return float4x3(float3(x0, x1.xy), float3(x1.zw, x2.x), float3(x2.yzw), float3(x3.xyz));
+}
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+    Outputs _out;
+    (void)_out;
+    float4 f4 = float4_from_float2x2(_uniforms.testMatrix2x2);
+    bool ok = float2x3_from_float4_float2(f4, f4.xy) == float2x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0));
+    ok = ok && float2x4_from_float3_float4_float(f4.xyz, f4.wxyz, f4.w) == float2x4(float4(1.0, 2.0, 3.0, 4.0), float4(1.0, 2.0, 3.0, 4.0));
+    ok = ok && float3x3_from_float2_float2_float4_float(f4.xy, f4.zw, f4, f4.x) == float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0));
+    ok = ok && float4x2_from_float3_float4_float(f4.xyz, f4.wxyz, f4.w) == float4x2(float2(1.0, 2.0), float2(3.0, 4.0), float2(1.0, 2.0), float2(3.0, 4.0));
+    ok = ok && float4x3_from_float_float4_float4_float3(f4.x, f4.yzwx, f4.yzwx, f4.yzw) == float4x3(float3(1.0, 2.0, 3.0), float3(4.0, 1.0, 2.0), float3(3.0, 4.0, 1.0), float3(2.0, 3.0, 4.0));
+    _out.sk_FragColor = ok ? _uniforms.colorGreen : _uniforms.colorRed;
+    return _out;
+}