Remove usage of sqrt() as an optimization barrier in tests.

In the majority of cases, a uniform is an equally good substitute, and
replacing `sqrt(N)` with `unknownInput` actually makes the test clearer.

Change-Id: I7bcb477571972d7aa2ce8c49b3674471f7310748
Bug: skia:12034
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411306
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/resources/sksl/errors/InvalidAssignment.sksl b/resources/sksl/errors/InvalidAssignment.sksl
index efffed2..d838ef3 100644
--- a/resources/sksl/errors/InvalidAssignment.sksl
+++ b/resources/sksl/errors/InvalidAssignment.sksl
@@ -14,7 +14,7 @@
 void assign_to_foldable_ternary_const_left()  { const float l = 1; float r; (true ? l : r) = 0; }
 void assign_to_foldable_ternary_const_right() { float l; const float r = 1; (false ? l : r) = 0; }
 void assign_to_foldable_ternary_const_both()  { const float l = 1; const float r = 1; (true ? l : r) = 0; }
-void assign_to_unfoldable_ternary()           { float l, r; (sqrt(1) > 0 ? l : r) = 0; }
+void assign_to_unfoldable_ternary()           { float l, r; (u > 0 ? l : r) = 0; }
 void assign_to_unary_minus()                  { float x; -x = 0; }
 void assign_to_unary_plus()                   { float x; +x = 0; }  // TODO(skbug.com/10766)
 
diff --git a/resources/sksl/errors/StaticIfTest.sksl b/resources/sksl/errors/StaticIfTest.sksl
index aba8ecd..b9a7667 100644
--- a/resources/sksl/errors/StaticIfTest.sksl
+++ b/resources/sksl/errors/StaticIfTest.sksl
@@ -1,7 +1,7 @@
+uniform float unknownInput;
+
 void main() {
-    float x = sqrt(25);
-    float y = 10;
-    @if (x < y) {
+    @if (unknownInput < 10) {
         sk_FragColor = half4(1);
     }
 }
diff --git a/resources/sksl/errors/StaticSwitchConditionalBreak.sksl b/resources/sksl/errors/StaticSwitchConditionalBreak.sksl
index ed94962..146d9d1 100644
--- a/resources/sksl/errors/StaticSwitchConditionalBreak.sksl
+++ b/resources/sksl/errors/StaticSwitchConditionalBreak.sksl
@@ -1,9 +1,11 @@
+uniform float unknownInput;
+
 void main() {
     const int x = 1;
     @switch (x) {
         case 1:
             sk_FragColor = half4(1);
-            if (sqrt(0) < sqrt(1)) break;
+            if (unknownInput == 2) break;
         default:
             sk_FragColor = half4(0);
     }
diff --git a/resources/sksl/errors/StaticSwitchTest.sksl b/resources/sksl/errors/StaticSwitchTest.sksl
index d3a594b..5c66d85 100644
--- a/resources/sksl/errors/StaticSwitchTest.sksl
+++ b/resources/sksl/errors/StaticSwitchTest.sksl
@@ -1,5 +1,7 @@
+uniform float unknownInput;
+
 half4 main() {
-    @switch (int(sqrt(1))) {
+    @switch (int(unknownInput)) {
         case 1:
             return half4(1);
         default:
diff --git a/resources/sksl/folding/FloatFolding.sksl b/resources/sksl/folding/FloatFolding.sksl
index a578de0..382215f 100644
--- a/resources/sksl/folding/FloatFolding.sksl
+++ b/resources/sksl/folding/FloatFolding.sksl
@@ -1,6 +1,9 @@
 uniform half4 colorRed, colorGreen;
+uniform float unknownInput;
 
 bool test() {
+    half unknown = half(unknownInput);
+
     bool ok = true;
     half x = 32.0 + 2.0;
     ok = ok && (x == 34);
@@ -37,7 +40,6 @@
     x = 6.0 <= 5.0 ? 12 : -12;
     ok = ok && (x == -12);
 
-    half unknown = half(sqrt(4));
     x = half(unknown + 0);
     ok = ok && (x == unknown);
     x = half(0 + unknown);
@@ -56,7 +58,7 @@
     ok = ok && (x == unknown);
     x = half(0 / unknown);
     ok = ok && (x == 0);
-    x += 1;                 // TODO(skia:11192): constant propagation for `+=` style operators
+    x += 1;
     ok = ok && (x == 1);
     x += 0;
     ok = ok && (x == 1);
diff --git a/resources/sksl/folding/IntFoldingES2.sksl b/resources/sksl/folding/IntFoldingES2.sksl
index d6000f4..5fd169c 100644
--- a/resources/sksl/folding/IntFoldingES2.sksl
+++ b/resources/sksl/folding/IntFoldingES2.sksl
@@ -37,6 +37,7 @@
     ok = ok && (x == 11);
     x = 6 <= 5 ? 12 : -12;
     ok = ok && (x == -12);
+
     x = unknown + 0;
     ok = ok && (x == unknown);
     x = 0 + unknown;
@@ -55,7 +56,7 @@
     ok = ok && (x == unknown);
     x = 0 / unknown;
     ok = ok && (x == 0);
-    x += 1;                    // TODO(skia:11192): constant propagation for `+=` style operators
+    x += 1;
     ok = ok && (x == 1);
     x += 0;
     ok = ok && (x == 1);
diff --git a/resources/sksl/folding/ShortCircuitBoolFolding.sksl b/resources/sksl/folding/ShortCircuitBoolFolding.sksl
index 9d5bc56..8ec6c0e 100644
--- a/resources/sksl/folding/ShortCircuitBoolFolding.sksl
+++ b/resources/sksl/folding/ShortCircuitBoolFolding.sksl
@@ -31,7 +31,7 @@
     if (expr != false) { ++ok; } else { ++bad; } // -> (expr)
 
     // Test that side-effects in the left-side expression prevent right-side expr elimination.
-    float a = sqrt(1), b = sqrt(2);
+    float a = unknownInput + 2, b = unknownInput * 2;
 
     true || bool(a = b);                         // -> true
     if (a == b) { ++bad; } else { ++ok; }
diff --git a/resources/sksl/fp/GrModuloOp.fp b/resources/sksl/fp/GrModuloOp.fp
index 2957e75..559917f 100644
--- a/resources/sksl/fp/GrModuloOp.fp
+++ b/resources/sksl/fp/GrModuloOp.fp
@@ -1,4 +1,5 @@
 // Test that '%' is expanded to '%%' in emitCode
+uniform int unknownInput;
 half4 main() {
-    return half4(half(1 % int(sqrt(2))));
+    return half4(unknownInput % 7);
 }
diff --git a/resources/sksl/glsl/ForceHighPrecision.sksl b/resources/sksl/glsl/ForceHighPrecision.sksl
index b3bd729..9d11172 100644
--- a/resources/sksl/glsl/ForceHighPrecision.sksl
+++ b/resources/sksl/glsl/ForceHighPrecision.sksl
@@ -1,6 +1,9 @@
 /*#pragma settings UsesPrecisionModifiers ForceHighPrecision*/
 
-void main() { half x = half(sqrt(1));
-     half4 y = half4(x);
-     sk_FragColor = y;
+uniform float unknownInput;
+
+void main() {
+    half x = half(unknownInput);
+    half4 y = half4(x);
+    sk_FragColor = y;
 }
diff --git a/resources/sksl/runtime/ConstPreservation.rts b/resources/sksl/runtime/ConstPreservation.rts
index dd4277b..25dd8e2 100644
--- a/resources/sksl/runtime/ConstPreservation.rts
+++ b/resources/sksl/runtime/ConstPreservation.rts
@@ -3,11 +3,15 @@
 // Ensure that 'const' is preserved on variable and function declarations in the .stage output
 const half r = 0;
 
+noinline half opt_barrier(const half x) {
+    return x;
+}
+
 half2 compute_ba(const half2 rg) {
     return rg;
 }
 
 half4 main(float2 xy) {
     const half g = r + 1;
-    return half4(sqrt(r), g, compute_ba(half2(r, sqrt(g))));
+    return half4(opt_barrier(r), g, compute_ba(half2(r, opt_barrier(g))));
 }
diff --git a/resources/sksl/shared/CommaMixedTypes.sksl b/resources/sksl/shared/CommaMixedTypes.sksl
index 8e98628..b017e74 100644
--- a/resources/sksl/shared/CommaMixedTypes.sksl
+++ b/resources/sksl/shared/CommaMixedTypes.sksl
@@ -1,10 +1,11 @@
 uniform half4 colorGreen;
+uniform float unknownInput;
 
 half4 main(float2 coords) {
     half4 result;
-    result.x = (sqrt(1),     colorGreen.x);
-    result.y = (float2(2),   colorGreen.y);
-    result.z = (half3(3),    colorGreen.z);
-    result.w = (float2x2(4), colorGreen.w);
+    result.x = (unknownInput, colorGreen.x);
+    result.y = (float2(2),    colorGreen.y);
+    result.z = (half3(3),     colorGreen.z);
+    result.w = (float2x2(4),  colorGreen.w);
     return result;
 }
diff --git a/resources/sksl/shared/Control.sksl b/resources/sksl/shared/Control.sksl
index 4524f6b..2b9eb35 100644
--- a/resources/sksl/shared/Control.sksl
+++ b/resources/sksl/shared/Control.sksl
@@ -1,5 +1,7 @@
+uniform float unknownInput;
+
 void main() {
-    if (sqrt(2) > 5) { sk_FragColor = half4(0.75); } else { discard; }
+    if (unknownInput > 5) { sk_FragColor = half4(0.75); } else { discard; }
     int i = 0;
     while (i < 10) { sk_FragColor *= 0.5; i++; }
     do { sk_FragColor += 0.25; } while (sk_FragColor.x < 0.75);
diff --git a/resources/sksl/shared/EmptyBlocksES2.sksl b/resources/sksl/shared/EmptyBlocksES2.sksl
index 4d7ae3c..f338722 100644
--- a/resources/sksl/shared/EmptyBlocksES2.sksl
+++ b/resources/sksl/shared/EmptyBlocksES2.sksl
@@ -1,13 +1,15 @@
+uniform half unknownInput;
+
 half4 main(float2 coords) {
     half4 color = half4(0);
 
     for (int counter=0; counter<10; ++counter) ;
     for (int counter=0; counter<10; ++counter) {}
-    for (int counter=0; counter<10; ++counter) { false, 1 == 2; sqrt(7); }
+    for (int counter=0; counter<10; ++counter) { false, 1 == 2; unknownInput; }
 
-    if (sqrt(1) == 1) color.g = 1; else 1;
-    if (sqrt(1) == 2) 0; else color.a = 1;
-    if (sqrt(1) == 3) 0; else 1;
+    if (unknownInput == 1) color.g = 1; else 1;
+    if (unknownInput == 2) 0; else color.a = 1;
+    if (unknownInput == 3) 0; else 1;
 
     return color;
 }
diff --git a/resources/sksl/shared/EmptyBlocksES3.sksl b/resources/sksl/shared/EmptyBlocksES3.sksl
index 25b361f..d002b2e 100644
--- a/resources/sksl/shared/EmptyBlocksES3.sksl
+++ b/resources/sksl/shared/EmptyBlocksES3.sksl
@@ -1,17 +1,19 @@
+uniform half4 colorWhite;
+
 half4 main(float2 coords) {
     half4 color = half4(0);
 
     for (int counter=0; counter<10; ++counter) ;
     for (int counter=0; counter<10; ++counter) {}
-    for (int counter=0; counter<10; ++counter) { false, 1 == 2; sqrt(7); }
+    for (int counter=0; counter<10; ++counter) { false, 1 == 2; colorWhite; }
 
-    if (sqrt(1) == 1) color.g = 1; else 1;
-    if (sqrt(1) == 2) 0; else color.a = 1;
-    if (sqrt(1) == 3) 0; else 1;
+    if (colorWhite.x == 1) color.g = 1; else 1;
+    if (colorWhite.x == 2) 0; else color.a = 1;
+    if (colorWhite.x == 3) 0; else 1;
 
-    while (sqrt(1) == 2) 1 + 2 + 3;
+    while (colorWhite.x == 2) 1 + 2 + 3;
 
-    do 1 * 2 * 3; while (sqrt(1) == 2);
+    do 1 * 2 * 3; while (colorWhite.x == 2);
 
     return color;
 }
diff --git a/resources/sksl/shared/NumberConversions.sksl b/resources/sksl/shared/NumberConversions.sksl
index 6c537bb..4edba37 100644
--- a/resources/sksl/shared/NumberConversions.sksl
+++ b/resources/sksl/shared/NumberConversions.sksl
@@ -1,11 +1,13 @@
+uniform float unknownInput;
+
 void main() {
     bool b = true;
-    short s = short(sqrt(1));
-    int i = int(sqrt(1));
-    ushort us = ushort(sqrt(1));
-    uint ui = uint(sqrt(1));
-    half h = half(sqrt(1));
-    float f = sqrt(1);
+    short s = short(unknownInput);
+    int i = int(unknownInput);
+    ushort us = ushort(unknownInput);
+    uint ui = uint(unknownInput);
+    half h = half(unknownInput);
+    float f = unknownInput;
     short s2s = s;
     short i2s = short(i);
     short us2s = short(us);
diff --git a/resources/sksl/shared/OperatorsES2.sksl b/resources/sksl/shared/OperatorsES2.sksl
index 85ed282..5d07bf6 100644
--- a/resources/sksl/shared/OperatorsES2.sksl
+++ b/resources/sksl/shared/OperatorsES2.sksl
@@ -1,4 +1,5 @@
 uniform half4 colorGreen, colorRed;
+uniform half unknownInput;
 
 half4 main(float2 coords) {
     float x = 1, y = 2;
@@ -6,8 +7,8 @@
     x = x - x + y * x * x * (y - x);
     y = x / y / x;
     z = (z / 2 * 3 + 4) - 2;
-    bool b = (x > 4) == x < 2 || 2 >= sqrt(2) && y <= x;
-    bool c = sqrt(2) > 2;
+    bool b = (x > 4) == x < 2 || 2 >= unknownInput && y <= x;
+    bool c = unknownInput > 2;
     bool d = b ^^ !!c;
     bool e = b && c;
     bool f = !!b || c;
diff --git a/resources/sksl/shared/OperatorsES3.sksl b/resources/sksl/shared/OperatorsES3.sksl
index 2a40e74..b88f830 100644
--- a/resources/sksl/shared/OperatorsES3.sksl
+++ b/resources/sksl/shared/OperatorsES3.sksl
@@ -1,4 +1,5 @@
 uniform half4 colorGreen, colorRed;
+uniform float unknownInput;
 
 half4 main(float2 coords) {
     float x = 1, y = 2;
@@ -6,8 +7,8 @@
     x = x - x + y * x * x * (y - x);
     y = x / y / x;
     z = (z / 2 % 3 << 4) >> 2 << 1;
-    bool b = (x > 4) == x < 2 || 2 >= sqrt(2) && y <= x;
-    bool c = sqrt(2) > 2;
+    bool b = (x > 4) == x < 2 || 2 >= unknownInput && y <= x;
+    bool c = unknownInput > 2;
     bool d = b ^^ c;
     bool e = b && c;
     bool f = b || c;
@@ -20,9 +21,9 @@
     z >>= 2;
     z <<= 4;
     z %= 5;
-    x = (float2(sqrt(1)), 6);
+    x = (colorGreen.xy, 6);
     y = (float(b) * float(c) * float(d) * float(e) * float(f), 6.0);
-    z = (float2(sqrt(1)), 6);
+    z = (colorRed.zw, 6);
 
     return (x == 6 && y == 6 && z == 6) ? colorGreen : colorRed;
 }
diff --git a/resources/sksl/shared/StaticSwitchWithConditionalBreak.sksl b/resources/sksl/shared/StaticSwitchWithConditionalBreak.sksl
index 100215b..34a9a53 100644
--- a/resources/sksl/shared/StaticSwitchWithConditionalBreak.sksl
+++ b/resources/sksl/shared/StaticSwitchWithConditionalBreak.sksl
@@ -1,11 +1,13 @@
+uniform float unknownInput;
+
 void main() {
-    float x = 0.0;
+    half value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1)) break;
+            value = 0.0;
+            if (unknownInput == 2) break;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    sk_FragColor = half4(half(x));
+    sk_FragColor = value.xxxx;
 }
diff --git a/resources/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.sksl b/resources/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.sksl
index 5cb7cda..004d20f 100644
--- a/resources/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.sksl
+++ b/resources/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.sksl
@@ -1,10 +1,15 @@
+uniform float unknownInput;
+
 void main() {
-    float x = 0.0;
+    half value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1)) { sk_FragColor = half4(half(x)); break; }
+            value = 0.0;
+            if (unknownInput == 2) {
+                sk_FragColor = value.xxxx;
+                break;
+            }
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
 }
diff --git a/resources/sksl/shared/Switch.sksl b/resources/sksl/shared/Switch.sksl
index c15e597..deabebc 100644
--- a/resources/sksl/shared/Switch.sksl
+++ b/resources/sksl/shared/Switch.sksl
@@ -1,15 +1,17 @@
+uniform float unknownInput;
+
 void main() {
     // Basic switch test.
-    float x;
-    switch (int(sqrt(1))) {
+    half value;
+    switch (int(unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
             break;
         case 1:
-            x = 1.0;
+            value = 1.0;
             break;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    sk_FragColor = half4(half(x));
+    sk_FragColor = value.xxxx;
 }
diff --git a/resources/sksl/shared/SwitchContainingDeadCode.sksl b/resources/sksl/shared/SwitchContainingDeadCode.sksl
index c7992e0..6d33c37 100644
--- a/resources/sksl/shared/SwitchContainingDeadCode.sksl
+++ b/resources/sksl/shared/SwitchContainingDeadCode.sksl
@@ -1,12 +1,14 @@
+uniform int unknownInput;
+
 void main() {
-    float x;
-    switch (int(sqrt(2))) {
+    half value;
+    switch (unknownInput) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    sk_FragColor = half4(half(x));
+    sk_FragColor = value.xxxx;
 }
diff --git a/resources/sksl/shared/SwitchWithFallthrough.sksl b/resources/sksl/shared/SwitchWithFallthrough.sksl
index d9b8ed8..1058df5 100644
--- a/resources/sksl/shared/SwitchWithFallthrough.sksl
+++ b/resources/sksl/shared/SwitchWithFallthrough.sksl
@@ -1,10 +1,12 @@
+uniform float unknownInput;
+
 void main() {
-    float x = 0.0;
-    switch (int(sqrt(3))) {
+    half value = 0.0;
+    switch (int(unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    sk_FragColor = half4(half(x));
+    sk_FragColor = value.xxxx;
 }
diff --git a/resources/sksl/shared/VectorConstructors.sksl b/resources/sksl/shared/VectorConstructors.sksl
index 14946ea..d036e66 100644
--- a/resources/sksl/shared/VectorConstructors.sksl
+++ b/resources/sksl/shared/VectorConstructors.sksl
@@ -1,6 +1,7 @@
 /*#pragma settings NoInline*/
 
 uniform half4 colorGreen, colorRed;
+uniform float unknownInput;
 
 bool check(float2 v1, float2 v2, float2 v3, float3 v4, int2 v5, int2 v6, float2 v7, float2 v8,
            float4 v9, int2 v10, bool4 v11, float2 v12, float2 v13, float2 v14, bool2 v15,
@@ -21,7 +22,7 @@
     int2   v6 = int2(float2(1, 2));
     float2 v7 = float2(int2(1, 2));
     float2 v8 = float2(v5);
-    float4 v9 = float4(v6.x, sqrt(2), int2(3, 4));
+    float4 v9 = float4(v6.x, unknownInput, int2(3, 4));
     int2   v10 = int2(3.14, v1.x);
     bool4  v11 = bool4(bool2(true, false), true, false);
     float2 v12 = float2(1.0, false);
diff --git a/resources/sksl/workarounds/NegatedAtan.sksl b/resources/sksl/workarounds/NegatedAtan.sksl
index fd94a44..33045a1 100644
--- a/resources/sksl/workarounds/NegatedAtan.sksl
+++ b/resources/sksl/workarounds/NegatedAtan.sksl
@@ -1,6 +1,8 @@
 /*#pragma settings MustForceNegatedAtanParamToFloat*/
 
+uniform float unknownInput;
+
 void main() {
-    float2 x = float2(sqrt(2));
+    float2 x = unknownInput.xx;
     sk_FragColor.r = half(atan(x.x, -x.y));
 }
diff --git a/tests/sksl/errors/StaticSwitchConditionalBreak.glsl b/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
index aca3d8a..ba85c59 100644
--- a/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
+++ b/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
@@ -1,4 +1,4 @@
 ### Compilation failed:
 
-error: 3: static switch contains non-static conditional exit
+error: 5: static switch contains non-static conditional exit
 1 error
diff --git a/tests/sksl/errors/StaticSwitchTest.glsl b/tests/sksl/errors/StaticSwitchTest.glsl
index d69be26..309c2e7 100644
--- a/tests/sksl/errors/StaticSwitchTest.glsl
+++ b/tests/sksl/errors/StaticSwitchTest.glsl
@@ -1,4 +1,4 @@
 ### Compilation failed:
 
-error: 2: static switch has non-static test
+error: 4: static switch has non-static test
 1 error
diff --git a/tests/sksl/folding/FloatFolding.glsl b/tests/sksl/folding/FloatFolding.glsl
index 2a4f102..f4d62c8 100644
--- a/tests/sksl/folding/FloatFolding.glsl
+++ b/tests/sksl/folding/FloatFolding.glsl
@@ -2,72 +2,73 @@
 out vec4 sk_FragColor;
 uniform vec4 colorRed;
 uniform vec4 colorGreen;
+uniform float unknownInput;
 vec4 main() {
-    bool _0_ok = true;
-    float _1_x = 34.0;
-    _0_ok = _0_ok && _1_x == 34.0;
-    _1_x = 30.0;
-    _0_ok = _0_ok && _1_x == 30.0;
-    _1_x = 64.0;
-    _0_ok = _0_ok && _1_x == 64.0;
-    _1_x = 16.0;
-    _0_ok = _0_ok && _1_x == 16.0;
-    _1_x = 19.0;
-    _0_ok = _0_ok && _1_x == 19.0;
-    _1_x = 1.0;
-    _0_ok = _0_ok && _1_x == 1.0;
-    _1_x = -2.0;
-    _0_ok = _0_ok && _1_x == -2.0;
-    _1_x = 3.0;
-    _0_ok = _0_ok && _1_x == 3.0;
-    _1_x = -4.0;
-    _0_ok = _0_ok && _1_x == -4.0;
-    _1_x = 5.0;
-    _0_ok = _0_ok && _1_x == 5.0;
-    _1_x = -6.0;
-    _0_ok = _0_ok && _1_x == -6.0;
-    _1_x = 7.0;
-    _0_ok = _0_ok && _1_x == 7.0;
-    _1_x = -8.0;
-    _0_ok = _0_ok && _1_x == -8.0;
-    _1_x = 9.0;
-    _0_ok = _0_ok && _1_x == 9.0;
-    _1_x = -10.0;
-    _0_ok = _0_ok && _1_x == -10.0;
-    _1_x = 11.0;
-    _0_ok = _0_ok && _1_x == 11.0;
-    _1_x = -12.0;
-    _0_ok = _0_ok && _1_x == -12.0;
-    float _2_unknown = sqrt(4.0);
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = 0.0;
-    _0_ok = _0_ok && _1_x == 0.0;
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = 0.0;
-    _0_ok = _0_ok && _1_x == 0.0;
-    _1_x = _2_unknown;
-    _0_ok = _0_ok && _1_x == _2_unknown;
-    _1_x = 0.0;
-    _0_ok = _0_ok && _1_x == 0.0;
-    _1_x += 1.0;
-    _0_ok = _0_ok && _1_x == 1.0;
-    _0_ok = _0_ok && _1_x == 1.0;
-    _1_x -= 2.0;
-    _0_ok = _0_ok && _1_x == -1.0;
-    _0_ok = _0_ok && _1_x == -1.0;
-    _0_ok = _0_ok && _1_x == -1.0;
-    _1_x *= 2.0;
-    _0_ok = _0_ok && _1_x == -2.0;
-    _0_ok = _0_ok && _1_x == -2.0;
-    _1_x /= 2.0;
-    _0_ok = _0_ok && _1_x == -1.0;
-    return _0_ok ? colorGreen : colorRed;
+    float _0_unknown = unknownInput;
+    bool _1_ok = true;
+    float _2_x = 34.0;
+    _1_ok = _1_ok && _2_x == 34.0;
+    _2_x = 30.0;
+    _1_ok = _1_ok && _2_x == 30.0;
+    _2_x = 64.0;
+    _1_ok = _1_ok && _2_x == 64.0;
+    _2_x = 16.0;
+    _1_ok = _1_ok && _2_x == 16.0;
+    _2_x = 19.0;
+    _1_ok = _1_ok && _2_x == 19.0;
+    _2_x = 1.0;
+    _1_ok = _1_ok && _2_x == 1.0;
+    _2_x = -2.0;
+    _1_ok = _1_ok && _2_x == -2.0;
+    _2_x = 3.0;
+    _1_ok = _1_ok && _2_x == 3.0;
+    _2_x = -4.0;
+    _1_ok = _1_ok && _2_x == -4.0;
+    _2_x = 5.0;
+    _1_ok = _1_ok && _2_x == 5.0;
+    _2_x = -6.0;
+    _1_ok = _1_ok && _2_x == -6.0;
+    _2_x = 7.0;
+    _1_ok = _1_ok && _2_x == 7.0;
+    _2_x = -8.0;
+    _1_ok = _1_ok && _2_x == -8.0;
+    _2_x = 9.0;
+    _1_ok = _1_ok && _2_x == 9.0;
+    _2_x = -10.0;
+    _1_ok = _1_ok && _2_x == -10.0;
+    _2_x = 11.0;
+    _1_ok = _1_ok && _2_x == 11.0;
+    _2_x = -12.0;
+    _1_ok = _1_ok && _2_x == -12.0;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = 0.0;
+    _1_ok = _1_ok && _2_x == 0.0;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = 0.0;
+    _1_ok = _1_ok && _2_x == 0.0;
+    _2_x = _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
+    _2_x = 0.0;
+    _1_ok = _1_ok && _2_x == 0.0;
+    _2_x += 1.0;
+    _1_ok = _1_ok && _2_x == 1.0;
+    _1_ok = _1_ok && _2_x == 1.0;
+    _2_x -= 2.0;
+    _1_ok = _1_ok && _2_x == -1.0;
+    _1_ok = _1_ok && _2_x == -1.0;
+    _1_ok = _1_ok && _2_x == -1.0;
+    _2_x *= 2.0;
+    _1_ok = _1_ok && _2_x == -2.0;
+    _1_ok = _1_ok && _2_x == -2.0;
+    _2_x /= 2.0;
+    _1_ok = _1_ok && _2_x == -1.0;
+    return _1_ok ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/folding/ShortCircuitBoolFolding.glsl b/tests/sksl/folding/ShortCircuitBoolFolding.glsl
index 4e2f89e..3ad1492 100644
--- a/tests/sksl/folding/ShortCircuitBoolFolding.glsl
+++ b/tests/sksl/folding/ShortCircuitBoolFolding.glsl
@@ -99,8 +99,8 @@
     } else {
         ++_2_bad;
     }
-    float _3_a = sqrt(1.0);
-    float _4_b = sqrt(2.0);
+    float _3_a = unknownInput + 2.0;
+    float _4_b = unknownInput * 2.0;
     if (_3_a == _4_b) {
         ++_2_bad;
     } else {
diff --git a/tests/sksl/fp/GrModuloOp.cpp b/tests/sksl/fp/GrModuloOp.cpp
index 93cd3a7..f491e1a 100644
--- a/tests/sksl/fp/GrModuloOp.cpp
+++ b/tests/sksl/fp/GrModuloOp.cpp
@@ -19,14 +19,16 @@
         GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
         const GrModuloOp& _outer = args.fFp.cast<GrModuloOp>();
         (void) _outer;
+        unknownInputVar = args.fUniformHandler->addUniform(&_outer, kFragment_GrShaderFlag, kInt_GrSLType, "unknownInput");
         fragBuilder->codeAppendf(
-R"SkSL(return half4(half(1 %% int(sqrt(2.0))));
+R"SkSL(return half4(half(%s %% 7));
 )SkSL"
-);
+, args.fUniformHandler->getUniformCStr(unknownInputVar));
     }
 private:
     void onSetData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& _proc) override {
     }
+    UniformHandle unknownInputVar;
 };
 std::unique_ptr<GrGLSLFragmentProcessor> GrModuloOp::onMakeProgramImpl() const {
     return std::make_unique<GrGLSLModuloOp>();
diff --git a/tests/sksl/glsl/ForceHighPrecision.glsl b/tests/sksl/glsl/ForceHighPrecision.glsl
index 97dda97..07acf78 100644
--- a/tests/sksl/glsl/ForceHighPrecision.glsl
+++ b/tests/sksl/glsl/ForceHighPrecision.glsl
@@ -2,8 +2,9 @@
 precision mediump float;
 precision mediump sampler2D;
 out mediump vec4 sk_FragColor;
+uniform highp float unknownInput;
 void main() {
-    highp float x = sqrt(1.0);
+    highp float x = unknownInput;
     highp vec4 y = vec4(x);
     sk_FragColor = y;
 }
diff --git a/tests/sksl/runtime/ConstPreservation.stage b/tests/sksl/runtime/ConstPreservation.stage
index b9665ae..25971eb 100644
--- a/tests/sksl/runtime/ConstPreservation.stage
+++ b/tests/sksl/runtime/ConstPreservation.stage
@@ -1,4 +1,8 @@
 const half r_0 = 0.0;
+noinline half opt_barrier_0(const half x)
+{
+	return x;
+}
 half2 compute_ba_0(const half2 rg)
 {
 	return rg;
@@ -6,5 +10,5 @@
 half4 main(float2 xy)
 {
 	const half g = 1.0;
-	return half4(half4(sqrt(r_0), 1.0, compute_ba_0(half2(0.0, sqrt(g)))));
+	return half4(half4(opt_barrier_0(r_0), 1.0, compute_ba_0(half2(0.0, opt_barrier_0(g)))));
 }
diff --git a/tests/sksl/shared/CommaMixedTypes.asm.frag b/tests/sksl/shared/CommaMixedTypes.asm.frag
index 78e44cd..cb666b6 100644
--- a/tests/sksl/shared/CommaMixedTypes.asm.frag
+++ b/tests/sksl/shared/CommaMixedTypes.asm.frag
@@ -7,6 +7,7 @@
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
+OpMemberName %_UniformBuffer 1 "unknownInput"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %main "main"
 OpName %result "result"
@@ -16,6 +17,7 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpMemberDecorate %_UniformBuffer 0 Offset 0
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
@@ -36,7 +38,7 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_UniformBuffer = OpTypeStruct %v4float
+%_UniformBuffer = OpTypeStruct %v4float %float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
diff --git a/tests/sksl/shared/CommaMixedTypes.glsl b/tests/sksl/shared/CommaMixedTypes.glsl
index a9ea49b..6c91771 100644
--- a/tests/sksl/shared/CommaMixedTypes.glsl
+++ b/tests/sksl/shared/CommaMixedTypes.glsl
@@ -1,6 +1,7 @@
 
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
+uniform float unknownInput;
 vec4 main() {
     vec4 result;
     result.x = colorGreen.x;
diff --git a/tests/sksl/shared/CommaMixedTypes.metal b/tests/sksl/shared/CommaMixedTypes.metal
index 607f3a5..28b63b4 100644
--- a/tests/sksl/shared/CommaMixedTypes.metal
+++ b/tests/sksl/shared/CommaMixedTypes.metal
@@ -3,6 +3,7 @@
 using namespace metal;
 struct Uniforms {
     float4 colorGreen;
+    float unknownInput;
 };
 struct Inputs {
 };
diff --git a/tests/sksl/shared/Control.asm.frag b/tests/sksl/shared/Control.asm.frag
index 239d042..0975b33 100644
--- a/tests/sksl/shared/Control.asm.frag
+++ b/tests/sksl/shared/Control.asm.frag
@@ -5,6 +5,8 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
 OpName %i "i"
 OpName %i_0 "i"
@@ -12,14 +14,18 @@
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %21 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
-OpDecorate %45 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %27 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
 OpDecorate %49 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %53 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -27,108 +33,112 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
-%float_2 = OpConstant %float 2
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_5 = OpConstant %float 5
 %float_0_75 = OpConstant %float 0.75
-%21 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75
-%int = OpTypeInt 32 1
+%27 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75
 %_ptr_Function_int = OpTypePointer Function %int
-%int_0 = OpConstant %int 0
 %int_10 = OpConstant %int 10
 %float_0_5 = OpConstant %float 0.5
 %int_1 = OpConstant %int 1
 %float_0_25 = OpConstant %float 0.25
 %int_2 = OpConstant %int 2
 %int_100 = OpConstant %int 100
-%main = OpFunction %void None %11
-%12 = OpLabel
+%main = OpFunction %void None %14
+%15 = OpLabel
 %i = OpVariable %_ptr_Function_int Function
 %i_0 = OpVariable %_ptr_Function_int Function
-%13 = OpExtInst %float %1 Sqrt %float_2
-%16 = OpFOrdGreaterThan %bool %13 %float_5
-OpSelectionMerge %19 None
-OpBranchConditional %16 %17 %18
-%17 = OpLabel
-OpStore %sk_FragColor %21
-OpBranch %19
-%18 = OpLabel
+%16 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%20 = OpLoad %float %16
+%22 = OpFOrdGreaterThan %bool %20 %float_5
+OpSelectionMerge %25 None
+OpBranchConditional %22 %23 %24
+%23 = OpLabel
+OpStore %sk_FragColor %27
+OpBranch %25
+%24 = OpLabel
 OpKill
-%19 = OpLabel
+%25 = OpLabel
 OpStore %i %int_0
-OpBranch %26
-%26 = OpLabel
-OpLoopMerge %30 %29 None
-OpBranch %27
-%27 = OpLabel
-%31 = OpLoad %int %i
-%33 = OpSLessThan %bool %31 %int_10
-OpBranchConditional %33 %28 %30
-%28 = OpLabel
-%34 = OpLoad %v4float %sk_FragColor
-%36 = OpVectorTimesScalar %v4float %34 %float_0_5
-OpStore %sk_FragColor %36
-%37 = OpLoad %int %i
-%39 = OpIAdd %int %37 %int_1
-OpStore %i %39
-OpBranch %29
-%29 = OpLabel
-OpBranch %26
+OpBranch %30
 %30 = OpLabel
-OpBranch %40
-%40 = OpLabel
-OpLoopMerge %44 %43 None
-OpBranch %41
-%41 = OpLabel
-%45 = OpLoad %v4float %sk_FragColor
-%47 = OpCompositeConstruct %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25
-%48 = OpFAdd %v4float %45 %47
-OpStore %sk_FragColor %48
-OpBranch %42
-%42 = OpLabel
-OpBranch %43
-%43 = OpLabel
-%49 = OpLoad %v4float %sk_FragColor
-%50 = OpCompositeExtract %float %49 0
-%51 = OpFOrdLessThan %bool %50 %float_0_75
-OpBranchConditional %51 %40 %44
+OpLoopMerge %34 %33 None
+OpBranch %31
+%31 = OpLabel
+%35 = OpLoad %int %i
+%37 = OpSLessThan %bool %35 %int_10
+OpBranchConditional %37 %32 %34
+%32 = OpLabel
+%38 = OpLoad %v4float %sk_FragColor
+%40 = OpVectorTimesScalar %v4float %38 %float_0_5
+OpStore %sk_FragColor %40
+%41 = OpLoad %int %i
+%43 = OpIAdd %int %41 %int_1
+OpStore %i %43
+OpBranch %33
+%33 = OpLabel
+OpBranch %30
+%34 = OpLabel
+OpBranch %44
 %44 = OpLabel
+OpLoopMerge %48 %47 None
+OpBranch %45
+%45 = OpLabel
+%49 = OpLoad %v4float %sk_FragColor
+%51 = OpCompositeConstruct %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25
+%52 = OpFAdd %v4float %49 %51
+OpStore %sk_FragColor %52
+OpBranch %46
+%46 = OpLabel
+OpBranch %47
+%47 = OpLabel
+%53 = OpLoad %v4float %sk_FragColor
+%54 = OpCompositeExtract %float %53 0
+%55 = OpFOrdLessThan %bool %54 %float_0_75
+OpBranchConditional %55 %44 %48
+%48 = OpLabel
 OpStore %i_0 %int_0
-OpBranch %53
-%53 = OpLabel
-OpLoopMerge %57 %56 None
-OpBranch %54
-%54 = OpLabel
-%58 = OpLoad %int %i_0
-%59 = OpSLessThan %bool %58 %int_10
-OpBranchConditional %59 %55 %57
-%55 = OpLabel
-%60 = OpLoad %int %i_0
-%62 = OpSMod %int %60 %int_2
-%63 = OpIEqual %bool %62 %int_1
-OpSelectionMerge %66 None
-OpBranchConditional %63 %64 %65
-%64 = OpLabel
 OpBranch %57
-%65 = OpLabel
-%67 = OpLoad %int %i_0
-%69 = OpSGreaterThan %bool %67 %int_100
-OpSelectionMerge %72 None
-OpBranchConditional %69 %70 %71
-%70 = OpLabel
-OpReturn
-%71 = OpLabel
-OpBranch %56
-%72 = OpLabel
-OpBranch %66
-%66 = OpLabel
-OpBranch %56
-%56 = OpLabel
-%73 = OpLoad %int %i_0
-%74 = OpIAdd %int %73 %int_1
-OpStore %i_0 %74
-OpBranch %53
 %57 = OpLabel
+OpLoopMerge %61 %60 None
+OpBranch %58
+%58 = OpLabel
+%62 = OpLoad %int %i_0
+%63 = OpSLessThan %bool %62 %int_10
+OpBranchConditional %63 %59 %61
+%59 = OpLabel
+%64 = OpLoad %int %i_0
+%66 = OpSMod %int %64 %int_2
+%67 = OpIEqual %bool %66 %int_1
+OpSelectionMerge %70 None
+OpBranchConditional %67 %68 %69
+%68 = OpLabel
+OpBranch %61
+%69 = OpLabel
+%71 = OpLoad %int %i_0
+%73 = OpSGreaterThan %bool %71 %int_100
+OpSelectionMerge %76 None
+OpBranchConditional %73 %74 %75
+%74 = OpLabel
+OpReturn
+%75 = OpLabel
+OpBranch %60
+%76 = OpLabel
+OpBranch %70
+%70 = OpLabel
+OpBranch %60
+%60 = OpLabel
+%77 = OpLoad %int %i_0
+%78 = OpIAdd %int %77 %int_1
+OpStore %i_0 %78
+OpBranch %57
+%61 = OpLabel
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Control.glsl b/tests/sksl/shared/Control.glsl
index 7fbcb51..c2bb048 100644
--- a/tests/sksl/shared/Control.glsl
+++ b/tests/sksl/shared/Control.glsl
@@ -1,7 +1,8 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    if (sqrt(2.0) > 5.0) {
+    if (unknownInput > 5.0) {
         sk_FragColor = vec4(0.75);
     } else {
         discard;
diff --git a/tests/sksl/shared/Control.metal b/tests/sksl/shared/Control.metal
index b736bcc..a775314 100644
--- a/tests/sksl/shared/Control.metal
+++ b/tests/sksl/shared/Control.metal
@@ -1,15 +1,18 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    if (sqrt(2.0) > 5.0) {
+    if (_uniforms.unknownInput > 5.0) {
         _out.sk_FragColor = float4(0.75);
     } else {
         discard_fragment();
diff --git a/tests/sksl/shared/EmptyBlocksES2.asm.frag b/tests/sksl/shared/EmptyBlocksES2.asm.frag
index 6ea226d..7dff7cc 100644
--- a/tests/sksl/shared/EmptyBlocksES2.asm.frag
+++ b/tests/sksl/shared/EmptyBlocksES2.asm.frag
@@ -5,6 +5,8 @@
 OpExecutionMode %_entrypoint_v OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %main "main"
 OpName %color "color"
@@ -15,9 +17,16 @@
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %color RelaxedPrecision
-OpDecorate %25 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -25,111 +34,117 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%12 = OpTypeFunction %void
+%15 = OpTypeFunction %void
 %v2float = OpTypeVector %float 2
 %float_0 = OpConstant %float 0
-%16 = OpConstantComposite %v2float %float_0 %float_0
+%19 = OpConstantComposite %v2float %float_0 %float_0
 %_ptr_Function_v2float = OpTypePointer Function %v2float
-%20 = OpTypeFunction %v4float %_ptr_Function_v2float
+%23 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
-%25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %int = OpTypeInt 32 1
 %_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
 %int_10 = OpConstant %int 10
 %int_1 = OpConstant %int 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %float_1 = OpConstant %float 1
 %_ptr_Function_float = OpTypePointer Function %float
 %float_2 = OpConstant %float 2
 %int_3 = OpConstant %int 3
-%_entrypoint_v = OpFunction %void None %12
-%13 = OpLabel
-%17 = OpVariable %_ptr_Function_v2float Function
-OpStore %17 %16
-%19 = OpFunctionCall %v4float %main %17
-OpStore %sk_FragColor %19
+%_entrypoint_v = OpFunction %void None %15
+%16 = OpLabel
+%20 = OpVariable %_ptr_Function_v2float Function
+OpStore %20 %19
+%22 = OpFunctionCall %v4float %main %20
+OpStore %sk_FragColor %22
 OpReturn
 OpFunctionEnd
-%main = OpFunction %v4float None %20
-%21 = OpFunctionParameter %_ptr_Function_v2float
-%22 = OpLabel
+%main = OpFunction %v4float None %23
+%24 = OpFunctionParameter %_ptr_Function_v2float
+%25 = OpLabel
 %color = OpVariable %_ptr_Function_v4float Function
 %counter = OpVariable %_ptr_Function_int Function
 %counter_0 = OpVariable %_ptr_Function_int Function
 %counter_1 = OpVariable %_ptr_Function_int Function
-OpStore %color %25
+OpStore %color %28
 OpStore %counter %int_0
-OpBranch %30
-%30 = OpLabel
-OpLoopMerge %34 %33 None
-OpBranch %31
-%31 = OpLabel
-%35 = OpLoad %int %counter
-%37 = OpSLessThan %bool %35 %int_10
-OpBranchConditional %37 %32 %34
-%32 = OpLabel
 OpBranch %33
 %33 = OpLabel
-%39 = OpLoad %int %counter
-%40 = OpIAdd %int %39 %int_1
-OpStore %counter %40
-OpBranch %30
+OpLoopMerge %37 %36 None
+OpBranch %34
 %34 = OpLabel
+%38 = OpLoad %int %counter
+%40 = OpSLessThan %bool %38 %int_10
+OpBranchConditional %40 %35 %37
+%35 = OpLabel
+OpBranch %36
+%36 = OpLabel
+%42 = OpLoad %int %counter
+%43 = OpIAdd %int %42 %int_1
+OpStore %counter %43
+OpBranch %33
+%37 = OpLabel
 OpStore %counter_0 %int_0
-OpBranch %42
-%42 = OpLabel
-OpLoopMerge %46 %45 None
-OpBranch %43
-%43 = OpLabel
-%47 = OpLoad %int %counter_0
-%48 = OpSLessThan %bool %47 %int_10
-OpBranchConditional %48 %44 %46
-%44 = OpLabel
 OpBranch %45
 %45 = OpLabel
-%49 = OpLoad %int %counter_0
-%50 = OpIAdd %int %49 %int_1
-OpStore %counter_0 %50
-OpBranch %42
+OpLoopMerge %49 %48 None
+OpBranch %46
 %46 = OpLabel
+%50 = OpLoad %int %counter_0
+%51 = OpSLessThan %bool %50 %int_10
+OpBranchConditional %51 %47 %49
+%47 = OpLabel
+OpBranch %48
+%48 = OpLabel
+%52 = OpLoad %int %counter_0
+%53 = OpIAdd %int %52 %int_1
+OpStore %counter_0 %53
+OpBranch %45
+%49 = OpLabel
 OpStore %counter_1 %int_0
-OpBranch %52
-%52 = OpLabel
-OpLoopMerge %56 %55 None
-OpBranch %53
-%53 = OpLabel
-%57 = OpLoad %int %counter_1
-%58 = OpSLessThan %bool %57 %int_10
-OpBranchConditional %58 %54 %56
-%54 = OpLabel
 OpBranch %55
 %55 = OpLabel
-%59 = OpLoad %int %counter_1
-%60 = OpIAdd %int %59 %int_1
-OpStore %counter_1 %60
-OpBranch %52
+OpLoopMerge %59 %58 None
+OpBranch %56
 %56 = OpLabel
-%61 = OpExtInst %float %1 Sqrt %float_1
-%63 = OpFOrdEqual %bool %61 %float_1
-OpSelectionMerge %65 None
-OpBranchConditional %63 %64 %65
-%64 = OpLabel
-%66 = OpAccessChain %_ptr_Function_float %color %int_1
-OpStore %66 %float_1
-OpBranch %65
-%65 = OpLabel
-%68 = OpExtInst %float %1 Sqrt %float_1
-%70 = OpFOrdEqual %bool %68 %float_2
-OpSelectionMerge %73 None
-OpBranchConditional %70 %71 %72
-%71 = OpLabel
-OpBranch %73
-%72 = OpLabel
-%74 = OpAccessChain %_ptr_Function_float %color %int_3
-OpStore %74 %float_1
-OpBranch %73
-%73 = OpLabel
-%76 = OpLoad %v4float %color
-OpReturnValue %76
+%60 = OpLoad %int %counter_1
+%61 = OpSLessThan %bool %60 %int_10
+OpBranchConditional %61 %57 %59
+%57 = OpLabel
+OpBranch %58
+%58 = OpLabel
+%62 = OpLoad %int %counter_1
+%63 = OpIAdd %int %62 %int_1
+OpStore %counter_1 %63
+OpBranch %55
+%59 = OpLabel
+%64 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%66 = OpLoad %float %64
+%68 = OpFOrdEqual %bool %66 %float_1
+OpSelectionMerge %70 None
+OpBranchConditional %68 %69 %70
+%69 = OpLabel
+%71 = OpAccessChain %_ptr_Function_float %color %int_1
+OpStore %71 %float_1
+OpBranch %70
+%70 = OpLabel
+%73 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%74 = OpLoad %float %73
+%76 = OpFOrdEqual %bool %74 %float_2
+OpSelectionMerge %79 None
+OpBranchConditional %76 %77 %78
+%77 = OpLabel
+OpBranch %79
+%78 = OpLabel
+%80 = OpAccessChain %_ptr_Function_float %color %int_3
+OpStore %80 %float_1
+OpBranch %79
+%79 = OpLabel
+%82 = OpLoad %v4float %color
+OpReturnValue %82
 OpFunctionEnd
diff --git a/tests/sksl/shared/EmptyBlocksES2.glsl b/tests/sksl/shared/EmptyBlocksES2.glsl
index efa2487..552af49 100644
--- a/tests/sksl/shared/EmptyBlocksES2.glsl
+++ b/tests/sksl/shared/EmptyBlocksES2.glsl
@@ -1,5 +1,6 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 vec4 main() {
     vec4 color = vec4(0.0);
     for (int counter = 0;counter < 10; ++counter) {
@@ -8,7 +9,7 @@
     }
     for (int counter = 0;counter < 10; ++counter) {
     }
-    if (sqrt(1.0) == 1.0) color.y = 1.0;
-    if (sqrt(1.0) == 2.0) ; else color.w = 1.0;
+    if (unknownInput == 1.0) color.y = 1.0;
+    if (unknownInput == 2.0) ; else color.w = 1.0;
     return color;
 }
diff --git a/tests/sksl/shared/EmptyBlocksES2.metal b/tests/sksl/shared/EmptyBlocksES2.metal
index 2312bb6..4170f5b 100644
--- a/tests/sksl/shared/EmptyBlocksES2.metal
+++ b/tests/sksl/shared/EmptyBlocksES2.metal
@@ -1,12 +1,15 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
     float4 color = float4(0.0);
@@ -16,8 +19,8 @@
     }
     for (int counter = 0;counter < 10; ++counter) {
     }
-    if (sqrt(1.0) == 1.0) color.y = 1.0;
-    if (sqrt(1.0) == 2.0) ; else color.w = 1.0;
+    if (_uniforms.unknownInput == 1.0) color.y = 1.0;
+    if (_uniforms.unknownInput == 2.0) ; else color.w = 1.0;
     _out.sk_FragColor = color;
     return _out;
 }
diff --git a/tests/sksl/shared/EmptyBlocksES3.asm.frag b/tests/sksl/shared/EmptyBlocksES3.asm.frag
index 6f702d4..37b1c52 100644
--- a/tests/sksl/shared/EmptyBlocksES3.asm.frag
+++ b/tests/sksl/shared/EmptyBlocksES3.asm.frag
@@ -5,6 +5,8 @@
 OpExecutionMode %_entrypoint_v OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "colorWhite"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %main "main"
 OpName %color "color"
@@ -15,9 +17,22 @@
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %color RelaxedPrecision
-OpDecorate %25 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -25,137 +40,149 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%12 = OpTypeFunction %void
+%15 = OpTypeFunction %void
 %v2float = OpTypeVector %float 2
 %float_0 = OpConstant %float 0
-%16 = OpConstantComposite %v2float %float_0 %float_0
+%19 = OpConstantComposite %v2float %float_0 %float_0
 %_ptr_Function_v2float = OpTypePointer Function %v2float
-%20 = OpTypeFunction %v4float %_ptr_Function_v2float
+%23 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
-%25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %int = OpTypeInt 32 1
 %_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
 %int_10 = OpConstant %int 10
 %int_1 = OpConstant %int 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %float_1 = OpConstant %float 1
 %_ptr_Function_float = OpTypePointer Function %float
 %float_2 = OpConstant %float 2
 %int_3 = OpConstant %int 3
-%_entrypoint_v = OpFunction %void None %12
-%13 = OpLabel
-%17 = OpVariable %_ptr_Function_v2float Function
-OpStore %17 %16
-%19 = OpFunctionCall %v4float %main %17
-OpStore %sk_FragColor %19
+%_entrypoint_v = OpFunction %void None %15
+%16 = OpLabel
+%20 = OpVariable %_ptr_Function_v2float Function
+OpStore %20 %19
+%22 = OpFunctionCall %v4float %main %20
+OpStore %sk_FragColor %22
 OpReturn
 OpFunctionEnd
-%main = OpFunction %v4float None %20
-%21 = OpFunctionParameter %_ptr_Function_v2float
-%22 = OpLabel
+%main = OpFunction %v4float None %23
+%24 = OpFunctionParameter %_ptr_Function_v2float
+%25 = OpLabel
 %color = OpVariable %_ptr_Function_v4float Function
 %counter = OpVariable %_ptr_Function_int Function
 %counter_0 = OpVariable %_ptr_Function_int Function
 %counter_1 = OpVariable %_ptr_Function_int Function
-OpStore %color %25
+OpStore %color %28
 OpStore %counter %int_0
-OpBranch %30
-%30 = OpLabel
-OpLoopMerge %34 %33 None
-OpBranch %31
-%31 = OpLabel
-%35 = OpLoad %int %counter
-%37 = OpSLessThan %bool %35 %int_10
-OpBranchConditional %37 %32 %34
-%32 = OpLabel
 OpBranch %33
 %33 = OpLabel
-%39 = OpLoad %int %counter
-%40 = OpIAdd %int %39 %int_1
-OpStore %counter %40
-OpBranch %30
+OpLoopMerge %37 %36 None
+OpBranch %34
 %34 = OpLabel
+%38 = OpLoad %int %counter
+%40 = OpSLessThan %bool %38 %int_10
+OpBranchConditional %40 %35 %37
+%35 = OpLabel
+OpBranch %36
+%36 = OpLabel
+%42 = OpLoad %int %counter
+%43 = OpIAdd %int %42 %int_1
+OpStore %counter %43
+OpBranch %33
+%37 = OpLabel
 OpStore %counter_0 %int_0
-OpBranch %42
-%42 = OpLabel
-OpLoopMerge %46 %45 None
-OpBranch %43
-%43 = OpLabel
-%47 = OpLoad %int %counter_0
-%48 = OpSLessThan %bool %47 %int_10
-OpBranchConditional %48 %44 %46
-%44 = OpLabel
 OpBranch %45
 %45 = OpLabel
-%49 = OpLoad %int %counter_0
-%50 = OpIAdd %int %49 %int_1
-OpStore %counter_0 %50
-OpBranch %42
+OpLoopMerge %49 %48 None
+OpBranch %46
 %46 = OpLabel
+%50 = OpLoad %int %counter_0
+%51 = OpSLessThan %bool %50 %int_10
+OpBranchConditional %51 %47 %49
+%47 = OpLabel
+OpBranch %48
+%48 = OpLabel
+%52 = OpLoad %int %counter_0
+%53 = OpIAdd %int %52 %int_1
+OpStore %counter_0 %53
+OpBranch %45
+%49 = OpLabel
 OpStore %counter_1 %int_0
-OpBranch %52
-%52 = OpLabel
-OpLoopMerge %56 %55 None
-OpBranch %53
-%53 = OpLabel
-%57 = OpLoad %int %counter_1
-%58 = OpSLessThan %bool %57 %int_10
-OpBranchConditional %58 %54 %56
-%54 = OpLabel
 OpBranch %55
 %55 = OpLabel
-%59 = OpLoad %int %counter_1
-%60 = OpIAdd %int %59 %int_1
-OpStore %counter_1 %60
-OpBranch %52
+OpLoopMerge %59 %58 None
+OpBranch %56
 %56 = OpLabel
-%61 = OpExtInst %float %1 Sqrt %float_1
-%63 = OpFOrdEqual %bool %61 %float_1
-OpSelectionMerge %65 None
-OpBranchConditional %63 %64 %65
-%64 = OpLabel
-%66 = OpAccessChain %_ptr_Function_float %color %int_1
-OpStore %66 %float_1
-OpBranch %65
-%65 = OpLabel
-%68 = OpExtInst %float %1 Sqrt %float_1
-%70 = OpFOrdEqual %bool %68 %float_2
-OpSelectionMerge %73 None
-OpBranchConditional %70 %71 %72
+%60 = OpLoad %int %counter_1
+%61 = OpSLessThan %bool %60 %int_10
+OpBranchConditional %61 %57 %59
+%57 = OpLabel
+OpBranch %58
+%58 = OpLabel
+%62 = OpLoad %int %counter_1
+%63 = OpIAdd %int %62 %int_1
+OpStore %counter_1 %63
+OpBranch %55
+%59 = OpLabel
+%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%66 = OpLoad %v4float %64
+%67 = OpCompositeExtract %float %66 0
+%69 = OpFOrdEqual %bool %67 %float_1
+OpSelectionMerge %71 None
+OpBranchConditional %69 %70 %71
+%70 = OpLabel
+%72 = OpAccessChain %_ptr_Function_float %color %int_1
+OpStore %72 %float_1
+OpBranch %71
 %71 = OpLabel
-OpBranch %73
-%72 = OpLabel
-%74 = OpAccessChain %_ptr_Function_float %color %int_3
-OpStore %74 %float_1
-OpBranch %73
-%73 = OpLabel
-OpBranch %76
-%76 = OpLabel
-OpLoopMerge %80 %79 None
-OpBranch %77
-%77 = OpLabel
-%81 = OpExtInst %float %1 Sqrt %float_1
-%82 = OpFOrdEqual %bool %81 %float_2
-OpBranchConditional %82 %78 %80
-%78 = OpLabel
-OpBranch %79
+%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%75 = OpLoad %v4float %74
+%76 = OpCompositeExtract %float %75 0
+%78 = OpFOrdEqual %bool %76 %float_2
+OpSelectionMerge %81 None
+OpBranchConditional %78 %79 %80
 %79 = OpLabel
-OpBranch %76
+OpBranch %81
 %80 = OpLabel
-OpBranch %83
-%83 = OpLabel
-OpLoopMerge %87 %86 None
+%82 = OpAccessChain %_ptr_Function_float %color %int_3
+OpStore %82 %float_1
+OpBranch %81
+%81 = OpLabel
 OpBranch %84
 %84 = OpLabel
+OpLoopMerge %88 %87 None
 OpBranch %85
 %85 = OpLabel
-OpBranch %86
+%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%90 = OpLoad %v4float %89
+%91 = OpCompositeExtract %float %90 0
+%92 = OpFOrdEqual %bool %91 %float_2
+OpBranchConditional %92 %86 %88
 %86 = OpLabel
-%88 = OpExtInst %float %1 Sqrt %float_1
-%89 = OpFOrdEqual %bool %88 %float_2
-OpBranchConditional %89 %83 %87
+OpBranch %87
 %87 = OpLabel
-%90 = OpLoad %v4float %color
-OpReturnValue %90
+OpBranch %84
+%88 = OpLabel
+OpBranch %93
+%93 = OpLabel
+OpLoopMerge %97 %96 None
+OpBranch %94
+%94 = OpLabel
+OpBranch %95
+%95 = OpLabel
+OpBranch %96
+%96 = OpLabel
+%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%99 = OpLoad %v4float %98
+%100 = OpCompositeExtract %float %99 0
+%101 = OpFOrdEqual %bool %100 %float_2
+OpBranchConditional %101 %93 %97
+%97 = OpLabel
+%102 = OpLoad %v4float %color
+OpReturnValue %102
 OpFunctionEnd
diff --git a/tests/sksl/shared/EmptyBlocksES3.glsl b/tests/sksl/shared/EmptyBlocksES3.glsl
index 7359383..3b296bb 100644
--- a/tests/sksl/shared/EmptyBlocksES3.glsl
+++ b/tests/sksl/shared/EmptyBlocksES3.glsl
@@ -1,5 +1,6 @@
 
 out vec4 sk_FragColor;
+uniform vec4 colorWhite;
 vec4 main() {
     vec4 color = vec4(0.0);
     for (int counter = 0;counter < 10; ++counter) {
@@ -8,9 +9,9 @@
     }
     for (int counter = 0;counter < 10; ++counter) {
     }
-    if (sqrt(1.0) == 1.0) color.y = 1.0;
-    if (sqrt(1.0) == 2.0) ; else color.w = 1.0;
-    while (sqrt(1.0) == 2.0) ;
-    do ; while (sqrt(1.0) == 2.0);
+    if (colorWhite.x == 1.0) color.y = 1.0;
+    if (colorWhite.x == 2.0) ; else color.w = 1.0;
+    while (colorWhite.x == 2.0) ;
+    do ; while (colorWhite.x == 2.0);
     return color;
 }
diff --git a/tests/sksl/shared/EmptyBlocksES3.metal b/tests/sksl/shared/EmptyBlocksES3.metal
index a7ea8d4..e9be287 100644
--- a/tests/sksl/shared/EmptyBlocksES3.metal
+++ b/tests/sksl/shared/EmptyBlocksES3.metal
@@ -1,12 +1,15 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float4 colorWhite;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
     float4 color = float4(0.0);
@@ -16,10 +19,10 @@
     }
     for (int counter = 0;counter < 10; ++counter) {
     }
-    if (sqrt(1.0) == 1.0) color.y = 1.0;
-    if (sqrt(1.0) == 2.0) ; else color.w = 1.0;
-    while (sqrt(1.0) == 2.0) ;
-    do ; while (sqrt(1.0) == 2.0);
+    if (_uniforms.colorWhite.x == 1.0) color.y = 1.0;
+    if (_uniforms.colorWhite.x == 2.0) ; else color.w = 1.0;
+    while (_uniforms.colorWhite.x == 2.0) ;
+    do ; while (_uniforms.colorWhite.x == 2.0);
     _out.sk_FragColor = color;
     return _out;
 }
diff --git a/tests/sksl/shared/NumberConversions.asm.frag b/tests/sksl/shared/NumberConversions.asm.frag
index 58240d3..b4c1649 100644
--- a/tests/sksl/shared/NumberConversions.asm.frag
+++ b/tests/sksl/shared/NumberConversions.asm.frag
@@ -5,6 +5,8 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
 OpName %b "b"
 OpName %s "s"
@@ -52,76 +54,70 @@
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %s RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
 OpDecorate %us RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
 OpDecorate %h RelaxedPrecision
 OpDecorate %s2s RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
+OpDecorate %49 RelaxedPrecision
 OpDecorate %i2s RelaxedPrecision
 OpDecorate %us2s RelaxedPrecision
-OpDecorate %43 RelaxedPrecision
-OpDecorate %44 RelaxedPrecision
-OpDecorate %ui2s RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %h2s RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
-OpDecorate %f2s RelaxedPrecision
 OpDecorate %53 RelaxedPrecision
-OpDecorate %b2s RelaxedPrecision
-OpDecorate %55 RelaxedPrecision
-OpDecorate %56 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %ui2s RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
+OpDecorate %h2s RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
-OpDecorate %64 RelaxedPrecision
-OpDecorate %70 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %s2us RelaxedPrecision
+OpDecorate %f2s RelaxedPrecision
+OpDecorate %63 RelaxedPrecision
+OpDecorate %b2s RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %i2us RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %us2us RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
+OpDecorate %s2us RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %i2us RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %us2us RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
 OpDecorate %ui2us RelaxedPrecision
 OpDecorate %h2us RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
 OpDecorate %f2us RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %b2us RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %142 RelaxedPrecision
-OpDecorate %143 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
+OpDecorate %134 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
 OpDecorate %144 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
-OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
-OpDecorate %150 RelaxedPrecision
+OpDecorate %151 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
 OpDecorate %153 RelaxedPrecision
 OpDecorate %154 RelaxedPrecision
 OpDecorate %155 RelaxedPrecision
-OpDecorate %156 RelaxedPrecision
 OpDecorate %157 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
 OpDecorate %159 RelaxedPrecision
 OpDecorate %160 RelaxedPrecision
-OpDecorate %161 RelaxedPrecision
 OpDecorate %162 RelaxedPrecision
 OpDecorate %163 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
@@ -134,29 +130,32 @@
 OpDecorate %171 RelaxedPrecision
 OpDecorate %172 RelaxedPrecision
 OpDecorate %173 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
 OpDecorate %175 RelaxedPrecision
 OpDecorate %176 RelaxedPrecision
+OpDecorate %177 RelaxedPrecision
 OpDecorate %178 RelaxedPrecision
 OpDecorate %179 RelaxedPrecision
+OpDecorate %180 RelaxedPrecision
 OpDecorate %181 RelaxedPrecision
 OpDecorate %182 RelaxedPrecision
-OpDecorate %184 RelaxedPrecision
+OpDecorate %183 RelaxedPrecision
 OpDecorate %185 RelaxedPrecision
-OpDecorate %187 RelaxedPrecision
+OpDecorate %186 RelaxedPrecision
 OpDecorate %188 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
+OpDecorate %189 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
-OpDecorate %193 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 %201 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
 OpDecorate %203 RelaxedPrecision
+OpDecorate %204 RelaxedPrecision
+OpDecorate %205 RelaxedPrecision
+OpDecorate %206 RelaxedPrecision
 OpDecorate %207 RelaxedPrecision
 OpDecorate %208 RelaxedPrecision
 OpDecorate %209 RelaxedPrecision
@@ -164,33 +163,40 @@
 OpDecorate %211 RelaxedPrecision
 OpDecorate %212 RelaxedPrecision
 OpDecorate %213 RelaxedPrecision
-OpDecorate %214 RelaxedPrecision
-OpDecorate %215 RelaxedPrecision
-OpDecorate %216 RelaxedPrecision
 OpDecorate %217 RelaxedPrecision
 OpDecorate %218 RelaxedPrecision
+OpDecorate %219 RelaxedPrecision
 OpDecorate %220 RelaxedPrecision
 OpDecorate %221 RelaxedPrecision
+OpDecorate %222 RelaxedPrecision
 OpDecorate %223 RelaxedPrecision
 OpDecorate %224 RelaxedPrecision
+OpDecorate %225 RelaxedPrecision
 OpDecorate %226 RelaxedPrecision
 OpDecorate %227 RelaxedPrecision
-OpDecorate %229 RelaxedPrecision
+OpDecorate %228 RelaxedPrecision
 OpDecorate %230 RelaxedPrecision
-OpDecorate %232 RelaxedPrecision
+OpDecorate %231 RelaxedPrecision
 OpDecorate %233 RelaxedPrecision
-OpDecorate %235 RelaxedPrecision
+OpDecorate %234 RelaxedPrecision
 OpDecorate %236 RelaxedPrecision
-OpDecorate %238 RelaxedPrecision
+OpDecorate %237 RelaxedPrecision
 OpDecorate %239 RelaxedPrecision
-OpDecorate %241 RelaxedPrecision
+OpDecorate %240 RelaxedPrecision
+OpDecorate %242 RelaxedPrecision
 OpDecorate %243 RelaxedPrecision
 OpDecorate %245 RelaxedPrecision
-OpDecorate %247 RelaxedPrecision
+OpDecorate %246 RelaxedPrecision
+OpDecorate %248 RelaxedPrecision
 OpDecorate %249 RelaxedPrecision
 OpDecorate %251 RelaxedPrecision
 OpDecorate %253 RelaxedPrecision
-OpDecorate %254 RelaxedPrecision
+OpDecorate %255 RelaxedPrecision
+OpDecorate %257 RelaxedPrecision
+OpDecorate %259 RelaxedPrecision
+OpDecorate %261 RelaxedPrecision
+OpDecorate %263 RelaxedPrecision
+OpDecorate %264 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -198,24 +204,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
+%14 = OpTypeFunction %void
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
 %int = OpTypeInt 32 1
 %_ptr_Function_int = OpTypePointer Function %int
-%float_1 = OpConstant %float 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%int_0 = OpConstant %int 0
 %uint = OpTypeInt 32 0
 %_ptr_Function_uint = OpTypePointer Function %uint
 %_ptr_Function_float = OpTypePointer Function %float
 %int_1 = OpConstant %int 1
-%int_0 = OpConstant %int 0
 %uint_1 = OpConstant %uint 1
 %uint_0 = OpConstant %uint 0
+%float_1 = OpConstant %float 1
 %float_0 = OpConstant %float 0
 %_ptr_Output_float = OpTypePointer Output %float
-%main = OpFunction %void None %11
-%12 = OpLabel
+%main = OpFunction %void None %14
+%15 = OpLabel
 %b = OpVariable %_ptr_Function_bool Function
 %s = OpVariable %_ptr_Function_int Function
 %i = OpVariable %_ptr_Function_int Function
@@ -259,234 +269,240 @@
 %f2f = OpVariable %_ptr_Function_float Function
 %b2f = OpVariable %_ptr_Function_float Function
 OpStore %b %true
-%19 = OpExtInst %float %1 Sqrt %float_1
-%21 = OpConvertFToS %int %19
-OpStore %s %21
-%23 = OpExtInst %float %1 Sqrt %float_1
-%24 = OpConvertFToS %int %23
-OpStore %i %24
-%28 = OpExtInst %float %1 Sqrt %float_1
-%29 = OpConvertFToU %uint %28
-OpStore %us %29
-%31 = OpExtInst %float %1 Sqrt %float_1
-%32 = OpConvertFToU %uint %31
-OpStore %ui %32
-%35 = OpExtInst %float %1 Sqrt %float_1
-OpStore %h %35
-%37 = OpExtInst %float %1 Sqrt %float_1
-OpStore %f %37
-%39 = OpLoad %int %s
-OpStore %s2s %39
-%41 = OpLoad %int %i
-OpStore %i2s %41
-%43 = OpLoad %uint %us
-%44 = OpBitcast %int %43
-OpStore %us2s %44
-%46 = OpLoad %uint %ui
-%47 = OpBitcast %int %46
-OpStore %ui2s %47
-%49 = OpLoad %float %h
-%50 = OpConvertFToS %int %49
-OpStore %h2s %50
-%52 = OpLoad %float %f
-%53 = OpConvertFToS %int %52
-OpStore %f2s %53
-%55 = OpLoad %bool %b
-%56 = OpSelect %int %55 %int_1 %int_0
-OpStore %b2s %56
-%60 = OpLoad %int %s
-OpStore %s2i %60
-%62 = OpLoad %int %i
-OpStore %i2i %62
-%64 = OpLoad %uint %us
-%65 = OpBitcast %int %64
-OpStore %us2i %65
-%67 = OpLoad %uint %ui
-%68 = OpBitcast %int %67
-OpStore %ui2i %68
-%70 = OpLoad %float %h
-%71 = OpConvertFToS %int %70
-OpStore %h2i %71
-%73 = OpLoad %float %f
-%74 = OpConvertFToS %int %73
-OpStore %f2i %74
-%76 = OpLoad %bool %b
-%77 = OpSelect %int %76 %int_1 %int_0
-OpStore %b2i %77
-%79 = OpLoad %int %s
-%80 = OpBitcast %uint %79
-OpStore %s2us %80
-%82 = OpLoad %int %i
-%83 = OpBitcast %uint %82
-OpStore %i2us %83
-%85 = OpLoad %uint %us
-OpStore %us2us %85
-%87 = OpLoad %uint %ui
-OpStore %ui2us %87
-%89 = OpLoad %float %h
-%90 = OpConvertFToU %uint %89
-OpStore %h2us %90
-%92 = OpLoad %float %f
-%93 = OpConvertFToU %uint %92
-OpStore %f2us %93
-%95 = OpLoad %bool %b
-%96 = OpSelect %uint %95 %uint_1 %uint_0
-OpStore %b2us %96
-%100 = OpLoad %int %s
-%101 = OpBitcast %uint %100
-OpStore %s2ui %101
-%103 = OpLoad %int %i
-%104 = OpBitcast %uint %103
-OpStore %i2ui %104
-%106 = OpLoad %uint %us
-OpStore %us2ui %106
-%108 = OpLoad %uint %ui
-OpStore %ui2ui %108
-%110 = OpLoad %float %h
-%111 = OpConvertFToU %uint %110
-OpStore %h2ui %111
-%113 = OpLoad %float %f
-%114 = OpConvertFToU %uint %113
-OpStore %f2ui %114
-%116 = OpLoad %bool %b
-%117 = OpSelect %uint %116 %uint_1 %uint_0
-OpStore %b2ui %117
-%119 = OpLoad %int %s
-%120 = OpConvertSToF %float %119
-OpStore %s2f %120
-%122 = OpLoad %int %i
-%123 = OpConvertSToF %float %122
-OpStore %i2f %123
-%125 = OpLoad %uint %us
-%126 = OpConvertUToF %float %125
-OpStore %us2f %126
-%128 = OpLoad %uint %ui
-%129 = OpConvertUToF %float %128
-OpStore %ui2f %129
-%131 = OpLoad %float %h
-OpStore %h2f %131
-%133 = OpLoad %float %f
-OpStore %f2f %133
-%135 = OpLoad %bool %b
-%136 = OpSelect %float %135 %float_1 %float_0
-OpStore %b2f %136
-%138 = OpLoad %int %s
-%139 = OpConvertSToF %float %138
-%140 = OpLoad %int %i
-%141 = OpConvertSToF %float %140
-%142 = OpFAdd %float %139 %141
-%143 = OpLoad %uint %us
-%144 = OpConvertUToF %float %143
-%145 = OpFAdd %float %142 %144
-%146 = OpLoad %uint %ui
-%147 = OpConvertUToF %float %146
-%148 = OpFAdd %float %145 %147
-%149 = OpLoad %float %h
-%150 = OpFAdd %float %148 %149
-%151 = OpLoad %float %f
-%152 = OpFAdd %float %150 %151
-%153 = OpLoad %int %s2s
-%154 = OpConvertSToF %float %153
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%25 = OpLoad %float %22
+%26 = OpConvertFToS %int %25
+OpStore %s %26
+%28 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%29 = OpLoad %float %28
+%30 = OpConvertFToS %int %29
+OpStore %i %30
+%34 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%35 = OpLoad %float %34
+%36 = OpConvertFToU %uint %35
+OpStore %us %36
+%38 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%39 = OpLoad %float %38
+%40 = OpConvertFToU %uint %39
+OpStore %ui %40
+%43 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%44 = OpLoad %float %43
+OpStore %h %44
+%46 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%47 = OpLoad %float %46
+OpStore %f %47
+%49 = OpLoad %int %s
+OpStore %s2s %49
+%51 = OpLoad %int %i
+OpStore %i2s %51
+%53 = OpLoad %uint %us
+%54 = OpBitcast %int %53
+OpStore %us2s %54
+%56 = OpLoad %uint %ui
+%57 = OpBitcast %int %56
+OpStore %ui2s %57
+%59 = OpLoad %float %h
+%60 = OpConvertFToS %int %59
+OpStore %h2s %60
+%62 = OpLoad %float %f
+%63 = OpConvertFToS %int %62
+OpStore %f2s %63
+%65 = OpLoad %bool %b
+%66 = OpSelect %int %65 %int_1 %int_0
+OpStore %b2s %66
+%69 = OpLoad %int %s
+OpStore %s2i %69
+%71 = OpLoad %int %i
+OpStore %i2i %71
+%73 = OpLoad %uint %us
+%74 = OpBitcast %int %73
+OpStore %us2i %74
+%76 = OpLoad %uint %ui
+%77 = OpBitcast %int %76
+OpStore %ui2i %77
+%79 = OpLoad %float %h
+%80 = OpConvertFToS %int %79
+OpStore %h2i %80
+%82 = OpLoad %float %f
+%83 = OpConvertFToS %int %82
+OpStore %f2i %83
+%85 = OpLoad %bool %b
+%86 = OpSelect %int %85 %int_1 %int_0
+OpStore %b2i %86
+%88 = OpLoad %int %s
+%89 = OpBitcast %uint %88
+OpStore %s2us %89
+%91 = OpLoad %int %i
+%92 = OpBitcast %uint %91
+OpStore %i2us %92
+%94 = OpLoad %uint %us
+OpStore %us2us %94
+%96 = OpLoad %uint %ui
+OpStore %ui2us %96
+%98 = OpLoad %float %h
+%99 = OpConvertFToU %uint %98
+OpStore %h2us %99
+%101 = OpLoad %float %f
+%102 = OpConvertFToU %uint %101
+OpStore %f2us %102
+%104 = OpLoad %bool %b
+%105 = OpSelect %uint %104 %uint_1 %uint_0
+OpStore %b2us %105
+%109 = OpLoad %int %s
+%110 = OpBitcast %uint %109
+OpStore %s2ui %110
+%112 = OpLoad %int %i
+%113 = OpBitcast %uint %112
+OpStore %i2ui %113
+%115 = OpLoad %uint %us
+OpStore %us2ui %115
+%117 = OpLoad %uint %ui
+OpStore %ui2ui %117
+%119 = OpLoad %float %h
+%120 = OpConvertFToU %uint %119
+OpStore %h2ui %120
+%122 = OpLoad %float %f
+%123 = OpConvertFToU %uint %122
+OpStore %f2ui %123
+%125 = OpLoad %bool %b
+%126 = OpSelect %uint %125 %uint_1 %uint_0
+OpStore %b2ui %126
+%128 = OpLoad %int %s
+%129 = OpConvertSToF %float %128
+OpStore %s2f %129
+%131 = OpLoad %int %i
+%132 = OpConvertSToF %float %131
+OpStore %i2f %132
+%134 = OpLoad %uint %us
+%135 = OpConvertUToF %float %134
+OpStore %us2f %135
+%137 = OpLoad %uint %ui
+%138 = OpConvertUToF %float %137
+OpStore %ui2f %138
+%140 = OpLoad %float %h
+OpStore %h2f %140
+%142 = OpLoad %float %f
+OpStore %f2f %142
+%144 = OpLoad %bool %b
+%145 = OpSelect %float %144 %float_1 %float_0
+OpStore %b2f %145
+%148 = OpLoad %int %s
+%149 = OpConvertSToF %float %148
+%150 = OpLoad %int %i
+%151 = OpConvertSToF %float %150
+%152 = OpFAdd %float %149 %151
+%153 = OpLoad %uint %us
+%154 = OpConvertUToF %float %153
 %155 = OpFAdd %float %152 %154
-%156 = OpLoad %int %i2s
-%157 = OpConvertSToF %float %156
+%156 = OpLoad %uint %ui
+%157 = OpConvertUToF %float %156
 %158 = OpFAdd %float %155 %157
-%159 = OpLoad %int %us2s
-%160 = OpConvertSToF %float %159
-%161 = OpFAdd %float %158 %160
-%162 = OpLoad %int %ui2s
-%163 = OpConvertSToF %float %162
-%164 = OpFAdd %float %161 %163
-%165 = OpLoad %int %h2s
-%166 = OpConvertSToF %float %165
-%167 = OpFAdd %float %164 %166
-%168 = OpLoad %int %f2s
-%169 = OpConvertSToF %float %168
-%170 = OpFAdd %float %167 %169
-%171 = OpLoad %int %b2s
-%172 = OpConvertSToF %float %171
-%173 = OpFAdd %float %170 %172
-%174 = OpLoad %int %s2i
-%175 = OpConvertSToF %float %174
-%176 = OpFAdd %float %173 %175
-%177 = OpLoad %int %i2i
-%178 = OpConvertSToF %float %177
-%179 = OpFAdd %float %176 %178
-%180 = OpLoad %int %us2i
-%181 = OpConvertSToF %float %180
-%182 = OpFAdd %float %179 %181
-%183 = OpLoad %int %ui2i
-%184 = OpConvertSToF %float %183
-%185 = OpFAdd %float %182 %184
-%186 = OpLoad %int %h2i
-%187 = OpConvertSToF %float %186
-%188 = OpFAdd %float %185 %187
-%189 = OpLoad %int %f2i
-%190 = OpConvertSToF %float %189
-%191 = OpFAdd %float %188 %190
-%192 = OpLoad %int %b2i
-%193 = OpConvertSToF %float %192
-%194 = OpFAdd %float %191 %193
-%195 = OpLoad %uint %s2us
-%196 = OpConvertUToF %float %195
-%197 = OpFAdd %float %194 %196
-%198 = OpLoad %uint %i2us
-%199 = OpConvertUToF %float %198
-%200 = OpFAdd %float %197 %199
-%201 = OpLoad %uint %us2us
-%202 = OpConvertUToF %float %201
-%203 = OpFAdd %float %200 %202
-%204 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %204 %203
-%206 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-%207 = OpLoad %float %206
-%208 = OpLoad %uint %ui2us
+%159 = OpLoad %float %h
+%160 = OpFAdd %float %158 %159
+%161 = OpLoad %float %f
+%162 = OpFAdd %float %160 %161
+%163 = OpLoad %int %s2s
+%164 = OpConvertSToF %float %163
+%165 = OpFAdd %float %162 %164
+%166 = OpLoad %int %i2s
+%167 = OpConvertSToF %float %166
+%168 = OpFAdd %float %165 %167
+%169 = OpLoad %int %us2s
+%170 = OpConvertSToF %float %169
+%171 = OpFAdd %float %168 %170
+%172 = OpLoad %int %ui2s
+%173 = OpConvertSToF %float %172
+%174 = OpFAdd %float %171 %173
+%175 = OpLoad %int %h2s
+%176 = OpConvertSToF %float %175
+%177 = OpFAdd %float %174 %176
+%178 = OpLoad %int %f2s
+%179 = OpConvertSToF %float %178
+%180 = OpFAdd %float %177 %179
+%181 = OpLoad %int %b2s
+%182 = OpConvertSToF %float %181
+%183 = OpFAdd %float %180 %182
+%184 = OpLoad %int %s2i
+%185 = OpConvertSToF %float %184
+%186 = OpFAdd %float %183 %185
+%187 = OpLoad %int %i2i
+%188 = OpConvertSToF %float %187
+%189 = OpFAdd %float %186 %188
+%190 = OpLoad %int %us2i
+%191 = OpConvertSToF %float %190
+%192 = OpFAdd %float %189 %191
+%193 = OpLoad %int %ui2i
+%194 = OpConvertSToF %float %193
+%195 = OpFAdd %float %192 %194
+%196 = OpLoad %int %h2i
+%197 = OpConvertSToF %float %196
+%198 = OpFAdd %float %195 %197
+%199 = OpLoad %int %f2i
+%200 = OpConvertSToF %float %199
+%201 = OpFAdd %float %198 %200
+%202 = OpLoad %int %b2i
+%203 = OpConvertSToF %float %202
+%204 = OpFAdd %float %201 %203
+%205 = OpLoad %uint %s2us
+%206 = OpConvertUToF %float %205
+%207 = OpFAdd %float %204 %206
+%208 = OpLoad %uint %i2us
 %209 = OpConvertUToF %float %208
-%210 = OpLoad %uint %h2us
-%211 = OpConvertUToF %float %210
-%212 = OpFAdd %float %209 %211
-%213 = OpLoad %uint %f2us
-%214 = OpConvertUToF %float %213
-%215 = OpFAdd %float %212 %214
-%216 = OpLoad %uint %b2us
-%217 = OpConvertUToF %float %216
-%218 = OpFAdd %float %215 %217
-%219 = OpLoad %uint %s2ui
-%220 = OpConvertUToF %float %219
-%221 = OpFAdd %float %218 %220
-%222 = OpLoad %uint %i2ui
-%223 = OpConvertUToF %float %222
-%224 = OpFAdd %float %221 %223
-%225 = OpLoad %uint %us2ui
-%226 = OpConvertUToF %float %225
-%227 = OpFAdd %float %224 %226
-%228 = OpLoad %uint %ui2ui
-%229 = OpConvertUToF %float %228
-%230 = OpFAdd %float %227 %229
-%231 = OpLoad %uint %h2ui
-%232 = OpConvertUToF %float %231
-%233 = OpFAdd %float %230 %232
-%234 = OpLoad %uint %f2ui
-%235 = OpConvertUToF %float %234
-%236 = OpFAdd %float %233 %235
-%237 = OpLoad %uint %b2ui
-%238 = OpConvertUToF %float %237
-%239 = OpFAdd %float %236 %238
-%240 = OpLoad %float %s2f
-%241 = OpFAdd %float %239 %240
-%242 = OpLoad %float %i2f
-%243 = OpFAdd %float %241 %242
-%244 = OpLoad %float %us2f
-%245 = OpFAdd %float %243 %244
-%246 = OpLoad %float %ui2f
-%247 = OpFAdd %float %245 %246
-%248 = OpLoad %float %h2f
-%249 = OpFAdd %float %247 %248
-%250 = OpLoad %float %f2f
+%210 = OpFAdd %float %207 %209
+%211 = OpLoad %uint %us2us
+%212 = OpConvertUToF %float %211
+%213 = OpFAdd %float %210 %212
+%214 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %214 %213
+%216 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+%217 = OpLoad %float %216
+%218 = OpLoad %uint %ui2us
+%219 = OpConvertUToF %float %218
+%220 = OpLoad %uint %h2us
+%221 = OpConvertUToF %float %220
+%222 = OpFAdd %float %219 %221
+%223 = OpLoad %uint %f2us
+%224 = OpConvertUToF %float %223
+%225 = OpFAdd %float %222 %224
+%226 = OpLoad %uint %b2us
+%227 = OpConvertUToF %float %226
+%228 = OpFAdd %float %225 %227
+%229 = OpLoad %uint %s2ui
+%230 = OpConvertUToF %float %229
+%231 = OpFAdd %float %228 %230
+%232 = OpLoad %uint %i2ui
+%233 = OpConvertUToF %float %232
+%234 = OpFAdd %float %231 %233
+%235 = OpLoad %uint %us2ui
+%236 = OpConvertUToF %float %235
+%237 = OpFAdd %float %234 %236
+%238 = OpLoad %uint %ui2ui
+%239 = OpConvertUToF %float %238
+%240 = OpFAdd %float %237 %239
+%241 = OpLoad %uint %h2ui
+%242 = OpConvertUToF %float %241
+%243 = OpFAdd %float %240 %242
+%244 = OpLoad %uint %f2ui
+%245 = OpConvertUToF %float %244
+%246 = OpFAdd %float %243 %245
+%247 = OpLoad %uint %b2ui
+%248 = OpConvertUToF %float %247
+%249 = OpFAdd %float %246 %248
+%250 = OpLoad %float %s2f
 %251 = OpFAdd %float %249 %250
-%252 = OpLoad %float %b2f
+%252 = OpLoad %float %i2f
 %253 = OpFAdd %float %251 %252
-%254 = OpFAdd %float %207 %253
-OpStore %206 %254
+%254 = OpLoad %float %us2f
+%255 = OpFAdd %float %253 %254
+%256 = OpLoad %float %ui2f
+%257 = OpFAdd %float %255 %256
+%258 = OpLoad %float %h2f
+%259 = OpFAdd %float %257 %258
+%260 = OpLoad %float %f2f
+%261 = OpFAdd %float %259 %260
+%262 = OpLoad %float %b2f
+%263 = OpFAdd %float %261 %262
+%264 = OpFAdd %float %217 %263
+OpStore %216 %264
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/NumberConversions.glsl b/tests/sksl/shared/NumberConversions.glsl
index a3adb8a..23b66d5 100644
--- a/tests/sksl/shared/NumberConversions.glsl
+++ b/tests/sksl/shared/NumberConversions.glsl
@@ -1,13 +1,14 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
     bool b = true;
-    int s = int(sqrt(1.0));
-    int i = int(sqrt(1.0));
-    uint us = uint(sqrt(1.0));
-    uint ui = uint(sqrt(1.0));
-    float h = sqrt(1.0);
-    float f = sqrt(1.0);
+    int s = int(unknownInput);
+    int i = int(unknownInput);
+    uint us = uint(unknownInput);
+    uint ui = uint(unknownInput);
+    float h = unknownInput;
+    float f = unknownInput;
     int s2s = s;
     int i2s = i;
     int us2s = int(us);
diff --git a/tests/sksl/shared/NumberConversions.metal b/tests/sksl/shared/NumberConversions.metal
index 0dd4f6c..af6f974 100644
--- a/tests/sksl/shared/NumberConversions.metal
+++ b/tests/sksl/shared/NumberConversions.metal
@@ -1,21 +1,24 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
     bool b = true;
-    short s = short(sqrt(1.0));
-    int i = int(sqrt(1.0));
-    ushort us = ushort(sqrt(1.0));
-    uint ui = uint(sqrt(1.0));
-    float h = sqrt(1.0);
-    float f = sqrt(1.0);
+    short s = short(_uniforms.unknownInput);
+    int i = int(_uniforms.unknownInput);
+    ushort us = ushort(_uniforms.unknownInput);
+    uint ui = uint(_uniforms.unknownInput);
+    float h = _uniforms.unknownInput;
+    float f = _uniforms.unknownInput;
     short s2s = s;
     short i2s = short(i);
     short us2s = short(us);
diff --git a/tests/sksl/shared/OperatorsES2.asm.frag b/tests/sksl/shared/OperatorsES2.asm.frag
index 3f6c54d..674930e 100644
--- a/tests/sksl/shared/OperatorsES2.asm.frag
+++ b/tests/sksl/shared/OperatorsES2.asm.frag
@@ -8,6 +8,7 @@
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
+OpMemberName %_UniformBuffer 2 "unknownInput"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %main "main"
 OpName %x "x"
@@ -26,23 +27,27 @@
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %74 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
 OpDecorate %92 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
-OpDecorate %149 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %155 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -50,7 +55,7 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_UniformBuffer = OpTypeStruct %v4float %v4float %float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
@@ -72,6 +77,7 @@
 %true = OpConstantTrue %bool
 %float_4 = OpConstant %float 4
 %false = OpConstantFalse %bool
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %float_12 = OpConstant %float 12
 %float_10 = OpConstant %float 10
 %float_6 = OpConstant %float 6
@@ -99,7 +105,7 @@
 %d = OpVariable %_ptr_Function_bool Function
 %e = OpVariable %_ptr_Function_bool Function
 %f = OpVariable %_ptr_Function_bool Function
-%141 = OpVariable %_ptr_Function_v4float Function
+%144 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_2
 OpStore %z %int_3
@@ -137,110 +143,112 @@
 OpSelectionMerge %70 None
 OpBranchConditional %68 %70 %69
 %69 = OpLabel
-%72 = OpExtInst %float %1 Sqrt %float_2
-%73 = OpFOrdGreaterThanEqual %bool %float_2 %72
-OpSelectionMerge %75 None
-OpBranchConditional %73 %74 %75
-%74 = OpLabel
-%76 = OpLoad %float %y
-%77 = OpLoad %float %x
-%78 = OpFOrdLessThanEqual %bool %76 %77
-OpBranch %75
-%75 = OpLabel
-%79 = OpPhi %bool %false %69 %78 %74
+%72 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%74 = OpLoad %float %72
+%75 = OpFOrdGreaterThanEqual %bool %float_2 %74
+OpSelectionMerge %77 None
+OpBranchConditional %75 %76 %77
+%76 = OpLabel
+%78 = OpLoad %float %y
+%79 = OpLoad %float %x
+%80 = OpFOrdLessThanEqual %bool %78 %79
+OpBranch %77
+%77 = OpLabel
+%81 = OpPhi %bool %false %69 %80 %76
 OpBranch %70
 %70 = OpLabel
-%80 = OpPhi %bool %true %25 %79 %75
-OpStore %b %80
-%82 = OpExtInst %float %1 Sqrt %float_2
-%83 = OpFOrdGreaterThan %bool %82 %float_2
-OpStore %c %83
-%85 = OpLoad %bool %b
-%86 = OpLoad %bool %c
-%87 = OpLogicalNotEqual %bool %85 %86
-OpStore %d %87
-%89 = OpLoad %bool %b
-OpSelectionMerge %91 None
-OpBranchConditional %89 %90 %91
-%90 = OpLabel
-%92 = OpLoad %bool %c
-OpBranch %91
-%91 = OpLabel
-%93 = OpPhi %bool %false %70 %92 %90
-OpStore %e %93
-%95 = OpLoad %bool %b
-OpSelectionMerge %97 None
-OpBranchConditional %95 %97 %96
-%96 = OpLabel
-%98 = OpLoad %bool %c
-OpBranch %97
-%97 = OpLabel
-%99 = OpPhi %bool %true %91 %98 %96
-OpStore %f %99
-%100 = OpLoad %float %x
-%102 = OpFAdd %float %100 %float_12
-OpStore %x %102
+%82 = OpPhi %bool %true %25 %81 %77
+OpStore %b %82
+%84 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%85 = OpLoad %float %84
+%86 = OpFOrdGreaterThan %bool %85 %float_2
+OpStore %c %86
+%88 = OpLoad %bool %b
+%89 = OpLoad %bool %c
+%90 = OpLogicalNotEqual %bool %88 %89
+OpStore %d %90
+%92 = OpLoad %bool %b
+OpSelectionMerge %94 None
+OpBranchConditional %92 %93 %94
+%93 = OpLabel
+%95 = OpLoad %bool %c
+OpBranch %94
+%94 = OpLabel
+%96 = OpPhi %bool %false %70 %95 %93
+OpStore %e %96
+%98 = OpLoad %bool %b
+OpSelectionMerge %100 None
+OpBranchConditional %98 %100 %99
+%99 = OpLabel
+%101 = OpLoad %bool %c
+OpBranch %100
+%100 = OpLabel
+%102 = OpPhi %bool %true %94 %101 %99
+OpStore %f %102
 %103 = OpLoad %float %x
-%104 = OpFSub %float %103 %float_12
-OpStore %x %104
-%105 = OpLoad %float %x
-%106 = OpLoad %float %y
-%108 = OpFDiv %float %106 %float_10
-OpStore %y %108
-%109 = OpFMul %float %105 %108
-OpStore %x %109
+%105 = OpFAdd %float %103 %float_12
+OpStore %x %105
+%106 = OpLoad %float %x
+%107 = OpFSub %float %106 %float_12
+OpStore %x %107
+%108 = OpLoad %float %x
+%109 = OpLoad %float %y
+%111 = OpFDiv %float %109 %float_10
+OpStore %y %111
+%112 = OpFMul %float %108 %111
+OpStore %x %112
 OpStore %x %float_6
-%111 = OpLoad %bool %b
-%112 = OpSelect %float %111 %float_1 %float_0
-%113 = OpLoad %bool %c
-%114 = OpSelect %float %113 %float_1 %float_0
-%115 = OpFMul %float %112 %114
-%116 = OpLoad %bool %d
+%114 = OpLoad %bool %b
+%115 = OpSelect %float %114 %float_1 %float_0
+%116 = OpLoad %bool %c
 %117 = OpSelect %float %116 %float_1 %float_0
 %118 = OpFMul %float %115 %117
-%119 = OpLoad %bool %e
+%119 = OpLoad %bool %d
 %120 = OpSelect %float %119 %float_1 %float_0
 %121 = OpFMul %float %118 %120
-%122 = OpLoad %bool %f
+%122 = OpLoad %bool %e
 %123 = OpSelect %float %122 %float_1 %float_0
 %124 = OpFMul %float %121 %123
-OpStore %y %124
+%125 = OpLoad %bool %f
+%126 = OpSelect %float %125 %float_1 %float_0
+%127 = OpFMul %float %124 %126
+OpStore %y %127
 OpStore %y %float_6
-%125 = OpLoad %int %z
-%127 = OpISub %int %125 %int_1
-OpStore %z %127
+%128 = OpLoad %int %z
+%130 = OpISub %int %128 %int_1
+OpStore %z %130
 OpStore %z %int_6
-%129 = OpLoad %float %x
-%130 = OpFOrdEqual %bool %129 %float_6
-OpSelectionMerge %132 None
-OpBranchConditional %130 %131 %132
-%131 = OpLabel
-%133 = OpLoad %float %y
-%134 = OpFOrdEqual %bool %133 %float_6
-OpBranch %132
-%132 = OpLabel
-%135 = OpPhi %bool %false %97 %134 %131
-OpSelectionMerge %137 None
-OpBranchConditional %135 %136 %137
-%136 = OpLabel
-%138 = OpLoad %int %z
-%139 = OpIEqual %bool %138 %int_6
-OpBranch %137
-%137 = OpLabel
-%140 = OpPhi %bool %false %132 %139 %136
-OpSelectionMerge %145 None
-OpBranchConditional %140 %143 %144
-%143 = OpLabel
-%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%149 = OpLoad %v4float %146
-OpStore %141 %149
-OpBranch %145
-%144 = OpLabel
-%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%151 = OpLoad %v4float %150
-OpStore %141 %151
-OpBranch %145
-%145 = OpLabel
-%152 = OpLoad %v4float %141
-OpReturnValue %152
+%132 = OpLoad %float %x
+%133 = OpFOrdEqual %bool %132 %float_6
+OpSelectionMerge %135 None
+OpBranchConditional %133 %134 %135
+%134 = OpLabel
+%136 = OpLoad %float %y
+%137 = OpFOrdEqual %bool %136 %float_6
+OpBranch %135
+%135 = OpLabel
+%138 = OpPhi %bool %false %100 %137 %134
+OpSelectionMerge %140 None
+OpBranchConditional %138 %139 %140
+%139 = OpLabel
+%141 = OpLoad %int %z
+%142 = OpIEqual %bool %141 %int_6
+OpBranch %140
+%140 = OpLabel
+%143 = OpPhi %bool %false %135 %142 %139
+OpSelectionMerge %148 None
+OpBranchConditional %143 %146 %147
+%146 = OpLabel
+%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%152 = OpLoad %v4float %149
+OpStore %144 %152
+OpBranch %148
+%147 = OpLabel
+%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%154 = OpLoad %v4float %153
+OpStore %144 %154
+OpBranch %148
+%148 = OpLabel
+%155 = OpLoad %v4float %144
+OpReturnValue %155
 OpFunctionEnd
diff --git a/tests/sksl/shared/OperatorsES2.glsl b/tests/sksl/shared/OperatorsES2.glsl
index 594e44a..e814726 100644
--- a/tests/sksl/shared/OperatorsES2.glsl
+++ b/tests/sksl/shared/OperatorsES2.glsl
@@ -2,6 +2,7 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+uniform float unknownInput;
 vec4 main() {
     float x = 1.0;
     float y = 2.0;
@@ -9,8 +10,8 @@
     x = (x - x) + ((y * x) * x) * (y - x);
     y = (x / y) / x;
     z = ((z / 2) * 3 + 4) - 2;
-    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
-    bool c = sqrt(2.0) > 2.0;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= unknownInput && y <= x;
+    bool c = unknownInput > 2.0;
     bool d = b ^^ c;
     bool e = b && c;
     bool f = b || c;
diff --git a/tests/sksl/shared/OperatorsES2.metal b/tests/sksl/shared/OperatorsES2.metal
index 3e6f098..757966d 100644
--- a/tests/sksl/shared/OperatorsES2.metal
+++ b/tests/sksl/shared/OperatorsES2.metal
@@ -4,6 +4,7 @@
 struct Uniforms {
     float4 colorGreen;
     float4 colorRed;
+    float unknownInput;
 };
 struct Inputs {
 };
@@ -19,8 +20,8 @@
     x = (x - x) + ((y * x) * x) * (y - x);
     y = (x / y) / x;
     z = ((z / 2) * 3 + 4) - 2;
-    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
-    bool c = sqrt(2.0) > 2.0;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= _uniforms.unknownInput && y <= x;
+    bool c = _uniforms.unknownInput > 2.0;
     bool d = b != c;
     bool e = b && c;
     bool f = b || c;
diff --git a/tests/sksl/shared/OperatorsES3.asm.frag b/tests/sksl/shared/OperatorsES3.asm.frag
index 30ca4ec..95f0e63 100644
--- a/tests/sksl/shared/OperatorsES3.asm.frag
+++ b/tests/sksl/shared/OperatorsES3.asm.frag
@@ -8,6 +8,7 @@
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
+OpMemberName %_UniformBuffer 2 "unknownInput"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %main "main"
 OpName %x "x"
@@ -21,6 +22,7 @@
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
@@ -34,7 +36,7 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_UniformBuffer = OpTypeStruct %v4float %v4float %float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
diff --git a/tests/sksl/shared/OperatorsES3.glsl b/tests/sksl/shared/OperatorsES3.glsl
index 6be98ec..ea921a9 100644
--- a/tests/sksl/shared/OperatorsES3.glsl
+++ b/tests/sksl/shared/OperatorsES3.glsl
@@ -2,6 +2,7 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+uniform float unknownInput;
 vec4 main() {
     float x = 1.0;
     float y = 2.0;
diff --git a/tests/sksl/shared/OperatorsES3.metal b/tests/sksl/shared/OperatorsES3.metal
index 4e92047..569b6f9 100644
--- a/tests/sksl/shared/OperatorsES3.metal
+++ b/tests/sksl/shared/OperatorsES3.metal
@@ -4,6 +4,7 @@
 struct Uniforms {
     float4 colorGreen;
     float4 colorRed;
+    float unknownInput;
 };
 struct Inputs {
 };
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
index 687eab8..11714df 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
@@ -5,13 +5,21 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
-OpName %x "x"
+OpName %value "value"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %28 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %value RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -19,36 +27,41 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
+%14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%float_2 = OpConstant %float 2
 %float_1 = OpConstant %float 1
-%main = OpFunction %void None %11
-%12 = OpLabel
-%x = OpVariable %_ptr_Function_float Function
-OpStore %x %float_0
-OpSelectionMerge %18 None
-OpSwitch %int_0 %18 0 %19 1 %20
-%19 = OpLabel
-OpStore %x %float_0
-%21 = OpLoad %float %x
-%22 = OpExtInst %float %1 Sqrt %float_1
-%24 = OpFOrdLessThan %bool %21 %22
-OpSelectionMerge %26 None
-OpBranchConditional %24 %25 %26
-%25 = OpLabel
-OpBranch %18
-%26 = OpLabel
-OpBranch %20
-%20 = OpLabel
-OpStore %x %float_1
-OpBranch %18
-%18 = OpLabel
-%27 = OpLoad %float %x
-%28 = OpCompositeConstruct %v4float %27 %27 %27 %27
-OpStore %sk_FragColor %28
+%main = OpFunction %void None %14
+%15 = OpLabel
+%value = OpVariable %_ptr_Function_float Function
+OpStore %value %float_0
+OpSelectionMerge %21 None
+OpSwitch %int_0 %21 0 %22 1 %23
+%22 = OpLabel
+OpStore %value %float_0
+%24 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%26 = OpLoad %float %24
+%28 = OpFOrdEqual %bool %26 %float_2
+OpSelectionMerge %30 None
+OpBranchConditional %28 %29 %30
+%29 = OpLabel
+OpBranch %21
+%30 = OpLabel
+OpBranch %23
+%23 = OpLabel
+OpStore %value %float_1
+OpBranch %21
+%21 = OpLabel
+%32 = OpLoad %float %value
+%33 = OpCompositeConstruct %v4float %32 %32 %32 %32
+OpStore %sk_FragColor %33
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl b/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
index 4fb783b..b5c1545 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
@@ -1,13 +1,14 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    float x = 0.0;
+    float value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1.0)) break;
+            value = 0.0;
+            if (unknownInput == 2.0) break;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    sk_FragColor = vec4(x);
+    sk_FragColor = vec4(value);
 }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal b/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
index 79cd08b..59242e0 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
@@ -1,22 +1,25 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float x = 0.0;
+    float value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1.0)) break;
+            value = 0.0;
+            if (_uniforms.unknownInput == 2.0) break;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    _out.sk_FragColor = float4(x);
+    _out.sk_FragColor = float4(value);
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
index 0df3264..429f58f 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
@@ -5,13 +5,21 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
-OpName %x "x"
+OpName %value "value"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %28 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %value RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -19,36 +27,41 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
+%14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%float_2 = OpConstant %float 2
 %float_1 = OpConstant %float 1
-%main = OpFunction %void None %11
-%12 = OpLabel
-%x = OpVariable %_ptr_Function_float Function
-OpStore %x %float_0
-OpSelectionMerge %18 None
-OpSwitch %int_0 %18 0 %19 1 %20
-%19 = OpLabel
-OpStore %x %float_0
-%21 = OpLoad %float %x
-%22 = OpExtInst %float %1 Sqrt %float_1
-%24 = OpFOrdLessThan %bool %21 %22
-OpSelectionMerge %26 None
-OpBranchConditional %24 %25 %26
-%25 = OpLabel
-%27 = OpLoad %float %x
-%28 = OpCompositeConstruct %v4float %27 %27 %27 %27
-OpStore %sk_FragColor %28
-OpBranch %18
-%26 = OpLabel
-OpBranch %20
-%20 = OpLabel
-OpStore %x %float_1
-OpBranch %18
-%18 = OpLabel
+%main = OpFunction %void None %14
+%15 = OpLabel
+%value = OpVariable %_ptr_Function_float Function
+OpStore %value %float_0
+OpSelectionMerge %21 None
+OpSwitch %int_0 %21 0 %22 1 %23
+%22 = OpLabel
+OpStore %value %float_0
+%24 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%26 = OpLoad %float %24
+%28 = OpFOrdEqual %bool %26 %float_2
+OpSelectionMerge %30 None
+OpBranchConditional %28 %29 %30
+%29 = OpLabel
+%31 = OpLoad %float %value
+%32 = OpCompositeConstruct %v4float %31 %31 %31 %31
+OpStore %sk_FragColor %32
+OpBranch %21
+%30 = OpLabel
+OpBranch %23
+%23 = OpLabel
+OpStore %value %float_1
+OpBranch %21
+%21 = OpLabel
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
index 2a7a3ad..20f989e 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
@@ -1,15 +1,16 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    float x = 0.0;
+    float value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1.0)) {
-                sk_FragColor = vec4(x);
+            value = 0.0;
+            if (unknownInput == 2.0) {
+                sk_FragColor = vec4(value);
                 break;
             }
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
 }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
index 204be79..d51d9c5 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
@@ -1,24 +1,27 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float x = 0.0;
+    float value = 0.0;
     switch (0) {
         case 0:
-            x = 0.0;
-            if (x < sqrt(1.0)) {
-                _out.sk_FragColor = float4(x);
+            value = 0.0;
+            if (_uniforms.unknownInput == 2.0) {
+                _out.sk_FragColor = float4(value);
                 break;
             }
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
     return _out;
 }
diff --git a/tests/sksl/shared/Switch.asm.frag b/tests/sksl/shared/Switch.asm.frag
index d0f3ed5..ed5beb9 100644
--- a/tests/sksl/shared/Switch.asm.frag
+++ b/tests/sksl/shared/Switch.asm.frag
@@ -5,13 +5,21 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
-OpName %x "x"
+OpName %value "value"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %26 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %value RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -19,32 +27,38 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
+%14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
-%float_1 = OpConstant %float 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
-%main = OpFunction %void None %11
-%12 = OpLabel
-%x = OpVariable %_ptr_Function_float Function
-%15 = OpExtInst %float %1 Sqrt %float_1
-%17 = OpConvertFToS %int %15
-OpSelectionMerge %19 None
-OpSwitch %17 %22 0 %20 1 %21
-%20 = OpLabel
-OpStore %x %float_0
-OpBranch %19
-%21 = OpLabel
-OpStore %x %float_1
-OpBranch %19
-%22 = OpLabel
-OpStore %x %float_2
-OpBranch %19
-%19 = OpLabel
-%25 = OpLoad %float %x
-%26 = OpCompositeConstruct %v4float %25 %25 %25 %25
-OpStore %sk_FragColor %26
+%main = OpFunction %void None %14
+%15 = OpLabel
+%value = OpVariable %_ptr_Function_float Function
+%18 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%22 = OpLoad %float %18
+%23 = OpConvertFToS %int %22
+OpSelectionMerge %24 None
+OpSwitch %23 %27 0 %25 1 %26
+%25 = OpLabel
+OpStore %value %float_0
+OpBranch %24
+%26 = OpLabel
+OpStore %value %float_1
+OpBranch %24
+%27 = OpLabel
+OpStore %value %float_2
+OpBranch %24
+%24 = OpLabel
+%31 = OpLoad %float %value
+%32 = OpCompositeConstruct %v4float %31 %31 %31 %31
+OpStore %sk_FragColor %32
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Switch.glsl b/tests/sksl/shared/Switch.glsl
index 8272d5e..39b48e2 100644
--- a/tests/sksl/shared/Switch.glsl
+++ b/tests/sksl/shared/Switch.glsl
@@ -1,16 +1,17 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    float x;
-    switch (int(sqrt(1.0))) {
+    float value;
+    switch (int(unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
             break;
         case 1:
-            x = 1.0;
+            value = 1.0;
             break;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    sk_FragColor = vec4(x);
+    sk_FragColor = vec4(value);
 }
diff --git a/tests/sksl/shared/Switch.metal b/tests/sksl/shared/Switch.metal
index b87bdf8..fcc6674 100644
--- a/tests/sksl/shared/Switch.metal
+++ b/tests/sksl/shared/Switch.metal
@@ -1,25 +1,28 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float x;
-    switch (int(sqrt(1.0))) {
+    float value;
+    switch (int(_uniforms.unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
             break;
         case 1:
-            x = 1.0;
+            value = 1.0;
             break;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    _out.sk_FragColor = float4(x);
+    _out.sk_FragColor = float4(value);
     return _out;
 }
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.asm.frag b/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
index 04d8afa..7ba375a 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
+++ b/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
@@ -5,13 +5,21 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
-OpName %x "x"
+OpName %value "value"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %26 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %value RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -19,32 +27,37 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%void = OpTypeVoid
-%11 = OpTypeFunction %void
-%_ptr_Function_float = OpTypePointer Function %float
-%float_2 = OpConstant %float 2
 %int = OpTypeInt 32 1
+%_UniformBuffer = OpTypeStruct %int
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%void = OpTypeVoid
+%15 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+%int_0 = OpConstant %int 0
 %float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
-%main = OpFunction %void None %11
-%12 = OpLabel
-%x = OpVariable %_ptr_Function_float Function
-%15 = OpExtInst %float %1 Sqrt %float_2
-%17 = OpConvertFToS %int %15
-OpSelectionMerge %19 None
-OpSwitch %17 %22 0 %20 1 %21
-%20 = OpLabel
-OpStore %x %float_0
-OpBranch %21
-%21 = OpLabel
-OpStore %x %float_1
-OpBranch %22
-%22 = OpLabel
-OpStore %x %float_2
-OpBranch %19
-%19 = OpLabel
-%25 = OpLoad %float %x
-%26 = OpCompositeConstruct %v4float %25 %25 %25 %25
-OpStore %sk_FragColor %26
+%float_2 = OpConstant %float 2
+%main = OpFunction %void None %15
+%16 = OpLabel
+%value = OpVariable %_ptr_Function_float Function
+%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0
+%22 = OpLoad %int %19
+OpSelectionMerge %23 None
+OpSwitch %22 %26 0 %24 1 %25
+%24 = OpLabel
+OpStore %value %float_0
+OpBranch %25
+%25 = OpLabel
+OpStore %value %float_1
+OpBranch %26
+%26 = OpLabel
+OpStore %value %float_2
+OpBranch %23
+%23 = OpLabel
+%30 = OpLoad %float %value
+%31 = OpCompositeConstruct %v4float %30 %30 %30 %30
+OpStore %sk_FragColor %31
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.glsl b/tests/sksl/shared/SwitchContainingDeadCode.glsl
index af43810..3d24c1e 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.glsl
+++ b/tests/sksl/shared/SwitchContainingDeadCode.glsl
@@ -1,14 +1,15 @@
 
 out vec4 sk_FragColor;
+uniform int unknownInput;
 void main() {
-    float x;
-    switch (int(sqrt(2.0))) {
+    float value;
+    switch (unknownInput) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    sk_FragColor = vec4(x);
+    sk_FragColor = vec4(value);
 }
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.metal b/tests/sksl/shared/SwitchContainingDeadCode.metal
index 61b6d59..8ae62b6 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.metal
+++ b/tests/sksl/shared/SwitchContainingDeadCode.metal
@@ -1,23 +1,26 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    int unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float x;
-    switch (int(sqrt(2.0))) {
+    float value;
+    switch (_uniforms.unknownInput) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
         default:
-            x = 2.0;
+            value = 2.0;
     }
-    _out.sk_FragColor = float4(x);
+    _out.sk_FragColor = float4(value);
     return _out;
 }
diff --git a/tests/sksl/shared/SwitchWithFallthrough.asm.frag b/tests/sksl/shared/SwitchWithFallthrough.asm.frag
index b7faa71..06ff1fc 100644
--- a/tests/sksl/shared/SwitchWithFallthrough.asm.frag
+++ b/tests/sksl/shared/SwitchWithFallthrough.asm.frag
@@ -5,13 +5,21 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "unknownInput"
 OpName %main "main"
-OpName %x "x"
+OpName %value "value"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %25 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %value RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -19,30 +27,35 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%11 = OpTypeFunction %void
+%14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
-%float_3 = OpConstant %float 3
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
-%main = OpFunction %void None %11
-%12 = OpLabel
-%x = OpVariable %_ptr_Function_float Function
-OpStore %x %float_0
-%16 = OpExtInst %float %1 Sqrt %float_3
-%18 = OpConvertFToS %int %16
-OpSelectionMerge %20 None
-OpSwitch %18 %20 0 %21 1 %22
-%21 = OpLabel
-OpStore %x %float_0
-OpBranch %22
-%22 = OpLabel
-OpStore %x %float_1
-OpBranch %20
-%20 = OpLabel
-%24 = OpLoad %float %x
-%25 = OpCompositeConstruct %v4float %24 %24 %24 %24
-OpStore %sk_FragColor %25
+%main = OpFunction %void None %14
+%15 = OpLabel
+%value = OpVariable %_ptr_Function_float Function
+OpStore %value %float_0
+%19 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%23 = OpLoad %float %19
+%24 = OpConvertFToS %int %23
+OpSelectionMerge %25 None
+OpSwitch %24 %25 0 %26 1 %27
+%26 = OpLabel
+OpStore %value %float_0
+OpBranch %27
+%27 = OpLabel
+OpStore %value %float_1
+OpBranch %25
+%25 = OpLabel
+%29 = OpLoad %float %value
+%30 = OpCompositeConstruct %v4float %29 %29 %29 %29
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwitchWithFallthrough.glsl b/tests/sksl/shared/SwitchWithFallthrough.glsl
index 144e592..5371840 100644
--- a/tests/sksl/shared/SwitchWithFallthrough.glsl
+++ b/tests/sksl/shared/SwitchWithFallthrough.glsl
@@ -1,12 +1,13 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    float x = 0.0;
-    switch (int(sqrt(3.0))) {
+    float value = 0.0;
+    switch (int(unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    sk_FragColor = vec4(x);
+    sk_FragColor = vec4(value);
 }
diff --git a/tests/sksl/shared/SwitchWithFallthrough.metal b/tests/sksl/shared/SwitchWithFallthrough.metal
index e30be7e..c0afcb3 100644
--- a/tests/sksl/shared/SwitchWithFallthrough.metal
+++ b/tests/sksl/shared/SwitchWithFallthrough.metal
@@ -1,21 +1,24 @@
 #include <metal_stdlib>
 #include <simd/simd.h>
 using namespace metal;
+struct Uniforms {
+    float unknownInput;
+};
 struct Inputs {
 };
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
+fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float x = 0.0;
-    switch (int(sqrt(3.0))) {
+    float value = 0.0;
+    switch (int(_uniforms.unknownInput)) {
         case 0:
-            x = 0.0;
+            value = 0.0;
         case 1:
-            x = 1.0;
+            value = 1.0;
     }
-    _out.sk_FragColor = float4(x);
+    _out.sk_FragColor = float4(value);
     return _out;
 }
diff --git a/tests/sksl/shared/VectorConstructors.asm.frag b/tests/sksl/shared/VectorConstructors.asm.frag
index b4da08a..b70f6e7 100644
--- a/tests/sksl/shared/VectorConstructors.asm.frag
+++ b/tests/sksl/shared/VectorConstructors.asm.frag
@@ -8,6 +8,7 @@
 OpName %_UniformBuffer "_UniformBuffer"
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
+OpMemberName %_UniformBuffer 2 "unknownInput"
 OpName %_entrypoint_v "_entrypoint_v"
 OpName %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3 "check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3"
 OpName %main "main"
@@ -36,6 +37,7 @@
 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
@@ -66,13 +68,13 @@
 OpDecorate %109 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %187 RelaxedPrecision
-OpDecorate %195 RelaxedPrecision
+OpDecorate %189 RelaxedPrecision
 OpDecorate %197 RelaxedPrecision
 OpDecorate %199 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 OpDecorate %211 RelaxedPrecision
-OpDecorate %212 RelaxedPrecision
+OpDecorate %213 RelaxedPrecision
+OpDecorate %214 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -80,7 +82,7 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_UniformBuffer = OpTypeStruct %v4float %v4float %float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
 %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
@@ -113,15 +115,16 @@
 %128 = OpConstantComposite %v2int %int_1 %int_1
 %int_2 = OpConstant %int 2
 %131 = OpConstantComposite %v2int %int_1 %int_2
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
 %int_3 = OpConstant %int 3
 %true = OpConstantTrue %bool
 %false = OpConstantFalse %bool
-%157 = OpConstantComposite %v4bool %true %false %true %false
-%159 = OpConstantComposite %v2float %float_1 %float_0
-%163 = OpConstantComposite %v2bool %true %true
-%166 = OpConstantComposite %v3bool %true %true %true
+%159 = OpConstantComposite %v4bool %true %false %true %false
+%161 = OpConstantComposite %v2float %float_1 %float_0
+%165 = OpConstantComposite %v2bool %true %true
+%168 = OpConstantComposite %v3bool %true %true %true
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %16
@@ -231,24 +234,24 @@
 %v15 = OpVariable %_ptr_Function_v2bool Function
 %v16 = OpVariable %_ptr_Function_v2bool Function
 %v17 = OpVariable %_ptr_Function_v3bool Function
-%168 = OpVariable %_ptr_Function_v2float Function
 %170 = OpVariable %_ptr_Function_v2float Function
 %172 = OpVariable %_ptr_Function_v2float Function
-%174 = OpVariable %_ptr_Function_v3float Function
-%176 = OpVariable %_ptr_Function_v2int Function
+%174 = OpVariable %_ptr_Function_v2float Function
+%176 = OpVariable %_ptr_Function_v3float Function
 %178 = OpVariable %_ptr_Function_v2int Function
-%180 = OpVariable %_ptr_Function_v2float Function
+%180 = OpVariable %_ptr_Function_v2int Function
 %182 = OpVariable %_ptr_Function_v2float Function
-%184 = OpVariable %_ptr_Function_v4float Function
-%186 = OpVariable %_ptr_Function_v2int Function
-%188 = OpVariable %_ptr_Function_v4bool Function
-%190 = OpVariable %_ptr_Function_v2float Function
+%184 = OpVariable %_ptr_Function_v2float Function
+%186 = OpVariable %_ptr_Function_v4float Function
+%188 = OpVariable %_ptr_Function_v2int Function
+%190 = OpVariable %_ptr_Function_v4bool Function
 %192 = OpVariable %_ptr_Function_v2float Function
 %194 = OpVariable %_ptr_Function_v2float Function
-%196 = OpVariable %_ptr_Function_v2bool Function
+%196 = OpVariable %_ptr_Function_v2float Function
 %198 = OpVariable %_ptr_Function_v2bool Function
-%200 = OpVariable %_ptr_Function_v3bool Function
-%202 = OpVariable %_ptr_Function_v4float Function
+%200 = OpVariable %_ptr_Function_v2bool Function
+%202 = OpVariable %_ptr_Function_v3bool Function
+%204 = OpVariable %_ptr_Function_v4float Function
 OpStore %v1 %119
 OpStore %v2 %122
 OpStore %v3 %119
@@ -266,69 +269,70 @@
 %141 = OpLoad %v2int %v6
 %142 = OpCompositeExtract %int %141 0
 %143 = OpConvertSToF %float %142
-%144 = OpExtInst %float %1 Sqrt %float_2
-%147 = OpCompositeConstruct %v4float %143 %144 %float_3 %float_4
-OpStore %v9 %147
-%150 = OpLoad %v2float %v1
-%151 = OpCompositeExtract %float %150 0
-%152 = OpConvertFToS %int %151
-%153 = OpCompositeConstruct %v2int %int_3 %152
-OpStore %v10 %153
-OpStore %v11 %157
-OpStore %v12 %159
+%144 = OpAccessChain %_ptr_Uniform_float %11 %int_2
+%146 = OpLoad %float %144
+%149 = OpCompositeConstruct %v4float %143 %146 %float_3 %float_4
+OpStore %v9 %149
+%152 = OpLoad %v2float %v1
+%153 = OpCompositeExtract %float %152 0
+%154 = OpConvertFToS %int %153
+%155 = OpCompositeConstruct %v2int %int_3 %154
+OpStore %v10 %155
+OpStore %v11 %159
+OpStore %v12 %161
 OpStore %v13 %20
 OpStore %v14 %20
-OpStore %v15 %163
-OpStore %v16 %163
-OpStore %v17 %166
-%167 = OpLoad %v2float %v1
-OpStore %168 %167
-%169 = OpLoad %v2float %v2
+OpStore %v15 %165
+OpStore %v16 %165
+OpStore %v17 %168
+%169 = OpLoad %v2float %v1
 OpStore %170 %169
-%171 = OpLoad %v2float %v3
+%171 = OpLoad %v2float %v2
 OpStore %172 %171
-%173 = OpLoad %v3float %v4
+%173 = OpLoad %v2float %v3
 OpStore %174 %173
-%175 = OpLoad %v2int %v5
+%175 = OpLoad %v3float %v4
 OpStore %176 %175
-%177 = OpLoad %v2int %v6
+%177 = OpLoad %v2int %v5
 OpStore %178 %177
-%179 = OpLoad %v2float %v7
+%179 = OpLoad %v2int %v6
 OpStore %180 %179
-%181 = OpLoad %v2float %v8
+%181 = OpLoad %v2float %v7
 OpStore %182 %181
-%183 = OpLoad %v4float %v9
+%183 = OpLoad %v2float %v8
 OpStore %184 %183
-%185 = OpLoad %v2int %v10
+%185 = OpLoad %v4float %v9
 OpStore %186 %185
-%187 = OpLoad %v4bool %v11
+%187 = OpLoad %v2int %v10
 OpStore %188 %187
-%189 = OpLoad %v2float %v12
+%189 = OpLoad %v4bool %v11
 OpStore %190 %189
-%191 = OpLoad %v2float %v13
+%191 = OpLoad %v2float %v12
 OpStore %192 %191
-%193 = OpLoad %v2float %v14
+%193 = OpLoad %v2float %v13
 OpStore %194 %193
-%195 = OpLoad %v2bool %v15
+%195 = OpLoad %v2float %v14
 OpStore %196 %195
-%197 = OpLoad %v2bool %v16
+%197 = OpLoad %v2bool %v15
 OpStore %198 %197
-%199 = OpLoad %v3bool %v17
+%199 = OpLoad %v2bool %v16
 OpStore %200 %199
-%201 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3 %168 %170 %172 %174 %176 %178 %180 %182 %184 %186 %188 %190 %192 %194 %196 %198 %200
-OpSelectionMerge %205 None
-OpBranchConditional %201 %203 %204
-%203 = OpLabel
-%206 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%209 = OpLoad %v4float %206
-OpStore %202 %209
-OpBranch %205
-%204 = OpLabel
-%210 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%211 = OpLoad %v4float %210
-OpStore %202 %211
-OpBranch %205
+%201 = OpLoad %v3bool %v17
+OpStore %202 %201
+%203 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3 %170 %172 %174 %176 %178 %180 %182 %184 %186 %188 %190 %192 %194 %196 %198 %200 %202
+OpSelectionMerge %207 None
+OpBranchConditional %203 %205 %206
 %205 = OpLabel
-%212 = OpLoad %v4float %202
-OpReturnValue %212
+%208 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%211 = OpLoad %v4float %208
+OpStore %204 %211
+OpBranch %207
+%206 = OpLabel
+%212 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%213 = OpLoad %v4float %212
+OpStore %204 %213
+OpBranch %207
+%207 = OpLabel
+%214 = OpLoad %v4float %204
+OpReturnValue %214
 OpFunctionEnd
diff --git a/tests/sksl/shared/VectorConstructors.glsl b/tests/sksl/shared/VectorConstructors.glsl
index df79ec6..dcbbfe3 100644
--- a/tests/sksl/shared/VectorConstructors.glsl
+++ b/tests/sksl/shared/VectorConstructors.glsl
@@ -2,6 +2,7 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+uniform float unknownInput;
 bool check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3(vec2 v1, vec2 v2, vec2 v3, vec3 v4, ivec2 v5, ivec2 v6, vec2 v7, vec2 v8, vec4 v9, ivec2 v10, bvec4 v11, vec2 v12, vec2 v13, vec2 v14, bvec2 v15, bvec2 v16, bvec3 v17) {
     return (((((((((((((((v1.x + v2.x) + v3.x) + v4.x) + float(v5.x)) + float(v6.x)) + v7.x) + v8.x) + v9.x) + float(v10.x)) + float(v11.x)) + v12.x) + v13.x) + v14.x) + float(v15.x)) + float(v16.x)) + float(v17.x) == 17.0;
 }
@@ -14,7 +15,7 @@
     ivec2 v6 = ivec2(1, 2);
     vec2 v7 = vec2(1.0, 2.0);
     vec2 v8 = vec2(v5);
-    vec4 v9 = vec4(float(v6.x), sqrt(2.0), 3.0, 4.0);
+    vec4 v9 = vec4(float(v6.x), unknownInput, 3.0, 4.0);
     ivec2 v10 = ivec2(3, int(v1.x));
     bvec4 v11 = bvec4(true, false, true, false);
     vec2 v12 = vec2(1.0, 0.0);
diff --git a/tests/sksl/shared/VectorConstructors.metal b/tests/sksl/shared/VectorConstructors.metal
index dca52c2..5aed031 100644
--- a/tests/sksl/shared/VectorConstructors.metal
+++ b/tests/sksl/shared/VectorConstructors.metal
@@ -4,6 +4,7 @@
 struct Uniforms {
     float4 colorGreen;
     float4 colorRed;
+    float unknownInput;
 };
 struct Inputs {
 };
@@ -24,7 +25,7 @@
     int2 v6 = int2(1, 2);
     float2 v7 = float2(1.0, 2.0);
     float2 v8 = float2(v5);
-    float4 v9 = float4(float(v6.x), sqrt(2.0), 3.0, 4.0);
+    float4 v9 = float4(float(v6.x), _uniforms.unknownInput, 3.0, 4.0);
     int2 v10 = int2(3, int(v1.x));
     bool4 v11 = bool4(true, false, true, false);
     float2 v12 = float2(1.0, 0.0);
diff --git a/tests/sksl/workarounds/NegatedAtan.glsl b/tests/sksl/workarounds/NegatedAtan.glsl
index 3abf684..23c66bf 100644
--- a/tests/sksl/workarounds/NegatedAtan.glsl
+++ b/tests/sksl/workarounds/NegatedAtan.glsl
@@ -1,6 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    vec2 x = vec2(sqrt(2.0));
+    vec2 x = vec2(unknownInput);
     sk_FragColor.x = atan(x.x, -1.0 * x.y);
 }
diff --git a/tests/sksl/workarounds/NegatedAtanStandaloneSettings.glsl b/tests/sksl/workarounds/NegatedAtanStandaloneSettings.glsl
index b976b16..e4c4e6c 100644
--- a/tests/sksl/workarounds/NegatedAtanStandaloneSettings.glsl
+++ b/tests/sksl/workarounds/NegatedAtanStandaloneSettings.glsl
@@ -1,6 +1,7 @@
 
 out vec4 sk_FragColor;
+uniform float unknownInput;
 void main() {
-    vec2 x = vec2(sqrt(2.0));
+    vec2 x = vec2(unknownInput);
     sk_FragColor.x = atan(x.x, -x.y);
 }