Change sksl tests to avoid SPIR-V validation errors

'in' variables without locations aren't allowed. Use uniforms instead.

Bug: skia:11738
Change-Id: Ic066106deb7409cff154b4be7cfb3e03a7025c7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385000
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/resources/sksl/blend/BlendClear.sksl b/resources/sksl/blend/BlendClear.sksl
index 74e2e4d..990b862 100644
--- a/resources/sksl/blend/BlendClear.sksl
+++ b/resources/sksl/blend/BlendClear.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_clear(src, dst);
diff --git a/resources/sksl/blend/BlendColor.sksl b/resources/sksl/blend/BlendColor.sksl
index 9cf0ae9..1d8d1ca 100644
--- a/resources/sksl/blend/BlendColor.sksl
+++ b/resources/sksl/blend/BlendColor.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_color(src, dst);
diff --git a/resources/sksl/blend/BlendColorBurn.sksl b/resources/sksl/blend/BlendColorBurn.sksl
index 28cb0a1..4466a48 100644
--- a/resources/sksl/blend/BlendColorBurn.sksl
+++ b/resources/sksl/blend/BlendColorBurn.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_color_burn(src, dst);
diff --git a/resources/sksl/blend/BlendColorDodge.sksl b/resources/sksl/blend/BlendColorDodge.sksl
index a1e7d8c..11d4f0d 100644
--- a/resources/sksl/blend/BlendColorDodge.sksl
+++ b/resources/sksl/blend/BlendColorDodge.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_color_dodge(src, dst);
diff --git a/resources/sksl/blend/BlendDarken.sksl b/resources/sksl/blend/BlendDarken.sksl
index 9606bd5..1a75fa7 100644
--- a/resources/sksl/blend/BlendDarken.sksl
+++ b/resources/sksl/blend/BlendDarken.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_darken(src, dst);
diff --git a/resources/sksl/blend/BlendDifference.sksl b/resources/sksl/blend/BlendDifference.sksl
index fc242e8..dd69e9d 100644
--- a/resources/sksl/blend/BlendDifference.sksl
+++ b/resources/sksl/blend/BlendDifference.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_difference(src, dst);
diff --git a/resources/sksl/blend/BlendDst.sksl b/resources/sksl/blend/BlendDst.sksl
index 547a0aa..ce30fea 100644
--- a/resources/sksl/blend/BlendDst.sksl
+++ b/resources/sksl/blend/BlendDst.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_dst(src, dst);
diff --git a/resources/sksl/blend/BlendDstAtop.sksl b/resources/sksl/blend/BlendDstAtop.sksl
index a518ce5..71fde88 100644
--- a/resources/sksl/blend/BlendDstAtop.sksl
+++ b/resources/sksl/blend/BlendDstAtop.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src_atop(src, dst);
diff --git a/resources/sksl/blend/BlendDstIn.sksl b/resources/sksl/blend/BlendDstIn.sksl
index f0c6d83..6fac6e0 100644
--- a/resources/sksl/blend/BlendDstIn.sksl
+++ b/resources/sksl/blend/BlendDstIn.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_dst_in(src, dst);
diff --git a/resources/sksl/blend/BlendDstOut.sksl b/resources/sksl/blend/BlendDstOut.sksl
index df0e440..1539399 100644
--- a/resources/sksl/blend/BlendDstOut.sksl
+++ b/resources/sksl/blend/BlendDstOut.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_dst_out(src, dst);
diff --git a/resources/sksl/blend/BlendDstOver.sksl b/resources/sksl/blend/BlendDstOver.sksl
index 198dda7..57c3a8d 100644
--- a/resources/sksl/blend/BlendDstOver.sksl
+++ b/resources/sksl/blend/BlendDstOver.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_dst_over(src, dst);
diff --git a/resources/sksl/blend/BlendEnum.sksl b/resources/sksl/blend/BlendEnum.sksl
index b7e5a8a..394bc00 100644
--- a/resources/sksl/blend/BlendEnum.sksl
+++ b/resources/sksl/blend/BlendEnum.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend(SkBlendMode::kModulate, src, dst);
diff --git a/resources/sksl/blend/BlendExclusion.sksl b/resources/sksl/blend/BlendExclusion.sksl
index fba6de5..71ae567 100644
--- a/resources/sksl/blend/BlendExclusion.sksl
+++ b/resources/sksl/blend/BlendExclusion.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_exclusion(src, dst);
diff --git a/resources/sksl/blend/BlendHardLight.sksl b/resources/sksl/blend/BlendHardLight.sksl
index b3745b5..58c42ce 100644
--- a/resources/sksl/blend/BlendHardLight.sksl
+++ b/resources/sksl/blend/BlendHardLight.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_hard_light(src, dst);
diff --git a/resources/sksl/blend/BlendHue.sksl b/resources/sksl/blend/BlendHue.sksl
index db633e7..16e6ee8 100644
--- a/resources/sksl/blend/BlendHue.sksl
+++ b/resources/sksl/blend/BlendHue.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_hue(src, dst);
diff --git a/resources/sksl/blend/BlendLighten.sksl b/resources/sksl/blend/BlendLighten.sksl
index 31f0d29..b25e26c 100644
--- a/resources/sksl/blend/BlendLighten.sksl
+++ b/resources/sksl/blend/BlendLighten.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_lighten(src, dst);
diff --git a/resources/sksl/blend/BlendLuminosity.sksl b/resources/sksl/blend/BlendLuminosity.sksl
index 74f507b..3f635ef 100644
--- a/resources/sksl/blend/BlendLuminosity.sksl
+++ b/resources/sksl/blend/BlendLuminosity.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_luminosity(src, dst);
diff --git a/resources/sksl/blend/BlendModulate.sksl b/resources/sksl/blend/BlendModulate.sksl
index 6bc2f15..fa819eb 100644
--- a/resources/sksl/blend/BlendModulate.sksl
+++ b/resources/sksl/blend/BlendModulate.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_modulate(src, dst);
diff --git a/resources/sksl/blend/BlendMultiply.sksl b/resources/sksl/blend/BlendMultiply.sksl
index 57796fd..bb417f0 100644
--- a/resources/sksl/blend/BlendMultiply.sksl
+++ b/resources/sksl/blend/BlendMultiply.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_multiply(src, dst);
diff --git a/resources/sksl/blend/BlendOverlay.sksl b/resources/sksl/blend/BlendOverlay.sksl
index df602c4..43560e5 100644
--- a/resources/sksl/blend/BlendOverlay.sksl
+++ b/resources/sksl/blend/BlendOverlay.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_overlay(src, dst);
diff --git a/resources/sksl/blend/BlendPlus.sksl b/resources/sksl/blend/BlendPlus.sksl
index b640354..b2c8bf7 100644
--- a/resources/sksl/blend/BlendPlus.sksl
+++ b/resources/sksl/blend/BlendPlus.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_plus(src, dst);
diff --git a/resources/sksl/blend/BlendSaturation.sksl b/resources/sksl/blend/BlendSaturation.sksl
index 305e269..599602b 100644
--- a/resources/sksl/blend/BlendSaturation.sksl
+++ b/resources/sksl/blend/BlendSaturation.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_saturation(src, dst);
diff --git a/resources/sksl/blend/BlendScreen.sksl b/resources/sksl/blend/BlendScreen.sksl
index a044ab0..c7d9d40 100644
--- a/resources/sksl/blend/BlendScreen.sksl
+++ b/resources/sksl/blend/BlendScreen.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_screen(src, dst);
diff --git a/resources/sksl/blend/BlendSoftLight.sksl b/resources/sksl/blend/BlendSoftLight.sksl
index 2847c7e..3f0dbfe 100644
--- a/resources/sksl/blend/BlendSoftLight.sksl
+++ b/resources/sksl/blend/BlendSoftLight.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_soft_light(src, dst);
diff --git a/resources/sksl/blend/BlendSrc.sksl b/resources/sksl/blend/BlendSrc.sksl
index e5dbf0d..196bed5 100644
--- a/resources/sksl/blend/BlendSrc.sksl
+++ b/resources/sksl/blend/BlendSrc.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src(src, dst);
diff --git a/resources/sksl/blend/BlendSrcAtop.sksl b/resources/sksl/blend/BlendSrcAtop.sksl
index a518ce5..71fde88 100644
--- a/resources/sksl/blend/BlendSrcAtop.sksl
+++ b/resources/sksl/blend/BlendSrcAtop.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src_atop(src, dst);
diff --git a/resources/sksl/blend/BlendSrcIn.sksl b/resources/sksl/blend/BlendSrcIn.sksl
index 73544b8..db2d0d2 100644
--- a/resources/sksl/blend/BlendSrcIn.sksl
+++ b/resources/sksl/blend/BlendSrcIn.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src_in(src, dst);
diff --git a/resources/sksl/blend/BlendSrcOut.sksl b/resources/sksl/blend/BlendSrcOut.sksl
index 0caaa30..d3416b3 100644
--- a/resources/sksl/blend/BlendSrcOut.sksl
+++ b/resources/sksl/blend/BlendSrcOut.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src_out(src, dst);
diff --git a/resources/sksl/blend/BlendSrcOver.sksl b/resources/sksl/blend/BlendSrcOver.sksl
index c387d09..54475bb 100644
--- a/resources/sksl/blend/BlendSrcOver.sksl
+++ b/resources/sksl/blend/BlendSrcOver.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_src_over(src, dst);
diff --git a/resources/sksl/blend/BlendXor.sksl b/resources/sksl/blend/BlendXor.sksl
index 3cde08a..45d668b 100644
--- a/resources/sksl/blend/BlendXor.sksl
+++ b/resources/sksl/blend/BlendXor.sksl
@@ -1,6 +1,6 @@
 /*#pragma settings Default*/
 
-in half4 src, dst;
+uniform half4 src, dst;
 
 void main() {
     sk_FragColor = blend_xor(src, dst);
diff --git a/resources/sksl/intrinsics/Acos.sksl b/resources/sksl/intrinsics/Acos.sksl
index 3666819..bb6c91c 100644
--- a/resources/sksl/intrinsics/Acos.sksl
+++ b/resources/sksl/intrinsics/Acos.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = acos(a); }
+uniform half a; void main() { sk_FragColor.x = acos(a); }
diff --git a/resources/sksl/intrinsics/Acosh.sksl b/resources/sksl/intrinsics/Acosh.sksl
index f856e3e..103cf83 100644
--- a/resources/sksl/intrinsics/Acosh.sksl
+++ b/resources/sksl/intrinsics/Acosh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = acosh(a); }
+uniform half a; void main() { sk_FragColor.x = acosh(a); }
diff --git a/resources/sksl/intrinsics/Asin.sksl b/resources/sksl/intrinsics/Asin.sksl
index ea65cd1..5610af7 100644
--- a/resources/sksl/intrinsics/Asin.sksl
+++ b/resources/sksl/intrinsics/Asin.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = asin(a); }
+uniform half a; void main() { sk_FragColor.x = asin(a); }
diff --git a/resources/sksl/intrinsics/Asinh.sksl b/resources/sksl/intrinsics/Asinh.sksl
index f84d5a2..174105c 100644
--- a/resources/sksl/intrinsics/Asinh.sksl
+++ b/resources/sksl/intrinsics/Asinh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = asinh(a); }
+uniform half a; void main() { sk_FragColor.x = asinh(a); }
diff --git a/resources/sksl/intrinsics/Atan.sksl b/resources/sksl/intrinsics/Atan.sksl
index 6c82ced..b3780bd 100644
--- a/resources/sksl/intrinsics/Atan.sksl
+++ b/resources/sksl/intrinsics/Atan.sksl
@@ -1,5 +1,5 @@
-in half a, b;
-in half4 c, d;
+uniform half a, b;
+uniform half4 c, d;
 void main() {
     sk_FragColor.x = atan(a);
     sk_FragColor.x = atan(a, b);
diff --git a/resources/sksl/intrinsics/Atanh.sksl b/resources/sksl/intrinsics/Atanh.sksl
index be1e997..c5fc0b3 100644
--- a/resources/sksl/intrinsics/Atanh.sksl
+++ b/resources/sksl/intrinsics/Atanh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = atanh(a); }
+uniform half a; void main() { sk_FragColor.x = atanh(a); }
diff --git a/resources/sksl/intrinsics/BitCount.sksl b/resources/sksl/intrinsics/BitCount.sksl
index 7b35059..5f85cdb 100644
--- a/resources/sksl/intrinsics/BitCount.sksl
+++ b/resources/sksl/intrinsics/BitCount.sksl
@@ -1,5 +1,5 @@
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = half(bitCount(a));
     sk_FragColor.y = half(bitCount(b));
diff --git a/resources/sksl/intrinsics/Cos.sksl b/resources/sksl/intrinsics/Cos.sksl
index afd9c00..9f47679 100644
--- a/resources/sksl/intrinsics/Cos.sksl
+++ b/resources/sksl/intrinsics/Cos.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = cos(a); }
+uniform half a; void main() { sk_FragColor.x = cos(a); }
diff --git a/resources/sksl/intrinsics/Cosh.sksl b/resources/sksl/intrinsics/Cosh.sksl
index 8ebb3fd..51941d1 100644
--- a/resources/sksl/intrinsics/Cosh.sksl
+++ b/resources/sksl/intrinsics/Cosh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = cosh(a); }
+uniform half a; void main() { sk_FragColor.x = cosh(a); }
diff --git a/resources/sksl/intrinsics/Cross.sksl b/resources/sksl/intrinsics/Cross.sksl
index e62c1a9..d02de89 100644
--- a/resources/sksl/intrinsics/Cross.sksl
+++ b/resources/sksl/intrinsics/Cross.sksl
@@ -1 +1 @@
-in half2 a, b; void main() { sk_FragColor.x = cross(a, b); }
+uniform half2 a, b; void main() { sk_FragColor.x = cross(a, b); }
diff --git a/resources/sksl/intrinsics/DFdx.sksl b/resources/sksl/intrinsics/DFdx.sksl
index 24440a9..4b0d907 100644
--- a/resources/sksl/intrinsics/DFdx.sksl
+++ b/resources/sksl/intrinsics/DFdx.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = dFdx(a); }
+uniform half a; void main() { sk_FragColor.x = dFdx(a); }
diff --git a/resources/sksl/intrinsics/DFdy.sksl b/resources/sksl/intrinsics/DFdy.sksl
index 0985218..717fe8f 100644
--- a/resources/sksl/intrinsics/DFdy.sksl
+++ b/resources/sksl/intrinsics/DFdy.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = dFdy(a); }
+uniform half a; void main() { sk_FragColor.x = dFdy(a); }
diff --git a/resources/sksl/intrinsics/Degrees.sksl b/resources/sksl/intrinsics/Degrees.sksl
index c1a6f7b..5bf9504 100644
--- a/resources/sksl/intrinsics/Degrees.sksl
+++ b/resources/sksl/intrinsics/Degrees.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = degrees(a); }
+uniform half a; void main() { sk_FragColor.x = degrees(a); }
diff --git a/resources/sksl/intrinsics/Distance.sksl b/resources/sksl/intrinsics/Distance.sksl
index 77b9f60..d0c8483 100644
--- a/resources/sksl/intrinsics/Distance.sksl
+++ b/resources/sksl/intrinsics/Distance.sksl
@@ -1,5 +1,5 @@
-in half a, b;
-in half4 c, d;
+uniform half a, b;
+uniform half4 c, d;
 void main() {
     sk_FragColor.x = distance(a, b);
     sk_FragColor.x = distance(c, d);
diff --git a/resources/sksl/intrinsics/Dot.sksl b/resources/sksl/intrinsics/Dot.sksl
index 3d45c66..0d60c75 100644
--- a/resources/sksl/intrinsics/Dot.sksl
+++ b/resources/sksl/intrinsics/Dot.sksl
@@ -1,5 +1,5 @@
-in half a, b;
-in half4 c, d;
+uniform half a, b;
+uniform half4 c, d;
 void main() {
     sk_FragColor.x = dot(a, b);
     sk_FragColor.x = dot(c, d);
diff --git a/resources/sksl/intrinsics/Equal.sksl b/resources/sksl/intrinsics/Equal.sksl
index 4d9f050..02151b8 100644
--- a/resources/sksl/intrinsics/Equal.sksl
+++ b/resources/sksl/intrinsics/Equal.sksl
@@ -1 +1 @@
-in half4 a, b; void main() { sk_FragColor.x = equal(a, b).x ? 1 : 0; }
+uniform half4 a, b; void main() { sk_FragColor.x = equal(a, b).x ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/Exp.sksl b/resources/sksl/intrinsics/Exp.sksl
index fff4614..ba122a3 100644
--- a/resources/sksl/intrinsics/Exp.sksl
+++ b/resources/sksl/intrinsics/Exp.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = exp(a); }
+uniform half a; void main() { sk_FragColor.x = exp(a); }
diff --git a/resources/sksl/intrinsics/Exp2.sksl b/resources/sksl/intrinsics/Exp2.sksl
index 73ab8fb..a8c5e4e 100644
--- a/resources/sksl/intrinsics/Exp2.sksl
+++ b/resources/sksl/intrinsics/Exp2.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = exp2(a); }
+uniform half a; void main() { sk_FragColor.x = exp2(a); }
diff --git a/resources/sksl/intrinsics/FaceForward.sksl b/resources/sksl/intrinsics/FaceForward.sksl
index 4271590..d178889 100644
--- a/resources/sksl/intrinsics/FaceForward.sksl
+++ b/resources/sksl/intrinsics/FaceForward.sksl
@@ -1,5 +1,5 @@
-in half a, b, c;
-in half4 d, e, f;
+uniform half a, b, c;
+uniform half4 d, e, f;
 void main() {
     sk_FragColor.x = faceforward(a, b, c);
     sk_FragColor = faceforward(d, e, f);
diff --git a/resources/sksl/intrinsics/FindLSB.sksl b/resources/sksl/intrinsics/FindLSB.sksl
index 8e06660..8a8955a 100644
--- a/resources/sksl/intrinsics/FindLSB.sksl
+++ b/resources/sksl/intrinsics/FindLSB.sksl
@@ -1,5 +1,5 @@
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = half(findLSB(a));
     sk_FragColor.y = half(findLSB(b));
diff --git a/resources/sksl/intrinsics/FindMSB.sksl b/resources/sksl/intrinsics/FindMSB.sksl
index 97f6713..66b2dd3 100644
--- a/resources/sksl/intrinsics/FindMSB.sksl
+++ b/resources/sksl/intrinsics/FindMSB.sksl
@@ -1,5 +1,5 @@
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = half(findMSB(a));
     sk_FragColor.y = half(findMSB(b));
diff --git a/resources/sksl/intrinsics/FloatBitsToInt.sksl b/resources/sksl/intrinsics/FloatBitsToInt.sksl
index 33f4e0c..cf6cb3a 100644
--- a/resources/sksl/intrinsics/FloatBitsToInt.sksl
+++ b/resources/sksl/intrinsics/FloatBitsToInt.sksl
@@ -1 +1 @@
-in float a; void main() { sk_FragColor.x = half(floatBitsToInt(a)); }
+uniform float a; void main() { sk_FragColor.x = half(floatBitsToInt(a)); }
diff --git a/resources/sksl/intrinsics/FloatBitsToUint.sksl b/resources/sksl/intrinsics/FloatBitsToUint.sksl
index 3cb4100..94e3d19 100644
--- a/resources/sksl/intrinsics/FloatBitsToUint.sksl
+++ b/resources/sksl/intrinsics/FloatBitsToUint.sksl
@@ -1 +1 @@
-in float a; void main() { sk_FragColor.x = half(floatBitsToUint(a)); }
+uniform float a; void main() { sk_FragColor.x = half(floatBitsToUint(a)); }
diff --git a/resources/sksl/intrinsics/Fma.sksl b/resources/sksl/intrinsics/Fma.sksl
index 1e6ec70..7732a1e 100644
--- a/resources/sksl/intrinsics/Fma.sksl
+++ b/resources/sksl/intrinsics/Fma.sksl
@@ -1 +1 @@
-in half a, b, c; void main() { sk_FragColor.x = fma(a, b, c); }
+uniform half a, b, c; void main() { sk_FragColor.x = fma(a, b, c); }
diff --git a/resources/sksl/intrinsics/Fract.sksl b/resources/sksl/intrinsics/Fract.sksl
index 91be33a..a400dde 100644
--- a/resources/sksl/intrinsics/Fract.sksl
+++ b/resources/sksl/intrinsics/Fract.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = fract(a); }
+uniform half a; void main() { sk_FragColor.x = fract(a); }
diff --git a/resources/sksl/intrinsics/Fwidth.sksl b/resources/sksl/intrinsics/Fwidth.sksl
index e183464..4cf9ec6 100644
--- a/resources/sksl/intrinsics/Fwidth.sksl
+++ b/resources/sksl/intrinsics/Fwidth.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = fwidth(a); }
+uniform half a; void main() { sk_FragColor.x = fwidth(a); }
diff --git a/resources/sksl/intrinsics/GreaterThan.sksl b/resources/sksl/intrinsics/GreaterThan.sksl
index d7d2e7c..1f6b1a7 100644
--- a/resources/sksl/intrinsics/GreaterThan.sksl
+++ b/resources/sksl/intrinsics/GreaterThan.sksl
@@ -1 +1 @@
-in half4 a, b; void main() { sk_FragColor.x = greaterThan(a, b).x ? 1 : 0; }
+uniform half4 a, b; void main() { sk_FragColor.x = greaterThan(a, b).x ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/GreaterThanEqual.sksl b/resources/sksl/intrinsics/GreaterThanEqual.sksl
index d11b0d1..46df43c 100644
--- a/resources/sksl/intrinsics/GreaterThanEqual.sksl
+++ b/resources/sksl/intrinsics/GreaterThanEqual.sksl
@@ -1 +1 @@
-in half4 a, b; void main() { sk_FragColor.x = greaterThanEqual(a, b).x ? 1 : 0; }
+uniform half4 a, b; void main() { sk_FragColor.x = greaterThanEqual(a, b).x ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/IntBitsToFloat.sksl b/resources/sksl/intrinsics/IntBitsToFloat.sksl
index 775b3d4..e25b695 100644
--- a/resources/sksl/intrinsics/IntBitsToFloat.sksl
+++ b/resources/sksl/intrinsics/IntBitsToFloat.sksl
@@ -1 +1 @@
-in int a; void main() { sk_FragColor.x = half(intBitsToFloat(a)); }
+uniform int a; void main() { sk_FragColor.x = half(intBitsToFloat(a)); }
diff --git a/resources/sksl/intrinsics/Inversesqrt.sksl b/resources/sksl/intrinsics/Inversesqrt.sksl
index 4ea4801..50d428c 100644
--- a/resources/sksl/intrinsics/Inversesqrt.sksl
+++ b/resources/sksl/intrinsics/Inversesqrt.sksl
@@ -1 +1 @@
-in float a; void main() { sk_FragColor.x = half(inversesqrt(a)); }
+uniform float a; void main() { sk_FragColor.x = half(inversesqrt(a)); }
diff --git a/resources/sksl/intrinsics/IsInf.sksl b/resources/sksl/intrinsics/IsInf.sksl
index 0326831..377b124 100644
--- a/resources/sksl/intrinsics/IsInf.sksl
+++ b/resources/sksl/intrinsics/IsInf.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = isinf(a) ? 1 : 0; }
+uniform half a; void main() { sk_FragColor.x = isinf(a) ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/IsNan.sksl b/resources/sksl/intrinsics/IsNan.sksl
index e9627a9..f550f29 100644
--- a/resources/sksl/intrinsics/IsNan.sksl
+++ b/resources/sksl/intrinsics/IsNan.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = isnan(a) ? 1 : 0; }
+uniform half a; void main() { sk_FragColor.x = isnan(a) ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/Ldexp.sksl b/resources/sksl/intrinsics/Ldexp.sksl
index 08896b0..e00859a 100644
--- a/resources/sksl/intrinsics/Ldexp.sksl
+++ b/resources/sksl/intrinsics/Ldexp.sksl
@@ -1 +1 @@
-in float a; int b; void main() { sk_FragColor.x = half(ldexp(a, b)); }
+uniform float a; int b; void main() { sk_FragColor.x = half(ldexp(a, b)); }
diff --git a/resources/sksl/intrinsics/Length.sksl b/resources/sksl/intrinsics/Length.sksl
index 7bc6b63..8ac305c 100644
--- a/resources/sksl/intrinsics/Length.sksl
+++ b/resources/sksl/intrinsics/Length.sksl
@@ -1,5 +1,5 @@
-in half a;
-in half4 b;
+uniform half a;
+uniform half4 b;
 void main() {
     sk_FragColor.x = length(a);
     sk_FragColor.x = length(b);
diff --git a/resources/sksl/intrinsics/LessThan.sksl b/resources/sksl/intrinsics/LessThan.sksl
index 7159e0b..432c07a 100644
--- a/resources/sksl/intrinsics/LessThan.sksl
+++ b/resources/sksl/intrinsics/LessThan.sksl
@@ -1,6 +1,6 @@
-in half4 a, b;
-in uint2 c, d;
-in int3 e, f;
+uniform half4 a, b;
+uniform uint2 c, d;
+uniform int3 e, f;
 void main() {
     sk_FragColor.x = lessThan(a, b).x ? 1 : 0;
     sk_FragColor.y = lessThan(c, d).y ? 1 : 0;
diff --git a/resources/sksl/intrinsics/LessThanEqual.sksl b/resources/sksl/intrinsics/LessThanEqual.sksl
index 0998a96..bb48db2 100644
--- a/resources/sksl/intrinsics/LessThanEqual.sksl
+++ b/resources/sksl/intrinsics/LessThanEqual.sksl
@@ -1 +1 @@
-in half4 a, b; void main() { sk_FragColor.x = lessThanEqual(a, b).x ? 1 : 0; }
+uniform half4 a, b; void main() { sk_FragColor.x = lessThanEqual(a, b).x ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/Log.sksl b/resources/sksl/intrinsics/Log.sksl
index 9e49212..d00dd93 100644
--- a/resources/sksl/intrinsics/Log.sksl
+++ b/resources/sksl/intrinsics/Log.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = log(a); }
+uniform half a; void main() { sk_FragColor.x = log(a); }
diff --git a/resources/sksl/intrinsics/Log2.sksl b/resources/sksl/intrinsics/Log2.sksl
index 6f55124..76592d6 100644
--- a/resources/sksl/intrinsics/Log2.sksl
+++ b/resources/sksl/intrinsics/Log2.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = log2(a); }
+uniform half a; void main() { sk_FragColor.x = log2(a); }
diff --git a/resources/sksl/intrinsics/Mod.sksl b/resources/sksl/intrinsics/Mod.sksl
index 3edde96..278cb95 100644
--- a/resources/sksl/intrinsics/Mod.sksl
+++ b/resources/sksl/intrinsics/Mod.sksl
@@ -1,5 +1,5 @@
-in half a, b;
-in half4 c, d;
+uniform half a, b;
+uniform half4 c, d;
 void main() {
     sk_FragColor.x = mod(a, b);
     sk_FragColor = mod(c, b);
diff --git a/resources/sksl/intrinsics/Normalize.sksl b/resources/sksl/intrinsics/Normalize.sksl
index 4f48590..eca9bca 100644
--- a/resources/sksl/intrinsics/Normalize.sksl
+++ b/resources/sksl/intrinsics/Normalize.sksl
@@ -1,5 +1,5 @@
-in half a;
-in half4 b;
+uniform half a;
+uniform half4 b;
 void main() {
     sk_FragColor.x = normalize(a);
     sk_FragColor = normalize(b);
diff --git a/resources/sksl/intrinsics/NotEqual.sksl b/resources/sksl/intrinsics/NotEqual.sksl
index efd0a50..b7830a7 100644
--- a/resources/sksl/intrinsics/NotEqual.sksl
+++ b/resources/sksl/intrinsics/NotEqual.sksl
@@ -1 +1 @@
-in half4 a, b; void main() { sk_FragColor.x = notEqual(a, b).x ? 1 : 0; }
+uniform half4 a, b; void main() { sk_FragColor.x = notEqual(a, b).x ? 1 : 0; }
diff --git a/resources/sksl/intrinsics/OuterProduct.sksl b/resources/sksl/intrinsics/OuterProduct.sksl
index 9cf20c8..a45b1c7 100644
--- a/resources/sksl/intrinsics/OuterProduct.sksl
+++ b/resources/sksl/intrinsics/OuterProduct.sksl
@@ -1,9 +1,9 @@
-in half2 h2;
-in half3 h3;
-in half4 h4;
-in float2 f2;
-in float3 f3;
-in float4 f4;
+uniform half2 h2;
+uniform half3 h3;
+uniform half4 h4;
+uniform float2 f2;
+uniform float3 f3;
+uniform float4 f4;
 void main() {
     sk_FragColor = half4(outerProduct(f2, f2)[1].xyyy);
     sk_FragColor = half4(outerProduct(f3, f3)[2].xyzz);
diff --git a/resources/sksl/intrinsics/Pack.sksl b/resources/sksl/intrinsics/Pack.sksl
index b371990..2e825aa 100644
--- a/resources/sksl/intrinsics/Pack.sksl
+++ b/resources/sksl/intrinsics/Pack.sksl
@@ -1,5 +1,5 @@
-in half2 a;
-in half4 b;
+uniform half2 a;
+uniform half4 b;
 void main() {
     sk_FragColor.x = half(packHalf2x16(a));
     sk_FragColor.x = half(packUnorm2x16(a));
diff --git a/resources/sksl/intrinsics/Pow.sksl b/resources/sksl/intrinsics/Pow.sksl
index 72e2468..74c1e1e 100644
--- a/resources/sksl/intrinsics/Pow.sksl
+++ b/resources/sksl/intrinsics/Pow.sksl
@@ -1 +1 @@
-in half a, b; void main() { sk_FragColor.x = pow(a, b); }
+uniform half a, b; void main() { sk_FragColor.x = pow(a, b); }
diff --git a/resources/sksl/intrinsics/Radians.sksl b/resources/sksl/intrinsics/Radians.sksl
index b788bab..922bd07 100644
--- a/resources/sksl/intrinsics/Radians.sksl
+++ b/resources/sksl/intrinsics/Radians.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = radians(a); }
+uniform half a; void main() { sk_FragColor.x = radians(a); }
diff --git a/resources/sksl/intrinsics/Reflect.sksl b/resources/sksl/intrinsics/Reflect.sksl
index 5eb8715..5edcc78 100644
--- a/resources/sksl/intrinsics/Reflect.sksl
+++ b/resources/sksl/intrinsics/Reflect.sksl
@@ -1,5 +1,5 @@
-in half a, b;
-in half4 c, d;
+uniform half a, b;
+uniform half4 c, d;
 void main() {
     sk_FragColor.x = reflect(a, b);
     sk_FragColor = reflect(c, d);
diff --git a/resources/sksl/intrinsics/Refract.sksl b/resources/sksl/intrinsics/Refract.sksl
index 2fa0ffd..ba04c4d 100644
--- a/resources/sksl/intrinsics/Refract.sksl
+++ b/resources/sksl/intrinsics/Refract.sksl
@@ -1,5 +1,5 @@
-in half a, b, c;
-in half4 d, e;
+uniform half a, b, c;
+uniform half4 d, e;
 void main() {
     sk_FragColor.x = refract(a, b, c);
     sk_FragColor = refract(d, e, c);
diff --git a/resources/sksl/intrinsics/Round.sksl b/resources/sksl/intrinsics/Round.sksl
index 266dd8a..49de442 100644
--- a/resources/sksl/intrinsics/Round.sksl
+++ b/resources/sksl/intrinsics/Round.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = round(a); }
+uniform half a; void main() { sk_FragColor.x = round(a); }
diff --git a/resources/sksl/intrinsics/RoundEven.sksl b/resources/sksl/intrinsics/RoundEven.sksl
index 0e28578..c196392 100644
--- a/resources/sksl/intrinsics/RoundEven.sksl
+++ b/resources/sksl/intrinsics/RoundEven.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = roundEven(a); }
+uniform half a; void main() { sk_FragColor.x = roundEven(a); }
diff --git a/resources/sksl/intrinsics/Saturate.sksl b/resources/sksl/intrinsics/Saturate.sksl
index 2d576b0..98fa3f5 100644
--- a/resources/sksl/intrinsics/Saturate.sksl
+++ b/resources/sksl/intrinsics/Saturate.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = saturate(a); }
+uniform half a; void main() { sk_FragColor.x = saturate(a); }
diff --git a/resources/sksl/intrinsics/Sin.sksl b/resources/sksl/intrinsics/Sin.sksl
index ef48a10..350281e 100644
--- a/resources/sksl/intrinsics/Sin.sksl
+++ b/resources/sksl/intrinsics/Sin.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = sin(a); }
+uniform half a; void main() { sk_FragColor.x = sin(a); }
diff --git a/resources/sksl/intrinsics/Sinh.sksl b/resources/sksl/intrinsics/Sinh.sksl
index 1645a36..f7d8f16 100644
--- a/resources/sksl/intrinsics/Sinh.sksl
+++ b/resources/sksl/intrinsics/Sinh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = sinh(a); }
+uniform half a; void main() { sk_FragColor.x = sinh(a); }
diff --git a/resources/sksl/intrinsics/Smoothstep.sksl b/resources/sksl/intrinsics/Smoothstep.sksl
index b4911ca..41660bd 100644
--- a/resources/sksl/intrinsics/Smoothstep.sksl
+++ b/resources/sksl/intrinsics/Smoothstep.sksl
@@ -1 +1 @@
-in half a, b, c; void main() { sk_FragColor.x = smoothstep(a, b, c); }
+uniform half a, b, c; void main() { sk_FragColor.x = smoothstep(a, b, c); }
diff --git a/resources/sksl/intrinsics/Sqrt.sksl b/resources/sksl/intrinsics/Sqrt.sksl
index 3c30edd..48834c6 100644
--- a/resources/sksl/intrinsics/Sqrt.sksl
+++ b/resources/sksl/intrinsics/Sqrt.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = sqrt(a); }
+uniform half a; void main() { sk_FragColor.x = sqrt(a); }
diff --git a/resources/sksl/intrinsics/Step.sksl b/resources/sksl/intrinsics/Step.sksl
index 0844b5c..9140bea 100644
--- a/resources/sksl/intrinsics/Step.sksl
+++ b/resources/sksl/intrinsics/Step.sksl
@@ -1 +1 @@
-in half a, b; void main() { sk_FragColor.x = step(a, b); }
+uniform half a, b; void main() { sk_FragColor.x = step(a, b); }
diff --git a/resources/sksl/intrinsics/Tan.sksl b/resources/sksl/intrinsics/Tan.sksl
index eb56479..73e9b05 100644
--- a/resources/sksl/intrinsics/Tan.sksl
+++ b/resources/sksl/intrinsics/Tan.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = tan(a); }
+uniform half a; void main() { sk_FragColor.x = tan(a); }
diff --git a/resources/sksl/intrinsics/Tanh.sksl b/resources/sksl/intrinsics/Tanh.sksl
index 0810d64..3c3234a 100644
--- a/resources/sksl/intrinsics/Tanh.sksl
+++ b/resources/sksl/intrinsics/Tanh.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = tanh(a); }
+uniform half a; void main() { sk_FragColor.x = tanh(a); }
diff --git a/resources/sksl/intrinsics/Trunc.sksl b/resources/sksl/intrinsics/Trunc.sksl
index 5dbc17e..8a9deec 100644
--- a/resources/sksl/intrinsics/Trunc.sksl
+++ b/resources/sksl/intrinsics/Trunc.sksl
@@ -1 +1 @@
-in half a; void main() { sk_FragColor.x = trunc(a); }
+uniform half a; void main() { sk_FragColor.x = trunc(a); }
diff --git a/resources/sksl/intrinsics/UintBitsToFloat.sksl b/resources/sksl/intrinsics/UintBitsToFloat.sksl
index 0e5aa2a..90ac67b 100644
--- a/resources/sksl/intrinsics/UintBitsToFloat.sksl
+++ b/resources/sksl/intrinsics/UintBitsToFloat.sksl
@@ -1 +1 @@
-in uint a; void main() { sk_FragColor.x = half(uintBitsToFloat(a)); }
+uniform uint a; void main() { sk_FragColor.x = half(uintBitsToFloat(a)); }
diff --git a/resources/sksl/intrinsics/Unpack.sksl b/resources/sksl/intrinsics/Unpack.sksl
index a80e164..b1cc1fd 100644
--- a/resources/sksl/intrinsics/Unpack.sksl
+++ b/resources/sksl/intrinsics/Unpack.sksl
@@ -1,4 +1,4 @@
-in uint a;
+uniform uint a;
 void main() {
     sk_FragColor.xy = half2(unpackHalf2x16(a));
     sk_FragColor.xy = half2(unpackUnorm2x16(a));
diff --git a/resources/sksl/shared/NoFragCoordsPos.vert b/resources/sksl/shared/NoFragCoordsPos.vert
index 308a75d..374fe57 100644
--- a/resources/sksl/shared/NoFragCoordsPos.vert
+++ b/resources/sksl/shared/NoFragCoordsPos.vert
@@ -1,6 +1,6 @@
 /*#pragma settings CannotUseFragCoord*/
 
-in float4 pos;
+layout(location=0) in float4 pos;
 
 void main() {
     sk_Position = pos;
diff --git a/resources/sksl/shared/NoFragCoordsPosRT.vert b/resources/sksl/shared/NoFragCoordsPosRT.vert
index 1395247..49796a1 100644
--- a/resources/sksl/shared/NoFragCoordsPosRT.vert
+++ b/resources/sksl/shared/NoFragCoordsPosRT.vert
@@ -1,7 +1,7 @@
 /*#pragma settings CannotUseFragCoord*/
 
 layout(set=0) uniform float4 sk_RTAdjust;
-in float4 pos;
+layout(location=0) in float4 pos;
 
 void main() {
     sk_Position = pos;
diff --git a/tests/sksl/blend/BlendClear.asm.frag b/tests/sksl/blend/BlendClear.asm.frag
index 57d2af4..76080d7 100644
--- a/tests/sksl/blend/BlendClear.asm.frag
+++ b/tests/sksl/blend/BlendClear.asm.frag
@@ -1,25 +1,26 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -27,9 +28,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_0 = OpConstant %float 0
@@ -39,5 +40,3 @@
 OpStore %sk_FragColor %17
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendClear.glsl b/tests/sksl/blend/BlendClear.glsl
index 0051317..a00c625 100644
--- a/tests/sksl/blend/BlendClear.glsl
+++ b/tests/sksl/blend/BlendClear.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4(0.0);
 }
diff --git a/tests/sksl/blend/BlendClear.metal b/tests/sksl/blend/BlendClear.metal
index 1ba1c3d..de0566f 100644
--- a/tests/sksl/blend/BlendClear.metal
+++ b/tests/sksl/blend/BlendClear.metal
@@ -1,12 +1,14 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
     _out.sk_FragColor = float4(0.0);
diff --git a/tests/sksl/blend/BlendClearStandaloneSettings.glsl b/tests/sksl/blend/BlendClearStandaloneSettings.glsl
index 5c7e82c..b987d21 100644
--- a/tests/sksl/blend/BlendClearStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendClearStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4(0.0);
 }
diff --git a/tests/sksl/blend/BlendColor.asm.frag b/tests/sksl/blend/BlendColor.asm.frag
index 87ec11b..c98c12f 100644
--- a/tests/sksl/blend/BlendColor.asm.frag
+++ b/tests/sksl/blend/BlendColor.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpName %_0_alpha "_0_alpha"
 OpName %_1_sda "_1_sda"
@@ -29,68 +25,73 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %22 RelaxedPrecision
 OpDecorate %26 RelaxedPrecision
 OpDecorate %28 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %46 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %67 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
-OpDecorate %85 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
 OpDecorate %99 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
 OpDecorate %104 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
 OpDecorate %132 RelaxedPrecision
 OpDecorate %133 RelaxedPrecision
+OpDecorate %134 RelaxedPrecision
 OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
-OpDecorate %140 RelaxedPrecision
 OpDecorate %141 RelaxedPrecision
 OpDecorate %142 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
 OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
+OpDecorate %165 RelaxedPrecision
+OpDecorate %166 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -98,18 +99,22 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %v3float = OpTypeVector %float 3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%43 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%53 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %false = OpConstantFalse %bool
 %float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
@@ -126,151 +131,159 @@
 %_8_d = OpVariable %_ptr_Function_float Function
 %_9_n = OpVariable %_ptr_Function_v3float Function
 %_10_d = OpVariable %_ptr_Function_float Function
-%18 = OpLoad %v4float %dst
-%19 = OpCompositeExtract %float %18 3
-%20 = OpLoad %v4float %src
-%21 = OpCompositeExtract %float %20 3
-%22 = OpFMul %float %19 %21
-OpStore %_0_alpha %22
-%26 = OpLoad %v4float %src
-%27 = OpVectorShuffle %v3float %26 %26 0 1 2
-%28 = OpLoad %v4float %dst
-%29 = OpCompositeExtract %float %28 3
-%30 = OpVectorTimesScalar %v3float %27 %29
-OpStore %_1_sda %30
-%32 = OpLoad %v4float %dst
-%33 = OpVectorShuffle %v3float %32 %32 0 1 2
-%34 = OpLoad %v4float %src
-%35 = OpCompositeExtract %float %34 3
-%36 = OpVectorTimesScalar %v3float %33 %35
-OpStore %_2_dsa %36
-%44 = OpLoad %v3float %_2_dsa
-%39 = OpDot %float %43 %44
-OpStore %_4_lum %39
-%46 = OpLoad %float %_4_lum
-%48 = OpLoad %v3float %_1_sda
-%47 = OpDot %float %43 %48
-%49 = OpFSub %float %46 %47
-%50 = OpLoad %v3float %_1_sda
-%51 = OpCompositeConstruct %v3float %49 %49 %49
-%52 = OpFAdd %v3float %51 %50
-OpStore %_5_result %52
-%56 = OpLoad %v3float %_5_result
-%57 = OpCompositeExtract %float %56 0
-%58 = OpLoad %v3float %_5_result
-%59 = OpCompositeExtract %float %58 1
-%55 = OpExtInst %float %1 FMin %57 %59
-%60 = OpLoad %v3float %_5_result
-%61 = OpCompositeExtract %float %60 2
-%54 = OpExtInst %float %1 FMin %55 %61
-OpStore %_6_minComp %54
-%65 = OpLoad %v3float %_5_result
-%66 = OpCompositeExtract %float %65 0
-%67 = OpLoad %v3float %_5_result
-%68 = OpCompositeExtract %float %67 1
-%64 = OpExtInst %float %1 FMax %66 %68
-%69 = OpLoad %v3float %_5_result
-%70 = OpCompositeExtract %float %69 2
-%63 = OpExtInst %float %1 FMax %64 %70
-OpStore %_7_maxComp %63
-%72 = OpLoad %float %_6_minComp
-%74 = OpFOrdLessThan %bool %72 %float_0
-OpSelectionMerge %76 None
-OpBranchConditional %74 %75 %76
-%75 = OpLabel
-%77 = OpLoad %float %_4_lum
-%78 = OpLoad %float %_6_minComp
-%79 = OpFOrdNotEqual %bool %77 %78
-OpBranch %76
-%76 = OpLabel
-%80 = OpPhi %bool %false %15 %79 %75
-OpSelectionMerge %82 None
-OpBranchConditional %80 %81 %82
-%81 = OpLabel
-%84 = OpLoad %float %_4_lum
-%85 = OpLoad %float %_6_minComp
-%86 = OpFSub %float %84 %85
-OpStore %_8_d %86
+%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%22 = OpLoad %v4float %18
+%23 = OpCompositeExtract %float %22 3
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%26 = OpLoad %v4float %24
+%27 = OpCompositeExtract %float %26 3
+%28 = OpFMul %float %23 %27
+OpStore %_0_alpha %28
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %32
+%34 = OpVectorShuffle %v3float %33 %33 0 1 2
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%36 = OpLoad %v4float %35
+%37 = OpCompositeExtract %float %36 3
+%38 = OpVectorTimesScalar %v3float %34 %37
+OpStore %_1_sda %38
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%41 = OpLoad %v4float %40
+%42 = OpVectorShuffle %v3float %41 %41 0 1 2
+%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%44 = OpLoad %v4float %43
+%45 = OpCompositeExtract %float %44 3
+%46 = OpVectorTimesScalar %v3float %42 %45
+OpStore %_2_dsa %46
+%54 = OpLoad %v3float %_2_dsa
+%49 = OpDot %float %53 %54
+OpStore %_4_lum %49
+%56 = OpLoad %float %_4_lum
+%58 = OpLoad %v3float %_1_sda
+%57 = OpDot %float %53 %58
+%59 = OpFSub %float %56 %57
+%60 = OpLoad %v3float %_1_sda
+%61 = OpCompositeConstruct %v3float %59 %59 %59
+%62 = OpFAdd %v3float %61 %60
+OpStore %_5_result %62
+%66 = OpLoad %v3float %_5_result
+%67 = OpCompositeExtract %float %66 0
+%68 = OpLoad %v3float %_5_result
+%69 = OpCompositeExtract %float %68 1
+%65 = OpExtInst %float %1 FMin %67 %69
+%70 = OpLoad %v3float %_5_result
+%71 = OpCompositeExtract %float %70 2
+%64 = OpExtInst %float %1 FMin %65 %71
+OpStore %_6_minComp %64
+%75 = OpLoad %v3float %_5_result
+%76 = OpCompositeExtract %float %75 0
+%77 = OpLoad %v3float %_5_result
+%78 = OpCompositeExtract %float %77 1
+%74 = OpExtInst %float %1 FMax %76 %78
+%79 = OpLoad %v3float %_5_result
+%80 = OpCompositeExtract %float %79 2
+%73 = OpExtInst %float %1 FMax %74 %80
+OpStore %_7_maxComp %73
+%82 = OpLoad %float %_6_minComp
+%84 = OpFOrdLessThan %bool %82 %float_0
+OpSelectionMerge %86 None
+OpBranchConditional %84 %85 %86
+%85 = OpLabel
 %87 = OpLoad %float %_4_lum
-%88 = OpLoad %v3float %_5_result
-%89 = OpLoad %float %_4_lum
-%90 = OpCompositeConstruct %v3float %89 %89 %89
-%91 = OpFSub %v3float %88 %90
-%92 = OpLoad %float %_4_lum
-%93 = OpLoad %float %_8_d
-%94 = OpFDiv %float %92 %93
-%95 = OpVectorTimesScalar %v3float %91 %94
-%96 = OpCompositeConstruct %v3float %87 %87 %87
-%97 = OpFAdd %v3float %96 %95
-OpStore %_5_result %97
-OpBranch %82
-%82 = OpLabel
-%98 = OpLoad %float %_7_maxComp
-%99 = OpLoad %float %_0_alpha
-%100 = OpFOrdGreaterThan %bool %98 %99
-OpSelectionMerge %102 None
-OpBranchConditional %100 %101 %102
-%101 = OpLabel
-%103 = OpLoad %float %_7_maxComp
-%104 = OpLoad %float %_4_lum
-%105 = OpFOrdNotEqual %bool %103 %104
-OpBranch %102
-%102 = OpLabel
-%106 = OpPhi %bool %false %82 %105 %101
-OpSelectionMerge %109 None
-OpBranchConditional %106 %107 %108
-%107 = OpLabel
-%111 = OpLoad %v3float %_5_result
-%112 = OpLoad %float %_4_lum
-%113 = OpCompositeConstruct %v3float %112 %112 %112
-%114 = OpFSub %v3float %111 %113
-%115 = OpLoad %float %_0_alpha
-%116 = OpLoad %float %_4_lum
-%117 = OpFSub %float %115 %116
-%118 = OpVectorTimesScalar %v3float %114 %117
-OpStore %_9_n %118
-%120 = OpLoad %float %_7_maxComp
-%121 = OpLoad %float %_4_lum
-%122 = OpFSub %float %120 %121
-OpStore %_10_d %122
-%123 = OpLoad %float %_4_lum
-%124 = OpLoad %v3float %_9_n
-%125 = OpLoad %float %_10_d
-%127 = OpFDiv %float %float_1 %125
+%88 = OpLoad %float %_6_minComp
+%89 = OpFOrdNotEqual %bool %87 %88
+OpBranch %86
+%86 = OpLabel
+%90 = OpPhi %bool %false %15 %89 %85
+OpSelectionMerge %92 None
+OpBranchConditional %90 %91 %92
+%91 = OpLabel
+%94 = OpLoad %float %_4_lum
+%95 = OpLoad %float %_6_minComp
+%96 = OpFSub %float %94 %95
+OpStore %_8_d %96
+%97 = OpLoad %float %_4_lum
+%98 = OpLoad %v3float %_5_result
+%99 = OpLoad %float %_4_lum
+%100 = OpCompositeConstruct %v3float %99 %99 %99
+%101 = OpFSub %v3float %98 %100
+%102 = OpLoad %float %_4_lum
+%103 = OpLoad %float %_8_d
+%104 = OpFDiv %float %102 %103
+%105 = OpVectorTimesScalar %v3float %101 %104
+%106 = OpCompositeConstruct %v3float %97 %97 %97
+%107 = OpFAdd %v3float %106 %105
+OpStore %_5_result %107
+OpBranch %92
+%92 = OpLabel
+%108 = OpLoad %float %_7_maxComp
+%109 = OpLoad %float %_0_alpha
+%110 = OpFOrdGreaterThan %bool %108 %109
+OpSelectionMerge %112 None
+OpBranchConditional %110 %111 %112
+%111 = OpLabel
+%113 = OpLoad %float %_7_maxComp
+%114 = OpLoad %float %_4_lum
+%115 = OpFOrdNotEqual %bool %113 %114
+OpBranch %112
+%112 = OpLabel
+%116 = OpPhi %bool %false %92 %115 %111
+OpSelectionMerge %119 None
+OpBranchConditional %116 %117 %118
+%117 = OpLabel
+%121 = OpLoad %v3float %_5_result
+%122 = OpLoad %float %_4_lum
+%123 = OpCompositeConstruct %v3float %122 %122 %122
+%124 = OpFSub %v3float %121 %123
+%125 = OpLoad %float %_0_alpha
+%126 = OpLoad %float %_4_lum
+%127 = OpFSub %float %125 %126
 %128 = OpVectorTimesScalar %v3float %124 %127
-%129 = OpCompositeConstruct %v3float %123 %123 %123
-%130 = OpFAdd %v3float %129 %128
-OpStore %_3_blend_set_color_luminance %130
-OpBranch %109
-%108 = OpLabel
-%131 = OpLoad %v3float %_5_result
-OpStore %_3_blend_set_color_luminance %131
-OpBranch %109
-%109 = OpLabel
-%132 = OpLoad %v3float %_3_blend_set_color_luminance
-%133 = OpLoad %v4float %dst
-%134 = OpVectorShuffle %v3float %133 %133 0 1 2
-%135 = OpFAdd %v3float %132 %134
-%136 = OpLoad %v3float %_2_dsa
-%137 = OpFSub %v3float %135 %136
-%138 = OpLoad %v4float %src
-%139 = OpVectorShuffle %v3float %138 %138 0 1 2
-%140 = OpFAdd %v3float %137 %139
-%141 = OpLoad %v3float %_1_sda
-%142 = OpFSub %v3float %140 %141
-%143 = OpCompositeExtract %float %142 0
-%144 = OpCompositeExtract %float %142 1
-%145 = OpCompositeExtract %float %142 2
-%146 = OpLoad %v4float %src
-%147 = OpCompositeExtract %float %146 3
-%148 = OpLoad %v4float %dst
-%149 = OpCompositeExtract %float %148 3
-%150 = OpFAdd %float %147 %149
-%151 = OpLoad %float %_0_alpha
-%152 = OpFSub %float %150 %151
-%153 = OpCompositeConstruct %v4float %143 %144 %145 %152
-OpStore %sk_FragColor %153
+OpStore %_9_n %128
+%130 = OpLoad %float %_7_maxComp
+%131 = OpLoad %float %_4_lum
+%132 = OpFSub %float %130 %131
+OpStore %_10_d %132
+%133 = OpLoad %float %_4_lum
+%134 = OpLoad %v3float %_9_n
+%135 = OpLoad %float %_10_d
+%137 = OpFDiv %float %float_1 %135
+%138 = OpVectorTimesScalar %v3float %134 %137
+%139 = OpCompositeConstruct %v3float %133 %133 %133
+%140 = OpFAdd %v3float %139 %138
+OpStore %_3_blend_set_color_luminance %140
+OpBranch %119
+%118 = OpLabel
+%141 = OpLoad %v3float %_5_result
+OpStore %_3_blend_set_color_luminance %141
+OpBranch %119
+%119 = OpLabel
+%142 = OpLoad %v3float %_3_blend_set_color_luminance
+%143 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%144 = OpLoad %v4float %143
+%145 = OpVectorShuffle %v3float %144 %144 0 1 2
+%146 = OpFAdd %v3float %142 %145
+%147 = OpLoad %v3float %_2_dsa
+%148 = OpFSub %v3float %146 %147
+%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%150 = OpLoad %v4float %149
+%151 = OpVectorShuffle %v3float %150 %150 0 1 2
+%152 = OpFAdd %v3float %148 %151
+%153 = OpLoad %v3float %_1_sda
+%154 = OpFSub %v3float %152 %153
+%155 = OpCompositeExtract %float %154 0
+%156 = OpCompositeExtract %float %154 1
+%157 = OpCompositeExtract %float %154 2
+%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%159 = OpLoad %v4float %158
+%160 = OpCompositeExtract %float %159 3
+%161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%162 = OpLoad %v4float %161
+%163 = OpCompositeExtract %float %162 3
+%164 = OpFAdd %float %160 %163
+%165 = OpLoad %float %_0_alpha
+%166 = OpFSub %float %164 %165
+%167 = OpCompositeConstruct %v4float %155 %156 %157 %166
+OpStore %sk_FragColor %167
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendColor.glsl b/tests/sksl/blend/BlendColor.glsl
index 81af23b..d88ebb8 100644
--- a/tests/sksl/blend/BlendColor.glsl
+++ b/tests/sksl/blend/BlendColor.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     float _0_alpha = dst.w * src.w;
     vec3 _1_sda = src.xyz * dst.w;
diff --git a/tests/sksl/blend/BlendColor.metal b/tests/sksl/blend/BlendColor.metal
index da90592..4a81670 100644
--- a/tests/sksl/blend/BlendColor.metal
+++ b/tests/sksl/blend/BlendColor.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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 _0_alpha = _in.dst.w * _in.src.w;
-    float3 _1_sda = _in.src.xyz * _in.dst.w;
-    float3 _2_dsa = _in.dst.xyz * _in.src.w;
+    float _0_alpha = _uniforms.dst.w * _uniforms.src.w;
+    float3 _1_sda = _uniforms.src.xyz * _uniforms.dst.w;
+    float3 _2_dsa = _uniforms.dst.xyz * _uniforms.src.w;
     float3 _3_blend_set_color_luminance;
     float _4_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
     float3 _5_result = (_4_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda)) + _1_sda;
@@ -28,6 +30,6 @@
     } else {
         _3_blend_set_color_luminance = _5_result;
     }
-    _out.sk_FragColor = float4((((_3_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
+    _out.sk_FragColor = float4((((_3_blend_set_color_luminance + _uniforms.dst.xyz) - _2_dsa) + _uniforms.src.xyz) - _1_sda, (_uniforms.src.w + _uniforms.dst.w) - _0_alpha);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendColorBurn.asm.frag b/tests/sksl/blend/BlendColorBurn.asm.frag
index e3c6373..b5fc62d 100644
--- a/tests/sksl/blend/BlendColorBurn.asm.frag
+++ b/tests/sksl/blend/BlendColorBurn.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_color_burn_component "_color_burn_component"
 OpName %_1_n "_1_n"
 OpName %delta "delta"
@@ -21,8 +17,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %20 RelaxedPrecision
 OpDecorate %22 RelaxedPrecision
 OpDecorate %28 RelaxedPrecision
@@ -66,18 +67,18 @@
 OpDecorate %95 RelaxedPrecision
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %115 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
 OpDecorate %124 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
-OpDecorate %130 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %136 RelaxedPrecision
+OpDecorate %138 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -85,9 +86,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %15 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
@@ -96,6 +97,10 @@
 %_ptr_Function_float = OpTypePointer Function %float
 %void = OpTypeVoid
 %99 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_color_burn_component = OpFunction %float None %15
 %17 = OpFunctionParameter %_ptr_Function_v2float
 %18 = OpFunctionParameter %_ptr_Function_v2float
@@ -189,45 +194,52 @@
 OpFunctionEnd
 %main = OpFunction %void None %99
 %100 = OpLabel
-%103 = OpVariable %_ptr_Function_v2float Function
-%106 = OpVariable %_ptr_Function_v2float Function
-%110 = OpVariable %_ptr_Function_v2float Function
-%113 = OpVariable %_ptr_Function_v2float Function
+%107 = OpVariable %_ptr_Function_v2float Function
+%112 = OpVariable %_ptr_Function_v2float Function
 %117 = OpVariable %_ptr_Function_v2float Function
-%120 = OpVariable %_ptr_Function_v2float Function
-%101 = OpLoad %v4float %src
-%102 = OpVectorShuffle %v2float %101 %101 0 3
-OpStore %103 %102
-%104 = OpLoad %v4float %dst
-%105 = OpVectorShuffle %v2float %104 %104 0 3
-OpStore %106 %105
-%107 = OpFunctionCall %float %_color_burn_component %103 %106
-%108 = OpLoad %v4float %src
-%109 = OpVectorShuffle %v2float %108 %108 1 3
-OpStore %110 %109
-%111 = OpLoad %v4float %dst
-%112 = OpVectorShuffle %v2float %111 %111 1 3
-OpStore %113 %112
-%114 = OpFunctionCall %float %_color_burn_component %110 %113
-%115 = OpLoad %v4float %src
-%116 = OpVectorShuffle %v2float %115 %115 2 3
+%121 = OpVariable %_ptr_Function_v2float Function
+%126 = OpVariable %_ptr_Function_v2float Function
+%130 = OpVariable %_ptr_Function_v2float Function
+%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%105 = OpLoad %v4float %101
+%106 = OpVectorShuffle %v2float %105 %105 0 3
+OpStore %107 %106
+%108 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%110 = OpLoad %v4float %108
+%111 = OpVectorShuffle %v2float %110 %110 0 3
+OpStore %112 %111
+%113 = OpFunctionCall %float %_color_burn_component %107 %112
+%114 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%115 = OpLoad %v4float %114
+%116 = OpVectorShuffle %v2float %115 %115 1 3
 OpStore %117 %116
-%118 = OpLoad %v4float %dst
-%119 = OpVectorShuffle %v2float %118 %118 2 3
-OpStore %120 %119
-%121 = OpFunctionCall %float %_color_burn_component %117 %120
-%122 = OpLoad %v4float %src
-%123 = OpCompositeExtract %float %122 3
-%124 = OpLoad %v4float %src
-%125 = OpCompositeExtract %float %124 3
-%126 = OpFSub %float %float_1 %125
-%127 = OpLoad %v4float %dst
-%128 = OpCompositeExtract %float %127 3
-%129 = OpFMul %float %126 %128
-%130 = OpFAdd %float %123 %129
-%131 = OpCompositeConstruct %v4float %107 %114 %121 %130
-OpStore %sk_FragColor %131
+%118 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%119 = OpLoad %v4float %118
+%120 = OpVectorShuffle %v2float %119 %119 1 3
+OpStore %121 %120
+%122 = OpFunctionCall %float %_color_burn_component %117 %121
+%123 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%124 = OpLoad %v4float %123
+%125 = OpVectorShuffle %v2float %124 %124 2 3
+OpStore %126 %125
+%127 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%128 = OpLoad %v4float %127
+%129 = OpVectorShuffle %v2float %128 %128 2 3
+OpStore %130 %129
+%131 = OpFunctionCall %float %_color_burn_component %126 %130
+%132 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%133 = OpLoad %v4float %132
+%134 = OpCompositeExtract %float %133 3
+%135 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%136 = OpLoad %v4float %135
+%137 = OpCompositeExtract %float %136 3
+%138 = OpFSub %float %float_1 %137
+%139 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%140 = OpLoad %v4float %139
+%141 = OpCompositeExtract %float %140 3
+%142 = OpFMul %float %138 %141
+%143 = OpFAdd %float %134 %142
+%144 = OpCompositeConstruct %v4float %113 %122 %131 %143
+OpStore %sk_FragColor %144
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendColorBurn.glsl b/tests/sksl/blend/BlendColorBurn.glsl
index 0a88f71..86437ff 100644
--- a/tests/sksl/blend/BlendColorBurn.glsl
+++ b/tests/sksl/blend/BlendColorBurn.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _color_burn_component(vec2 s, vec2 d) {
     if (d.y == d.x) {
         return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
diff --git a/tests/sksl/blend/BlendColorBurn.metal b/tests/sksl/blend/BlendColorBurn.metal
index af2625f..64d431e 100644
--- a/tests/sksl/blend/BlendColorBurn.metal
+++ b/tests/sksl/blend/BlendColorBurn.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -17,9 +19,9 @@
     }
 }
 
-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;
-    _out.sk_FragColor = float4(_color_burn_component(_in.src.xw, _in.dst.xw), _color_burn_component(_in.src.yw, _in.dst.yw), _color_burn_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = float4(_color_burn_component(_uniforms.src.xw, _uniforms.dst.xw), _color_burn_component(_uniforms.src.yw, _uniforms.dst.yw), _color_burn_component(_uniforms.src.zw, _uniforms.dst.zw), _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendColorBurnStandaloneSettings.glsl b/tests/sksl/blend/BlendColorBurnStandaloneSettings.glsl
index d96a357..7012905 100644
--- a/tests/sksl/blend/BlendColorBurnStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendColorBurnStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _color_burn_component(vec2 s, vec2 d) {
     if (d.y == d.x) {
         return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
diff --git a/tests/sksl/blend/BlendColorDodge.asm.frag b/tests/sksl/blend/BlendColorDodge.asm.frag
index c4c1f2c..fd3a2d8 100644
--- a/tests/sksl/blend/BlendColorDodge.asm.frag
+++ b/tests/sksl/blend/BlendColorDodge.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_color_dodge_component "_color_dodge_component"
 OpName %delta "delta"
 OpName %_0_n "_0_n"
@@ -21,8 +17,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %20 RelaxedPrecision
 OpDecorate %27 RelaxedPrecision
 OpDecorate %30 RelaxedPrecision
@@ -65,18 +66,18 @@
 OpDecorate %92 RelaxedPrecision
 OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %135 RelaxedPrecision
+OpDecorate %137 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -84,9 +85,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %15 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
@@ -95,6 +96,10 @@
 %_ptr_Function_float = OpTypePointer Function %float
 %void = OpTypeVoid
 %96 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_color_dodge_component = OpFunction %float None %15
 %17 = OpFunctionParameter %_ptr_Function_v2float
 %18 = OpFunctionParameter %_ptr_Function_v2float
@@ -186,45 +191,52 @@
 OpFunctionEnd
 %main = OpFunction %void None %96
 %97 = OpLabel
-%100 = OpVariable %_ptr_Function_v2float Function
-%103 = OpVariable %_ptr_Function_v2float Function
-%107 = OpVariable %_ptr_Function_v2float Function
-%110 = OpVariable %_ptr_Function_v2float Function
+%104 = OpVariable %_ptr_Function_v2float Function
+%109 = OpVariable %_ptr_Function_v2float Function
 %114 = OpVariable %_ptr_Function_v2float Function
-%117 = OpVariable %_ptr_Function_v2float Function
-%98 = OpLoad %v4float %src
-%99 = OpVectorShuffle %v2float %98 %98 0 3
-OpStore %100 %99
-%101 = OpLoad %v4float %dst
-%102 = OpVectorShuffle %v2float %101 %101 0 3
-OpStore %103 %102
-%104 = OpFunctionCall %float %_color_dodge_component %100 %103
-%105 = OpLoad %v4float %src
-%106 = OpVectorShuffle %v2float %105 %105 1 3
-OpStore %107 %106
-%108 = OpLoad %v4float %dst
-%109 = OpVectorShuffle %v2float %108 %108 1 3
-OpStore %110 %109
-%111 = OpFunctionCall %float %_color_dodge_component %107 %110
-%112 = OpLoad %v4float %src
-%113 = OpVectorShuffle %v2float %112 %112 2 3
+%118 = OpVariable %_ptr_Function_v2float Function
+%123 = OpVariable %_ptr_Function_v2float Function
+%127 = OpVariable %_ptr_Function_v2float Function
+%98 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%102 = OpLoad %v4float %98
+%103 = OpVectorShuffle %v2float %102 %102 0 3
+OpStore %104 %103
+%105 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%107 = OpLoad %v4float %105
+%108 = OpVectorShuffle %v2float %107 %107 0 3
+OpStore %109 %108
+%110 = OpFunctionCall %float %_color_dodge_component %104 %109
+%111 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%112 = OpLoad %v4float %111
+%113 = OpVectorShuffle %v2float %112 %112 1 3
 OpStore %114 %113
-%115 = OpLoad %v4float %dst
-%116 = OpVectorShuffle %v2float %115 %115 2 3
-OpStore %117 %116
-%118 = OpFunctionCall %float %_color_dodge_component %114 %117
-%119 = OpLoad %v4float %src
-%120 = OpCompositeExtract %float %119 3
-%121 = OpLoad %v4float %src
-%122 = OpCompositeExtract %float %121 3
-%123 = OpFSub %float %float_1 %122
-%124 = OpLoad %v4float %dst
-%125 = OpCompositeExtract %float %124 3
-%126 = OpFMul %float %123 %125
-%127 = OpFAdd %float %120 %126
-%128 = OpCompositeConstruct %v4float %104 %111 %118 %127
-OpStore %sk_FragColor %128
+%115 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%116 = OpLoad %v4float %115
+%117 = OpVectorShuffle %v2float %116 %116 1 3
+OpStore %118 %117
+%119 = OpFunctionCall %float %_color_dodge_component %114 %118
+%120 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%121 = OpLoad %v4float %120
+%122 = OpVectorShuffle %v2float %121 %121 2 3
+OpStore %123 %122
+%124 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%125 = OpLoad %v4float %124
+%126 = OpVectorShuffle %v2float %125 %125 2 3
+OpStore %127 %126
+%128 = OpFunctionCall %float %_color_dodge_component %123 %127
+%129 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%130 = OpLoad %v4float %129
+%131 = OpCompositeExtract %float %130 3
+%132 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%133 = OpLoad %v4float %132
+%134 = OpCompositeExtract %float %133 3
+%135 = OpFSub %float %float_1 %134
+%136 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%137 = OpLoad %v4float %136
+%138 = OpCompositeExtract %float %137 3
+%139 = OpFMul %float %135 %138
+%140 = OpFAdd %float %131 %139
+%141 = OpCompositeConstruct %v4float %110 %119 %128 %140
+OpStore %sk_FragColor %141
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendColorDodge.glsl b/tests/sksl/blend/BlendColorDodge.glsl
index f4c98c3..5425261 100644
--- a/tests/sksl/blend/BlendColorDodge.glsl
+++ b/tests/sksl/blend/BlendColorDodge.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _color_dodge_component(vec2 s, vec2 d) {
     if (d.x == 0.0) {
         return s.x * (1.0 - d.y);
diff --git a/tests/sksl/blend/BlendColorDodge.metal b/tests/sksl/blend/BlendColorDodge.metal
index 0882fa9..705b330 100644
--- a/tests/sksl/blend/BlendColorDodge.metal
+++ b/tests/sksl/blend/BlendColorDodge.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -20,9 +22,9 @@
     }
 }
 
-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;
-    _out.sk_FragColor = float4(_color_dodge_component(_in.src.xw, _in.dst.xw), _color_dodge_component(_in.src.yw, _in.dst.yw), _color_dodge_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = float4(_color_dodge_component(_uniforms.src.xw, _uniforms.dst.xw), _color_dodge_component(_uniforms.src.yw, _uniforms.dst.yw), _color_dodge_component(_uniforms.src.zw, _uniforms.dst.zw), _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendColorDodgeStandaloneSettings.glsl b/tests/sksl/blend/BlendColorDodgeStandaloneSettings.glsl
index 562a006..0804582 100644
--- a/tests/sksl/blend/BlendColorDodgeStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendColorDodgeStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _color_dodge_component(vec2 s, vec2 d) {
     if (d.x == 0.0) {
         return s.x * (1.0 - d.y);
diff --git a/tests/sksl/blend/BlendColorStandaloneSettings.glsl b/tests/sksl/blend/BlendColorStandaloneSettings.glsl
index f64f79c..93fa7b6 100644
--- a/tests/sksl/blend/BlendColorStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendColorStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     float _0_alpha = dst.w * src.w;
     vec3 _1_sda = src.xyz * dst.w;
diff --git a/tests/sksl/blend/BlendDarken.asm.frag b/tests/sksl/blend/BlendDarken.asm.frag
index 4628511..6da2df0 100644
--- a/tests/sksl/blend/BlendDarken.asm.frag
+++ b/tests/sksl/blend/BlendDarken.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpName %_0_result "_0_result"
 OpDecorate %sk_FragColor RelaxedPrecision
@@ -19,21 +15,26 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %22 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
 OpDecorate %25 RelaxedPrecision
 OpDecorate %27 RelaxedPrecision
 OpDecorate %30 RelaxedPrecision
 OpDecorate %32 RelaxedPrecision
-OpDecorate %33 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 OpDecorate %38 RelaxedPrecision
 OpDecorate %40 RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %50 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -41,43 +42,51 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
+%int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
 %main = OpFunction %void None %14
 %15 = OpLabel
 %_0_result = OpVariable %_ptr_Function_v4float Function
-%18 = OpLoad %v4float %src
-%20 = OpLoad %v4float %src
-%21 = OpCompositeExtract %float %20 3
-%22 = OpFSub %float %float_1 %21
-%23 = OpLoad %v4float %dst
-%24 = OpVectorTimesScalar %v4float %23 %22
-%25 = OpFAdd %v4float %18 %24
-OpStore %_0_result %25
-%27 = OpLoad %v4float %_0_result
-%28 = OpVectorShuffle %v3float %27 %27 0 1 2
-%30 = OpLoad %v4float %dst
-%31 = OpCompositeExtract %float %30 3
-%32 = OpFSub %float %float_1 %31
-%33 = OpLoad %v4float %src
-%34 = OpVectorShuffle %v3float %33 %33 0 1 2
-%35 = OpVectorTimesScalar %v3float %34 %32
-%36 = OpLoad %v4float %dst
-%37 = OpVectorShuffle %v3float %36 %36 0 1 2
-%38 = OpFAdd %v3float %35 %37
-%26 = OpExtInst %v3float %1 FMin %28 %38
-%39 = OpLoad %v4float %_0_result
-%40 = OpVectorShuffle %v4float %39 %26 4 5 6 3
-OpStore %_0_result %40
-%41 = OpLoad %v4float %_0_result
-OpStore %sk_FragColor %41
+%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%22 = OpLoad %v4float %18
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%25 = OpLoad %v4float %24
+%26 = OpCompositeExtract %float %25 3
+%27 = OpFSub %float %float_1 %26
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%30 = OpLoad %v4float %28
+%31 = OpVectorTimesScalar %v4float %30 %27
+%32 = OpFAdd %v4float %22 %31
+OpStore %_0_result %32
+%34 = OpLoad %v4float %_0_result
+%35 = OpVectorShuffle %v3float %34 %34 0 1 2
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%38 = OpLoad %v4float %37
+%39 = OpCompositeExtract %float %38 3
+%40 = OpFSub %float %float_1 %39
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpVectorShuffle %v3float %42 %42 0 1 2
+%44 = OpVectorTimesScalar %v3float %43 %40
+%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%46 = OpLoad %v4float %45
+%47 = OpVectorShuffle %v3float %46 %46 0 1 2
+%48 = OpFAdd %v3float %44 %47
+%33 = OpExtInst %v3float %1 FMin %35 %48
+%49 = OpLoad %v4float %_0_result
+%50 = OpVectorShuffle %v4float %49 %33 4 5 6 3
+OpStore %_0_result %50
+%51 = OpLoad %v4float %_0_result
+OpStore %sk_FragColor %51
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDarken.glsl b/tests/sksl/blend/BlendDarken.glsl
index 40f0f70..63a9bcd 100644
--- a/tests/sksl/blend/BlendDarken.glsl
+++ b/tests/sksl/blend/BlendDarken.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_result = src + (1.0 - src.w) * dst;
     _0_result.xyz = min(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
diff --git a/tests/sksl/blend/BlendDarken.metal b/tests/sksl/blend/BlendDarken.metal
index c25783c..b2fa61f 100644
--- a/tests/sksl/blend/BlendDarken.metal
+++ b/tests/sksl/blend/BlendDarken.metal
@@ -1,16 +1,18 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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 _0_result = _in.src + (1.0 - _in.src.w) * _in.dst;
-    _0_result.xyz = min(_0_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
+    float4 _0_result = _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
+    _0_result.xyz = min(_0_result.xyz, (1.0 - _uniforms.dst.w) * _uniforms.src.xyz + _uniforms.dst.xyz);
     _out.sk_FragColor = _0_result;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDarkenStandaloneSettings.glsl b/tests/sksl/blend/BlendDarkenStandaloneSettings.glsl
index 4000df7..c28eb75 100644
--- a/tests/sksl/blend/BlendDarkenStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDarkenStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_result = src + (1.0 - src.w) * dst;
     _0_result.xyz = min(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
diff --git a/tests/sksl/blend/BlendDifference.asm.frag b/tests/sksl/blend/BlendDifference.asm.frag
index 4b1debc..08f6ce6 100644
--- a/tests/sksl/blend/BlendDifference.asm.frag
+++ b/tests/sksl/blend/BlendDifference.asm.frag
@@ -1,39 +1,40 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
-OpDecorate %26 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 OpDecorate %31 RelaxedPrecision
-OpDecorate %35 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
-OpDecorate %42 RelaxedPrecision
-OpDecorate %44 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
 OpDecorate %45 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
+OpDecorate %50 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %56 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %60 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -41,49 +42,60 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %v3float = OpTypeVector %float 3
+%int_1 = OpConstant %int 1
 %float_2 = OpConstant %float 2
 %float_1 = OpConstant %float 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-%17 = OpVectorShuffle %v3float %16 %16 0 1 2
-%19 = OpLoad %v4float %dst
-%20 = OpVectorShuffle %v3float %19 %19 0 1 2
-%21 = OpFAdd %v3float %17 %20
-%24 = OpLoad %v4float %src
-%25 = OpVectorShuffle %v3float %24 %24 0 1 2
-%26 = OpLoad %v4float %dst
-%27 = OpCompositeExtract %float %26 3
-%28 = OpVectorTimesScalar %v3float %25 %27
-%29 = OpLoad %v4float %dst
-%30 = OpVectorShuffle %v3float %29 %29 0 1 2
-%31 = OpLoad %v4float %src
-%32 = OpCompositeExtract %float %31 3
-%33 = OpVectorTimesScalar %v3float %30 %32
-%23 = OpExtInst %v3float %1 FMin %28 %33
-%34 = OpVectorTimesScalar %v3float %23 %float_2
-%35 = OpFSub %v3float %21 %34
-%36 = OpCompositeExtract %float %35 0
-%37 = OpCompositeExtract %float %35 1
-%38 = OpCompositeExtract %float %35 2
-%39 = OpLoad %v4float %src
-%40 = OpCompositeExtract %float %39 3
-%42 = OpLoad %v4float %src
-%43 = OpCompositeExtract %float %42 3
-%44 = OpFSub %float %float_1 %43
-%45 = OpLoad %v4float %dst
-%46 = OpCompositeExtract %float %45 3
-%47 = OpFMul %float %44 %46
-%48 = OpFAdd %float %40 %47
-%49 = OpCompositeConstruct %v4float %36 %37 %38 %48
-OpStore %sk_FragColor %49
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+%21 = OpVectorShuffle %v3float %20 %20 0 1 2
+%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%25 = OpLoad %v4float %23
+%26 = OpVectorShuffle %v3float %25 %25 0 1 2
+%27 = OpFAdd %v3float %21 %26
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%31 = OpLoad %v4float %30
+%32 = OpVectorShuffle %v3float %31 %31 0 1 2
+%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%34 = OpLoad %v4float %33
+%35 = OpCompositeExtract %float %34 3
+%36 = OpVectorTimesScalar %v3float %32 %35
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%38 = OpLoad %v4float %37
+%39 = OpVectorShuffle %v3float %38 %38 0 1 2
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%41 = OpLoad %v4float %40
+%42 = OpCompositeExtract %float %41 3
+%43 = OpVectorTimesScalar %v3float %39 %42
+%29 = OpExtInst %v3float %1 FMin %36 %43
+%44 = OpVectorTimesScalar %v3float %29 %float_2
+%45 = OpFSub %v3float %27 %44
+%46 = OpCompositeExtract %float %45 0
+%47 = OpCompositeExtract %float %45 1
+%48 = OpCompositeExtract %float %45 2
+%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%50 = OpLoad %v4float %49
+%51 = OpCompositeExtract %float %50 3
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%54 = OpLoad %v4float %53
+%55 = OpCompositeExtract %float %54 3
+%56 = OpFSub %float %float_1 %55
+%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%58 = OpLoad %v4float %57
+%59 = OpCompositeExtract %float %58 3
+%60 = OpFMul %float %56 %59
+%61 = OpFAdd %float %51 %60
+%62 = OpCompositeConstruct %v4float %46 %47 %48 %61
+OpStore %sk_FragColor %62
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDifference.glsl b/tests/sksl/blend/BlendDifference.glsl
index 156cfa5..b0953c9 100644
--- a/tests/sksl/blend/BlendDifference.glsl
+++ b/tests/sksl/blend/BlendDifference.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendDifference.metal b/tests/sksl/blend/BlendDifference.metal
index 2c29a95..91a10e5 100644
--- a/tests/sksl/blend/BlendDifference.metal
+++ b/tests/sksl/blend/BlendDifference.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = float4((_in.src.xyz + _in.dst.xyz) - 2.0 * min(_in.src.xyz * _in.dst.w, _in.dst.xyz * _in.src.w), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = float4((_uniforms.src.xyz + _uniforms.dst.xyz) - 2.0 * min(_uniforms.src.xyz * _uniforms.dst.w, _uniforms.dst.xyz * _uniforms.src.w), _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDifferenceStandaloneSettings.glsl b/tests/sksl/blend/BlendDifferenceStandaloneSettings.glsl
index b9ef17e..50bf6fd 100644
--- a/tests/sksl/blend/BlendDifferenceStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDifferenceStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendDst.asm.frag b/tests/sksl/blend/BlendDst.asm.frag
index 71abf25..01dbc45 100644
--- a/tests/sksl/blend/BlendDst.asm.frag
+++ b/tests/sksl/blend/BlendDst.asm.frag
@@ -1,26 +1,27 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -28,16 +29,18 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %dst
-OpStore %sk_FragColor %16
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%20 = OpLoad %v4float %16
+OpStore %sk_FragColor %20
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDst.glsl b/tests/sksl/blend/BlendDst.glsl
index 74d096d..cee7118 100644
--- a/tests/sksl/blend/BlendDst.glsl
+++ b/tests/sksl/blend/BlendDst.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst;
 }
diff --git a/tests/sksl/blend/BlendDst.metal b/tests/sksl/blend/BlendDst.metal
index 3aed885..5bf3025 100644
--- a/tests/sksl/blend/BlendDst.metal
+++ b/tests/sksl/blend/BlendDst.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.dst;
+    _out.sk_FragColor = _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDstAtop.asm.frag b/tests/sksl/blend/BlendDstAtop.asm.frag
index 1aae8de..e876464 100644
--- a/tests/sksl/blend/BlendDstAtop.asm.frag
+++ b/tests/sksl/blend/BlendDstAtop.asm.frag
@@ -1,31 +1,32 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
-OpDecorate %26 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,26 +34,32 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %dst
-%17 = OpCompositeExtract %float %16 3
-%18 = OpLoad %v4float %src
-%19 = OpVectorTimesScalar %v4float %18 %17
-%21 = OpLoad %v4float %src
-%22 = OpCompositeExtract %float %21 3
-%23 = OpFSub %float %float_1 %22
-%24 = OpLoad %v4float %dst
-%25 = OpVectorTimesScalar %v4float %24 %23
-%26 = OpFAdd %v4float %19 %25
-OpStore %sk_FragColor %26
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%20 = OpLoad %v4float %16
+%21 = OpCompositeExtract %float %20 3
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%24 = OpLoad %v4float %22
+%25 = OpVectorTimesScalar %v4float %24 %21
+%27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%28 = OpLoad %v4float %27
+%29 = OpCompositeExtract %float %28 3
+%30 = OpFSub %float %float_1 %29
+%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%32 = OpLoad %v4float %31
+%33 = OpVectorTimesScalar %v4float %32 %30
+%34 = OpFAdd %v4float %25 %33
+OpStore %sk_FragColor %34
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDstAtop.glsl b/tests/sksl/blend/BlendDstAtop.glsl
index 37fade9..5ec8169 100644
--- a/tests/sksl/blend/BlendDstAtop.glsl
+++ b/tests/sksl/blend/BlendDstAtop.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendDstAtop.metal b/tests/sksl/blend/BlendDstAtop.metal
index 2e39b83..ce4763d 100644
--- a/tests/sksl/blend/BlendDstAtop.metal
+++ b/tests/sksl/blend/BlendDstAtop.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
+    _out.sk_FragColor = _uniforms.dst.w * _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDstAtopStandaloneSettings.glsl b/tests/sksl/blend/BlendDstAtopStandaloneSettings.glsl
index 6503e8f..4e0dbb6 100644
--- a/tests/sksl/blend/BlendDstAtopStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDstAtopStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendDstIn.asm.frag b/tests/sksl/blend/BlendDstIn.asm.frag
index 8093df6..ba1de1c 100644
--- a/tests/sksl/blend/BlendDstIn.asm.frag
+++ b/tests/sksl/blend/BlendDstIn.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,19 +30,23 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %dst
-%17 = OpLoad %v4float %src
-%18 = OpCompositeExtract %float %17 3
-%19 = OpVectorTimesScalar %v4float %16 %18
-OpStore %sk_FragColor %19
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%20 = OpLoad %v4float %16
+%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%23 = OpLoad %v4float %21
+%24 = OpCompositeExtract %float %23 3
+%25 = OpVectorTimesScalar %v4float %20 %24
+OpStore %sk_FragColor %25
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDstIn.glsl b/tests/sksl/blend/BlendDstIn.glsl
index d7af68a..2eccde6 100644
--- a/tests/sksl/blend/BlendDstIn.glsl
+++ b/tests/sksl/blend/BlendDstIn.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst * src.w;
 }
diff --git a/tests/sksl/blend/BlendDstIn.metal b/tests/sksl/blend/BlendDstIn.metal
index 71c61d5..8703ade 100644
--- a/tests/sksl/blend/BlendDstIn.metal
+++ b/tests/sksl/blend/BlendDstIn.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.dst * _in.src.w;
+    _out.sk_FragColor = _uniforms.dst * _uniforms.src.w;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDstInStandaloneSettings.glsl b/tests/sksl/blend/BlendDstInStandaloneSettings.glsl
index 6c6d731..f0c85b1 100644
--- a/tests/sksl/blend/BlendDstInStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDstInStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst * src.w;
 }
diff --git a/tests/sksl/blend/BlendDstOut.asm.frag b/tests/sksl/blend/BlendDstOut.asm.frag
index baf745d..f9ced28 100644
--- a/tests/sksl/blend/BlendDstOut.asm.frag
+++ b/tests/sksl/blend/BlendDstOut.asm.frag
@@ -1,28 +1,29 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -30,21 +31,25 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_1 = OpConstant %float 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %src
-%18 = OpCompositeExtract %float %17 3
-%19 = OpFSub %float %float_1 %18
-%20 = OpLoad %v4float %dst
-%21 = OpVectorTimesScalar %v4float %20 %19
-OpStore %sk_FragColor %21
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpCompositeExtract %float %21 3
+%23 = OpFSub %float %float_1 %22
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%26 = OpLoad %v4float %24
+%27 = OpVectorTimesScalar %v4float %26 %23
+OpStore %sk_FragColor %27
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDstOut.glsl b/tests/sksl/blend/BlendDstOut.glsl
index 274e8f0..31b259e 100644
--- a/tests/sksl/blend/BlendDstOut.glsl
+++ b/tests/sksl/blend/BlendDstOut.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendDstOut.metal b/tests/sksl/blend/BlendDstOut.metal
index a417ece..c9e412c 100644
--- a/tests/sksl/blend/BlendDstOut.metal
+++ b/tests/sksl/blend/BlendDstOut.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = (1.0 - _in.src.w) * _in.dst;
+    _out.sk_FragColor = (1.0 - _uniforms.src.w) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDstOutStandaloneSettings.glsl b/tests/sksl/blend/BlendDstOutStandaloneSettings.glsl
index de77151..ff5a83b 100644
--- a/tests/sksl/blend/BlendDstOutStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDstOutStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendDstOver.asm.frag b/tests/sksl/blend/BlendDstOver.asm.frag
index 38c382a..0bc1aeb 100644
--- a/tests/sksl/blend/BlendDstOver.asm.frag
+++ b/tests/sksl/blend/BlendDstOver.asm.frag
@@ -1,30 +1,31 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,23 +33,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_1 = OpConstant %float 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %dst
-%18 = OpCompositeExtract %float %17 3
-%19 = OpFSub %float %float_1 %18
-%20 = OpLoad %v4float %src
-%21 = OpVectorTimesScalar %v4float %20 %19
-%22 = OpLoad %v4float %dst
-%23 = OpFAdd %v4float %21 %22
-OpStore %sk_FragColor %23
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%21 = OpLoad %v4float %17
+%22 = OpCompositeExtract %float %21 3
+%23 = OpFSub %float %float_1 %22
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%26 = OpLoad %v4float %24
+%27 = OpVectorTimesScalar %v4float %26 %23
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%29 = OpLoad %v4float %28
+%30 = OpFAdd %v4float %27 %29
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendDstOver.glsl b/tests/sksl/blend/BlendDstOver.glsl
index 70d648f..078b934 100644
--- a/tests/sksl/blend/BlendDstOver.glsl
+++ b/tests/sksl/blend/BlendDstOver.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src + dst;
 }
diff --git a/tests/sksl/blend/BlendDstOver.metal b/tests/sksl/blend/BlendDstOver.metal
index 15e99e2..1d99691 100644
--- a/tests/sksl/blend/BlendDstOver.metal
+++ b/tests/sksl/blend/BlendDstOver.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = (1.0 - _in.dst.w) * _in.src + _in.dst;
+    _out.sk_FragColor = (1.0 - _uniforms.dst.w) * _uniforms.src + _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendDstOverStandaloneSettings.glsl b/tests/sksl/blend/BlendDstOverStandaloneSettings.glsl
index 01f8b41..82ff391 100644
--- a/tests/sksl/blend/BlendDstOverStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDstOverStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src + dst;
 }
diff --git a/tests/sksl/blend/BlendDstStandaloneSettings.glsl b/tests/sksl/blend/BlendDstStandaloneSettings.glsl
index a28a9a2..7ad1248 100644
--- a/tests/sksl/blend/BlendDstStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendDstStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst;
 }
diff --git a/tests/sksl/blend/BlendEnum.asm.frag b/tests/sksl/blend/BlendEnum.asm.frag
index b2d6427..6677c42 100644
--- a/tests/sksl/blend/BlendEnum.asm.frag
+++ b/tests/sksl/blend/BlendEnum.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpName %_0_blend "_0_blend"
 OpName %_1_loop "_1_loop"
@@ -20,12 +16,17 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %30 RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %32 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 OpDecorate %35 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,9 +34,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %_ptr_Function_v4float = OpTypePointer Function %v4float
@@ -43,6 +44,7 @@
 %_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %main = OpFunction %void None %14
 %15 = OpLabel
 %_0_blend = OpVariable %_ptr_Function_v4float Function
@@ -57,20 +59,20 @@
 %29 = OpSLessThan %bool %27 %int_1
 OpBranchConditional %29 %24 %26
 %24 = OpLabel
-%30 = OpLoad %v4float %src
-%31 = OpLoad %v4float %dst
-%32 = OpFMul %v4float %30 %31
-OpStore %_0_blend %32
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%32 = OpLoad %v4float %30
+%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%34 = OpLoad %v4float %33
+%35 = OpFMul %v4float %32 %34
+OpStore %_0_blend %35
 OpBranch %25
 %25 = OpLabel
-%33 = OpLoad %int %_1_loop
-%34 = OpIAdd %int %33 %int_1
-OpStore %_1_loop %34
+%36 = OpLoad %int %_1_loop
+%37 = OpIAdd %int %36 %int_1
+OpStore %_1_loop %37
 OpBranch %22
 %26 = OpLabel
-%35 = OpLoad %v4float %_0_blend
-OpStore %sk_FragColor %35
+%38 = OpLoad %v4float %_0_blend
+OpStore %sk_FragColor %38
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendEnum.glsl b/tests/sksl/blend/BlendEnum.glsl
index c03492a..cadc459 100644
--- a/tests/sksl/blend/BlendEnum.glsl
+++ b/tests/sksl/blend/BlendEnum.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_blend;
     for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
diff --git a/tests/sksl/blend/BlendEnum.metal b/tests/sksl/blend/BlendEnum.metal
index 79a00f7..ac59bb8 100644
--- a/tests/sksl/blend/BlendEnum.metal
+++ b/tests/sksl/blend/BlendEnum.metal
@@ -1,19 +1,21 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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 _0_blend;
     for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
         {
             {
-                _0_blend = _in.src * _in.dst;
+                _0_blend = _uniforms.src * _uniforms.dst;
                 continue;
             }
         }
diff --git a/tests/sksl/blend/BlendEnumStandaloneSettings.glsl b/tests/sksl/blend/BlendEnumStandaloneSettings.glsl
index 8b13870..95f05e7 100644
--- a/tests/sksl/blend/BlendEnumStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendEnumStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_blend;
     for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
diff --git a/tests/sksl/blend/BlendExclusion.asm.frag b/tests/sksl/blend/BlendExclusion.asm.frag
index d67d16d..2c729ad 100644
--- a/tests/sksl/blend/BlendExclusion.asm.frag
+++ b/tests/sksl/blend/BlendExclusion.asm.frag
@@ -1,38 +1,39 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
-OpDecorate %26 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
-OpDecorate %33 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 OpDecorate %36 RelaxedPrecision
-OpDecorate %38 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %50 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %53 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -40,43 +41,52 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
+%int_0 = OpConstant %int 0
 %float_2 = OpConstant %float 2
 %float_1 = OpConstant %float 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %dst
-%17 = OpVectorShuffle %v3float %16 %16 0 1 2
-%19 = OpLoad %v4float %src
-%20 = OpVectorShuffle %v3float %19 %19 0 1 2
-%21 = OpFAdd %v3float %17 %20
-%23 = OpLoad %v4float %dst
-%24 = OpVectorShuffle %v3float %23 %23 0 1 2
-%25 = OpVectorTimesScalar %v3float %24 %float_2
-%26 = OpLoad %v4float %src
-%27 = OpVectorShuffle %v3float %26 %26 0 1 2
-%28 = OpFMul %v3float %25 %27
-%29 = OpFSub %v3float %21 %28
-%30 = OpCompositeExtract %float %29 0
-%31 = OpCompositeExtract %float %29 1
-%32 = OpCompositeExtract %float %29 2
-%33 = OpLoad %v4float %src
-%34 = OpCompositeExtract %float %33 3
-%36 = OpLoad %v4float %src
-%37 = OpCompositeExtract %float %36 3
-%38 = OpFSub %float %float_1 %37
-%39 = OpLoad %v4float %dst
-%40 = OpCompositeExtract %float %39 3
-%41 = OpFMul %float %38 %40
-%42 = OpFAdd %float %34 %41
-%43 = OpCompositeConstruct %v4float %30 %31 %32 %42
-OpStore %sk_FragColor %43
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%20 = OpLoad %v4float %16
+%21 = OpVectorShuffle %v3float %20 %20 0 1 2
+%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%25 = OpLoad %v4float %23
+%26 = OpVectorShuffle %v3float %25 %25 0 1 2
+%27 = OpFAdd %v3float %21 %26
+%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%30 = OpLoad %v4float %29
+%31 = OpVectorShuffle %v3float %30 %30 0 1 2
+%32 = OpVectorTimesScalar %v3float %31 %float_2
+%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%34 = OpLoad %v4float %33
+%35 = OpVectorShuffle %v3float %34 %34 0 1 2
+%36 = OpFMul %v3float %32 %35
+%37 = OpFSub %v3float %27 %36
+%38 = OpCompositeExtract %float %37 0
+%39 = OpCompositeExtract %float %37 1
+%40 = OpCompositeExtract %float %37 2
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpCompositeExtract %float %42 3
+%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%46 = OpLoad %v4float %45
+%47 = OpCompositeExtract %float %46 3
+%48 = OpFSub %float %float_1 %47
+%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%50 = OpLoad %v4float %49
+%51 = OpCompositeExtract %float %50 3
+%52 = OpFMul %float %48 %51
+%53 = OpFAdd %float %43 %52
+%54 = OpCompositeConstruct %v4float %38 %39 %40 %53
+OpStore %sk_FragColor %54
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendExclusion.glsl b/tests/sksl/blend/BlendExclusion.glsl
index b3194b4..583cb40 100644
--- a/tests/sksl/blend/BlendExclusion.glsl
+++ b/tests/sksl/blend/BlendExclusion.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendExclusion.metal b/tests/sksl/blend/BlendExclusion.metal
index 564bf04..e671eba 100644
--- a/tests/sksl/blend/BlendExclusion.metal
+++ b/tests/sksl/blend/BlendExclusion.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = float4((_in.dst.xyz + _in.src.xyz) - (2.0 * _in.dst.xyz) * _in.src.xyz, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = float4((_uniforms.dst.xyz + _uniforms.src.xyz) - (2.0 * _uniforms.dst.xyz) * _uniforms.src.xyz, _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendExclusionStandaloneSettings.glsl b/tests/sksl/blend/BlendExclusionStandaloneSettings.glsl
index 095899d..cb61c89 100644
--- a/tests/sksl/blend/BlendExclusionStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendExclusionStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendHardLight.asm.frag b/tests/sksl/blend/BlendHardLight.asm.frag
index 4e3231b..967de19 100644
--- a/tests/sksl/blend/BlendHardLight.asm.frag
+++ b/tests/sksl/blend/BlendHardLight.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_blend_overlay_component "_blend_overlay_component"
 OpName %main "main"
 OpName %_0_result "_0_result"
@@ -20,8 +16,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
@@ -42,30 +43,30 @@
 OpDecorate %54 RelaxedPrecision
 OpDecorate %55 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
 OpDecorate %76 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
+OpDecorate %129 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -73,9 +74,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %15 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
@@ -84,6 +85,10 @@
 %void = OpTypeVoid
 %58 = OpTypeFunction %void
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
 %v3float = OpTypeVector %float 3
 %_blend_overlay_component = OpFunction %float None %15
@@ -136,66 +141,77 @@
 %main = OpFunction %void None %58
 %59 = OpLabel
 %_0_result = OpVariable %_ptr_Function_v4float Function
-%64 = OpVariable %_ptr_Function_v2float Function
-%67 = OpVariable %_ptr_Function_v2float Function
-%71 = OpVariable %_ptr_Function_v2float Function
-%74 = OpVariable %_ptr_Function_v2float Function
+%68 = OpVariable %_ptr_Function_v2float Function
+%73 = OpVariable %_ptr_Function_v2float Function
 %78 = OpVariable %_ptr_Function_v2float Function
-%81 = OpVariable %_ptr_Function_v2float Function
-%62 = OpLoad %v4float %dst
-%63 = OpVectorShuffle %v2float %62 %62 0 3
-OpStore %64 %63
-%65 = OpLoad %v4float %src
-%66 = OpVectorShuffle %v2float %65 %65 0 3
-OpStore %67 %66
-%68 = OpFunctionCall %float %_blend_overlay_component %64 %67
-%69 = OpLoad %v4float %dst
-%70 = OpVectorShuffle %v2float %69 %69 1 3
-OpStore %71 %70
-%72 = OpLoad %v4float %src
-%73 = OpVectorShuffle %v2float %72 %72 1 3
-OpStore %74 %73
-%75 = OpFunctionCall %float %_blend_overlay_component %71 %74
-%76 = OpLoad %v4float %dst
-%77 = OpVectorShuffle %v2float %76 %76 2 3
+%82 = OpVariable %_ptr_Function_v2float Function
+%87 = OpVariable %_ptr_Function_v2float Function
+%91 = OpVariable %_ptr_Function_v2float Function
+%62 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%66 = OpLoad %v4float %62
+%67 = OpVectorShuffle %v2float %66 %66 0 3
+OpStore %68 %67
+%69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%71 = OpLoad %v4float %69
+%72 = OpVectorShuffle %v2float %71 %71 0 3
+OpStore %73 %72
+%74 = OpFunctionCall %float %_blend_overlay_component %68 %73
+%75 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%76 = OpLoad %v4float %75
+%77 = OpVectorShuffle %v2float %76 %76 1 3
 OpStore %78 %77
-%79 = OpLoad %v4float %src
-%80 = OpVectorShuffle %v2float %79 %79 2 3
-OpStore %81 %80
-%82 = OpFunctionCall %float %_blend_overlay_component %78 %81
-%83 = OpLoad %v4float %dst
-%84 = OpCompositeExtract %float %83 3
-%86 = OpLoad %v4float %dst
-%87 = OpCompositeExtract %float %86 3
-%88 = OpFSub %float %float_1 %87
-%89 = OpLoad %v4float %src
-%90 = OpCompositeExtract %float %89 3
-%91 = OpFMul %float %88 %90
-%92 = OpFAdd %float %84 %91
-%93 = OpCompositeConstruct %v4float %68 %75 %82 %92
-OpStore %_0_result %93
-%94 = OpLoad %v4float %_0_result
-%95 = OpVectorShuffle %v3float %94 %94 0 1 2
-%97 = OpLoad %v4float %src
-%98 = OpVectorShuffle %v3float %97 %97 0 1 2
-%99 = OpLoad %v4float %dst
-%100 = OpCompositeExtract %float %99 3
-%101 = OpFSub %float %float_1 %100
-%102 = OpVectorTimesScalar %v3float %98 %101
-%103 = OpLoad %v4float %dst
-%104 = OpVectorShuffle %v3float %103 %103 0 1 2
-%105 = OpLoad %v4float %src
-%106 = OpCompositeExtract %float %105 3
-%107 = OpFSub %float %float_1 %106
-%108 = OpVectorTimesScalar %v3float %104 %107
-%109 = OpFAdd %v3float %102 %108
-%110 = OpFAdd %v3float %95 %109
-%111 = OpLoad %v4float %_0_result
-%112 = OpVectorShuffle %v4float %111 %110 4 5 6 3
-OpStore %_0_result %112
-%113 = OpLoad %v4float %_0_result
-OpStore %sk_FragColor %113
+%79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%80 = OpLoad %v4float %79
+%81 = OpVectorShuffle %v2float %80 %80 1 3
+OpStore %82 %81
+%83 = OpFunctionCall %float %_blend_overlay_component %78 %82
+%84 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%85 = OpLoad %v4float %84
+%86 = OpVectorShuffle %v2float %85 %85 2 3
+OpStore %87 %86
+%88 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%89 = OpLoad %v4float %88
+%90 = OpVectorShuffle %v2float %89 %89 2 3
+OpStore %91 %90
+%92 = OpFunctionCall %float %_blend_overlay_component %87 %91
+%93 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%94 = OpLoad %v4float %93
+%95 = OpCompositeExtract %float %94 3
+%97 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%98 = OpLoad %v4float %97
+%99 = OpCompositeExtract %float %98 3
+%100 = OpFSub %float %float_1 %99
+%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%102 = OpLoad %v4float %101
+%103 = OpCompositeExtract %float %102 3
+%104 = OpFMul %float %100 %103
+%105 = OpFAdd %float %95 %104
+%106 = OpCompositeConstruct %v4float %74 %83 %92 %105
+OpStore %_0_result %106
+%107 = OpLoad %v4float %_0_result
+%108 = OpVectorShuffle %v3float %107 %107 0 1 2
+%110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%111 = OpLoad %v4float %110
+%112 = OpVectorShuffle %v3float %111 %111 0 1 2
+%113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%114 = OpLoad %v4float %113
+%115 = OpCompositeExtract %float %114 3
+%116 = OpFSub %float %float_1 %115
+%117 = OpVectorTimesScalar %v3float %112 %116
+%118 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%119 = OpLoad %v4float %118
+%120 = OpVectorShuffle %v3float %119 %119 0 1 2
+%121 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%122 = OpLoad %v4float %121
+%123 = OpCompositeExtract %float %122 3
+%124 = OpFSub %float %float_1 %123
+%125 = OpVectorTimesScalar %v3float %120 %124
+%126 = OpFAdd %v3float %117 %125
+%127 = OpFAdd %v3float %108 %126
+%128 = OpLoad %v4float %_0_result
+%129 = OpVectorShuffle %v4float %128 %127 4 5 6 3
+OpStore %_0_result %129
+%130 = OpLoad %v4float %_0_result
+OpStore %sk_FragColor %130
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendHardLight.glsl b/tests/sksl/blend/BlendHardLight.glsl
index 2e8e895..ba4fd7d 100644
--- a/tests/sksl/blend/BlendHardLight.glsl
+++ b/tests/sksl/blend/BlendHardLight.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _blend_overlay_component(vec2 s, vec2 d) {
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
diff --git a/tests/sksl/blend/BlendHardLight.metal b/tests/sksl/blend/BlendHardLight.metal
index 42b91df..85c58c6 100644
--- a/tests/sksl/blend/BlendHardLight.metal
+++ b/tests/sksl/blend/BlendHardLight.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -9,11 +11,11 @@
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
 
-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 _0_result = float4(_blend_overlay_component(_in.dst.xw, _in.src.xw), _blend_overlay_component(_in.dst.yw, _in.src.yw), _blend_overlay_component(_in.dst.zw, _in.src.zw), _in.dst.w + (1.0 - _in.dst.w) * _in.src.w);
-    _0_result.xyz = _0_result.xyz + _in.src.xyz * (1.0 - _in.dst.w) + _in.dst.xyz * (1.0 - _in.src.w);
+    float4 _0_result = float4(_blend_overlay_component(_uniforms.dst.xw, _uniforms.src.xw), _blend_overlay_component(_uniforms.dst.yw, _uniforms.src.yw), _blend_overlay_component(_uniforms.dst.zw, _uniforms.src.zw), _uniforms.dst.w + (1.0 - _uniforms.dst.w) * _uniforms.src.w);
+    _0_result.xyz = _0_result.xyz + _uniforms.src.xyz * (1.0 - _uniforms.dst.w) + _uniforms.dst.xyz * (1.0 - _uniforms.src.w);
     _out.sk_FragColor = _0_result;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendHardLightStandaloneSettings.glsl b/tests/sksl/blend/BlendHardLightStandaloneSettings.glsl
index 67011d6..cd491cd 100644
--- a/tests/sksl/blend/BlendHardLightStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendHardLightStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _blend_overlay_component(vec2 s, vec2 d) {
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
diff --git a/tests/sksl/blend/BlendHue.asm.frag b/tests/sksl/blend/BlendHue.asm.frag
index e7cde51..55bb09d 100644
--- a/tests/sksl/blend/BlendHue.asm.frag
+++ b/tests/sksl/blend/BlendHue.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_blend_set_color_saturation_helper "_blend_set_color_saturation_helper"
 OpName %_7_n "_7_n"
 OpName %_8_d "_8_d"
@@ -34,8 +30,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
 OpDecorate %30 RelaxedPrecision
@@ -50,95 +51,95 @@
 OpDecorate %45 RelaxedPrecision
 OpDecorate %46 RelaxedPrecision
 OpDecorate %47 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
-OpDecorate %66 RelaxedPrecision
-OpDecorate %68 RelaxedPrecision
+OpDecorate %64 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
 OpDecorate %75 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
-OpDecorate %133 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
-OpDecorate %148 RelaxedPrecision
-OpDecorate %150 RelaxedPrecision
-OpDecorate %156 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %163 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
+OpDecorate %136 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %151 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
 OpDecorate %166 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
-OpDecorate %179 RelaxedPrecision
-OpDecorate %181 RelaxedPrecision
-OpDecorate %182 RelaxedPrecision
-OpDecorate %183 RelaxedPrecision
+OpDecorate %169 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
+OpDecorate %187 RelaxedPrecision
 OpDecorate %189 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
+OpDecorate %192 RelaxedPrecision
 OpDecorate %193 RelaxedPrecision
-OpDecorate %198 RelaxedPrecision
-OpDecorate %200 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %205 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
+OpDecorate %199 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
+OpDecorate %203 RelaxedPrecision
+OpDecorate %208 RelaxedPrecision
 OpDecorate %210 RelaxedPrecision
-OpDecorate %216 RelaxedPrecision
-OpDecorate %217 RelaxedPrecision
-OpDecorate %218 RelaxedPrecision
+OpDecorate %212 RelaxedPrecision
+OpDecorate %215 RelaxedPrecision
 OpDecorate %219 RelaxedPrecision
 OpDecorate %220 RelaxedPrecision
-OpDecorate %221 RelaxedPrecision
-OpDecorate %224 RelaxedPrecision
-OpDecorate %225 RelaxedPrecision
 OpDecorate %226 RelaxedPrecision
+OpDecorate %227 RelaxedPrecision
+OpDecorate %228 RelaxedPrecision
+OpDecorate %229 RelaxedPrecision
 OpDecorate %230 RelaxedPrecision
 OpDecorate %231 RelaxedPrecision
+OpDecorate %234 RelaxedPrecision
 OpDecorate %235 RelaxedPrecision
 OpDecorate %236 RelaxedPrecision
-OpDecorate %243 RelaxedPrecision
-OpDecorate %244 RelaxedPrecision
-OpDecorate %247 RelaxedPrecision
-OpDecorate %248 RelaxedPrecision
-OpDecorate %249 RelaxedPrecision
-OpDecorate %252 RelaxedPrecision
+OpDecorate %240 RelaxedPrecision
+OpDecorate %241 RelaxedPrecision
+OpDecorate %245 RelaxedPrecision
+OpDecorate %246 RelaxedPrecision
 OpDecorate %253 RelaxedPrecision
 OpDecorate %254 RelaxedPrecision
-OpDecorate %255 RelaxedPrecision
-OpDecorate %256 RelaxedPrecision
 OpDecorate %257 RelaxedPrecision
+OpDecorate %258 RelaxedPrecision
+OpDecorate %259 RelaxedPrecision
+OpDecorate %262 RelaxedPrecision
 OpDecorate %263 RelaxedPrecision
 OpDecorate %264 RelaxedPrecision
 OpDecorate %265 RelaxedPrecision
+OpDecorate %266 RelaxedPrecision
 OpDecorate %267 RelaxedPrecision
-OpDecorate %268 RelaxedPrecision
-OpDecorate %269 RelaxedPrecision
-OpDecorate %270 RelaxedPrecision
-OpDecorate %272 RelaxedPrecision
 OpDecorate %273 RelaxedPrecision
 OpDecorate %274 RelaxedPrecision
+OpDecorate %276 RelaxedPrecision
 OpDecorate %278 RelaxedPrecision
+OpDecorate %279 RelaxedPrecision
 OpDecorate %280 RelaxedPrecision
 OpDecorate %282 RelaxedPrecision
-OpDecorate %283 RelaxedPrecision
 OpDecorate %284 RelaxedPrecision
+OpDecorate %285 RelaxedPrecision
+OpDecorate %286 RelaxedPrecision
+OpDecorate %291 RelaxedPrecision
+OpDecorate %294 RelaxedPrecision
+OpDecorate %296 RelaxedPrecision
+OpDecorate %297 RelaxedPrecision
+OpDecorate %298 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -146,9 +147,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v3float = OpTypeVector %float 3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %_ptr_Function_float = OpTypePointer Function %float
@@ -157,10 +158,14 @@
 %49 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %void = OpTypeVoid
 %51 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%176 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%186 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %false = OpConstantFalse %bool
 %float_1 = OpConstant %float 1
 %_blend_set_color_saturation_helper = OpFunction %v3float None %15
@@ -209,18 +214,18 @@
 %_2_dsa = OpVariable %_ptr_Function_v3float Function
 %_3_blend_set_color_saturation = OpVariable %_ptr_Function_v3float Function
 %_4_sat = OpVariable %_ptr_Function_float Function
-%107 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_float Function
-%121 = OpVariable %_ptr_Function_v3float Function
-%123 = OpVariable %_ptr_Function_float Function
-%128 = OpVariable %_ptr_Function_v3float Function
-%130 = OpVariable %_ptr_Function_float Function
-%143 = OpVariable %_ptr_Function_v3float Function
-%145 = OpVariable %_ptr_Function_float Function
-%158 = OpVariable %_ptr_Function_v3float Function
-%160 = OpVariable %_ptr_Function_float Function
-%165 = OpVariable %_ptr_Function_v3float Function
-%167 = OpVariable %_ptr_Function_float Function
+%117 = OpVariable %_ptr_Function_v3float Function
+%119 = OpVariable %_ptr_Function_float Function
+%131 = OpVariable %_ptr_Function_v3float Function
+%133 = OpVariable %_ptr_Function_float Function
+%138 = OpVariable %_ptr_Function_v3float Function
+%140 = OpVariable %_ptr_Function_float Function
+%153 = OpVariable %_ptr_Function_v3float Function
+%155 = OpVariable %_ptr_Function_float Function
+%168 = OpVariable %_ptr_Function_v3float Function
+%170 = OpVariable %_ptr_Function_float Function
+%175 = OpVariable %_ptr_Function_v3float Function
+%177 = OpVariable %_ptr_Function_float Function
 %_5_blend_set_color_luminance = OpVariable %_ptr_Function_v3float Function
 %_6_lum = OpVariable %_ptr_Function_float Function
 %_7_result = OpVariable %_ptr_Function_v3float Function
@@ -229,275 +234,283 @@
 %_10_d = OpVariable %_ptr_Function_float Function
 %_11_n = OpVariable %_ptr_Function_v3float Function
 %_12_d = OpVariable %_ptr_Function_float Function
-%54 = OpLoad %v4float %dst
-%55 = OpCompositeExtract %float %54 3
-%56 = OpLoad %v4float %src
-%57 = OpCompositeExtract %float %56 3
-%58 = OpFMul %float %55 %57
-OpStore %_0_alpha %58
-%60 = OpLoad %v4float %src
-%61 = OpVectorShuffle %v3float %60 %60 0 1 2
-%62 = OpLoad %v4float %dst
+%54 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%58 = OpLoad %v4float %54
+%59 = OpCompositeExtract %float %58 3
+%60 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%62 = OpLoad %v4float %60
 %63 = OpCompositeExtract %float %62 3
-%64 = OpVectorTimesScalar %v3float %61 %63
-OpStore %_1_sda %64
-%66 = OpLoad %v4float %dst
-%67 = OpVectorShuffle %v3float %66 %66 0 1 2
-%68 = OpLoad %v4float %src
-%69 = OpCompositeExtract %float %68 3
-%70 = OpVectorTimesScalar %v3float %67 %69
-OpStore %_2_dsa %70
-%75 = OpLoad %v3float %_2_dsa
-%76 = OpCompositeExtract %float %75 0
-%77 = OpLoad %v3float %_2_dsa
-%78 = OpCompositeExtract %float %77 1
-%74 = OpExtInst %float %1 FMax %76 %78
-%79 = OpLoad %v3float %_2_dsa
-%80 = OpCompositeExtract %float %79 2
-%73 = OpExtInst %float %1 FMax %74 %80
-%83 = OpLoad %v3float %_2_dsa
-%84 = OpCompositeExtract %float %83 0
+%64 = OpFMul %float %59 %63
+OpStore %_0_alpha %64
+%66 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%67 = OpLoad %v4float %66
+%68 = OpVectorShuffle %v3float %67 %67 0 1 2
+%69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%70 = OpLoad %v4float %69
+%71 = OpCompositeExtract %float %70 3
+%72 = OpVectorTimesScalar %v3float %68 %71
+OpStore %_1_sda %72
+%74 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%75 = OpLoad %v4float %74
+%76 = OpVectorShuffle %v3float %75 %75 0 1 2
+%77 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%78 = OpLoad %v4float %77
+%79 = OpCompositeExtract %float %78 3
+%80 = OpVectorTimesScalar %v3float %76 %79
+OpStore %_2_dsa %80
 %85 = OpLoad %v3float %_2_dsa
-%86 = OpCompositeExtract %float %85 1
-%82 = OpExtInst %float %1 FMin %84 %86
+%86 = OpCompositeExtract %float %85 0
 %87 = OpLoad %v3float %_2_dsa
-%88 = OpCompositeExtract %float %87 2
-%81 = OpExtInst %float %1 FMin %82 %88
-%89 = OpFSub %float %73 %81
-OpStore %_4_sat %89
-%90 = OpLoad %v3float %_1_sda
-%91 = OpCompositeExtract %float %90 0
-%92 = OpLoad %v3float %_1_sda
-%93 = OpCompositeExtract %float %92 1
-%94 = OpFOrdLessThanEqual %bool %91 %93
-OpSelectionMerge %97 None
-OpBranchConditional %94 %95 %96
-%95 = OpLabel
-%98 = OpLoad %v3float %_1_sda
-%99 = OpCompositeExtract %float %98 1
+%88 = OpCompositeExtract %float %87 1
+%84 = OpExtInst %float %1 FMax %86 %88
+%89 = OpLoad %v3float %_2_dsa
+%90 = OpCompositeExtract %float %89 2
+%83 = OpExtInst %float %1 FMax %84 %90
+%93 = OpLoad %v3float %_2_dsa
+%94 = OpCompositeExtract %float %93 0
+%95 = OpLoad %v3float %_2_dsa
+%96 = OpCompositeExtract %float %95 1
+%92 = OpExtInst %float %1 FMin %94 %96
+%97 = OpLoad %v3float %_2_dsa
+%98 = OpCompositeExtract %float %97 2
+%91 = OpExtInst %float %1 FMin %92 %98
+%99 = OpFSub %float %83 %91
+OpStore %_4_sat %99
 %100 = OpLoad %v3float %_1_sda
-%101 = OpCompositeExtract %float %100 2
-%102 = OpFOrdLessThanEqual %bool %99 %101
-OpSelectionMerge %105 None
-OpBranchConditional %102 %103 %104
-%103 = OpLabel
-%106 = OpLoad %v3float %_1_sda
-OpStore %107 %106
-%108 = OpLoad %float %_4_sat
-OpStore %109 %108
-%110 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %107 %109
-OpStore %_3_blend_set_color_saturation %110
-OpBranch %105
-%104 = OpLabel
-%111 = OpLoad %v3float %_1_sda
-%112 = OpCompositeExtract %float %111 0
-%113 = OpLoad %v3float %_1_sda
-%114 = OpCompositeExtract %float %113 2
-%115 = OpFOrdLessThanEqual %bool %112 %114
-OpSelectionMerge %118 None
-OpBranchConditional %115 %116 %117
-%116 = OpLabel
-%119 = OpLoad %v3float %_1_sda
-%120 = OpVectorShuffle %v3float %119 %119 0 2 1
-OpStore %121 %120
-%122 = OpLoad %float %_4_sat
-OpStore %123 %122
-%124 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %121 %123
-%125 = OpVectorShuffle %v3float %124 %124 0 2 1
-OpStore %_3_blend_set_color_saturation %125
-OpBranch %118
-%117 = OpLabel
-%126 = OpLoad %v3float %_1_sda
-%127 = OpVectorShuffle %v3float %126 %126 2 0 1
-OpStore %128 %127
-%129 = OpLoad %float %_4_sat
-OpStore %130 %129
-%131 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %128 %130
-%132 = OpVectorShuffle %v3float %131 %131 1 2 0
-OpStore %_3_blend_set_color_saturation %132
-OpBranch %118
-%118 = OpLabel
-OpBranch %105
+%101 = OpCompositeExtract %float %100 0
+%102 = OpLoad %v3float %_1_sda
+%103 = OpCompositeExtract %float %102 1
+%104 = OpFOrdLessThanEqual %bool %101 %103
+OpSelectionMerge %107 None
+OpBranchConditional %104 %105 %106
 %105 = OpLabel
-OpBranch %97
-%96 = OpLabel
-%133 = OpLoad %v3float %_1_sda
-%134 = OpCompositeExtract %float %133 0
-%135 = OpLoad %v3float %_1_sda
-%136 = OpCompositeExtract %float %135 2
-%137 = OpFOrdLessThanEqual %bool %134 %136
-OpSelectionMerge %140 None
-OpBranchConditional %137 %138 %139
-%138 = OpLabel
-%141 = OpLoad %v3float %_1_sda
-%142 = OpVectorShuffle %v3float %141 %141 1 0 2
-OpStore %143 %142
-%144 = OpLoad %float %_4_sat
-OpStore %145 %144
-%146 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %143 %145
-%147 = OpVectorShuffle %v3float %146 %146 1 0 2
-OpStore %_3_blend_set_color_saturation %147
-OpBranch %140
-%139 = OpLabel
-%148 = OpLoad %v3float %_1_sda
-%149 = OpCompositeExtract %float %148 1
-%150 = OpLoad %v3float %_1_sda
-%151 = OpCompositeExtract %float %150 2
-%152 = OpFOrdLessThanEqual %bool %149 %151
-OpSelectionMerge %155 None
-OpBranchConditional %152 %153 %154
-%153 = OpLabel
-%156 = OpLoad %v3float %_1_sda
-%157 = OpVectorShuffle %v3float %156 %156 1 2 0
-OpStore %158 %157
-%159 = OpLoad %float %_4_sat
-OpStore %160 %159
-%161 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %158 %160
-%162 = OpVectorShuffle %v3float %161 %161 2 0 1
-OpStore %_3_blend_set_color_saturation %162
-OpBranch %155
-%154 = OpLabel
-%163 = OpLoad %v3float %_1_sda
-%164 = OpVectorShuffle %v3float %163 %163 2 1 0
-OpStore %165 %164
-%166 = OpLoad %float %_4_sat
-OpStore %167 %166
-%168 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %165 %167
-%169 = OpVectorShuffle %v3float %168 %168 2 1 0
-OpStore %_3_blend_set_color_saturation %169
-OpBranch %155
-%155 = OpLabel
-OpBranch %140
-%140 = OpLabel
-OpBranch %97
-%97 = OpLabel
-%177 = OpLoad %v3float %_2_dsa
-%172 = OpDot %float %176 %177
-OpStore %_6_lum %172
-%179 = OpLoad %float %_6_lum
-%181 = OpLoad %v3float %_3_blend_set_color_saturation
-%180 = OpDot %float %176 %181
-%182 = OpFSub %float %179 %180
-%183 = OpLoad %v3float %_3_blend_set_color_saturation
-%184 = OpCompositeConstruct %v3float %182 %182 %182
-%185 = OpFAdd %v3float %184 %183
-OpStore %_7_result %185
-%189 = OpLoad %v3float %_7_result
-%190 = OpCompositeExtract %float %189 0
-%191 = OpLoad %v3float %_7_result
-%192 = OpCompositeExtract %float %191 1
-%188 = OpExtInst %float %1 FMin %190 %192
-%193 = OpLoad %v3float %_7_result
-%194 = OpCompositeExtract %float %193 2
-%187 = OpExtInst %float %1 FMin %188 %194
-OpStore %_8_minComp %187
-%198 = OpLoad %v3float %_7_result
-%199 = OpCompositeExtract %float %198 0
-%200 = OpLoad %v3float %_7_result
-%201 = OpCompositeExtract %float %200 1
-%197 = OpExtInst %float %1 FMax %199 %201
-%202 = OpLoad %v3float %_7_result
-%203 = OpCompositeExtract %float %202 2
-%196 = OpExtInst %float %1 FMax %197 %203
-OpStore %_9_maxComp %196
-%205 = OpLoad %float %_8_minComp
-%206 = OpFOrdLessThan %bool %205 %float_0
-OpSelectionMerge %208 None
-OpBranchConditional %206 %207 %208
-%207 = OpLabel
-%209 = OpLoad %float %_6_lum
-%210 = OpLoad %float %_8_minComp
-%211 = OpFOrdNotEqual %bool %209 %210
-OpBranch %208
-%208 = OpLabel
-%212 = OpPhi %bool %false %97 %211 %207
-OpSelectionMerge %214 None
-OpBranchConditional %212 %213 %214
-%213 = OpLabel
-%216 = OpLoad %float %_6_lum
-%217 = OpLoad %float %_8_minComp
-%218 = OpFSub %float %216 %217
-OpStore %_10_d %218
+%108 = OpLoad %v3float %_1_sda
+%109 = OpCompositeExtract %float %108 1
+%110 = OpLoad %v3float %_1_sda
+%111 = OpCompositeExtract %float %110 2
+%112 = OpFOrdLessThanEqual %bool %109 %111
+OpSelectionMerge %115 None
+OpBranchConditional %112 %113 %114
+%113 = OpLabel
+%116 = OpLoad %v3float %_1_sda
+OpStore %117 %116
+%118 = OpLoad %float %_4_sat
+OpStore %119 %118
+%120 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %117 %119
+OpStore %_3_blend_set_color_saturation %120
+OpBranch %115
+%114 = OpLabel
+%121 = OpLoad %v3float %_1_sda
+%122 = OpCompositeExtract %float %121 0
+%123 = OpLoad %v3float %_1_sda
+%124 = OpCompositeExtract %float %123 2
+%125 = OpFOrdLessThanEqual %bool %122 %124
+OpSelectionMerge %128 None
+OpBranchConditional %125 %126 %127
+%126 = OpLabel
+%129 = OpLoad %v3float %_1_sda
+%130 = OpVectorShuffle %v3float %129 %129 0 2 1
+OpStore %131 %130
+%132 = OpLoad %float %_4_sat
+OpStore %133 %132
+%134 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %131 %133
+%135 = OpVectorShuffle %v3float %134 %134 0 2 1
+OpStore %_3_blend_set_color_saturation %135
+OpBranch %128
+%127 = OpLabel
+%136 = OpLoad %v3float %_1_sda
+%137 = OpVectorShuffle %v3float %136 %136 2 0 1
+OpStore %138 %137
+%139 = OpLoad %float %_4_sat
+OpStore %140 %139
+%141 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %138 %140
+%142 = OpVectorShuffle %v3float %141 %141 1 2 0
+OpStore %_3_blend_set_color_saturation %142
+OpBranch %128
+%128 = OpLabel
+OpBranch %115
+%115 = OpLabel
+OpBranch %107
+%106 = OpLabel
+%143 = OpLoad %v3float %_1_sda
+%144 = OpCompositeExtract %float %143 0
+%145 = OpLoad %v3float %_1_sda
+%146 = OpCompositeExtract %float %145 2
+%147 = OpFOrdLessThanEqual %bool %144 %146
+OpSelectionMerge %150 None
+OpBranchConditional %147 %148 %149
+%148 = OpLabel
+%151 = OpLoad %v3float %_1_sda
+%152 = OpVectorShuffle %v3float %151 %151 1 0 2
+OpStore %153 %152
+%154 = OpLoad %float %_4_sat
+OpStore %155 %154
+%156 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %153 %155
+%157 = OpVectorShuffle %v3float %156 %156 1 0 2
+OpStore %_3_blend_set_color_saturation %157
+OpBranch %150
+%149 = OpLabel
+%158 = OpLoad %v3float %_1_sda
+%159 = OpCompositeExtract %float %158 1
+%160 = OpLoad %v3float %_1_sda
+%161 = OpCompositeExtract %float %160 2
+%162 = OpFOrdLessThanEqual %bool %159 %161
+OpSelectionMerge %165 None
+OpBranchConditional %162 %163 %164
+%163 = OpLabel
+%166 = OpLoad %v3float %_1_sda
+%167 = OpVectorShuffle %v3float %166 %166 1 2 0
+OpStore %168 %167
+%169 = OpLoad %float %_4_sat
+OpStore %170 %169
+%171 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %168 %170
+%172 = OpVectorShuffle %v3float %171 %171 2 0 1
+OpStore %_3_blend_set_color_saturation %172
+OpBranch %165
+%164 = OpLabel
+%173 = OpLoad %v3float %_1_sda
+%174 = OpVectorShuffle %v3float %173 %173 2 1 0
+OpStore %175 %174
+%176 = OpLoad %float %_4_sat
+OpStore %177 %176
+%178 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %175 %177
+%179 = OpVectorShuffle %v3float %178 %178 2 1 0
+OpStore %_3_blend_set_color_saturation %179
+OpBranch %165
+%165 = OpLabel
+OpBranch %150
+%150 = OpLabel
+OpBranch %107
+%107 = OpLabel
+%187 = OpLoad %v3float %_2_dsa
+%182 = OpDot %float %186 %187
+OpStore %_6_lum %182
+%189 = OpLoad %float %_6_lum
+%191 = OpLoad %v3float %_3_blend_set_color_saturation
+%190 = OpDot %float %186 %191
+%192 = OpFSub %float %189 %190
+%193 = OpLoad %v3float %_3_blend_set_color_saturation
+%194 = OpCompositeConstruct %v3float %192 %192 %192
+%195 = OpFAdd %v3float %194 %193
+OpStore %_7_result %195
+%199 = OpLoad %v3float %_7_result
+%200 = OpCompositeExtract %float %199 0
+%201 = OpLoad %v3float %_7_result
+%202 = OpCompositeExtract %float %201 1
+%198 = OpExtInst %float %1 FMin %200 %202
+%203 = OpLoad %v3float %_7_result
+%204 = OpCompositeExtract %float %203 2
+%197 = OpExtInst %float %1 FMin %198 %204
+OpStore %_8_minComp %197
+%208 = OpLoad %v3float %_7_result
+%209 = OpCompositeExtract %float %208 0
+%210 = OpLoad %v3float %_7_result
+%211 = OpCompositeExtract %float %210 1
+%207 = OpExtInst %float %1 FMax %209 %211
+%212 = OpLoad %v3float %_7_result
+%213 = OpCompositeExtract %float %212 2
+%206 = OpExtInst %float %1 FMax %207 %213
+OpStore %_9_maxComp %206
+%215 = OpLoad %float %_8_minComp
+%216 = OpFOrdLessThan %bool %215 %float_0
+OpSelectionMerge %218 None
+OpBranchConditional %216 %217 %218
+%217 = OpLabel
 %219 = OpLoad %float %_6_lum
-%220 = OpLoad %v3float %_7_result
-%221 = OpLoad %float %_6_lum
-%222 = OpCompositeConstruct %v3float %221 %221 %221
-%223 = OpFSub %v3float %220 %222
-%224 = OpLoad %float %_6_lum
-%225 = OpLoad %float %_10_d
-%226 = OpFDiv %float %224 %225
-%227 = OpVectorTimesScalar %v3float %223 %226
-%228 = OpCompositeConstruct %v3float %219 %219 %219
-%229 = OpFAdd %v3float %228 %227
-OpStore %_7_result %229
-OpBranch %214
-%214 = OpLabel
-%230 = OpLoad %float %_9_maxComp
-%231 = OpLoad %float %_0_alpha
-%232 = OpFOrdGreaterThan %bool %230 %231
-OpSelectionMerge %234 None
-OpBranchConditional %232 %233 %234
-%233 = OpLabel
-%235 = OpLoad %float %_9_maxComp
-%236 = OpLoad %float %_6_lum
-%237 = OpFOrdNotEqual %bool %235 %236
-OpBranch %234
-%234 = OpLabel
-%238 = OpPhi %bool %false %214 %237 %233
-OpSelectionMerge %241 None
-OpBranchConditional %238 %239 %240
-%239 = OpLabel
-%243 = OpLoad %v3float %_7_result
-%244 = OpLoad %float %_6_lum
-%245 = OpCompositeConstruct %v3float %244 %244 %244
-%246 = OpFSub %v3float %243 %245
-%247 = OpLoad %float %_0_alpha
-%248 = OpLoad %float %_6_lum
-%249 = OpFSub %float %247 %248
-%250 = OpVectorTimesScalar %v3float %246 %249
-OpStore %_11_n %250
-%252 = OpLoad %float %_9_maxComp
-%253 = OpLoad %float %_6_lum
-%254 = OpFSub %float %252 %253
-OpStore %_12_d %254
-%255 = OpLoad %float %_6_lum
-%256 = OpLoad %v3float %_11_n
-%257 = OpLoad %float %_12_d
-%259 = OpFDiv %float %float_1 %257
+%220 = OpLoad %float %_8_minComp
+%221 = OpFOrdNotEqual %bool %219 %220
+OpBranch %218
+%218 = OpLabel
+%222 = OpPhi %bool %false %107 %221 %217
+OpSelectionMerge %224 None
+OpBranchConditional %222 %223 %224
+%223 = OpLabel
+%226 = OpLoad %float %_6_lum
+%227 = OpLoad %float %_8_minComp
+%228 = OpFSub %float %226 %227
+OpStore %_10_d %228
+%229 = OpLoad %float %_6_lum
+%230 = OpLoad %v3float %_7_result
+%231 = OpLoad %float %_6_lum
+%232 = OpCompositeConstruct %v3float %231 %231 %231
+%233 = OpFSub %v3float %230 %232
+%234 = OpLoad %float %_6_lum
+%235 = OpLoad %float %_10_d
+%236 = OpFDiv %float %234 %235
+%237 = OpVectorTimesScalar %v3float %233 %236
+%238 = OpCompositeConstruct %v3float %229 %229 %229
+%239 = OpFAdd %v3float %238 %237
+OpStore %_7_result %239
+OpBranch %224
+%224 = OpLabel
+%240 = OpLoad %float %_9_maxComp
+%241 = OpLoad %float %_0_alpha
+%242 = OpFOrdGreaterThan %bool %240 %241
+OpSelectionMerge %244 None
+OpBranchConditional %242 %243 %244
+%243 = OpLabel
+%245 = OpLoad %float %_9_maxComp
+%246 = OpLoad %float %_6_lum
+%247 = OpFOrdNotEqual %bool %245 %246
+OpBranch %244
+%244 = OpLabel
+%248 = OpPhi %bool %false %224 %247 %243
+OpSelectionMerge %251 None
+OpBranchConditional %248 %249 %250
+%249 = OpLabel
+%253 = OpLoad %v3float %_7_result
+%254 = OpLoad %float %_6_lum
+%255 = OpCompositeConstruct %v3float %254 %254 %254
+%256 = OpFSub %v3float %253 %255
+%257 = OpLoad %float %_0_alpha
+%258 = OpLoad %float %_6_lum
+%259 = OpFSub %float %257 %258
 %260 = OpVectorTimesScalar %v3float %256 %259
-%261 = OpCompositeConstruct %v3float %255 %255 %255
-%262 = OpFAdd %v3float %261 %260
-OpStore %_5_blend_set_color_luminance %262
-OpBranch %241
-%240 = OpLabel
-%263 = OpLoad %v3float %_7_result
-OpStore %_5_blend_set_color_luminance %263
-OpBranch %241
-%241 = OpLabel
-%264 = OpLoad %v3float %_5_blend_set_color_luminance
-%265 = OpLoad %v4float %dst
-%266 = OpVectorShuffle %v3float %265 %265 0 1 2
-%267 = OpFAdd %v3float %264 %266
-%268 = OpLoad %v3float %_2_dsa
-%269 = OpFSub %v3float %267 %268
-%270 = OpLoad %v4float %src
-%271 = OpVectorShuffle %v3float %270 %270 0 1 2
-%272 = OpFAdd %v3float %269 %271
-%273 = OpLoad %v3float %_1_sda
-%274 = OpFSub %v3float %272 %273
-%275 = OpCompositeExtract %float %274 0
-%276 = OpCompositeExtract %float %274 1
-%277 = OpCompositeExtract %float %274 2
-%278 = OpLoad %v4float %src
-%279 = OpCompositeExtract %float %278 3
-%280 = OpLoad %v4float %dst
-%281 = OpCompositeExtract %float %280 3
-%282 = OpFAdd %float %279 %281
-%283 = OpLoad %float %_0_alpha
-%284 = OpFSub %float %282 %283
-%285 = OpCompositeConstruct %v4float %275 %276 %277 %284
-OpStore %sk_FragColor %285
+OpStore %_11_n %260
+%262 = OpLoad %float %_9_maxComp
+%263 = OpLoad %float %_6_lum
+%264 = OpFSub %float %262 %263
+OpStore %_12_d %264
+%265 = OpLoad %float %_6_lum
+%266 = OpLoad %v3float %_11_n
+%267 = OpLoad %float %_12_d
+%269 = OpFDiv %float %float_1 %267
+%270 = OpVectorTimesScalar %v3float %266 %269
+%271 = OpCompositeConstruct %v3float %265 %265 %265
+%272 = OpFAdd %v3float %271 %270
+OpStore %_5_blend_set_color_luminance %272
+OpBranch %251
+%250 = OpLabel
+%273 = OpLoad %v3float %_7_result
+OpStore %_5_blend_set_color_luminance %273
+OpBranch %251
+%251 = OpLabel
+%274 = OpLoad %v3float %_5_blend_set_color_luminance
+%275 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%276 = OpLoad %v4float %275
+%277 = OpVectorShuffle %v3float %276 %276 0 1 2
+%278 = OpFAdd %v3float %274 %277
+%279 = OpLoad %v3float %_2_dsa
+%280 = OpFSub %v3float %278 %279
+%281 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%282 = OpLoad %v4float %281
+%283 = OpVectorShuffle %v3float %282 %282 0 1 2
+%284 = OpFAdd %v3float %280 %283
+%285 = OpLoad %v3float %_1_sda
+%286 = OpFSub %v3float %284 %285
+%287 = OpCompositeExtract %float %286 0
+%288 = OpCompositeExtract %float %286 1
+%289 = OpCompositeExtract %float %286 2
+%290 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%291 = OpLoad %v4float %290
+%292 = OpCompositeExtract %float %291 3
+%293 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%294 = OpLoad %v4float %293
+%295 = OpCompositeExtract %float %294 3
+%296 = OpFAdd %float %292 %295
+%297 = OpLoad %float %_0_alpha
+%298 = OpFSub %float %296 %297
+%299 = OpCompositeConstruct %v4float %287 %288 %289 %298
+OpStore %sk_FragColor %299
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendHue.glsl b/tests/sksl/blend/BlendHue.glsl
index c27e2f8..ce56eb5 100644
--- a/tests/sksl/blend/BlendHue.glsl
+++ b/tests/sksl/blend/BlendHue.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
     if (minMidMax.x < minMidMax.z) {
         float _7_n = sat * (minMidMax.y - minMidMax.x);
diff --git a/tests/sksl/blend/BlendHue.metal b/tests/sksl/blend/BlendHue.metal
index 80f32e4..aa75bc8 100644
--- a/tests/sksl/blend/BlendHue.metal
+++ b/tests/sksl/blend/BlendHue.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -15,12 +17,12 @@
     }
 }
 
-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 _0_alpha = _in.dst.w * _in.src.w;
-    float3 _1_sda = _in.src.xyz * _in.dst.w;
-    float3 _2_dsa = _in.dst.xyz * _in.src.w;
+    float _0_alpha = _uniforms.dst.w * _uniforms.src.w;
+    float3 _1_sda = _uniforms.src.xyz * _uniforms.dst.w;
+    float3 _2_dsa = _uniforms.dst.xyz * _uniforms.src.w;
     float3 _3_blend_set_color_saturation;
     float _4_sat = max(max(_2_dsa.x, _2_dsa.y), _2_dsa.z) - min(min(_2_dsa.x, _2_dsa.y), _2_dsa.z);
     if (_1_sda.x <= _1_sda.y) {
@@ -54,6 +56,6 @@
     } else {
         _5_blend_set_color_luminance = _7_result;
     }
-    _out.sk_FragColor = float4((((_5_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
+    _out.sk_FragColor = float4((((_5_blend_set_color_luminance + _uniforms.dst.xyz) - _2_dsa) + _uniforms.src.xyz) - _1_sda, (_uniforms.src.w + _uniforms.dst.w) - _0_alpha);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendHueStandaloneSettings.glsl b/tests/sksl/blend/BlendHueStandaloneSettings.glsl
index 36a49af..432ce9e 100644
--- a/tests/sksl/blend/BlendHueStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendHueStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
     if (minMidMax.x < minMidMax.z) {
         float _7_n = sat * (minMidMax.y - minMidMax.x);
diff --git a/tests/sksl/blend/BlendLighten.asm.frag b/tests/sksl/blend/BlendLighten.asm.frag
index 832363a..1e8de32 100644
--- a/tests/sksl/blend/BlendLighten.asm.frag
+++ b/tests/sksl/blend/BlendLighten.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpName %_0_result "_0_result"
 OpDecorate %sk_FragColor RelaxedPrecision
@@ -19,21 +15,26 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %22 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
 OpDecorate %25 RelaxedPrecision
 OpDecorate %27 RelaxedPrecision
 OpDecorate %30 RelaxedPrecision
 OpDecorate %32 RelaxedPrecision
-OpDecorate %33 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 OpDecorate %38 RelaxedPrecision
 OpDecorate %40 RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %50 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -41,43 +42,51 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
+%int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
 %main = OpFunction %void None %14
 %15 = OpLabel
 %_0_result = OpVariable %_ptr_Function_v4float Function
-%18 = OpLoad %v4float %src
-%20 = OpLoad %v4float %src
-%21 = OpCompositeExtract %float %20 3
-%22 = OpFSub %float %float_1 %21
-%23 = OpLoad %v4float %dst
-%24 = OpVectorTimesScalar %v4float %23 %22
-%25 = OpFAdd %v4float %18 %24
-OpStore %_0_result %25
-%27 = OpLoad %v4float %_0_result
-%28 = OpVectorShuffle %v3float %27 %27 0 1 2
-%30 = OpLoad %v4float %dst
-%31 = OpCompositeExtract %float %30 3
-%32 = OpFSub %float %float_1 %31
-%33 = OpLoad %v4float %src
-%34 = OpVectorShuffle %v3float %33 %33 0 1 2
-%35 = OpVectorTimesScalar %v3float %34 %32
-%36 = OpLoad %v4float %dst
-%37 = OpVectorShuffle %v3float %36 %36 0 1 2
-%38 = OpFAdd %v3float %35 %37
-%26 = OpExtInst %v3float %1 FMax %28 %38
-%39 = OpLoad %v4float %_0_result
-%40 = OpVectorShuffle %v4float %39 %26 4 5 6 3
-OpStore %_0_result %40
-%41 = OpLoad %v4float %_0_result
-OpStore %sk_FragColor %41
+%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%22 = OpLoad %v4float %18
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%25 = OpLoad %v4float %24
+%26 = OpCompositeExtract %float %25 3
+%27 = OpFSub %float %float_1 %26
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%30 = OpLoad %v4float %28
+%31 = OpVectorTimesScalar %v4float %30 %27
+%32 = OpFAdd %v4float %22 %31
+OpStore %_0_result %32
+%34 = OpLoad %v4float %_0_result
+%35 = OpVectorShuffle %v3float %34 %34 0 1 2
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%38 = OpLoad %v4float %37
+%39 = OpCompositeExtract %float %38 3
+%40 = OpFSub %float %float_1 %39
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpVectorShuffle %v3float %42 %42 0 1 2
+%44 = OpVectorTimesScalar %v3float %43 %40
+%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%46 = OpLoad %v4float %45
+%47 = OpVectorShuffle %v3float %46 %46 0 1 2
+%48 = OpFAdd %v3float %44 %47
+%33 = OpExtInst %v3float %1 FMax %35 %48
+%49 = OpLoad %v4float %_0_result
+%50 = OpVectorShuffle %v4float %49 %33 4 5 6 3
+OpStore %_0_result %50
+%51 = OpLoad %v4float %_0_result
+OpStore %sk_FragColor %51
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendLighten.glsl b/tests/sksl/blend/BlendLighten.glsl
index 953a699..e418df3 100644
--- a/tests/sksl/blend/BlendLighten.glsl
+++ b/tests/sksl/blend/BlendLighten.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_result = src + (1.0 - src.w) * dst;
     _0_result.xyz = max(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
diff --git a/tests/sksl/blend/BlendLighten.metal b/tests/sksl/blend/BlendLighten.metal
index 76a6ece..b070cfe 100644
--- a/tests/sksl/blend/BlendLighten.metal
+++ b/tests/sksl/blend/BlendLighten.metal
@@ -1,16 +1,18 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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 _0_result = _in.src + (1.0 - _in.src.w) * _in.dst;
-    _0_result.xyz = max(_0_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
+    float4 _0_result = _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
+    _0_result.xyz = max(_0_result.xyz, (1.0 - _uniforms.dst.w) * _uniforms.src.xyz + _uniforms.dst.xyz);
     _out.sk_FragColor = _0_result;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendLightenStandaloneSettings.glsl b/tests/sksl/blend/BlendLightenStandaloneSettings.glsl
index f8b30d5..0865170 100644
--- a/tests/sksl/blend/BlendLightenStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendLightenStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     vec4 _0_result = src + (1.0 - src.w) * dst;
     _0_result.xyz = max(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
diff --git a/tests/sksl/blend/BlendLuminosity.asm.frag b/tests/sksl/blend/BlendLuminosity.asm.frag
index e594a75..421869a 100644
--- a/tests/sksl/blend/BlendLuminosity.asm.frag
+++ b/tests/sksl/blend/BlendLuminosity.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpName %_0_alpha "_0_alpha"
 OpName %_1_sda "_1_sda"
@@ -29,68 +25,73 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %22 RelaxedPrecision
 OpDecorate %26 RelaxedPrecision
 OpDecorate %28 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %46 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %67 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
-OpDecorate %85 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
 OpDecorate %99 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
 OpDecorate %104 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
 OpDecorate %132 RelaxedPrecision
 OpDecorate %133 RelaxedPrecision
+OpDecorate %134 RelaxedPrecision
 OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
-OpDecorate %140 RelaxedPrecision
 OpDecorate %141 RelaxedPrecision
 OpDecorate %142 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
 OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
+OpDecorate %165 RelaxedPrecision
+OpDecorate %166 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -98,18 +99,22 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %_ptr_Function_float = OpTypePointer Function %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %v3float = OpTypeVector %float 3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%43 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%53 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %false = OpConstantFalse %bool
 %float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
@@ -126,151 +131,159 @@
 %_8_d = OpVariable %_ptr_Function_float Function
 %_9_n = OpVariable %_ptr_Function_v3float Function
 %_10_d = OpVariable %_ptr_Function_float Function
-%18 = OpLoad %v4float %dst
-%19 = OpCompositeExtract %float %18 3
-%20 = OpLoad %v4float %src
-%21 = OpCompositeExtract %float %20 3
-%22 = OpFMul %float %19 %21
-OpStore %_0_alpha %22
-%26 = OpLoad %v4float %src
-%27 = OpVectorShuffle %v3float %26 %26 0 1 2
-%28 = OpLoad %v4float %dst
-%29 = OpCompositeExtract %float %28 3
-%30 = OpVectorTimesScalar %v3float %27 %29
-OpStore %_1_sda %30
-%32 = OpLoad %v4float %dst
-%33 = OpVectorShuffle %v3float %32 %32 0 1 2
-%34 = OpLoad %v4float %src
-%35 = OpCompositeExtract %float %34 3
-%36 = OpVectorTimesScalar %v3float %33 %35
-OpStore %_2_dsa %36
-%44 = OpLoad %v3float %_1_sda
-%39 = OpDot %float %43 %44
-OpStore %_4_lum %39
-%46 = OpLoad %float %_4_lum
-%48 = OpLoad %v3float %_2_dsa
-%47 = OpDot %float %43 %48
-%49 = OpFSub %float %46 %47
-%50 = OpLoad %v3float %_2_dsa
-%51 = OpCompositeConstruct %v3float %49 %49 %49
-%52 = OpFAdd %v3float %51 %50
-OpStore %_5_result %52
-%56 = OpLoad %v3float %_5_result
-%57 = OpCompositeExtract %float %56 0
-%58 = OpLoad %v3float %_5_result
-%59 = OpCompositeExtract %float %58 1
-%55 = OpExtInst %float %1 FMin %57 %59
-%60 = OpLoad %v3float %_5_result
-%61 = OpCompositeExtract %float %60 2
-%54 = OpExtInst %float %1 FMin %55 %61
-OpStore %_6_minComp %54
-%65 = OpLoad %v3float %_5_result
-%66 = OpCompositeExtract %float %65 0
-%67 = OpLoad %v3float %_5_result
-%68 = OpCompositeExtract %float %67 1
-%64 = OpExtInst %float %1 FMax %66 %68
-%69 = OpLoad %v3float %_5_result
-%70 = OpCompositeExtract %float %69 2
-%63 = OpExtInst %float %1 FMax %64 %70
-OpStore %_7_maxComp %63
-%72 = OpLoad %float %_6_minComp
-%74 = OpFOrdLessThan %bool %72 %float_0
-OpSelectionMerge %76 None
-OpBranchConditional %74 %75 %76
-%75 = OpLabel
-%77 = OpLoad %float %_4_lum
-%78 = OpLoad %float %_6_minComp
-%79 = OpFOrdNotEqual %bool %77 %78
-OpBranch %76
-%76 = OpLabel
-%80 = OpPhi %bool %false %15 %79 %75
-OpSelectionMerge %82 None
-OpBranchConditional %80 %81 %82
-%81 = OpLabel
-%84 = OpLoad %float %_4_lum
-%85 = OpLoad %float %_6_minComp
-%86 = OpFSub %float %84 %85
-OpStore %_8_d %86
+%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%22 = OpLoad %v4float %18
+%23 = OpCompositeExtract %float %22 3
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%26 = OpLoad %v4float %24
+%27 = OpCompositeExtract %float %26 3
+%28 = OpFMul %float %23 %27
+OpStore %_0_alpha %28
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %32
+%34 = OpVectorShuffle %v3float %33 %33 0 1 2
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%36 = OpLoad %v4float %35
+%37 = OpCompositeExtract %float %36 3
+%38 = OpVectorTimesScalar %v3float %34 %37
+OpStore %_1_sda %38
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%41 = OpLoad %v4float %40
+%42 = OpVectorShuffle %v3float %41 %41 0 1 2
+%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%44 = OpLoad %v4float %43
+%45 = OpCompositeExtract %float %44 3
+%46 = OpVectorTimesScalar %v3float %42 %45
+OpStore %_2_dsa %46
+%54 = OpLoad %v3float %_1_sda
+%49 = OpDot %float %53 %54
+OpStore %_4_lum %49
+%56 = OpLoad %float %_4_lum
+%58 = OpLoad %v3float %_2_dsa
+%57 = OpDot %float %53 %58
+%59 = OpFSub %float %56 %57
+%60 = OpLoad %v3float %_2_dsa
+%61 = OpCompositeConstruct %v3float %59 %59 %59
+%62 = OpFAdd %v3float %61 %60
+OpStore %_5_result %62
+%66 = OpLoad %v3float %_5_result
+%67 = OpCompositeExtract %float %66 0
+%68 = OpLoad %v3float %_5_result
+%69 = OpCompositeExtract %float %68 1
+%65 = OpExtInst %float %1 FMin %67 %69
+%70 = OpLoad %v3float %_5_result
+%71 = OpCompositeExtract %float %70 2
+%64 = OpExtInst %float %1 FMin %65 %71
+OpStore %_6_minComp %64
+%75 = OpLoad %v3float %_5_result
+%76 = OpCompositeExtract %float %75 0
+%77 = OpLoad %v3float %_5_result
+%78 = OpCompositeExtract %float %77 1
+%74 = OpExtInst %float %1 FMax %76 %78
+%79 = OpLoad %v3float %_5_result
+%80 = OpCompositeExtract %float %79 2
+%73 = OpExtInst %float %1 FMax %74 %80
+OpStore %_7_maxComp %73
+%82 = OpLoad %float %_6_minComp
+%84 = OpFOrdLessThan %bool %82 %float_0
+OpSelectionMerge %86 None
+OpBranchConditional %84 %85 %86
+%85 = OpLabel
 %87 = OpLoad %float %_4_lum
-%88 = OpLoad %v3float %_5_result
-%89 = OpLoad %float %_4_lum
-%90 = OpCompositeConstruct %v3float %89 %89 %89
-%91 = OpFSub %v3float %88 %90
-%92 = OpLoad %float %_4_lum
-%93 = OpLoad %float %_8_d
-%94 = OpFDiv %float %92 %93
-%95 = OpVectorTimesScalar %v3float %91 %94
-%96 = OpCompositeConstruct %v3float %87 %87 %87
-%97 = OpFAdd %v3float %96 %95
-OpStore %_5_result %97
-OpBranch %82
-%82 = OpLabel
-%98 = OpLoad %float %_7_maxComp
-%99 = OpLoad %float %_0_alpha
-%100 = OpFOrdGreaterThan %bool %98 %99
-OpSelectionMerge %102 None
-OpBranchConditional %100 %101 %102
-%101 = OpLabel
-%103 = OpLoad %float %_7_maxComp
-%104 = OpLoad %float %_4_lum
-%105 = OpFOrdNotEqual %bool %103 %104
-OpBranch %102
-%102 = OpLabel
-%106 = OpPhi %bool %false %82 %105 %101
-OpSelectionMerge %109 None
-OpBranchConditional %106 %107 %108
-%107 = OpLabel
-%111 = OpLoad %v3float %_5_result
-%112 = OpLoad %float %_4_lum
-%113 = OpCompositeConstruct %v3float %112 %112 %112
-%114 = OpFSub %v3float %111 %113
-%115 = OpLoad %float %_0_alpha
-%116 = OpLoad %float %_4_lum
-%117 = OpFSub %float %115 %116
-%118 = OpVectorTimesScalar %v3float %114 %117
-OpStore %_9_n %118
-%120 = OpLoad %float %_7_maxComp
-%121 = OpLoad %float %_4_lum
-%122 = OpFSub %float %120 %121
-OpStore %_10_d %122
-%123 = OpLoad %float %_4_lum
-%124 = OpLoad %v3float %_9_n
-%125 = OpLoad %float %_10_d
-%127 = OpFDiv %float %float_1 %125
+%88 = OpLoad %float %_6_minComp
+%89 = OpFOrdNotEqual %bool %87 %88
+OpBranch %86
+%86 = OpLabel
+%90 = OpPhi %bool %false %15 %89 %85
+OpSelectionMerge %92 None
+OpBranchConditional %90 %91 %92
+%91 = OpLabel
+%94 = OpLoad %float %_4_lum
+%95 = OpLoad %float %_6_minComp
+%96 = OpFSub %float %94 %95
+OpStore %_8_d %96
+%97 = OpLoad %float %_4_lum
+%98 = OpLoad %v3float %_5_result
+%99 = OpLoad %float %_4_lum
+%100 = OpCompositeConstruct %v3float %99 %99 %99
+%101 = OpFSub %v3float %98 %100
+%102 = OpLoad %float %_4_lum
+%103 = OpLoad %float %_8_d
+%104 = OpFDiv %float %102 %103
+%105 = OpVectorTimesScalar %v3float %101 %104
+%106 = OpCompositeConstruct %v3float %97 %97 %97
+%107 = OpFAdd %v3float %106 %105
+OpStore %_5_result %107
+OpBranch %92
+%92 = OpLabel
+%108 = OpLoad %float %_7_maxComp
+%109 = OpLoad %float %_0_alpha
+%110 = OpFOrdGreaterThan %bool %108 %109
+OpSelectionMerge %112 None
+OpBranchConditional %110 %111 %112
+%111 = OpLabel
+%113 = OpLoad %float %_7_maxComp
+%114 = OpLoad %float %_4_lum
+%115 = OpFOrdNotEqual %bool %113 %114
+OpBranch %112
+%112 = OpLabel
+%116 = OpPhi %bool %false %92 %115 %111
+OpSelectionMerge %119 None
+OpBranchConditional %116 %117 %118
+%117 = OpLabel
+%121 = OpLoad %v3float %_5_result
+%122 = OpLoad %float %_4_lum
+%123 = OpCompositeConstruct %v3float %122 %122 %122
+%124 = OpFSub %v3float %121 %123
+%125 = OpLoad %float %_0_alpha
+%126 = OpLoad %float %_4_lum
+%127 = OpFSub %float %125 %126
 %128 = OpVectorTimesScalar %v3float %124 %127
-%129 = OpCompositeConstruct %v3float %123 %123 %123
-%130 = OpFAdd %v3float %129 %128
-OpStore %_3_blend_set_color_luminance %130
-OpBranch %109
-%108 = OpLabel
-%131 = OpLoad %v3float %_5_result
-OpStore %_3_blend_set_color_luminance %131
-OpBranch %109
-%109 = OpLabel
-%132 = OpLoad %v3float %_3_blend_set_color_luminance
-%133 = OpLoad %v4float %dst
-%134 = OpVectorShuffle %v3float %133 %133 0 1 2
-%135 = OpFAdd %v3float %132 %134
-%136 = OpLoad %v3float %_2_dsa
-%137 = OpFSub %v3float %135 %136
-%138 = OpLoad %v4float %src
-%139 = OpVectorShuffle %v3float %138 %138 0 1 2
-%140 = OpFAdd %v3float %137 %139
-%141 = OpLoad %v3float %_1_sda
-%142 = OpFSub %v3float %140 %141
-%143 = OpCompositeExtract %float %142 0
-%144 = OpCompositeExtract %float %142 1
-%145 = OpCompositeExtract %float %142 2
-%146 = OpLoad %v4float %src
-%147 = OpCompositeExtract %float %146 3
-%148 = OpLoad %v4float %dst
-%149 = OpCompositeExtract %float %148 3
-%150 = OpFAdd %float %147 %149
-%151 = OpLoad %float %_0_alpha
-%152 = OpFSub %float %150 %151
-%153 = OpCompositeConstruct %v4float %143 %144 %145 %152
-OpStore %sk_FragColor %153
+OpStore %_9_n %128
+%130 = OpLoad %float %_7_maxComp
+%131 = OpLoad %float %_4_lum
+%132 = OpFSub %float %130 %131
+OpStore %_10_d %132
+%133 = OpLoad %float %_4_lum
+%134 = OpLoad %v3float %_9_n
+%135 = OpLoad %float %_10_d
+%137 = OpFDiv %float %float_1 %135
+%138 = OpVectorTimesScalar %v3float %134 %137
+%139 = OpCompositeConstruct %v3float %133 %133 %133
+%140 = OpFAdd %v3float %139 %138
+OpStore %_3_blend_set_color_luminance %140
+OpBranch %119
+%118 = OpLabel
+%141 = OpLoad %v3float %_5_result
+OpStore %_3_blend_set_color_luminance %141
+OpBranch %119
+%119 = OpLabel
+%142 = OpLoad %v3float %_3_blend_set_color_luminance
+%143 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%144 = OpLoad %v4float %143
+%145 = OpVectorShuffle %v3float %144 %144 0 1 2
+%146 = OpFAdd %v3float %142 %145
+%147 = OpLoad %v3float %_2_dsa
+%148 = OpFSub %v3float %146 %147
+%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%150 = OpLoad %v4float %149
+%151 = OpVectorShuffle %v3float %150 %150 0 1 2
+%152 = OpFAdd %v3float %148 %151
+%153 = OpLoad %v3float %_1_sda
+%154 = OpFSub %v3float %152 %153
+%155 = OpCompositeExtract %float %154 0
+%156 = OpCompositeExtract %float %154 1
+%157 = OpCompositeExtract %float %154 2
+%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%159 = OpLoad %v4float %158
+%160 = OpCompositeExtract %float %159 3
+%161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%162 = OpLoad %v4float %161
+%163 = OpCompositeExtract %float %162 3
+%164 = OpFAdd %float %160 %163
+%165 = OpLoad %float %_0_alpha
+%166 = OpFSub %float %164 %165
+%167 = OpCompositeConstruct %v4float %155 %156 %157 %166
+OpStore %sk_FragColor %167
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendLuminosity.glsl b/tests/sksl/blend/BlendLuminosity.glsl
index cab7866..e9b88cb 100644
--- a/tests/sksl/blend/BlendLuminosity.glsl
+++ b/tests/sksl/blend/BlendLuminosity.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     float _0_alpha = dst.w * src.w;
     vec3 _1_sda = src.xyz * dst.w;
diff --git a/tests/sksl/blend/BlendLuminosity.metal b/tests/sksl/blend/BlendLuminosity.metal
index 9308394..f21668c 100644
--- a/tests/sksl/blend/BlendLuminosity.metal
+++ b/tests/sksl/blend/BlendLuminosity.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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 _0_alpha = _in.dst.w * _in.src.w;
-    float3 _1_sda = _in.src.xyz * _in.dst.w;
-    float3 _2_dsa = _in.dst.xyz * _in.src.w;
+    float _0_alpha = _uniforms.dst.w * _uniforms.src.w;
+    float3 _1_sda = _uniforms.src.xyz * _uniforms.dst.w;
+    float3 _2_dsa = _uniforms.dst.xyz * _uniforms.src.w;
     float3 _3_blend_set_color_luminance;
     float _4_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda);
     float3 _5_result = (_4_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa)) + _2_dsa;
@@ -28,6 +30,6 @@
     } else {
         _3_blend_set_color_luminance = _5_result;
     }
-    _out.sk_FragColor = float4((((_3_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
+    _out.sk_FragColor = float4((((_3_blend_set_color_luminance + _uniforms.dst.xyz) - _2_dsa) + _uniforms.src.xyz) - _1_sda, (_uniforms.src.w + _uniforms.dst.w) - _0_alpha);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendLuminosityStandaloneSettings.glsl b/tests/sksl/blend/BlendLuminosityStandaloneSettings.glsl
index c0e6b78..6b565e7 100644
--- a/tests/sksl/blend/BlendLuminosityStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendLuminosityStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     float _0_alpha = dst.w * src.w;
     vec3 _1_sda = src.xyz * dst.w;
diff --git a/tests/sksl/blend/BlendModulate.asm.frag b/tests/sksl/blend/BlendModulate.asm.frag
index 3c3fc0f..4ce7f2a 100644
--- a/tests/sksl/blend/BlendModulate.asm.frag
+++ b/tests/sksl/blend/BlendModulate.asm.frag
@@ -1,28 +1,29 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -30,18 +31,22 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-%17 = OpLoad %v4float %dst
-%18 = OpFMul %v4float %16 %17
-OpStore %sk_FragColor %18
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%23 = OpLoad %v4float %21
+%24 = OpFMul %v4float %20 %23
+OpStore %sk_FragColor %24
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendModulate.glsl b/tests/sksl/blend/BlendModulate.glsl
index a3fbb31..200b256 100644
--- a/tests/sksl/blend/BlendModulate.glsl
+++ b/tests/sksl/blend/BlendModulate.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src * dst;
 }
diff --git a/tests/sksl/blend/BlendModulate.metal b/tests/sksl/blend/BlendModulate.metal
index 234d04e..6580e22 100644
--- a/tests/sksl/blend/BlendModulate.metal
+++ b/tests/sksl/blend/BlendModulate.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.src * _in.dst;
+    _out.sk_FragColor = _uniforms.src * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendModulateStandaloneSettings.glsl b/tests/sksl/blend/BlendModulateStandaloneSettings.glsl
index e662ece..3958ed0 100644
--- a/tests/sksl/blend/BlendModulateStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendModulateStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src * dst;
 }
diff --git a/tests/sksl/blend/BlendMultiply.asm.frag b/tests/sksl/blend/BlendMultiply.asm.frag
index 3d8ab6f..5a7813b 100644
--- a/tests/sksl/blend/BlendMultiply.asm.frag
+++ b/tests/sksl/blend/BlendMultiply.asm.frag
@@ -1,42 +1,43 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
 OpDecorate %26 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %30 RelaxedPrecision
 OpDecorate %31 RelaxedPrecision
 OpDecorate %33 RelaxedPrecision
 OpDecorate %35 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
 OpDecorate %40 RelaxedPrecision
-OpDecorate %42 RelaxedPrecision
-OpDecorate %44 RelaxedPrecision
+OpDecorate %43 RelaxedPrecision
 OpDecorate %45 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %56 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %60 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -44,49 +45,60 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_1 = OpConstant %float 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %src
-%18 = OpCompositeExtract %float %17 3
-%19 = OpFSub %float %float_1 %18
-%20 = OpLoad %v4float %dst
-%21 = OpVectorShuffle %v3float %20 %20 0 1 2
-%23 = OpVectorTimesScalar %v3float %21 %19
-%24 = OpLoad %v4float %dst
-%25 = OpCompositeExtract %float %24 3
-%26 = OpFSub %float %float_1 %25
-%27 = OpLoad %v4float %src
-%28 = OpVectorShuffle %v3float %27 %27 0 1 2
-%29 = OpVectorTimesScalar %v3float %28 %26
-%30 = OpFAdd %v3float %23 %29
-%31 = OpLoad %v4float %src
-%32 = OpVectorShuffle %v3float %31 %31 0 1 2
-%33 = OpLoad %v4float %dst
-%34 = OpVectorShuffle %v3float %33 %33 0 1 2
-%35 = OpFMul %v3float %32 %34
-%36 = OpFAdd %v3float %30 %35
-%37 = OpCompositeExtract %float %36 0
-%38 = OpCompositeExtract %float %36 1
-%39 = OpCompositeExtract %float %36 2
-%40 = OpLoad %v4float %src
-%41 = OpCompositeExtract %float %40 3
-%42 = OpLoad %v4float %src
-%43 = OpCompositeExtract %float %42 3
-%44 = OpFSub %float %float_1 %43
-%45 = OpLoad %v4float %dst
-%46 = OpCompositeExtract %float %45 3
-%47 = OpFMul %float %44 %46
-%48 = OpFAdd %float %41 %47
-%49 = OpCompositeConstruct %v4float %37 %38 %39 %48
-OpStore %sk_FragColor %49
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpCompositeExtract %float %21 3
+%23 = OpFSub %float %float_1 %22
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%26 = OpLoad %v4float %24
+%27 = OpVectorShuffle %v3float %26 %26 0 1 2
+%29 = OpVectorTimesScalar %v3float %27 %23
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%31 = OpLoad %v4float %30
+%32 = OpCompositeExtract %float %31 3
+%33 = OpFSub %float %float_1 %32
+%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%35 = OpLoad %v4float %34
+%36 = OpVectorShuffle %v3float %35 %35 0 1 2
+%37 = OpVectorTimesScalar %v3float %36 %33
+%38 = OpFAdd %v3float %29 %37
+%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%40 = OpLoad %v4float %39
+%41 = OpVectorShuffle %v3float %40 %40 0 1 2
+%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%43 = OpLoad %v4float %42
+%44 = OpVectorShuffle %v3float %43 %43 0 1 2
+%45 = OpFMul %v3float %41 %44
+%46 = OpFAdd %v3float %38 %45
+%47 = OpCompositeExtract %float %46 0
+%48 = OpCompositeExtract %float %46 1
+%49 = OpCompositeExtract %float %46 2
+%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%51 = OpLoad %v4float %50
+%52 = OpCompositeExtract %float %51 3
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%54 = OpLoad %v4float %53
+%55 = OpCompositeExtract %float %54 3
+%56 = OpFSub %float %float_1 %55
+%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%58 = OpLoad %v4float %57
+%59 = OpCompositeExtract %float %58 3
+%60 = OpFMul %float %56 %59
+%61 = OpFAdd %float %52 %60
+%62 = OpCompositeConstruct %v4float %47 %48 %49 %61
+OpStore %sk_FragColor %62
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendMultiply.glsl b/tests/sksl/blend/BlendMultiply.glsl
index 8907b70..520b054 100644
--- a/tests/sksl/blend/BlendMultiply.glsl
+++ b/tests/sksl/blend/BlendMultiply.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendMultiply.metal b/tests/sksl/blend/BlendMultiply.metal
index 3787c81..92df1c6 100644
--- a/tests/sksl/blend/BlendMultiply.metal
+++ b/tests/sksl/blend/BlendMultiply.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = float4(((1.0 - _in.src.w) * _in.dst.xyz + (1.0 - _in.dst.w) * _in.src.xyz) + _in.src.xyz * _in.dst.xyz, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = float4(((1.0 - _uniforms.src.w) * _uniforms.dst.xyz + (1.0 - _uniforms.dst.w) * _uniforms.src.xyz) + _uniforms.src.xyz * _uniforms.dst.xyz, _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendMultiplyStandaloneSettings.glsl b/tests/sksl/blend/BlendMultiplyStandaloneSettings.glsl
index 89d07f4..112a079 100644
--- a/tests/sksl/blend/BlendMultiplyStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendMultiplyStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
 }
diff --git a/tests/sksl/blend/BlendOverlay.asm.frag b/tests/sksl/blend/BlendOverlay.asm.frag
index 89480a2..2dc5e1b 100644
--- a/tests/sksl/blend/BlendOverlay.asm.frag
+++ b/tests/sksl/blend/BlendOverlay.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_blend_overlay_component "_blend_overlay_component"
 OpName %main "main"
 OpName %_0_result "_0_result"
@@ -20,8 +16,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
@@ -42,30 +43,30 @@
 OpDecorate %54 RelaxedPrecision
 OpDecorate %55 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
 OpDecorate %76 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
+OpDecorate %129 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -73,9 +74,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %15 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
@@ -84,6 +85,10 @@
 %void = OpTypeVoid
 %58 = OpTypeFunction %void
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %float_1 = OpConstant %float 1
 %v3float = OpTypeVector %float 3
 %_blend_overlay_component = OpFunction %float None %15
@@ -136,66 +141,77 @@
 %main = OpFunction %void None %58
 %59 = OpLabel
 %_0_result = OpVariable %_ptr_Function_v4float Function
-%64 = OpVariable %_ptr_Function_v2float Function
-%67 = OpVariable %_ptr_Function_v2float Function
-%71 = OpVariable %_ptr_Function_v2float Function
-%74 = OpVariable %_ptr_Function_v2float Function
+%68 = OpVariable %_ptr_Function_v2float Function
+%73 = OpVariable %_ptr_Function_v2float Function
 %78 = OpVariable %_ptr_Function_v2float Function
-%81 = OpVariable %_ptr_Function_v2float Function
-%62 = OpLoad %v4float %src
-%63 = OpVectorShuffle %v2float %62 %62 0 3
-OpStore %64 %63
-%65 = OpLoad %v4float %dst
-%66 = OpVectorShuffle %v2float %65 %65 0 3
-OpStore %67 %66
-%68 = OpFunctionCall %float %_blend_overlay_component %64 %67
-%69 = OpLoad %v4float %src
-%70 = OpVectorShuffle %v2float %69 %69 1 3
-OpStore %71 %70
-%72 = OpLoad %v4float %dst
-%73 = OpVectorShuffle %v2float %72 %72 1 3
-OpStore %74 %73
-%75 = OpFunctionCall %float %_blend_overlay_component %71 %74
-%76 = OpLoad %v4float %src
-%77 = OpVectorShuffle %v2float %76 %76 2 3
+%82 = OpVariable %_ptr_Function_v2float Function
+%87 = OpVariable %_ptr_Function_v2float Function
+%91 = OpVariable %_ptr_Function_v2float Function
+%62 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%66 = OpLoad %v4float %62
+%67 = OpVectorShuffle %v2float %66 %66 0 3
+OpStore %68 %67
+%69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%71 = OpLoad %v4float %69
+%72 = OpVectorShuffle %v2float %71 %71 0 3
+OpStore %73 %72
+%74 = OpFunctionCall %float %_blend_overlay_component %68 %73
+%75 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%76 = OpLoad %v4float %75
+%77 = OpVectorShuffle %v2float %76 %76 1 3
 OpStore %78 %77
-%79 = OpLoad %v4float %dst
-%80 = OpVectorShuffle %v2float %79 %79 2 3
-OpStore %81 %80
-%82 = OpFunctionCall %float %_blend_overlay_component %78 %81
-%83 = OpLoad %v4float %src
-%84 = OpCompositeExtract %float %83 3
-%86 = OpLoad %v4float %src
-%87 = OpCompositeExtract %float %86 3
-%88 = OpFSub %float %float_1 %87
-%89 = OpLoad %v4float %dst
-%90 = OpCompositeExtract %float %89 3
-%91 = OpFMul %float %88 %90
-%92 = OpFAdd %float %84 %91
-%93 = OpCompositeConstruct %v4float %68 %75 %82 %92
-OpStore %_0_result %93
-%94 = OpLoad %v4float %_0_result
-%95 = OpVectorShuffle %v3float %94 %94 0 1 2
-%97 = OpLoad %v4float %dst
-%98 = OpVectorShuffle %v3float %97 %97 0 1 2
-%99 = OpLoad %v4float %src
-%100 = OpCompositeExtract %float %99 3
-%101 = OpFSub %float %float_1 %100
-%102 = OpVectorTimesScalar %v3float %98 %101
-%103 = OpLoad %v4float %src
-%104 = OpVectorShuffle %v3float %103 %103 0 1 2
-%105 = OpLoad %v4float %dst
-%106 = OpCompositeExtract %float %105 3
-%107 = OpFSub %float %float_1 %106
-%108 = OpVectorTimesScalar %v3float %104 %107
-%109 = OpFAdd %v3float %102 %108
-%110 = OpFAdd %v3float %95 %109
-%111 = OpLoad %v4float %_0_result
-%112 = OpVectorShuffle %v4float %111 %110 4 5 6 3
-OpStore %_0_result %112
-%113 = OpLoad %v4float %_0_result
-OpStore %sk_FragColor %113
+%79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%80 = OpLoad %v4float %79
+%81 = OpVectorShuffle %v2float %80 %80 1 3
+OpStore %82 %81
+%83 = OpFunctionCall %float %_blend_overlay_component %78 %82
+%84 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%85 = OpLoad %v4float %84
+%86 = OpVectorShuffle %v2float %85 %85 2 3
+OpStore %87 %86
+%88 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%89 = OpLoad %v4float %88
+%90 = OpVectorShuffle %v2float %89 %89 2 3
+OpStore %91 %90
+%92 = OpFunctionCall %float %_blend_overlay_component %87 %91
+%93 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%94 = OpLoad %v4float %93
+%95 = OpCompositeExtract %float %94 3
+%97 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%98 = OpLoad %v4float %97
+%99 = OpCompositeExtract %float %98 3
+%100 = OpFSub %float %float_1 %99
+%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%102 = OpLoad %v4float %101
+%103 = OpCompositeExtract %float %102 3
+%104 = OpFMul %float %100 %103
+%105 = OpFAdd %float %95 %104
+%106 = OpCompositeConstruct %v4float %74 %83 %92 %105
+OpStore %_0_result %106
+%107 = OpLoad %v4float %_0_result
+%108 = OpVectorShuffle %v3float %107 %107 0 1 2
+%110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%111 = OpLoad %v4float %110
+%112 = OpVectorShuffle %v3float %111 %111 0 1 2
+%113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%114 = OpLoad %v4float %113
+%115 = OpCompositeExtract %float %114 3
+%116 = OpFSub %float %float_1 %115
+%117 = OpVectorTimesScalar %v3float %112 %116
+%118 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%119 = OpLoad %v4float %118
+%120 = OpVectorShuffle %v3float %119 %119 0 1 2
+%121 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%122 = OpLoad %v4float %121
+%123 = OpCompositeExtract %float %122 3
+%124 = OpFSub %float %float_1 %123
+%125 = OpVectorTimesScalar %v3float %120 %124
+%126 = OpFAdd %v3float %117 %125
+%127 = OpFAdd %v3float %108 %126
+%128 = OpLoad %v4float %_0_result
+%129 = OpVectorShuffle %v4float %128 %127 4 5 6 3
+OpStore %_0_result %129
+%130 = OpLoad %v4float %_0_result
+OpStore %sk_FragColor %130
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendOverlay.glsl b/tests/sksl/blend/BlendOverlay.glsl
index 4727fce..11f7431 100644
--- a/tests/sksl/blend/BlendOverlay.glsl
+++ b/tests/sksl/blend/BlendOverlay.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _blend_overlay_component(vec2 s, vec2 d) {
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
diff --git a/tests/sksl/blend/BlendOverlay.metal b/tests/sksl/blend/BlendOverlay.metal
index fcbb5b5..df326ac 100644
--- a/tests/sksl/blend/BlendOverlay.metal
+++ b/tests/sksl/blend/BlendOverlay.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -9,11 +11,11 @@
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
 
-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 _0_result = float4(_blend_overlay_component(_in.src.xw, _in.dst.xw), _blend_overlay_component(_in.src.yw, _in.dst.yw), _blend_overlay_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
-    _0_result.xyz = _0_result.xyz + _in.dst.xyz * (1.0 - _in.src.w) + _in.src.xyz * (1.0 - _in.dst.w);
+    float4 _0_result = float4(_blend_overlay_component(_uniforms.src.xw, _uniforms.dst.xw), _blend_overlay_component(_uniforms.src.yw, _uniforms.dst.yw), _blend_overlay_component(_uniforms.src.zw, _uniforms.dst.zw), _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
+    _0_result.xyz = _0_result.xyz + _uniforms.dst.xyz * (1.0 - _uniforms.src.w) + _uniforms.src.xyz * (1.0 - _uniforms.dst.w);
     _out.sk_FragColor = _0_result;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendOverlayStandaloneSettings.glsl b/tests/sksl/blend/BlendOverlayStandaloneSettings.glsl
index 3be5c8c..04d6b1a 100644
--- a/tests/sksl/blend/BlendOverlayStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendOverlayStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _blend_overlay_component(vec2 s, vec2 d) {
     return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
 }
diff --git a/tests/sksl/blend/BlendPlus.asm.frag b/tests/sksl/blend/BlendPlus.asm.frag
index ce57ecc..3c0e42d 100644
--- a/tests/sksl/blend/BlendPlus.asm.frag
+++ b/tests/sksl/blend/BlendPlus.asm.frag
@@ -1,29 +1,30 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -31,21 +32,25 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %float_1 = OpConstant %float 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %src
-%18 = OpLoad %v4float %dst
-%19 = OpFAdd %v4float %17 %18
-%21 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
-%16 = OpExtInst %v4float %1 FMin %19 %21
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%25 = OpFAdd %v4float %21 %24
+%27 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
+%16 = OpExtInst %v4float %1 FMin %25 %27
 OpStore %sk_FragColor %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendPlus.glsl b/tests/sksl/blend/BlendPlus.glsl
index 18f33cd..caad0b2 100644
--- a/tests/sksl/blend/BlendPlus.glsl
+++ b/tests/sksl/blend/BlendPlus.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = min(src + dst, 1.0);
 }
diff --git a/tests/sksl/blend/BlendPlus.metal b/tests/sksl/blend/BlendPlus.metal
index 80820eb..82d9d65 100644
--- a/tests/sksl/blend/BlendPlus.metal
+++ b/tests/sksl/blend/BlendPlus.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = min(_in.src + _in.dst, 1.0);
+    _out.sk_FragColor = min(_uniforms.src + _uniforms.dst, 1.0);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendPlusStandaloneSettings.glsl b/tests/sksl/blend/BlendPlusStandaloneSettings.glsl
index e665939..680dac1 100644
--- a/tests/sksl/blend/BlendPlusStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendPlusStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = min(src + dst, 1.0);
 }
diff --git a/tests/sksl/blend/BlendSaturation.asm.frag b/tests/sksl/blend/BlendSaturation.asm.frag
index 4004159..29492ae 100644
--- a/tests/sksl/blend/BlendSaturation.asm.frag
+++ b/tests/sksl/blend/BlendSaturation.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_blend_set_color_saturation_helper "_blend_set_color_saturation_helper"
 OpName %_7_n "_7_n"
 OpName %_8_d "_8_d"
@@ -34,8 +30,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
 OpDecorate %30 RelaxedPrecision
@@ -50,95 +51,95 @@
 OpDecorate %45 RelaxedPrecision
 OpDecorate %46 RelaxedPrecision
 OpDecorate %47 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
-OpDecorate %66 RelaxedPrecision
-OpDecorate %68 RelaxedPrecision
+OpDecorate %64 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
 OpDecorate %75 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
-OpDecorate %133 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
-OpDecorate %148 RelaxedPrecision
-OpDecorate %150 RelaxedPrecision
-OpDecorate %156 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %163 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
+OpDecorate %136 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %151 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
 OpDecorate %166 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
-OpDecorate %179 RelaxedPrecision
-OpDecorate %181 RelaxedPrecision
-OpDecorate %182 RelaxedPrecision
-OpDecorate %183 RelaxedPrecision
+OpDecorate %169 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
+OpDecorate %187 RelaxedPrecision
 OpDecorate %189 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
+OpDecorate %192 RelaxedPrecision
 OpDecorate %193 RelaxedPrecision
-OpDecorate %198 RelaxedPrecision
-OpDecorate %200 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %205 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
+OpDecorate %199 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
+OpDecorate %203 RelaxedPrecision
+OpDecorate %208 RelaxedPrecision
 OpDecorate %210 RelaxedPrecision
-OpDecorate %216 RelaxedPrecision
-OpDecorate %217 RelaxedPrecision
-OpDecorate %218 RelaxedPrecision
+OpDecorate %212 RelaxedPrecision
+OpDecorate %215 RelaxedPrecision
 OpDecorate %219 RelaxedPrecision
 OpDecorate %220 RelaxedPrecision
-OpDecorate %221 RelaxedPrecision
-OpDecorate %224 RelaxedPrecision
-OpDecorate %225 RelaxedPrecision
 OpDecorate %226 RelaxedPrecision
+OpDecorate %227 RelaxedPrecision
+OpDecorate %228 RelaxedPrecision
+OpDecorate %229 RelaxedPrecision
 OpDecorate %230 RelaxedPrecision
 OpDecorate %231 RelaxedPrecision
+OpDecorate %234 RelaxedPrecision
 OpDecorate %235 RelaxedPrecision
 OpDecorate %236 RelaxedPrecision
-OpDecorate %243 RelaxedPrecision
-OpDecorate %244 RelaxedPrecision
-OpDecorate %247 RelaxedPrecision
-OpDecorate %248 RelaxedPrecision
-OpDecorate %249 RelaxedPrecision
-OpDecorate %252 RelaxedPrecision
+OpDecorate %240 RelaxedPrecision
+OpDecorate %241 RelaxedPrecision
+OpDecorate %245 RelaxedPrecision
+OpDecorate %246 RelaxedPrecision
 OpDecorate %253 RelaxedPrecision
 OpDecorate %254 RelaxedPrecision
-OpDecorate %255 RelaxedPrecision
-OpDecorate %256 RelaxedPrecision
 OpDecorate %257 RelaxedPrecision
+OpDecorate %258 RelaxedPrecision
+OpDecorate %259 RelaxedPrecision
+OpDecorate %262 RelaxedPrecision
 OpDecorate %263 RelaxedPrecision
 OpDecorate %264 RelaxedPrecision
 OpDecorate %265 RelaxedPrecision
+OpDecorate %266 RelaxedPrecision
 OpDecorate %267 RelaxedPrecision
-OpDecorate %268 RelaxedPrecision
-OpDecorate %269 RelaxedPrecision
-OpDecorate %270 RelaxedPrecision
-OpDecorate %272 RelaxedPrecision
 OpDecorate %273 RelaxedPrecision
 OpDecorate %274 RelaxedPrecision
+OpDecorate %276 RelaxedPrecision
 OpDecorate %278 RelaxedPrecision
+OpDecorate %279 RelaxedPrecision
 OpDecorate %280 RelaxedPrecision
 OpDecorate %282 RelaxedPrecision
-OpDecorate %283 RelaxedPrecision
 OpDecorate %284 RelaxedPrecision
+OpDecorate %285 RelaxedPrecision
+OpDecorate %286 RelaxedPrecision
+OpDecorate %291 RelaxedPrecision
+OpDecorate %294 RelaxedPrecision
+OpDecorate %296 RelaxedPrecision
+OpDecorate %297 RelaxedPrecision
+OpDecorate %298 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -146,9 +147,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v3float = OpTypeVector %float 3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %_ptr_Function_float = OpTypePointer Function %float
@@ -157,10 +158,14 @@
 %49 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %void = OpTypeVoid
 %51 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%176 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%186 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %false = OpConstantFalse %bool
 %float_1 = OpConstant %float 1
 %_blend_set_color_saturation_helper = OpFunction %v3float None %15
@@ -209,18 +214,18 @@
 %_2_dsa = OpVariable %_ptr_Function_v3float Function
 %_3_blend_set_color_saturation = OpVariable %_ptr_Function_v3float Function
 %_4_sat = OpVariable %_ptr_Function_float Function
-%107 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_float Function
-%121 = OpVariable %_ptr_Function_v3float Function
-%123 = OpVariable %_ptr_Function_float Function
-%128 = OpVariable %_ptr_Function_v3float Function
-%130 = OpVariable %_ptr_Function_float Function
-%143 = OpVariable %_ptr_Function_v3float Function
-%145 = OpVariable %_ptr_Function_float Function
-%158 = OpVariable %_ptr_Function_v3float Function
-%160 = OpVariable %_ptr_Function_float Function
-%165 = OpVariable %_ptr_Function_v3float Function
-%167 = OpVariable %_ptr_Function_float Function
+%117 = OpVariable %_ptr_Function_v3float Function
+%119 = OpVariable %_ptr_Function_float Function
+%131 = OpVariable %_ptr_Function_v3float Function
+%133 = OpVariable %_ptr_Function_float Function
+%138 = OpVariable %_ptr_Function_v3float Function
+%140 = OpVariable %_ptr_Function_float Function
+%153 = OpVariable %_ptr_Function_v3float Function
+%155 = OpVariable %_ptr_Function_float Function
+%168 = OpVariable %_ptr_Function_v3float Function
+%170 = OpVariable %_ptr_Function_float Function
+%175 = OpVariable %_ptr_Function_v3float Function
+%177 = OpVariable %_ptr_Function_float Function
 %_5_blend_set_color_luminance = OpVariable %_ptr_Function_v3float Function
 %_6_lum = OpVariable %_ptr_Function_float Function
 %_7_result = OpVariable %_ptr_Function_v3float Function
@@ -229,275 +234,283 @@
 %_10_d = OpVariable %_ptr_Function_float Function
 %_11_n = OpVariable %_ptr_Function_v3float Function
 %_12_d = OpVariable %_ptr_Function_float Function
-%54 = OpLoad %v4float %dst
-%55 = OpCompositeExtract %float %54 3
-%56 = OpLoad %v4float %src
-%57 = OpCompositeExtract %float %56 3
-%58 = OpFMul %float %55 %57
-OpStore %_0_alpha %58
-%60 = OpLoad %v4float %src
-%61 = OpVectorShuffle %v3float %60 %60 0 1 2
-%62 = OpLoad %v4float %dst
+%54 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%58 = OpLoad %v4float %54
+%59 = OpCompositeExtract %float %58 3
+%60 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%62 = OpLoad %v4float %60
 %63 = OpCompositeExtract %float %62 3
-%64 = OpVectorTimesScalar %v3float %61 %63
-OpStore %_1_sda %64
-%66 = OpLoad %v4float %dst
-%67 = OpVectorShuffle %v3float %66 %66 0 1 2
-%68 = OpLoad %v4float %src
-%69 = OpCompositeExtract %float %68 3
-%70 = OpVectorTimesScalar %v3float %67 %69
-OpStore %_2_dsa %70
-%75 = OpLoad %v3float %_1_sda
-%76 = OpCompositeExtract %float %75 0
-%77 = OpLoad %v3float %_1_sda
-%78 = OpCompositeExtract %float %77 1
-%74 = OpExtInst %float %1 FMax %76 %78
-%79 = OpLoad %v3float %_1_sda
-%80 = OpCompositeExtract %float %79 2
-%73 = OpExtInst %float %1 FMax %74 %80
-%83 = OpLoad %v3float %_1_sda
-%84 = OpCompositeExtract %float %83 0
+%64 = OpFMul %float %59 %63
+OpStore %_0_alpha %64
+%66 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%67 = OpLoad %v4float %66
+%68 = OpVectorShuffle %v3float %67 %67 0 1 2
+%69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%70 = OpLoad %v4float %69
+%71 = OpCompositeExtract %float %70 3
+%72 = OpVectorTimesScalar %v3float %68 %71
+OpStore %_1_sda %72
+%74 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%75 = OpLoad %v4float %74
+%76 = OpVectorShuffle %v3float %75 %75 0 1 2
+%77 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%78 = OpLoad %v4float %77
+%79 = OpCompositeExtract %float %78 3
+%80 = OpVectorTimesScalar %v3float %76 %79
+OpStore %_2_dsa %80
 %85 = OpLoad %v3float %_1_sda
-%86 = OpCompositeExtract %float %85 1
-%82 = OpExtInst %float %1 FMin %84 %86
+%86 = OpCompositeExtract %float %85 0
 %87 = OpLoad %v3float %_1_sda
-%88 = OpCompositeExtract %float %87 2
-%81 = OpExtInst %float %1 FMin %82 %88
-%89 = OpFSub %float %73 %81
-OpStore %_4_sat %89
-%90 = OpLoad %v3float %_2_dsa
-%91 = OpCompositeExtract %float %90 0
-%92 = OpLoad %v3float %_2_dsa
-%93 = OpCompositeExtract %float %92 1
-%94 = OpFOrdLessThanEqual %bool %91 %93
-OpSelectionMerge %97 None
-OpBranchConditional %94 %95 %96
-%95 = OpLabel
-%98 = OpLoad %v3float %_2_dsa
-%99 = OpCompositeExtract %float %98 1
+%88 = OpCompositeExtract %float %87 1
+%84 = OpExtInst %float %1 FMax %86 %88
+%89 = OpLoad %v3float %_1_sda
+%90 = OpCompositeExtract %float %89 2
+%83 = OpExtInst %float %1 FMax %84 %90
+%93 = OpLoad %v3float %_1_sda
+%94 = OpCompositeExtract %float %93 0
+%95 = OpLoad %v3float %_1_sda
+%96 = OpCompositeExtract %float %95 1
+%92 = OpExtInst %float %1 FMin %94 %96
+%97 = OpLoad %v3float %_1_sda
+%98 = OpCompositeExtract %float %97 2
+%91 = OpExtInst %float %1 FMin %92 %98
+%99 = OpFSub %float %83 %91
+OpStore %_4_sat %99
 %100 = OpLoad %v3float %_2_dsa
-%101 = OpCompositeExtract %float %100 2
-%102 = OpFOrdLessThanEqual %bool %99 %101
-OpSelectionMerge %105 None
-OpBranchConditional %102 %103 %104
-%103 = OpLabel
-%106 = OpLoad %v3float %_2_dsa
-OpStore %107 %106
-%108 = OpLoad %float %_4_sat
-OpStore %109 %108
-%110 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %107 %109
-OpStore %_3_blend_set_color_saturation %110
-OpBranch %105
-%104 = OpLabel
-%111 = OpLoad %v3float %_2_dsa
-%112 = OpCompositeExtract %float %111 0
-%113 = OpLoad %v3float %_2_dsa
-%114 = OpCompositeExtract %float %113 2
-%115 = OpFOrdLessThanEqual %bool %112 %114
-OpSelectionMerge %118 None
-OpBranchConditional %115 %116 %117
-%116 = OpLabel
-%119 = OpLoad %v3float %_2_dsa
-%120 = OpVectorShuffle %v3float %119 %119 0 2 1
-OpStore %121 %120
-%122 = OpLoad %float %_4_sat
-OpStore %123 %122
-%124 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %121 %123
-%125 = OpVectorShuffle %v3float %124 %124 0 2 1
-OpStore %_3_blend_set_color_saturation %125
-OpBranch %118
-%117 = OpLabel
-%126 = OpLoad %v3float %_2_dsa
-%127 = OpVectorShuffle %v3float %126 %126 2 0 1
-OpStore %128 %127
-%129 = OpLoad %float %_4_sat
-OpStore %130 %129
-%131 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %128 %130
-%132 = OpVectorShuffle %v3float %131 %131 1 2 0
-OpStore %_3_blend_set_color_saturation %132
-OpBranch %118
-%118 = OpLabel
-OpBranch %105
+%101 = OpCompositeExtract %float %100 0
+%102 = OpLoad %v3float %_2_dsa
+%103 = OpCompositeExtract %float %102 1
+%104 = OpFOrdLessThanEqual %bool %101 %103
+OpSelectionMerge %107 None
+OpBranchConditional %104 %105 %106
 %105 = OpLabel
-OpBranch %97
-%96 = OpLabel
-%133 = OpLoad %v3float %_2_dsa
-%134 = OpCompositeExtract %float %133 0
-%135 = OpLoad %v3float %_2_dsa
-%136 = OpCompositeExtract %float %135 2
-%137 = OpFOrdLessThanEqual %bool %134 %136
-OpSelectionMerge %140 None
-OpBranchConditional %137 %138 %139
-%138 = OpLabel
-%141 = OpLoad %v3float %_2_dsa
-%142 = OpVectorShuffle %v3float %141 %141 1 0 2
-OpStore %143 %142
-%144 = OpLoad %float %_4_sat
-OpStore %145 %144
-%146 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %143 %145
-%147 = OpVectorShuffle %v3float %146 %146 1 0 2
-OpStore %_3_blend_set_color_saturation %147
-OpBranch %140
-%139 = OpLabel
-%148 = OpLoad %v3float %_2_dsa
-%149 = OpCompositeExtract %float %148 1
-%150 = OpLoad %v3float %_2_dsa
-%151 = OpCompositeExtract %float %150 2
-%152 = OpFOrdLessThanEqual %bool %149 %151
-OpSelectionMerge %155 None
-OpBranchConditional %152 %153 %154
-%153 = OpLabel
-%156 = OpLoad %v3float %_2_dsa
-%157 = OpVectorShuffle %v3float %156 %156 1 2 0
-OpStore %158 %157
-%159 = OpLoad %float %_4_sat
-OpStore %160 %159
-%161 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %158 %160
-%162 = OpVectorShuffle %v3float %161 %161 2 0 1
-OpStore %_3_blend_set_color_saturation %162
-OpBranch %155
-%154 = OpLabel
-%163 = OpLoad %v3float %_2_dsa
-%164 = OpVectorShuffle %v3float %163 %163 2 1 0
-OpStore %165 %164
-%166 = OpLoad %float %_4_sat
-OpStore %167 %166
-%168 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %165 %167
-%169 = OpVectorShuffle %v3float %168 %168 2 1 0
-OpStore %_3_blend_set_color_saturation %169
-OpBranch %155
-%155 = OpLabel
-OpBranch %140
-%140 = OpLabel
-OpBranch %97
-%97 = OpLabel
-%177 = OpLoad %v3float %_2_dsa
-%172 = OpDot %float %176 %177
-OpStore %_6_lum %172
-%179 = OpLoad %float %_6_lum
-%181 = OpLoad %v3float %_3_blend_set_color_saturation
-%180 = OpDot %float %176 %181
-%182 = OpFSub %float %179 %180
-%183 = OpLoad %v3float %_3_blend_set_color_saturation
-%184 = OpCompositeConstruct %v3float %182 %182 %182
-%185 = OpFAdd %v3float %184 %183
-OpStore %_7_result %185
-%189 = OpLoad %v3float %_7_result
-%190 = OpCompositeExtract %float %189 0
-%191 = OpLoad %v3float %_7_result
-%192 = OpCompositeExtract %float %191 1
-%188 = OpExtInst %float %1 FMin %190 %192
-%193 = OpLoad %v3float %_7_result
-%194 = OpCompositeExtract %float %193 2
-%187 = OpExtInst %float %1 FMin %188 %194
-OpStore %_8_minComp %187
-%198 = OpLoad %v3float %_7_result
-%199 = OpCompositeExtract %float %198 0
-%200 = OpLoad %v3float %_7_result
-%201 = OpCompositeExtract %float %200 1
-%197 = OpExtInst %float %1 FMax %199 %201
-%202 = OpLoad %v3float %_7_result
-%203 = OpCompositeExtract %float %202 2
-%196 = OpExtInst %float %1 FMax %197 %203
-OpStore %_9_maxComp %196
-%205 = OpLoad %float %_8_minComp
-%206 = OpFOrdLessThan %bool %205 %float_0
-OpSelectionMerge %208 None
-OpBranchConditional %206 %207 %208
-%207 = OpLabel
-%209 = OpLoad %float %_6_lum
-%210 = OpLoad %float %_8_minComp
-%211 = OpFOrdNotEqual %bool %209 %210
-OpBranch %208
-%208 = OpLabel
-%212 = OpPhi %bool %false %97 %211 %207
-OpSelectionMerge %214 None
-OpBranchConditional %212 %213 %214
-%213 = OpLabel
-%216 = OpLoad %float %_6_lum
-%217 = OpLoad %float %_8_minComp
-%218 = OpFSub %float %216 %217
-OpStore %_10_d %218
+%108 = OpLoad %v3float %_2_dsa
+%109 = OpCompositeExtract %float %108 1
+%110 = OpLoad %v3float %_2_dsa
+%111 = OpCompositeExtract %float %110 2
+%112 = OpFOrdLessThanEqual %bool %109 %111
+OpSelectionMerge %115 None
+OpBranchConditional %112 %113 %114
+%113 = OpLabel
+%116 = OpLoad %v3float %_2_dsa
+OpStore %117 %116
+%118 = OpLoad %float %_4_sat
+OpStore %119 %118
+%120 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %117 %119
+OpStore %_3_blend_set_color_saturation %120
+OpBranch %115
+%114 = OpLabel
+%121 = OpLoad %v3float %_2_dsa
+%122 = OpCompositeExtract %float %121 0
+%123 = OpLoad %v3float %_2_dsa
+%124 = OpCompositeExtract %float %123 2
+%125 = OpFOrdLessThanEqual %bool %122 %124
+OpSelectionMerge %128 None
+OpBranchConditional %125 %126 %127
+%126 = OpLabel
+%129 = OpLoad %v3float %_2_dsa
+%130 = OpVectorShuffle %v3float %129 %129 0 2 1
+OpStore %131 %130
+%132 = OpLoad %float %_4_sat
+OpStore %133 %132
+%134 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %131 %133
+%135 = OpVectorShuffle %v3float %134 %134 0 2 1
+OpStore %_3_blend_set_color_saturation %135
+OpBranch %128
+%127 = OpLabel
+%136 = OpLoad %v3float %_2_dsa
+%137 = OpVectorShuffle %v3float %136 %136 2 0 1
+OpStore %138 %137
+%139 = OpLoad %float %_4_sat
+OpStore %140 %139
+%141 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %138 %140
+%142 = OpVectorShuffle %v3float %141 %141 1 2 0
+OpStore %_3_blend_set_color_saturation %142
+OpBranch %128
+%128 = OpLabel
+OpBranch %115
+%115 = OpLabel
+OpBranch %107
+%106 = OpLabel
+%143 = OpLoad %v3float %_2_dsa
+%144 = OpCompositeExtract %float %143 0
+%145 = OpLoad %v3float %_2_dsa
+%146 = OpCompositeExtract %float %145 2
+%147 = OpFOrdLessThanEqual %bool %144 %146
+OpSelectionMerge %150 None
+OpBranchConditional %147 %148 %149
+%148 = OpLabel
+%151 = OpLoad %v3float %_2_dsa
+%152 = OpVectorShuffle %v3float %151 %151 1 0 2
+OpStore %153 %152
+%154 = OpLoad %float %_4_sat
+OpStore %155 %154
+%156 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %153 %155
+%157 = OpVectorShuffle %v3float %156 %156 1 0 2
+OpStore %_3_blend_set_color_saturation %157
+OpBranch %150
+%149 = OpLabel
+%158 = OpLoad %v3float %_2_dsa
+%159 = OpCompositeExtract %float %158 1
+%160 = OpLoad %v3float %_2_dsa
+%161 = OpCompositeExtract %float %160 2
+%162 = OpFOrdLessThanEqual %bool %159 %161
+OpSelectionMerge %165 None
+OpBranchConditional %162 %163 %164
+%163 = OpLabel
+%166 = OpLoad %v3float %_2_dsa
+%167 = OpVectorShuffle %v3float %166 %166 1 2 0
+OpStore %168 %167
+%169 = OpLoad %float %_4_sat
+OpStore %170 %169
+%171 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %168 %170
+%172 = OpVectorShuffle %v3float %171 %171 2 0 1
+OpStore %_3_blend_set_color_saturation %172
+OpBranch %165
+%164 = OpLabel
+%173 = OpLoad %v3float %_2_dsa
+%174 = OpVectorShuffle %v3float %173 %173 2 1 0
+OpStore %175 %174
+%176 = OpLoad %float %_4_sat
+OpStore %177 %176
+%178 = OpFunctionCall %v3float %_blend_set_color_saturation_helper %175 %177
+%179 = OpVectorShuffle %v3float %178 %178 2 1 0
+OpStore %_3_blend_set_color_saturation %179
+OpBranch %165
+%165 = OpLabel
+OpBranch %150
+%150 = OpLabel
+OpBranch %107
+%107 = OpLabel
+%187 = OpLoad %v3float %_2_dsa
+%182 = OpDot %float %186 %187
+OpStore %_6_lum %182
+%189 = OpLoad %float %_6_lum
+%191 = OpLoad %v3float %_3_blend_set_color_saturation
+%190 = OpDot %float %186 %191
+%192 = OpFSub %float %189 %190
+%193 = OpLoad %v3float %_3_blend_set_color_saturation
+%194 = OpCompositeConstruct %v3float %192 %192 %192
+%195 = OpFAdd %v3float %194 %193
+OpStore %_7_result %195
+%199 = OpLoad %v3float %_7_result
+%200 = OpCompositeExtract %float %199 0
+%201 = OpLoad %v3float %_7_result
+%202 = OpCompositeExtract %float %201 1
+%198 = OpExtInst %float %1 FMin %200 %202
+%203 = OpLoad %v3float %_7_result
+%204 = OpCompositeExtract %float %203 2
+%197 = OpExtInst %float %1 FMin %198 %204
+OpStore %_8_minComp %197
+%208 = OpLoad %v3float %_7_result
+%209 = OpCompositeExtract %float %208 0
+%210 = OpLoad %v3float %_7_result
+%211 = OpCompositeExtract %float %210 1
+%207 = OpExtInst %float %1 FMax %209 %211
+%212 = OpLoad %v3float %_7_result
+%213 = OpCompositeExtract %float %212 2
+%206 = OpExtInst %float %1 FMax %207 %213
+OpStore %_9_maxComp %206
+%215 = OpLoad %float %_8_minComp
+%216 = OpFOrdLessThan %bool %215 %float_0
+OpSelectionMerge %218 None
+OpBranchConditional %216 %217 %218
+%217 = OpLabel
 %219 = OpLoad %float %_6_lum
-%220 = OpLoad %v3float %_7_result
-%221 = OpLoad %float %_6_lum
-%222 = OpCompositeConstruct %v3float %221 %221 %221
-%223 = OpFSub %v3float %220 %222
-%224 = OpLoad %float %_6_lum
-%225 = OpLoad %float %_10_d
-%226 = OpFDiv %float %224 %225
-%227 = OpVectorTimesScalar %v3float %223 %226
-%228 = OpCompositeConstruct %v3float %219 %219 %219
-%229 = OpFAdd %v3float %228 %227
-OpStore %_7_result %229
-OpBranch %214
-%214 = OpLabel
-%230 = OpLoad %float %_9_maxComp
-%231 = OpLoad %float %_0_alpha
-%232 = OpFOrdGreaterThan %bool %230 %231
-OpSelectionMerge %234 None
-OpBranchConditional %232 %233 %234
-%233 = OpLabel
-%235 = OpLoad %float %_9_maxComp
-%236 = OpLoad %float %_6_lum
-%237 = OpFOrdNotEqual %bool %235 %236
-OpBranch %234
-%234 = OpLabel
-%238 = OpPhi %bool %false %214 %237 %233
-OpSelectionMerge %241 None
-OpBranchConditional %238 %239 %240
-%239 = OpLabel
-%243 = OpLoad %v3float %_7_result
-%244 = OpLoad %float %_6_lum
-%245 = OpCompositeConstruct %v3float %244 %244 %244
-%246 = OpFSub %v3float %243 %245
-%247 = OpLoad %float %_0_alpha
-%248 = OpLoad %float %_6_lum
-%249 = OpFSub %float %247 %248
-%250 = OpVectorTimesScalar %v3float %246 %249
-OpStore %_11_n %250
-%252 = OpLoad %float %_9_maxComp
-%253 = OpLoad %float %_6_lum
-%254 = OpFSub %float %252 %253
-OpStore %_12_d %254
-%255 = OpLoad %float %_6_lum
-%256 = OpLoad %v3float %_11_n
-%257 = OpLoad %float %_12_d
-%259 = OpFDiv %float %float_1 %257
+%220 = OpLoad %float %_8_minComp
+%221 = OpFOrdNotEqual %bool %219 %220
+OpBranch %218
+%218 = OpLabel
+%222 = OpPhi %bool %false %107 %221 %217
+OpSelectionMerge %224 None
+OpBranchConditional %222 %223 %224
+%223 = OpLabel
+%226 = OpLoad %float %_6_lum
+%227 = OpLoad %float %_8_minComp
+%228 = OpFSub %float %226 %227
+OpStore %_10_d %228
+%229 = OpLoad %float %_6_lum
+%230 = OpLoad %v3float %_7_result
+%231 = OpLoad %float %_6_lum
+%232 = OpCompositeConstruct %v3float %231 %231 %231
+%233 = OpFSub %v3float %230 %232
+%234 = OpLoad %float %_6_lum
+%235 = OpLoad %float %_10_d
+%236 = OpFDiv %float %234 %235
+%237 = OpVectorTimesScalar %v3float %233 %236
+%238 = OpCompositeConstruct %v3float %229 %229 %229
+%239 = OpFAdd %v3float %238 %237
+OpStore %_7_result %239
+OpBranch %224
+%224 = OpLabel
+%240 = OpLoad %float %_9_maxComp
+%241 = OpLoad %float %_0_alpha
+%242 = OpFOrdGreaterThan %bool %240 %241
+OpSelectionMerge %244 None
+OpBranchConditional %242 %243 %244
+%243 = OpLabel
+%245 = OpLoad %float %_9_maxComp
+%246 = OpLoad %float %_6_lum
+%247 = OpFOrdNotEqual %bool %245 %246
+OpBranch %244
+%244 = OpLabel
+%248 = OpPhi %bool %false %224 %247 %243
+OpSelectionMerge %251 None
+OpBranchConditional %248 %249 %250
+%249 = OpLabel
+%253 = OpLoad %v3float %_7_result
+%254 = OpLoad %float %_6_lum
+%255 = OpCompositeConstruct %v3float %254 %254 %254
+%256 = OpFSub %v3float %253 %255
+%257 = OpLoad %float %_0_alpha
+%258 = OpLoad %float %_6_lum
+%259 = OpFSub %float %257 %258
 %260 = OpVectorTimesScalar %v3float %256 %259
-%261 = OpCompositeConstruct %v3float %255 %255 %255
-%262 = OpFAdd %v3float %261 %260
-OpStore %_5_blend_set_color_luminance %262
-OpBranch %241
-%240 = OpLabel
-%263 = OpLoad %v3float %_7_result
-OpStore %_5_blend_set_color_luminance %263
-OpBranch %241
-%241 = OpLabel
-%264 = OpLoad %v3float %_5_blend_set_color_luminance
-%265 = OpLoad %v4float %dst
-%266 = OpVectorShuffle %v3float %265 %265 0 1 2
-%267 = OpFAdd %v3float %264 %266
-%268 = OpLoad %v3float %_2_dsa
-%269 = OpFSub %v3float %267 %268
-%270 = OpLoad %v4float %src
-%271 = OpVectorShuffle %v3float %270 %270 0 1 2
-%272 = OpFAdd %v3float %269 %271
-%273 = OpLoad %v3float %_1_sda
-%274 = OpFSub %v3float %272 %273
-%275 = OpCompositeExtract %float %274 0
-%276 = OpCompositeExtract %float %274 1
-%277 = OpCompositeExtract %float %274 2
-%278 = OpLoad %v4float %src
-%279 = OpCompositeExtract %float %278 3
-%280 = OpLoad %v4float %dst
-%281 = OpCompositeExtract %float %280 3
-%282 = OpFAdd %float %279 %281
-%283 = OpLoad %float %_0_alpha
-%284 = OpFSub %float %282 %283
-%285 = OpCompositeConstruct %v4float %275 %276 %277 %284
-OpStore %sk_FragColor %285
+OpStore %_11_n %260
+%262 = OpLoad %float %_9_maxComp
+%263 = OpLoad %float %_6_lum
+%264 = OpFSub %float %262 %263
+OpStore %_12_d %264
+%265 = OpLoad %float %_6_lum
+%266 = OpLoad %v3float %_11_n
+%267 = OpLoad %float %_12_d
+%269 = OpFDiv %float %float_1 %267
+%270 = OpVectorTimesScalar %v3float %266 %269
+%271 = OpCompositeConstruct %v3float %265 %265 %265
+%272 = OpFAdd %v3float %271 %270
+OpStore %_5_blend_set_color_luminance %272
+OpBranch %251
+%250 = OpLabel
+%273 = OpLoad %v3float %_7_result
+OpStore %_5_blend_set_color_luminance %273
+OpBranch %251
+%251 = OpLabel
+%274 = OpLoad %v3float %_5_blend_set_color_luminance
+%275 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%276 = OpLoad %v4float %275
+%277 = OpVectorShuffle %v3float %276 %276 0 1 2
+%278 = OpFAdd %v3float %274 %277
+%279 = OpLoad %v3float %_2_dsa
+%280 = OpFSub %v3float %278 %279
+%281 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%282 = OpLoad %v4float %281
+%283 = OpVectorShuffle %v3float %282 %282 0 1 2
+%284 = OpFAdd %v3float %280 %283
+%285 = OpLoad %v3float %_1_sda
+%286 = OpFSub %v3float %284 %285
+%287 = OpCompositeExtract %float %286 0
+%288 = OpCompositeExtract %float %286 1
+%289 = OpCompositeExtract %float %286 2
+%290 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%291 = OpLoad %v4float %290
+%292 = OpCompositeExtract %float %291 3
+%293 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%294 = OpLoad %v4float %293
+%295 = OpCompositeExtract %float %294 3
+%296 = OpFAdd %float %292 %295
+%297 = OpLoad %float %_0_alpha
+%298 = OpFSub %float %296 %297
+%299 = OpCompositeConstruct %v4float %287 %288 %289 %298
+OpStore %sk_FragColor %299
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSaturation.glsl b/tests/sksl/blend/BlendSaturation.glsl
index 28b5d92..9e9e449 100644
--- a/tests/sksl/blend/BlendSaturation.glsl
+++ b/tests/sksl/blend/BlendSaturation.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
     if (minMidMax.x < minMidMax.z) {
         float _7_n = sat * (minMidMax.y - minMidMax.x);
diff --git a/tests/sksl/blend/BlendSaturation.metal b/tests/sksl/blend/BlendSaturation.metal
index 6c756af..4525c32 100644
--- a/tests/sksl/blend/BlendSaturation.metal
+++ b/tests/sksl/blend/BlendSaturation.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -15,12 +17,12 @@
     }
 }
 
-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 _0_alpha = _in.dst.w * _in.src.w;
-    float3 _1_sda = _in.src.xyz * _in.dst.w;
-    float3 _2_dsa = _in.dst.xyz * _in.src.w;
+    float _0_alpha = _uniforms.dst.w * _uniforms.src.w;
+    float3 _1_sda = _uniforms.src.xyz * _uniforms.dst.w;
+    float3 _2_dsa = _uniforms.dst.xyz * _uniforms.src.w;
     float3 _3_blend_set_color_saturation;
     float _4_sat = max(max(_1_sda.x, _1_sda.y), _1_sda.z) - min(min(_1_sda.x, _1_sda.y), _1_sda.z);
     if (_2_dsa.x <= _2_dsa.y) {
@@ -54,6 +56,6 @@
     } else {
         _5_blend_set_color_luminance = _7_result;
     }
-    _out.sk_FragColor = float4((((_5_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
+    _out.sk_FragColor = float4((((_5_blend_set_color_luminance + _uniforms.dst.xyz) - _2_dsa) + _uniforms.src.xyz) - _1_sda, (_uniforms.src.w + _uniforms.dst.w) - _0_alpha);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSaturationStandaloneSettings.glsl b/tests/sksl/blend/BlendSaturationStandaloneSettings.glsl
index 88f627c..62e4adf 100644
--- a/tests/sksl/blend/BlendSaturationStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSaturationStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
     if (minMidMax.x < minMidMax.z) {
         float _7_n = sat * (minMidMax.y - minMidMax.x);
diff --git a/tests/sksl/blend/BlendScreen.asm.frag b/tests/sksl/blend/BlendScreen.asm.frag
index fff29c5..ccf6ce9 100644
--- a/tests/sksl/blend/BlendScreen.asm.frag
+++ b/tests/sksl/blend/BlendScreen.asm.frag
@@ -1,30 +1,31 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,23 +33,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-%18 = OpLoad %v4float %src
-%19 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
-%20 = OpFSub %v4float %19 %18
-%21 = OpLoad %v4float %dst
-%22 = OpFMul %v4float %20 %21
-%23 = OpFAdd %v4float %16 %22
-OpStore %sk_FragColor %23
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%23 = OpLoad %v4float %22
+%24 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
+%25 = OpFSub %v4float %24 %23
+%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%28 = OpLoad %v4float %26
+%29 = OpFMul %v4float %25 %28
+%30 = OpFAdd %v4float %20 %29
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendScreen.glsl b/tests/sksl/blend/BlendScreen.glsl
index a155738..22f087a 100644
--- a/tests/sksl/blend/BlendScreen.glsl
+++ b/tests/sksl/blend/BlendScreen.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src + (1.0 - src) * dst;
 }
diff --git a/tests/sksl/blend/BlendScreen.metal b/tests/sksl/blend/BlendScreen.metal
index 0286ffe..9e734dd 100644
--- a/tests/sksl/blend/BlendScreen.metal
+++ b/tests/sksl/blend/BlendScreen.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.src + (1.0 - _in.src) * _in.dst;
+    _out.sk_FragColor = _uniforms.src + (1.0 - _uniforms.src) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendScreenStandaloneSettings.glsl b/tests/sksl/blend/BlendScreenStandaloneSettings.glsl
index d01c2ee..4b26ef9 100644
--- a/tests/sksl/blend/BlendScreenStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendScreenStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src + (1.0 - src) * dst;
 }
diff --git a/tests/sksl/blend/BlendSoftLight.asm.frag b/tests/sksl/blend/BlendSoftLight.asm.frag
index 9d20437..39f0709 100644
--- a/tests/sksl/blend/BlendSoftLight.asm.frag
+++ b/tests/sksl/blend/BlendSoftLight.asm.frag
@@ -1,17 +1,13 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %_soft_light_component "_soft_light_component"
 OpName %_2_n "_2_n"
 OpName %DSqd "DSqd"
@@ -25,8 +21,13 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
@@ -129,21 +130,21 @@
 OpDecorate %181 RelaxedPrecision
 OpDecorate %183 RelaxedPrecision
 OpDecorate %184 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
-OpDecorate %197 RelaxedPrecision
-OpDecorate %198 RelaxedPrecision
-OpDecorate %201 RelaxedPrecision
+OpDecorate %192 RelaxedPrecision
+OpDecorate %203 RelaxedPrecision
 OpDecorate %205 RelaxedPrecision
-OpDecorate %208 RelaxedPrecision
-OpDecorate %212 RelaxedPrecision
-OpDecorate %215 RelaxedPrecision
-OpDecorate %219 RelaxedPrecision
-OpDecorate %221 RelaxedPrecision
+OpDecorate %209 RelaxedPrecision
+OpDecorate %214 RelaxedPrecision
+OpDecorate %218 RelaxedPrecision
 OpDecorate %223 RelaxedPrecision
-OpDecorate %224 RelaxedPrecision
-OpDecorate %226 RelaxedPrecision
 OpDecorate %227 RelaxedPrecision
-OpDecorate %229 RelaxedPrecision
+OpDecorate %232 RelaxedPrecision
+OpDecorate %235 RelaxedPrecision
+OpDecorate %237 RelaxedPrecision
+OpDecorate %239 RelaxedPrecision
+OpDecorate %241 RelaxedPrecision
+OpDecorate %242 RelaxedPrecision
+OpDecorate %244 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -151,9 +152,9 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %15 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
@@ -167,8 +168,12 @@
 %float_16 = OpConstant %float 16
 %void = OpTypeVoid
 %186 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
 %float_0 = OpConstant %float 0
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%int_0 = OpConstant %int 0
 %_soft_light_component = OpFunction %float None %15
 %17 = OpFunctionParameter %_ptr_Function_v2float
 %18 = OpFunctionParameter %_ptr_Function_v2float
@@ -348,60 +353,69 @@
 OpFunctionEnd
 %main = OpFunction %void None %186
 %187 = OpLabel
-%192 = OpVariable %_ptr_Function_v4float Function
-%200 = OpVariable %_ptr_Function_v2float Function
-%203 = OpVariable %_ptr_Function_v2float Function
+%196 = OpVariable %_ptr_Function_v4float Function
 %207 = OpVariable %_ptr_Function_v2float Function
-%210 = OpVariable %_ptr_Function_v2float Function
-%214 = OpVariable %_ptr_Function_v2float Function
-%217 = OpVariable %_ptr_Function_v2float Function
-%188 = OpLoad %v4float %dst
-%189 = OpCompositeExtract %float %188 3
-%191 = OpFOrdEqual %bool %189 %float_0
-OpSelectionMerge %196 None
-OpBranchConditional %191 %194 %195
-%194 = OpLabel
-%197 = OpLoad %v4float %src
-OpStore %192 %197
-OpBranch %196
-%195 = OpLabel
-%198 = OpLoad %v4float %src
-%199 = OpVectorShuffle %v2float %198 %198 0 3
-OpStore %200 %199
-%201 = OpLoad %v4float %dst
-%202 = OpVectorShuffle %v2float %201 %201 0 3
-OpStore %203 %202
-%204 = OpFunctionCall %float %_soft_light_component %200 %203
-%205 = OpLoad %v4float %src
-%206 = OpVectorShuffle %v2float %205 %205 1 3
+%211 = OpVariable %_ptr_Function_v2float Function
+%216 = OpVariable %_ptr_Function_v2float Function
+%220 = OpVariable %_ptr_Function_v2float Function
+%225 = OpVariable %_ptr_Function_v2float Function
+%229 = OpVariable %_ptr_Function_v2float Function
+%188 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%192 = OpLoad %v4float %188
+%193 = OpCompositeExtract %float %192 3
+%195 = OpFOrdEqual %bool %193 %float_0
+OpSelectionMerge %200 None
+OpBranchConditional %195 %198 %199
+%198 = OpLabel
+%201 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%203 = OpLoad %v4float %201
+OpStore %196 %203
+OpBranch %200
+%199 = OpLabel
+%204 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%205 = OpLoad %v4float %204
+%206 = OpVectorShuffle %v2float %205 %205 0 3
 OpStore %207 %206
-%208 = OpLoad %v4float %dst
-%209 = OpVectorShuffle %v2float %208 %208 1 3
-OpStore %210 %209
-%211 = OpFunctionCall %float %_soft_light_component %207 %210
-%212 = OpLoad %v4float %src
-%213 = OpVectorShuffle %v2float %212 %212 2 3
-OpStore %214 %213
-%215 = OpLoad %v4float %dst
-%216 = OpVectorShuffle %v2float %215 %215 2 3
-OpStore %217 %216
-%218 = OpFunctionCall %float %_soft_light_component %214 %217
-%219 = OpLoad %v4float %src
-%220 = OpCompositeExtract %float %219 3
-%221 = OpLoad %v4float %src
-%222 = OpCompositeExtract %float %221 3
-%223 = OpFSub %float %float_1 %222
-%224 = OpLoad %v4float %dst
-%225 = OpCompositeExtract %float %224 3
-%226 = OpFMul %float %223 %225
-%227 = OpFAdd %float %220 %226
-%228 = OpCompositeConstruct %v4float %204 %211 %218 %227
-OpStore %192 %228
-OpBranch %196
-%196 = OpLabel
-%229 = OpLoad %v4float %192
-OpStore %sk_FragColor %229
+%208 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%209 = OpLoad %v4float %208
+%210 = OpVectorShuffle %v2float %209 %209 0 3
+OpStore %211 %210
+%212 = OpFunctionCall %float %_soft_light_component %207 %211
+%213 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%214 = OpLoad %v4float %213
+%215 = OpVectorShuffle %v2float %214 %214 1 3
+OpStore %216 %215
+%217 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%218 = OpLoad %v4float %217
+%219 = OpVectorShuffle %v2float %218 %218 1 3
+OpStore %220 %219
+%221 = OpFunctionCall %float %_soft_light_component %216 %220
+%222 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%223 = OpLoad %v4float %222
+%224 = OpVectorShuffle %v2float %223 %223 2 3
+OpStore %225 %224
+%226 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%227 = OpLoad %v4float %226
+%228 = OpVectorShuffle %v2float %227 %227 2 3
+OpStore %229 %228
+%230 = OpFunctionCall %float %_soft_light_component %225 %229
+%231 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%232 = OpLoad %v4float %231
+%233 = OpCompositeExtract %float %232 3
+%234 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%235 = OpLoad %v4float %234
+%236 = OpCompositeExtract %float %235 3
+%237 = OpFSub %float %float_1 %236
+%238 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%239 = OpLoad %v4float %238
+%240 = OpCompositeExtract %float %239 3
+%241 = OpFMul %float %237 %240
+%242 = OpFAdd %float %233 %241
+%243 = OpCompositeConstruct %v4float %212 %221 %230 %242
+OpStore %196 %243
+OpBranch %200
+%200 = OpLabel
+%244 = OpLoad %v4float %196
+OpStore %sk_FragColor %244
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSoftLight.glsl b/tests/sksl/blend/BlendSoftLight.glsl
index 7981c35..4da27e9 100644
--- a/tests/sksl/blend/BlendSoftLight.glsl
+++ b/tests/sksl/blend/BlendSoftLight.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _soft_light_component(vec2 s, vec2 d) {
     if (2.0 * s.x <= s.y) {
         float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
diff --git a/tests/sksl/blend/BlendSoftLight.metal b/tests/sksl/blend/BlendSoftLight.metal
index 11c1887..c6aa829 100644
--- a/tests/sksl/blend/BlendSoftLight.metal
+++ b/tests/sksl/blend/BlendSoftLight.metal
@@ -1,7 +1,9 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
@@ -21,9 +23,9 @@
     }
 }
 
-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;
-    _out.sk_FragColor = _in.dst.w == 0.0 ? _in.src : float4(_soft_light_component(_in.src.xw, _in.dst.xw), _soft_light_component(_in.src.yw, _in.dst.yw), _soft_light_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
+    _out.sk_FragColor = _uniforms.dst.w == 0.0 ? _uniforms.src : float4(_soft_light_component(_uniforms.src.xw, _uniforms.dst.xw), _soft_light_component(_uniforms.src.yw, _uniforms.dst.yw), _soft_light_component(_uniforms.src.zw, _uniforms.dst.zw), _uniforms.src.w + (1.0 - _uniforms.src.w) * _uniforms.dst.w);
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSoftLightStandaloneSettings.glsl b/tests/sksl/blend/BlendSoftLightStandaloneSettings.glsl
index cf5f016..3321a12 100644
--- a/tests/sksl/blend/BlendSoftLightStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSoftLightStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 float _soft_light_component(vec2 s, vec2 d) {
     if (2.0 * s.x <= s.y) {
         float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
diff --git a/tests/sksl/blend/BlendSrc.asm.frag b/tests/sksl/blend/BlendSrc.asm.frag
index 5daf9e0..a7364ee 100644
--- a/tests/sksl/blend/BlendSrc.asm.frag
+++ b/tests/sksl/blend/BlendSrc.asm.frag
@@ -1,26 +1,27 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -28,16 +29,18 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-OpStore %sk_FragColor %16
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+OpStore %sk_FragColor %20
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSrc.glsl b/tests/sksl/blend/BlendSrc.glsl
index 1d0696b..8c5f58a 100644
--- a/tests/sksl/blend/BlendSrc.glsl
+++ b/tests/sksl/blend/BlendSrc.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src;
 }
diff --git a/tests/sksl/blend/BlendSrc.metal b/tests/sksl/blend/BlendSrc.metal
index 1bd77c4..a01fedd 100644
--- a/tests/sksl/blend/BlendSrc.metal
+++ b/tests/sksl/blend/BlendSrc.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.src;
+    _out.sk_FragColor = _uniforms.src;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSrcAtop.asm.frag b/tests/sksl/blend/BlendSrcAtop.asm.frag
index 1aae8de..e876464 100644
--- a/tests/sksl/blend/BlendSrcAtop.asm.frag
+++ b/tests/sksl/blend/BlendSrcAtop.asm.frag
@@ -1,31 +1,32 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
-OpDecorate %26 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,26 +34,32 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %dst
-%17 = OpCompositeExtract %float %16 3
-%18 = OpLoad %v4float %src
-%19 = OpVectorTimesScalar %v4float %18 %17
-%21 = OpLoad %v4float %src
-%22 = OpCompositeExtract %float %21 3
-%23 = OpFSub %float %float_1 %22
-%24 = OpLoad %v4float %dst
-%25 = OpVectorTimesScalar %v4float %24 %23
-%26 = OpFAdd %v4float %19 %25
-OpStore %sk_FragColor %26
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%20 = OpLoad %v4float %16
+%21 = OpCompositeExtract %float %20 3
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%24 = OpLoad %v4float %22
+%25 = OpVectorTimesScalar %v4float %24 %21
+%27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%28 = OpLoad %v4float %27
+%29 = OpCompositeExtract %float %28 3
+%30 = OpFSub %float %float_1 %29
+%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%32 = OpLoad %v4float %31
+%33 = OpVectorTimesScalar %v4float %32 %30
+%34 = OpFAdd %v4float %25 %33
+OpStore %sk_FragColor %34
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSrcAtop.glsl b/tests/sksl/blend/BlendSrcAtop.glsl
index 37fade9..5ec8169 100644
--- a/tests/sksl/blend/BlendSrcAtop.glsl
+++ b/tests/sksl/blend/BlendSrcAtop.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendSrcAtop.metal b/tests/sksl/blend/BlendSrcAtop.metal
index 2e39b83..ce4763d 100644
--- a/tests/sksl/blend/BlendSrcAtop.metal
+++ b/tests/sksl/blend/BlendSrcAtop.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
+    _out.sk_FragColor = _uniforms.dst.w * _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSrcAtopStandaloneSettings.glsl b/tests/sksl/blend/BlendSrcAtopStandaloneSettings.glsl
index 6503e8f..4e0dbb6 100644
--- a/tests/sksl/blend/BlendSrcAtopStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSrcAtopStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendSrcIn.asm.frag b/tests/sksl/blend/BlendSrcIn.asm.frag
index 3a48439..c0cdf33 100644
--- a/tests/sksl/blend/BlendSrcIn.asm.frag
+++ b/tests/sksl/blend/BlendSrcIn.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %20 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,19 +30,23 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-%17 = OpLoad %v4float %dst
-%18 = OpCompositeExtract %float %17 3
-%19 = OpVectorTimesScalar %v4float %16 %18
-OpStore %sk_FragColor %19
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%23 = OpLoad %v4float %21
+%24 = OpCompositeExtract %float %23 3
+%25 = OpVectorTimesScalar %v4float %20 %24
+OpStore %sk_FragColor %25
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSrcIn.glsl b/tests/sksl/blend/BlendSrcIn.glsl
index 504932a..e451f80 100644
--- a/tests/sksl/blend/BlendSrcIn.glsl
+++ b/tests/sksl/blend/BlendSrcIn.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src * dst.w;
 }
diff --git a/tests/sksl/blend/BlendSrcIn.metal b/tests/sksl/blend/BlendSrcIn.metal
index 878d613..6616e5e 100644
--- a/tests/sksl/blend/BlendSrcIn.metal
+++ b/tests/sksl/blend/BlendSrcIn.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.src * _in.dst.w;
+    _out.sk_FragColor = _uniforms.src * _uniforms.dst.w;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSrcInStandaloneSettings.glsl b/tests/sksl/blend/BlendSrcInStandaloneSettings.glsl
index 48e7e8d..c1bb819 100644
--- a/tests/sksl/blend/BlendSrcInStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSrcInStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src * dst.w;
 }
diff --git a/tests/sksl/blend/BlendSrcOut.asm.frag b/tests/sksl/blend/BlendSrcOut.asm.frag
index 731df89..a928690 100644
--- a/tests/sksl/blend/BlendSrcOut.asm.frag
+++ b/tests/sksl/blend/BlendSrcOut.asm.frag
@@ -1,28 +1,29 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -30,21 +31,25 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_1 = OpConstant %float 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %dst
-%18 = OpCompositeExtract %float %17 3
-%19 = OpFSub %float %float_1 %18
-%20 = OpLoad %v4float %src
-%21 = OpVectorTimesScalar %v4float %20 %19
-OpStore %sk_FragColor %21
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%21 = OpLoad %v4float %17
+%22 = OpCompositeExtract %float %21 3
+%23 = OpFSub %float %float_1 %22
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%26 = OpLoad %v4float %24
+%27 = OpVectorTimesScalar %v4float %26 %23
+OpStore %sk_FragColor %27
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSrcOut.glsl b/tests/sksl/blend/BlendSrcOut.glsl
index 8e8e8c7..40ed9b5 100644
--- a/tests/sksl/blend/BlendSrcOut.glsl
+++ b/tests/sksl/blend/BlendSrcOut.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src;
 }
diff --git a/tests/sksl/blend/BlendSrcOut.metal b/tests/sksl/blend/BlendSrcOut.metal
index 8f724c0..45f69ff 100644
--- a/tests/sksl/blend/BlendSrcOut.metal
+++ b/tests/sksl/blend/BlendSrcOut.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = (1.0 - _in.dst.w) * _in.src;
+    _out.sk_FragColor = (1.0 - _uniforms.dst.w) * _uniforms.src;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSrcOutStandaloneSettings.glsl b/tests/sksl/blend/BlendSrcOutStandaloneSettings.glsl
index 1fd140d..f6427b9 100644
--- a/tests/sksl/blend/BlendSrcOutStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSrcOutStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src;
 }
diff --git a/tests/sksl/blend/BlendSrcOver.asm.frag b/tests/sksl/blend/BlendSrcOver.asm.frag
index d68225e..63cc27e 100644
--- a/tests/sksl/blend/BlendSrcOver.asm.frag
+++ b/tests/sksl/blend/BlendSrcOver.asm.frag
@@ -1,30 +1,31 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %20 RelaxedPrecision
-OpDecorate %21 RelaxedPrecision
 OpDecorate %23 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,23 +33,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
+%int_1 = OpConstant %int 1
 %main = OpFunction %void None %14
 %15 = OpLabel
-%16 = OpLoad %v4float %src
-%18 = OpLoad %v4float %src
-%19 = OpCompositeExtract %float %18 3
-%20 = OpFSub %float %float_1 %19
-%21 = OpLoad %v4float %dst
-%22 = OpVectorTimesScalar %v4float %21 %20
-%23 = OpFAdd %v4float %16 %22
-OpStore %sk_FragColor %23
+%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%20 = OpLoad %v4float %16
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%23 = OpLoad %v4float %22
+%24 = OpCompositeExtract %float %23 3
+%25 = OpFSub %float %float_1 %24
+%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%28 = OpLoad %v4float %26
+%29 = OpVectorTimesScalar %v4float %28 %25
+%30 = OpFAdd %v4float %20 %29
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendSrcOver.glsl b/tests/sksl/blend/BlendSrcOver.glsl
index 8a6db15..f14df4f 100644
--- a/tests/sksl/blend/BlendSrcOver.glsl
+++ b/tests/sksl/blend/BlendSrcOver.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendSrcOver.metal b/tests/sksl/blend/BlendSrcOver.metal
index 9a2b8d0..8220c5a 100644
--- a/tests/sksl/blend/BlendSrcOver.metal
+++ b/tests/sksl/blend/BlendSrcOver.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = _in.src + (1.0 - _in.src.w) * _in.dst;
+    _out.sk_FragColor = _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendSrcOverStandaloneSettings.glsl b/tests/sksl/blend/BlendSrcOverStandaloneSettings.glsl
index 59de1c2..4bfb24d 100644
--- a/tests/sksl/blend/BlendSrcOverStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSrcOverStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendSrcStandaloneSettings.glsl b/tests/sksl/blend/BlendSrcStandaloneSettings.glsl
index 75d46ff..1494f97 100644
--- a/tests/sksl/blend/BlendSrcStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendSrcStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = src;
 }
diff --git a/tests/sksl/blend/BlendXor.asm.frag b/tests/sksl/blend/BlendXor.asm.frag
index 3e9b525..76edb0fa 100644
--- a/tests/sksl/blend/BlendXor.asm.frag
+++ b/tests/sksl/blend/BlendXor.asm.frag
@@ -1,32 +1,33 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %src = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %src %dst
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %src "src"
-OpName %dst "dst"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "src"
+OpMemberName %_UniformBuffer 1 "dst"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %src RelaxedPrecision
-OpDecorate %dst RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
-OpDecorate %25 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -34,27 +35,33 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%src = OpVariable %_ptr_Input_v4float Input
-%dst = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
 %float_1 = OpConstant %float 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int = OpTypeInt 32 1
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %dst
-%18 = OpCompositeExtract %float %17 3
-%19 = OpFSub %float %float_1 %18
-%20 = OpLoad %v4float %src
-%21 = OpVectorTimesScalar %v4float %20 %19
-%22 = OpLoad %v4float %src
-%23 = OpCompositeExtract %float %22 3
-%24 = OpFSub %float %float_1 %23
-%25 = OpLoad %v4float %dst
-%26 = OpVectorTimesScalar %v4float %25 %24
-%27 = OpFAdd %v4float %21 %26
-OpStore %sk_FragColor %27
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%21 = OpLoad %v4float %17
+%22 = OpCompositeExtract %float %21 3
+%23 = OpFSub %float %float_1 %22
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%26 = OpLoad %v4float %24
+%27 = OpVectorTimesScalar %v4float %26 %23
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%29 = OpLoad %v4float %28
+%30 = OpCompositeExtract %float %29 3
+%31 = OpFSub %float %float_1 %30
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%33 = OpLoad %v4float %32
+%34 = OpVectorTimesScalar %v4float %33 %31
+%35 = OpFAdd %v4float %27 %34
+OpStore %sk_FragColor %35
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/blend/BlendXor.glsl b/tests/sksl/blend/BlendXor.glsl
index 3588d60..eec344a 100644
--- a/tests/sksl/blend/BlendXor.glsl
+++ b/tests/sksl/blend/BlendXor.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/blend/BlendXor.metal b/tests/sksl/blend/BlendXor.metal
index 68da508..b5e99ea 100644
--- a/tests/sksl/blend/BlendXor.metal
+++ b/tests/sksl/blend/BlendXor.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 src;
     float4 dst;
 };
+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;
-    _out.sk_FragColor = (1.0 - _in.dst.w) * _in.src + (1.0 - _in.src.w) * _in.dst;
+    _out.sk_FragColor = (1.0 - _uniforms.dst.w) * _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
     return _out;
 }
diff --git a/tests/sksl/blend/BlendXorStandaloneSettings.glsl b/tests/sksl/blend/BlendXorStandaloneSettings.glsl
index 6a9bfe7..896e0b0 100644
--- a/tests/sksl/blend/BlendXorStandaloneSettings.glsl
+++ b/tests/sksl/blend/BlendXorStandaloneSettings.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 src;
-in vec4 dst;
+uniform vec4 src;
+uniform vec4 dst;
 void main() {
     sk_FragColor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
 }
diff --git a/tests/sksl/intrinsics/Acos.asm.frag b/tests/sksl/intrinsics/Acos.asm.frag
index b435c13..f0cfc50 100644
--- a/tests/sksl/intrinsics/Acos.asm.frag
+++ b/tests/sksl/intrinsics/Acos.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Acos %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Acos %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Acos.glsl b/tests/sksl/intrinsics/Acos.glsl
index 7143016..c7dbc2e 100644
--- a/tests/sksl/intrinsics/Acos.glsl
+++ b/tests/sksl/intrinsics/Acos.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = acos(a);
 }
diff --git a/tests/sksl/intrinsics/Acos.metal b/tests/sksl/intrinsics/Acos.metal
index 79fad5c..85759ff 100644
--- a/tests/sksl/intrinsics/Acos.metal
+++ b/tests/sksl/intrinsics/Acos.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = acos(_in.a);
+    _out.sk_FragColor.x = acos(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Acosh.asm.frag b/tests/sksl/intrinsics/Acosh.asm.frag
index 19cdcac..fac8a57 100644
--- a/tests/sksl/intrinsics/Acosh.asm.frag
+++ b/tests/sksl/intrinsics/Acosh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Acosh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Acosh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Acosh.glsl b/tests/sksl/intrinsics/Acosh.glsl
index 5201d50..510fac5 100644
--- a/tests/sksl/intrinsics/Acosh.glsl
+++ b/tests/sksl/intrinsics/Acosh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = acosh(a);
 }
diff --git a/tests/sksl/intrinsics/Acosh.metal b/tests/sksl/intrinsics/Acosh.metal
index 0f22a09..fc559be 100644
--- a/tests/sksl/intrinsics/Acosh.metal
+++ b/tests/sksl/intrinsics/Acosh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = acosh(_in.a);
+    _out.sk_FragColor.x = acosh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Asin.asm.frag b/tests/sksl/intrinsics/Asin.asm.frag
index 52d5943..abfb6e7 100644
--- a/tests/sksl/intrinsics/Asin.asm.frag
+++ b/tests/sksl/intrinsics/Asin.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Asin %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Asin %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Asin.glsl b/tests/sksl/intrinsics/Asin.glsl
index c010325..64bd3ff 100644
--- a/tests/sksl/intrinsics/Asin.glsl
+++ b/tests/sksl/intrinsics/Asin.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = asin(a);
 }
diff --git a/tests/sksl/intrinsics/Asin.metal b/tests/sksl/intrinsics/Asin.metal
index 20842dc..452df96 100644
--- a/tests/sksl/intrinsics/Asin.metal
+++ b/tests/sksl/intrinsics/Asin.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = asin(_in.a);
+    _out.sk_FragColor.x = asin(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Asinh.asm.frag b/tests/sksl/intrinsics/Asinh.asm.frag
index 68a21b5..7abfc48 100644
--- a/tests/sksl/intrinsics/Asinh.asm.frag
+++ b/tests/sksl/intrinsics/Asinh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Asinh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Asinh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Asinh.glsl b/tests/sksl/intrinsics/Asinh.glsl
index 787afef..7b3bb42 100644
--- a/tests/sksl/intrinsics/Asinh.glsl
+++ b/tests/sksl/intrinsics/Asinh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = asinh(a);
 }
diff --git a/tests/sksl/intrinsics/Asinh.metal b/tests/sksl/intrinsics/Asinh.metal
index effbbd2..78b2ff8 100644
--- a/tests/sksl/intrinsics/Asinh.metal
+++ b/tests/sksl/intrinsics/Asinh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = asinh(_in.a);
+    _out.sk_FragColor.x = asinh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Atan.asm.frag b/tests/sksl/intrinsics/Atan.asm.frag
index 04e286b..2d72df4 100644
--- a/tests/sksl/intrinsics/Atan.asm.frag
+++ b/tests/sksl/intrinsics/Atan.asm.frag
@@ -1,35 +1,38 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 16
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 32
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 OpDecorate %26 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %30 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
-OpDecorate %33 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -37,36 +40,42 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%c = OpVariable %_ptr_Input_v4float Input
-%d = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %float %a
-%19 = OpExtInst %float %1 Atan %20
-%21 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %21 %19
-%26 = OpLoad %float %a
-%27 = OpLoad %float %b
-%25 = OpExtInst %float %1 Atan2 %26 %27
-%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %28 %25
-%30 = OpLoad %v4float %c
-%29 = OpExtInst %v4float %1 Atan %30
-OpStore %sk_FragColor %29
-%32 = OpLoad %v4float %c
-%33 = OpLoad %v4float %d
-%31 = OpExtInst %v4float %1 Atan2 %32 %33
+%_ptr_Output_float = OpTypePointer Output %float
+%int_1 = OpConstant %int 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Atan %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
+%25 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%26 = OpLoad %float %25
+%27 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%29 = OpLoad %float %27
+%24 = OpExtInst %float %1 Atan2 %26 %29
+%30 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %30 %24
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%35 = OpLoad %v4float %32
+%31 = OpExtInst %v4float %1 Atan %35
 OpStore %sk_FragColor %31
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%38 = OpLoad %v4float %37
+%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%41 = OpLoad %v4float %39
+%36 = OpExtInst %v4float %1 Atan2 %38 %41
+OpStore %sk_FragColor %36
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Atan.glsl b/tests/sksl/intrinsics/Atan.glsl
index 94a8686..313fede 100644
--- a/tests/sksl/intrinsics/Atan.glsl
+++ b/tests/sksl/intrinsics/Atan.glsl
@@ -1,9 +1,9 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in vec4 c;
-in vec4 d;
+uniform float a;
+uniform float b;
+uniform vec4 c;
+uniform vec4 d;
 void main() {
     sk_FragColor.x = atan(a);
     sk_FragColor.x = atan(a, b);
diff --git a/tests/sksl/intrinsics/Atan.metal b/tests/sksl/intrinsics/Atan.metal
index 2c6e77b..9c50ad0 100644
--- a/tests/sksl/intrinsics/Atan.metal
+++ b/tests/sksl/intrinsics/Atan.metal
@@ -1,19 +1,21 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float4 c;
     float4 d;
 };
+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;
-    _out.sk_FragColor.x = atan(_in.a);
-    _out.sk_FragColor.x = atan2(_in.a, _in.b);
-    _out.sk_FragColor = atan(_in.c);
-    _out.sk_FragColor = atan2(_in.c, _in.d);
+    _out.sk_FragColor.x = atan(_uniforms.a);
+    _out.sk_FragColor.x = atan2(_uniforms.a, _uniforms.b);
+    _out.sk_FragColor = atan(_uniforms.c);
+    _out.sk_FragColor = atan2(_uniforms.c, _uniforms.d);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Atanh.asm.frag b/tests/sksl/intrinsics/Atanh.asm.frag
index 25722d8..0dac576 100644
--- a/tests/sksl/intrinsics/Atanh.asm.frag
+++ b/tests/sksl/intrinsics/Atanh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Atanh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Atanh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Atanh.glsl b/tests/sksl/intrinsics/Atanh.glsl
index 85f6883..bb7a9fc 100644
--- a/tests/sksl/intrinsics/Atanh.glsl
+++ b/tests/sksl/intrinsics/Atanh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = atanh(a);
 }
diff --git a/tests/sksl/intrinsics/Atanh.metal b/tests/sksl/intrinsics/Atanh.metal
index de005f9..2fe79fe 100644
--- a/tests/sksl/intrinsics/Atanh.metal
+++ b/tests/sksl/intrinsics/Atanh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = atanh(_in.a);
+    _out.sk_FragColor.x = atanh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/BitCount.asm.frag b/tests/sksl/intrinsics/BitCount.asm.frag
index a7b89ba..b363f16 100644
--- a/tests/sksl/intrinsics/BitCount.asm.frag
+++ b/tests/sksl/intrinsics/BitCount.asm.frag
@@ -1,23 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_int Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,29 +27,30 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %int = OpTypeInt 32 1
-%_ptr_Input_int = OpTypePointer Input %int
-%a = OpVariable %_ptr_Input_int Input
 %uint = OpTypeInt 32 0
-%_ptr_Input_uint = OpTypePointer Input %uint
-%b = OpVariable %_ptr_Input_uint Input
+%_UniformBuffer = OpTypeStruct %int %uint
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%16 = OpTypeFunction %void
+%_ptr_Uniform_int = OpTypePointer Uniform %int
 %int_0 = OpConstant %int 0
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_uint = OpTypePointer Uniform %uint
 %int_1 = OpConstant %int 1
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %int %a
-%19 = OpBitCount %int %20
-%21 = OpConvertSToF %float %19
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
-%26 = OpLoad %uint %b
-%25 = OpBitCount %int %26
-%27 = OpConvertSToF %float %25
-%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %27
+%main = OpFunction %void None %16
+%17 = OpLabel
+%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0
+%22 = OpLoad %int %19
+%18 = OpBitCount %int %22
+%23 = OpConvertSToF %float %18
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %23
+%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1
+%30 = OpLoad %uint %27
+%26 = OpBitCount %int %30
+%31 = OpConvertSToF %float %26
+%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
+OpStore %32 %31
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/BitCount.glsl b/tests/sksl/intrinsics/BitCount.glsl
index 2d1e7de..b2af45a 100644
--- a/tests/sksl/intrinsics/BitCount.glsl
+++ b/tests/sksl/intrinsics/BitCount.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = float(bitCount(a));
     sk_FragColor.y = float(bitCount(b));
diff --git a/tests/sksl/intrinsics/BitCount.metal b/tests/sksl/intrinsics/BitCount.metal
index 08ca93c..a345b8e 100644
--- a/tests/sksl/intrinsics/BitCount.metal
+++ b/tests/sksl/intrinsics/BitCount.metal
@@ -1,15 +1,17 @@
-struct Inputs {
+struct Uniforms {
     int a;
     uint b;
 };
+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;
-    _out.sk_FragColor.x = float(popcount(_in.a));
-    _out.sk_FragColor.y = float(popcount(_in.b));
+    _out.sk_FragColor.x = float(popcount(_uniforms.a));
+    _out.sk_FragColor.y = float(popcount(_uniforms.b));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Cos.asm.frag b/tests/sksl/intrinsics/Cos.asm.frag
index 8c5d111..7ccdc80 100644
--- a/tests/sksl/intrinsics/Cos.asm.frag
+++ b/tests/sksl/intrinsics/Cos.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Cos %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Cos %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Cos.glsl b/tests/sksl/intrinsics/Cos.glsl
index efb55d3..d70fc41 100644
--- a/tests/sksl/intrinsics/Cos.glsl
+++ b/tests/sksl/intrinsics/Cos.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = cos(a);
 }
diff --git a/tests/sksl/intrinsics/Cos.metal b/tests/sksl/intrinsics/Cos.metal
index 7dccf7f..29312a8 100644
--- a/tests/sksl/intrinsics/Cos.metal
+++ b/tests/sksl/intrinsics/Cos.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = cos(_in.a);
+    _out.sk_FragColor.x = cos(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Cosh.asm.frag b/tests/sksl/intrinsics/Cosh.asm.frag
index 5960d73..06e7c01 100644
--- a/tests/sksl/intrinsics/Cosh.asm.frag
+++ b/tests/sksl/intrinsics/Cosh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Cosh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Cosh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Cosh.glsl b/tests/sksl/intrinsics/Cosh.glsl
index 70c45a2..ba36c72 100644
--- a/tests/sksl/intrinsics/Cosh.glsl
+++ b/tests/sksl/intrinsics/Cosh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = cosh(a);
 }
diff --git a/tests/sksl/intrinsics/Cosh.metal b/tests/sksl/intrinsics/Cosh.metal
index 44d9389..4ec0802 100644
--- a/tests/sksl/intrinsics/Cosh.metal
+++ b/tests/sksl/intrinsics/Cosh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = cosh(_in.a);
+    _out.sk_FragColor.x = cosh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Cross.asm.frag b/tests/sksl/intrinsics/Cross.asm.frag
index ea2e58c..4311f6c 100644
--- a/tests/sksl/intrinsics/Cross.asm.frag
+++ b/tests/sksl/intrinsics/Cross.asm.frag
@@ -1,32 +1,33 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v2float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 8
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
-OpDecorate %26 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
 OpDecorate %27 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -35,30 +36,34 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %v2float = OpTypeVector %float 2
-%_ptr_Input_v2float = OpTypePointer Input %v2float
-%a = OpVariable %_ptr_Input_v2float Input
-%b = OpVariable %_ptr_Input_v2float Input
+%_UniformBuffer = OpTypeStruct %v2float %v2float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %15
 %16 = OpLabel
-%17 = OpLoad %v2float %a
-%18 = OpCompositeExtract %float %17 0
-%19 = OpLoad %v2float %b
-%20 = OpCompositeExtract %float %19 1
-%21 = OpFMul %float %18 %20
-%22 = OpLoad %v2float %a
-%23 = OpCompositeExtract %float %22 1
-%24 = OpLoad %v2float %b
-%25 = OpCompositeExtract %float %24 0
-%26 = OpFMul %float %23 %25
-%27 = OpFSub %float %21 %26
-%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %28 %27
+%17 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%21 = OpLoad %v2float %17
+%22 = OpCompositeExtract %float %21 0
+%23 = OpAccessChain %_ptr_Uniform_v2float %10 %int_1
+%25 = OpLoad %v2float %23
+%26 = OpCompositeExtract %float %25 1
+%27 = OpFMul %float %22 %26
+%28 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%29 = OpLoad %v2float %28
+%30 = OpCompositeExtract %float %29 1
+%31 = OpAccessChain %_ptr_Uniform_v2float %10 %int_1
+%32 = OpLoad %v2float %31
+%33 = OpCompositeExtract %float %32 0
+%34 = OpFMul %float %30 %33
+%35 = OpFSub %float %27 %34
+%36 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %36 %35
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Cross.glsl b/tests/sksl/intrinsics/Cross.glsl
index 1152803..081889c 100644
--- a/tests/sksl/intrinsics/Cross.glsl
+++ b/tests/sksl/intrinsics/Cross.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec2 a;
-in vec2 b;
+uniform vec2 a;
+uniform vec2 b;
 void main() {
     sk_FragColor.x = a.x * b.y - a.y * b.x;
 }
diff --git a/tests/sksl/intrinsics/Cross.metal b/tests/sksl/intrinsics/Cross.metal
index f61f42d..269f2a8 100644
--- a/tests/sksl/intrinsics/Cross.metal
+++ b/tests/sksl/intrinsics/Cross.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float2 a;
     float2 b;
 };
+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;
-    _out.sk_FragColor.x = _in.a.x * _in.b.y - _in.a.y * _in.b.x;
+    _out.sk_FragColor.x = _uniforms.a.x * _uniforms.b.y - _uniforms.a.y * _uniforms.b.x;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/DFdx.asm.frag b/tests/sksl/intrinsics/DFdx.asm.frag
index 97079fa..ddc55d6 100644
--- a/tests/sksl/intrinsics/DFdx.asm.frag
+++ b/tests/sksl/intrinsics/DFdx.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpDPdx %float %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpDPdx %float %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/DFdx.glsl b/tests/sksl/intrinsics/DFdx.glsl
index 3f7c0c1..5ad1c32 100644
--- a/tests/sksl/intrinsics/DFdx.glsl
+++ b/tests/sksl/intrinsics/DFdx.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = dFdx(a);
 }
diff --git a/tests/sksl/intrinsics/DFdx.metal b/tests/sksl/intrinsics/DFdx.metal
index f74deb3..a24f215 100644
--- a/tests/sksl/intrinsics/DFdx.metal
+++ b/tests/sksl/intrinsics/DFdx.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = dfdx(_in.a);
+    _out.sk_FragColor.x = dfdx(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/DFdy.asm.frag b/tests/sksl/intrinsics/DFdy.asm.frag
index ecfdda3..38ee49e 100644
--- a/tests/sksl/intrinsics/DFdy.asm.frag
+++ b/tests/sksl/intrinsics/DFdy.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpDPdy %float %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpDPdy %float %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/DFdy.glsl b/tests/sksl/intrinsics/DFdy.glsl
index fa43ac5..49aef35 100644
--- a/tests/sksl/intrinsics/DFdy.glsl
+++ b/tests/sksl/intrinsics/DFdy.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = dFdy(a);
 }
diff --git a/tests/sksl/intrinsics/DFdy.metal b/tests/sksl/intrinsics/DFdy.metal
index 1e4625b..6232b65 100644
--- a/tests/sksl/intrinsics/DFdy.metal
+++ b/tests/sksl/intrinsics/DFdy.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = dfdy(_in.a);
+    _out.sk_FragColor.x = dfdy(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Degrees.asm.frag b/tests/sksl/intrinsics/Degrees.asm.frag
index 0d3aaea..30415f7 100644
--- a/tests/sksl/intrinsics/Degrees.asm.frag
+++ b/tests/sksl/intrinsics/Degrees.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Degrees %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Degrees %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Degrees.glsl b/tests/sksl/intrinsics/Degrees.glsl
index f10fcde..8332033 100644
--- a/tests/sksl/intrinsics/Degrees.glsl
+++ b/tests/sksl/intrinsics/Degrees.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = degrees(a);
 }
diff --git a/tests/sksl/intrinsics/Degrees.metal b/tests/sksl/intrinsics/Degrees.metal
index 8cb82a9..07d2527 100644
--- a/tests/sksl/intrinsics/Degrees.metal
+++ b/tests/sksl/intrinsics/Degrees.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = ((_in.a) * 57.2957795);
+    _out.sk_FragColor.x = ((_uniforms.a) * 57.2957795);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Distance.asm.frag b/tests/sksl/intrinsics/Distance.asm.frag
index 2909349..dab3c03 100644
--- a/tests/sksl/intrinsics/Distance.asm.frag
+++ b/tests/sksl/intrinsics/Distance.asm.frag
@@ -1,33 +1,36 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 16
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 32
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -35,30 +38,34 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%c = OpVariable %_ptr_Input_v4float Input
-%d = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %float %a
-%21 = OpLoad %float %b
-%19 = OpExtInst %float %1 Distance %20 %21
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %v4float %c
-%28 = OpLoad %v4float %d
-%26 = OpExtInst %float %1 Distance %27 %28
-%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %29 %26
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpExtInst %float %1 Distance %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%31 = OpLoad %v4float %28
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%34 = OpLoad %v4float %32
+%27 = OpExtInst %float %1 Distance %31 %34
+%35 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %35 %27
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Distance.glsl b/tests/sksl/intrinsics/Distance.glsl
index fca861b..fe21805 100644
--- a/tests/sksl/intrinsics/Distance.glsl
+++ b/tests/sksl/intrinsics/Distance.glsl
@@ -1,9 +1,9 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in vec4 c;
-in vec4 d;
+uniform float a;
+uniform float b;
+uniform vec4 c;
+uniform vec4 d;
 void main() {
     sk_FragColor.x = distance(a, b);
     sk_FragColor.x = distance(c, d);
diff --git a/tests/sksl/intrinsics/Distance.metal b/tests/sksl/intrinsics/Distance.metal
index 7d37c3c..74fb729 100644
--- a/tests/sksl/intrinsics/Distance.metal
+++ b/tests/sksl/intrinsics/Distance.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float4 c;
     float4 d;
 };
+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;
-    _out.sk_FragColor.x = abs(_in.a - _in.b);
-    _out.sk_FragColor.x = distance(_in.c, _in.d);
+    _out.sk_FragColor.x = abs(_uniforms.a - _uniforms.b);
+    _out.sk_FragColor.x = distance(_uniforms.c, _uniforms.d);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Dot.asm.frag b/tests/sksl/intrinsics/Dot.asm.frag
index f23a5df..7fca2df 100644
--- a/tests/sksl/intrinsics/Dot.asm.frag
+++ b/tests/sksl/intrinsics/Dot.asm.frag
@@ -1,33 +1,36 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 16
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 32
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -35,30 +38,34 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%c = OpVariable %_ptr_Input_v4float Input
-%d = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %float %a
-%21 = OpLoad %float %b
-%19 = OpFMul %float %20 %21
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %v4float %c
-%28 = OpLoad %v4float %d
-%26 = OpDot %float %27 %28
-%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %29 %26
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpFMul %float %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%31 = OpLoad %v4float %28
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%34 = OpLoad %v4float %32
+%27 = OpDot %float %31 %34
+%35 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %35 %27
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Dot.glsl b/tests/sksl/intrinsics/Dot.glsl
index 9c176b9..3247c1b 100644
--- a/tests/sksl/intrinsics/Dot.glsl
+++ b/tests/sksl/intrinsics/Dot.glsl
@@ -1,9 +1,9 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in vec4 c;
-in vec4 d;
+uniform float a;
+uniform float b;
+uniform vec4 c;
+uniform vec4 d;
 void main() {
     sk_FragColor.x = dot(a, b);
     sk_FragColor.x = dot(c, d);
diff --git a/tests/sksl/intrinsics/Dot.metal b/tests/sksl/intrinsics/Dot.metal
index e538af7..391a7ef 100644
--- a/tests/sksl/intrinsics/Dot.metal
+++ b/tests/sksl/intrinsics/Dot.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float4 c;
     float4 d;
 };
+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;
-    _out.sk_FragColor.x = (_in.a * _in.b);
-    _out.sk_FragColor.x = dot(_in.c, _in.d);
+    _out.sk_FragColor.x = (_uniforms.a * _uniforms.b);
+    _out.sk_FragColor.x = dot(_uniforms.c, _uniforms.d);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Equal.asm.frag b/tests/sksl/intrinsics/Equal.asm.frag
index f6ceaa3..c39d9c0 100644
--- a/tests/sksl/intrinsics/Equal.asm.frag
+++ b/tests/sksl/intrinsics/Equal.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,27 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %a
-%18 = OpLoad %v4float %b
-%16 = OpFOrdEqual %v4bool %17 %18
-%20 = OpCompositeExtract %bool %16 0
-%21 = OpSelect %int %20 %int_1 %int_0
-%25 = OpConvertSToF %float %21
-%26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %25
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%16 = OpFOrdEqual %v4bool %21 %24
+%26 = OpCompositeExtract %bool %16 0
+%27 = OpSelect %int %26 %int_1 %int_0
+%28 = OpConvertSToF %float %27
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %28
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Equal.glsl b/tests/sksl/intrinsics/Equal.glsl
index 1334796..4823d64 100644
--- a/tests/sksl/intrinsics/Equal.glsl
+++ b/tests/sksl/intrinsics/Equal.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
+uniform vec4 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(equal(a, b).x ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/Equal.metal b/tests/sksl/intrinsics/Equal.metal
index 30e065d..df51259 100644
--- a/tests/sksl/intrinsics/Equal.metal
+++ b/tests/sksl/intrinsics/Equal.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a == _in.b).x ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a == _uniforms.b).x ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Exp.asm.frag b/tests/sksl/intrinsics/Exp.asm.frag
index 584df36..ea274c8 100644
--- a/tests/sksl/intrinsics/Exp.asm.frag
+++ b/tests/sksl/intrinsics/Exp.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Exp %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Exp %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Exp.glsl b/tests/sksl/intrinsics/Exp.glsl
index 5dc98d3..c441762 100644
--- a/tests/sksl/intrinsics/Exp.glsl
+++ b/tests/sksl/intrinsics/Exp.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = exp(a);
 }
diff --git a/tests/sksl/intrinsics/Exp.metal b/tests/sksl/intrinsics/Exp.metal
index 01d9e49..a19fc0d 100644
--- a/tests/sksl/intrinsics/Exp.metal
+++ b/tests/sksl/intrinsics/Exp.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = exp(_in.a);
+    _out.sk_FragColor.x = exp(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Exp2.asm.frag b/tests/sksl/intrinsics/Exp2.asm.frag
index 30a996d..1442dfa 100644
--- a/tests/sksl/intrinsics/Exp2.asm.frag
+++ b/tests/sksl/intrinsics/Exp2.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Exp2 %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Exp2 %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Exp2.glsl b/tests/sksl/intrinsics/Exp2.glsl
index d326100..54bbca1 100644
--- a/tests/sksl/intrinsics/Exp2.glsl
+++ b/tests/sksl/intrinsics/Exp2.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = exp2(a);
 }
diff --git a/tests/sksl/intrinsics/Exp2.metal b/tests/sksl/intrinsics/Exp2.metal
index 27e391c..0d108b7 100644
--- a/tests/sksl/intrinsics/Exp2.metal
+++ b/tests/sksl/intrinsics/Exp2.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = exp2(_in.a);
+    _out.sk_FragColor.x = exp2(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/FaceForward.asm.frag b/tests/sksl/intrinsics/FaceForward.asm.frag
index 1f50dda..ccfc3ba 100644
--- a/tests/sksl/intrinsics/FaceForward.asm.frag
+++ b/tests/sksl/intrinsics/FaceForward.asm.frag
@@ -1,39 +1,44 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d %e %f
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
-OpName %e "e"
-OpName %f "f"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
+OpMemberName %_UniformBuffer 4 "e"
+OpMemberName %_UniformBuffer 5 "f"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %e RelaxedPrecision
-OpDecorate %f RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 8
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 16
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 4 Offset 32
+OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 5 Offset 48
+OpMemberDecorate %_UniformBuffer 5 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 OpDecorate %24 RelaxedPrecision
-OpDecorate %30 RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -41,33 +46,39 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%c = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%d = OpVariable %_ptr_Input_v4float Input
-%e = OpVariable %_ptr_Input_v4float Input
-%f = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %float %v4float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%19 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %19
-%20 = OpLabel
-%22 = OpLoad %float %a
-%23 = OpLoad %float %b
-%24 = OpLoad %float %c
-%21 = OpExtInst %float %1 FaceForward %22 %23 %24
-%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %25 %21
-%30 = OpLoad %v4float %d
-%31 = OpLoad %v4float %e
-%32 = OpLoad %v4float %f
-%29 = OpExtInst %v4float %1 FaceForward %30 %31 %32
-OpStore %sk_FragColor %29
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_3 = OpConstant %int 3
+%int_4 = OpConstant %int 4
+%int_5 = OpConstant %int 5
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%25 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%27 = OpLoad %float %25
+%16 = OpExtInst %float %1 FaceForward %21 %24 %27
+%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %28 %16
+%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%34 = OpLoad %v4float %31
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%37 = OpLoad %v4float %35
+%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%40 = OpLoad %v4float %38
+%30 = OpExtInst %v4float %1 FaceForward %34 %37 %40
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/FaceForward.glsl b/tests/sksl/intrinsics/FaceForward.glsl
index 87ae683..7ba1862 100644
--- a/tests/sksl/intrinsics/FaceForward.glsl
+++ b/tests/sksl/intrinsics/FaceForward.glsl
@@ -1,11 +1,11 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in float c;
-in vec4 d;
-in vec4 e;
-in vec4 f;
+uniform float a;
+uniform float b;
+uniform float c;
+uniform vec4 d;
+uniform vec4 e;
+uniform vec4 f;
 void main() {
     sk_FragColor.x = faceforward(a, b, c);
     sk_FragColor = faceforward(d, e, f);
diff --git a/tests/sksl/intrinsics/FaceForward.metal b/tests/sksl/intrinsics/FaceForward.metal
index 6890e07..d81239a 100644
--- a/tests/sksl/intrinsics/FaceForward.metal
+++ b/tests/sksl/intrinsics/FaceForward.metal
@@ -1,4 +1,4 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float c;
@@ -6,14 +6,16 @@
     float4 e;
     float4 f;
 };
+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;
-    _out.sk_FragColor.x = ((((_in.c) * (_in.b) < 0) ? 1 : -1) * (_in.a));
-    _out.sk_FragColor = faceforward(_in.d, _in.e, _in.f);
+    _out.sk_FragColor.x = ((((_uniforms.c) * (_uniforms.b) < 0) ? 1 : -1) * (_uniforms.a));
+    _out.sk_FragColor = faceforward(_uniforms.d, _uniforms.e, _uniforms.f);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/FindLSB.asm.frag b/tests/sksl/intrinsics/FindLSB.asm.frag
index b758423..2a2dbaf 100644
--- a/tests/sksl/intrinsics/FindLSB.asm.frag
+++ b/tests/sksl/intrinsics/FindLSB.asm.frag
@@ -1,23 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_int Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,29 +27,30 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %int = OpTypeInt 32 1
-%_ptr_Input_int = OpTypePointer Input %int
-%a = OpVariable %_ptr_Input_int Input
 %uint = OpTypeInt 32 0
-%_ptr_Input_uint = OpTypePointer Input %uint
-%b = OpVariable %_ptr_Input_uint Input
+%_UniformBuffer = OpTypeStruct %int %uint
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%16 = OpTypeFunction %void
+%_ptr_Uniform_int = OpTypePointer Uniform %int
 %int_0 = OpConstant %int 0
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_uint = OpTypePointer Uniform %uint
 %int_1 = OpConstant %int 1
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %int %a
-%19 = OpExtInst %int %1 FindILsb %20
-%21 = OpConvertSToF %float %19
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
-%26 = OpLoad %uint %b
-%25 = OpExtInst %int %1 FindILsb %26
-%27 = OpConvertSToF %float %25
-%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %27
+%main = OpFunction %void None %16
+%17 = OpLabel
+%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0
+%22 = OpLoad %int %19
+%18 = OpExtInst %int %1 FindILsb %22
+%23 = OpConvertSToF %float %18
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %23
+%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1
+%30 = OpLoad %uint %27
+%26 = OpExtInst %int %1 FindILsb %30
+%31 = OpConvertSToF %float %26
+%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
+OpStore %32 %31
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/FindLSB.glsl b/tests/sksl/intrinsics/FindLSB.glsl
index df634f7..5249f24 100644
--- a/tests/sksl/intrinsics/FindLSB.glsl
+++ b/tests/sksl/intrinsics/FindLSB.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = float(findLSB(a));
     sk_FragColor.y = float(findLSB(b));
diff --git a/tests/sksl/intrinsics/FindLSB.metal b/tests/sksl/intrinsics/FindLSB.metal
index 49cdf8e..1e22732 100644
--- a/tests/sksl/intrinsics/FindLSB.metal
+++ b/tests/sksl/intrinsics/FindLSB.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     int a;
     uint b;
 };
+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;
     int _skTemp0;
     uint _skTemp1;
-    _out.sk_FragColor.x = float((_skTemp0 = (_in.a), select(ctz(_skTemp0), int(-1), _skTemp0 == int(0))));
-    _out.sk_FragColor.y = float((_skTemp1 = (_in.b), select(ctz(_skTemp1), uint(-1), _skTemp1 == uint(0))));
+    _out.sk_FragColor.x = float((_skTemp0 = (_uniforms.a), select(ctz(_skTemp0), int(-1), _skTemp0 == int(0))));
+    _out.sk_FragColor.y = float((_skTemp1 = (_uniforms.b), select(ctz(_skTemp1), uint(-1), _skTemp1 == uint(0))));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/FindMSB.asm.frag b/tests/sksl/intrinsics/FindMSB.asm.frag
index 135a58c..3450cb1 100644
--- a/tests/sksl/intrinsics/FindMSB.asm.frag
+++ b/tests/sksl/intrinsics/FindMSB.asm.frag
@@ -1,23 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_int Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,29 +27,30 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %int = OpTypeInt 32 1
-%_ptr_Input_int = OpTypePointer Input %int
-%a = OpVariable %_ptr_Input_int Input
 %uint = OpTypeInt 32 0
-%_ptr_Input_uint = OpTypePointer Input %uint
-%b = OpVariable %_ptr_Input_uint Input
+%_UniformBuffer = OpTypeStruct %int %uint
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%16 = OpTypeFunction %void
+%_ptr_Uniform_int = OpTypePointer Uniform %int
 %int_0 = OpConstant %int 0
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_uint = OpTypePointer Uniform %uint
 %int_1 = OpConstant %int 1
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %int %a
-%19 = OpExtInst %int %1 FindSMsb %20
-%21 = OpConvertSToF %float %19
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
-%26 = OpLoad %uint %b
-%25 = OpExtInst %int %1 FindUMsb %26
-%27 = OpConvertSToF %float %25
-%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %27
+%main = OpFunction %void None %16
+%17 = OpLabel
+%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0
+%22 = OpLoad %int %19
+%18 = OpExtInst %int %1 FindSMsb %22
+%23 = OpConvertSToF %float %18
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %23
+%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1
+%30 = OpLoad %uint %27
+%26 = OpExtInst %int %1 FindUMsb %30
+%31 = OpConvertSToF %float %26
+%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
+OpStore %32 %31
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/FindMSB.glsl b/tests/sksl/intrinsics/FindMSB.glsl
index f8ecd83..ba0ae07 100644
--- a/tests/sksl/intrinsics/FindMSB.glsl
+++ b/tests/sksl/intrinsics/FindMSB.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in int a;
-in uint b;
+uniform int a;
+uniform uint b;
 void main() {
     sk_FragColor.x = float(findMSB(a));
     sk_FragColor.y = float(findMSB(b));
diff --git a/tests/sksl/intrinsics/FindMSB.metal b/tests/sksl/intrinsics/FindMSB.metal
index fd2d84e..cb7a77c 100644
--- a/tests/sksl/intrinsics/FindMSB.metal
+++ b/tests/sksl/intrinsics/FindMSB.metal
@@ -1,18 +1,20 @@
-struct Inputs {
+struct Uniforms {
     int a;
     uint b;
 };
+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;
     int _skTemp0;
     int _skTemp1;
     uint _skTemp2;
-    _out.sk_FragColor.x = float((_skTemp0 = (_in.a), _skTemp1 = (select(_skTemp0, ~_skTemp0, _skTemp0 < 0)), select(int(clz(_skTemp1)), int(-1), _skTemp1 == int(0))));
-    _out.sk_FragColor.y = float((_skTemp2 = (_in.b), select(int(clz(_skTemp2)), int(-1), _skTemp2 == uint(0))));
+    _out.sk_FragColor.x = float((_skTemp0 = (_uniforms.a), _skTemp1 = (select(_skTemp0, ~_skTemp0, _skTemp0 < 0)), select(int(clz(_skTemp1)), int(-1), _skTemp1 == int(0))));
+    _out.sk_FragColor.y = float((_skTemp2 = (_uniforms.b), select(int(clz(_skTemp2)), int(-1), _skTemp2 == uint(0))));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
index 8b7bcec..693d59b 100644
--- a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
+++ b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
@@ -1,22 +1,22 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -24,21 +24,22 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
-%_ptr_Output_float = OpTypePointer Output %float
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpBitcast %int %16
-%18 = OpConvertSToF %float %15
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %18
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpBitcast %int %21
+%22 = OpConvertSToF %float %16
+%23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %23 %22
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/FloatBitsToInt.glsl b/tests/sksl/intrinsics/FloatBitsToInt.glsl
index 26d938d..10cda58 100644
--- a/tests/sksl/intrinsics/FloatBitsToInt.glsl
+++ b/tests/sksl/intrinsics/FloatBitsToInt.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = float(floatBitsToInt(a));
 }
diff --git a/tests/sksl/intrinsics/FloatBitsToInt.metal b/tests/sksl/intrinsics/FloatBitsToInt.metal
index 3e59456..8eb9ba8 100644
--- a/tests/sksl/intrinsics/FloatBitsToInt.metal
+++ b/tests/sksl/intrinsics/FloatBitsToInt.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = float(as_type<int>(_in.a));
+    _out.sk_FragColor.x = float(as_type<int>(_uniforms.a));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
index f280e16..412c0a9 100644
--- a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
+++ b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
@@ -1,22 +1,22 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -24,22 +24,23 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%uint = OpTypeInt 32 0
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpBitcast %uint %16
-%18 = OpConvertUToF %float %15
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %18
+%uint = OpTypeInt 32 0
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpBitcast %uint %21
+%23 = OpConvertUToF %float %16
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %23
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/FloatBitsToUint.glsl b/tests/sksl/intrinsics/FloatBitsToUint.glsl
index ee9f965..31c93ab 100644
--- a/tests/sksl/intrinsics/FloatBitsToUint.glsl
+++ b/tests/sksl/intrinsics/FloatBitsToUint.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = float(floatBitsToUint(a));
 }
diff --git a/tests/sksl/intrinsics/FloatBitsToUint.metal b/tests/sksl/intrinsics/FloatBitsToUint.metal
index 075c2d9..18be0b8 100644
--- a/tests/sksl/intrinsics/FloatBitsToUint.metal
+++ b/tests/sksl/intrinsics/FloatBitsToUint.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = float(as_type<uint>(_in.a));
+    _out.sk_FragColor.x = float(as_type<uint>(_uniforms.a));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Fma.asm.frag b/tests/sksl/intrinsics/Fma.asm.frag
index b0c8f73..66ff25c 100644
--- a/tests/sksl/intrinsics/Fma.asm.frag
+++ b/tests/sksl/intrinsics/Fma.asm.frag
@@ -1,30 +1,32 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 8
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,24 +34,27 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%c = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float %float %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %15
-%16 = OpLabel
-%18 = OpLoad %float %a
-%19 = OpLoad %float %b
-%20 = OpLoad %float %c
-%17 = OpExtInst %float %1 Fma %18 %19 %20
-%21 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %21 %17
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%25 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%27 = OpLoad %float %25
+%16 = OpExtInst %float %1 Fma %21 %24 %27
+%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %28 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Fma.glsl b/tests/sksl/intrinsics/Fma.glsl
index 37eb9c8..0fa7912 100644
--- a/tests/sksl/intrinsics/Fma.glsl
+++ b/tests/sksl/intrinsics/Fma.glsl
@@ -1,8 +1,8 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in float c;
+uniform float a;
+uniform float b;
+uniform float c;
 void main() {
     sk_FragColor.x = ((a) * (b) + (c));
 }
diff --git a/tests/sksl/intrinsics/Fma.metal b/tests/sksl/intrinsics/Fma.metal
index 01866dd..7f3494e 100644
--- a/tests/sksl/intrinsics/Fma.metal
+++ b/tests/sksl/intrinsics/Fma.metal
@@ -1,15 +1,17 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float c;
 };
+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;
-    _out.sk_FragColor.x = fma(_in.a, _in.b, _in.c);
+    _out.sk_FragColor.x = fma(_uniforms.a, _uniforms.b, _uniforms.c);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Fract.asm.frag b/tests/sksl/intrinsics/Fract.asm.frag
index d950b36..2f13fbf 100644
--- a/tests/sksl/intrinsics/Fract.asm.frag
+++ b/tests/sksl/intrinsics/Fract.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Fract %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Fract %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Fract.glsl b/tests/sksl/intrinsics/Fract.glsl
index a5fa512..f3efb86 100644
--- a/tests/sksl/intrinsics/Fract.glsl
+++ b/tests/sksl/intrinsics/Fract.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = fract(a);
 }
diff --git a/tests/sksl/intrinsics/Fract.metal b/tests/sksl/intrinsics/Fract.metal
index c9b699a..49d0d5d 100644
--- a/tests/sksl/intrinsics/Fract.metal
+++ b/tests/sksl/intrinsics/Fract.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = fract(_in.a);
+    _out.sk_FragColor.x = fract(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Fwidth.asm.frag b/tests/sksl/intrinsics/Fwidth.asm.frag
index cd6d170..03fe8ae 100644
--- a/tests/sksl/intrinsics/Fwidth.asm.frag
+++ b/tests/sksl/intrinsics/Fwidth.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpFwidth %float %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpFwidth %float %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Fwidth.glsl b/tests/sksl/intrinsics/Fwidth.glsl
index 6c1cbdb..ade5428 100644
--- a/tests/sksl/intrinsics/Fwidth.glsl
+++ b/tests/sksl/intrinsics/Fwidth.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = fwidth(a);
 }
diff --git a/tests/sksl/intrinsics/Fwidth.metal b/tests/sksl/intrinsics/Fwidth.metal
index 6a4fa66..01a29b4 100644
--- a/tests/sksl/intrinsics/Fwidth.metal
+++ b/tests/sksl/intrinsics/Fwidth.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = fwidth(_in.a);
+    _out.sk_FragColor.x = fwidth(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/GreaterThan.asm.frag b/tests/sksl/intrinsics/GreaterThan.asm.frag
index 38936f2..6bab6d2 100644
--- a/tests/sksl/intrinsics/GreaterThan.asm.frag
+++ b/tests/sksl/intrinsics/GreaterThan.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,27 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %a
-%18 = OpLoad %v4float %b
-%16 = OpFOrdGreaterThan %v4bool %17 %18
-%20 = OpCompositeExtract %bool %16 0
-%21 = OpSelect %int %20 %int_1 %int_0
-%25 = OpConvertSToF %float %21
-%26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %25
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%16 = OpFOrdGreaterThan %v4bool %21 %24
+%26 = OpCompositeExtract %bool %16 0
+%27 = OpSelect %int %26 %int_1 %int_0
+%28 = OpConvertSToF %float %27
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %28
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/GreaterThan.glsl b/tests/sksl/intrinsics/GreaterThan.glsl
index 717f803..4b32617 100644
--- a/tests/sksl/intrinsics/GreaterThan.glsl
+++ b/tests/sksl/intrinsics/GreaterThan.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
+uniform vec4 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(greaterThan(a, b).x ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/GreaterThan.metal b/tests/sksl/intrinsics/GreaterThan.metal
index dbd4155..32cc39e 100644
--- a/tests/sksl/intrinsics/GreaterThan.metal
+++ b/tests/sksl/intrinsics/GreaterThan.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a > _in.b).x ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a > _uniforms.b).x ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/GreaterThanEqual.asm.frag b/tests/sksl/intrinsics/GreaterThanEqual.asm.frag
index 5ce3f87..ae8f96e 100644
--- a/tests/sksl/intrinsics/GreaterThanEqual.asm.frag
+++ b/tests/sksl/intrinsics/GreaterThanEqual.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,27 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %a
-%18 = OpLoad %v4float %b
-%16 = OpFOrdGreaterThanEqual %v4bool %17 %18
-%20 = OpCompositeExtract %bool %16 0
-%21 = OpSelect %int %20 %int_1 %int_0
-%25 = OpConvertSToF %float %21
-%26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %25
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%16 = OpFOrdGreaterThanEqual %v4bool %21 %24
+%26 = OpCompositeExtract %bool %16 0
+%27 = OpSelect %int %26 %int_1 %int_0
+%28 = OpConvertSToF %float %27
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %28
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/GreaterThanEqual.glsl b/tests/sksl/intrinsics/GreaterThanEqual.glsl
index 45029a0..526ddb6 100644
--- a/tests/sksl/intrinsics/GreaterThanEqual.glsl
+++ b/tests/sksl/intrinsics/GreaterThanEqual.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
+uniform vec4 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(greaterThanEqual(a, b).x ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/GreaterThanEqual.metal b/tests/sksl/intrinsics/GreaterThanEqual.metal
index 1372ce3..048eae6 100644
--- a/tests/sksl/intrinsics/GreaterThanEqual.metal
+++ b/tests/sksl/intrinsics/GreaterThanEqual.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a >= _in.b).x ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a >= _uniforms.b).x ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
index 6dac3a0..7f02b9f 100644
--- a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
+++ b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
@@ -1,22 +1,22 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_int Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -25,19 +25,20 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %int = OpTypeInt 32 1
-%_ptr_Input_int = OpTypePointer Input %int
-%a = OpVariable %_ptr_Input_int Input
+%_UniformBuffer = OpTypeStruct %int
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%14 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%15 = OpTypeFunction %void
+%_ptr_Uniform_int = OpTypePointer Uniform %int
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %14
-%15 = OpLabel
-%17 = OpLoad %int %a
-%16 = OpBitcast %float %17
-%18 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %18 %16
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %15
+%16 = OpLabel
+%18 = OpAccessChain %_ptr_Uniform_int %10 %int_0
+%21 = OpLoad %int %18
+%17 = OpBitcast %float %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %17
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/IntBitsToFloat.glsl b/tests/sksl/intrinsics/IntBitsToFloat.glsl
index bd1e932..2326b8b 100644
--- a/tests/sksl/intrinsics/IntBitsToFloat.glsl
+++ b/tests/sksl/intrinsics/IntBitsToFloat.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in int a;
+uniform int a;
 void main() {
     sk_FragColor.x = intBitsToFloat(a);
 }
diff --git a/tests/sksl/intrinsics/IntBitsToFloat.metal b/tests/sksl/intrinsics/IntBitsToFloat.metal
index d698411..d68f05d 100644
--- a/tests/sksl/intrinsics/IntBitsToFloat.metal
+++ b/tests/sksl/intrinsics/IntBitsToFloat.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     int a;
 };
+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;
-    _out.sk_FragColor.x = as_type<float>(_in.a);
+    _out.sk_FragColor.x = as_type<float>(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Inversesqrt.asm.frag b/tests/sksl/intrinsics/Inversesqrt.asm.frag
index dca22af..ba0c38a 100644
--- a/tests/sksl/intrinsics/Inversesqrt.asm.frag
+++ b/tests/sksl/intrinsics/Inversesqrt.asm.frag
@@ -1,22 +1,22 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -24,20 +24,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 InverseSqrt %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 InverseSqrt %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Inversesqrt.glsl b/tests/sksl/intrinsics/Inversesqrt.glsl
index 570cbf0..f822896 100644
--- a/tests/sksl/intrinsics/Inversesqrt.glsl
+++ b/tests/sksl/intrinsics/Inversesqrt.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = inversesqrt(a);
 }
diff --git a/tests/sksl/intrinsics/Inversesqrt.metal b/tests/sksl/intrinsics/Inversesqrt.metal
index 9d276fc..703034a 100644
--- a/tests/sksl/intrinsics/Inversesqrt.metal
+++ b/tests/sksl/intrinsics/Inversesqrt.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = rsqrt(_in.a);
+    _out.sk_FragColor.x = rsqrt(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/IsInf.asm.frag b/tests/sksl/intrinsics/IsInf.asm.frag
index e42a2e4..a3be343 100644
--- a/tests/sksl/intrinsics/IsInf.asm.frag
+++ b/tests/sksl/intrinsics/IsInf.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,23 +26,24 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_ptr_Output_float = OpTypePointer Output %float
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpIsInf %bool %16
-%17 = OpSelect %int %15 %int_1 %int_0
-%21 = OpConvertSToF %float %17
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpIsInf %bool %21
+%22 = OpSelect %int %16 %int_1 %int_0
+%24 = OpConvertSToF %float %22
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %24
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/IsInf.glsl b/tests/sksl/intrinsics/IsInf.glsl
index ea52a66..b0fe50d 100644
--- a/tests/sksl/intrinsics/IsInf.glsl
+++ b/tests/sksl/intrinsics/IsInf.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = float(isinf(a) ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/IsInf.metal b/tests/sksl/intrinsics/IsInf.metal
index ba016b8..5016b0e 100644
--- a/tests/sksl/intrinsics/IsInf.metal
+++ b/tests/sksl/intrinsics/IsInf.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = float(isinf(_in.a) ? 1 : 0);
+    _out.sk_FragColor.x = float(isinf(_uniforms.a) ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/IsNan.asm.frag b/tests/sksl/intrinsics/IsNan.asm.frag
index b532963..c2b4782 100644
--- a/tests/sksl/intrinsics/IsNan.asm.frag
+++ b/tests/sksl/intrinsics/IsNan.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,23 +26,24 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_ptr_Output_float = OpTypePointer Output %float
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpIsNan %bool %16
-%17 = OpSelect %int %15 %int_1 %int_0
-%21 = OpConvertSToF %float %17
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpIsNan %bool %21
+%22 = OpSelect %int %16 %int_1 %int_0
+%24 = OpConvertSToF %float %22
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %24
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/IsNan.glsl b/tests/sksl/intrinsics/IsNan.glsl
index fb705ae..35a2501 100644
--- a/tests/sksl/intrinsics/IsNan.glsl
+++ b/tests/sksl/intrinsics/IsNan.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = float(isnan(a) ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/IsNan.metal b/tests/sksl/intrinsics/IsNan.metal
index 94ed817..a4f9931 100644
--- a/tests/sksl/intrinsics/IsNan.metal
+++ b/tests/sksl/intrinsics/IsNan.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = float(isnan(_in.a) ? 1 : 0);
+    _out.sk_FragColor.x = float(isnan(_uniforms.a) ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Ldexp.asm.frag b/tests/sksl/intrinsics/Ldexp.asm.frag
index 52901de..9d09b36 100644
--- a/tests/sksl/intrinsics/Ldexp.asm.frag
+++ b/tests/sksl/intrinsics/Ldexp.asm.frag
@@ -1,23 +1,23 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
 OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %13 Binding 0
+OpDecorate %13 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -25,23 +25,24 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
 %int = OpTypeInt 32 1
 %_ptr_Private_int = OpTypePointer Private %int
 %b = OpVariable %_ptr_Private_int Private
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%16 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%17 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %16
-%17 = OpLabel
-%19 = OpLoad %float %a
-%20 = OpLoad %int %b
-%18 = OpExtInst %float %1 Ldexp %19 %20
-%21 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %21 %18
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %17
+%18 = OpLabel
+%20 = OpAccessChain %_ptr_Uniform_float %13 %int_0
+%23 = OpLoad %float %20
+%24 = OpLoad %int %b
+%19 = OpExtInst %float %1 Ldexp %23 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %19
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Ldexp.glsl b/tests/sksl/intrinsics/Ldexp.glsl
index 6b40dbd..211f15a 100644
--- a/tests/sksl/intrinsics/Ldexp.glsl
+++ b/tests/sksl/intrinsics/Ldexp.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 int b;
 void main() {
     sk_FragColor.x = ldexp(a, b);
diff --git a/tests/sksl/intrinsics/Ldexp.metal b/tests/sksl/intrinsics/Ldexp.metal
index df27be8..4a3c92e 100644
--- a/tests/sksl/intrinsics/Ldexp.metal
+++ b/tests/sksl/intrinsics/Ldexp.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+struct Inputs {
+};
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
 struct Globals {
     int b;
 };
-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]]) {
     Globals _globals{{}};
     (void)_globals;
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.x = ldexp(_in.a, _globals.b);
+    _out.sk_FragColor.x = ldexp(_uniforms.a, _globals.b);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Length.asm.frag b/tests/sksl/intrinsics/Length.asm.frag
index b2e14a2..2c6d3e7 100644
--- a/tests/sksl/intrinsics/Length.asm.frag
+++ b/tests/sksl/intrinsics/Length.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,26 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %15
-%16 = OpLabel
-%18 = OpLoad %float %a
-%17 = OpExtInst %float %1 Length %18
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %17
-%24 = OpLoad %v4float %b
-%23 = OpExtInst %float %1 Length %24
-%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %25 %23
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_1 = OpConstant %int 1
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Length %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
+%25 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%28 = OpLoad %v4float %25
+%24 = OpExtInst %float %1 Length %28
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %24
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Length.glsl b/tests/sksl/intrinsics/Length.glsl
index c315435..d001a1b 100644
--- a/tests/sksl/intrinsics/Length.glsl
+++ b/tests/sksl/intrinsics/Length.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in float a;
-in vec4 b;
+uniform float a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = length(a);
     sk_FragColor.x = length(b);
diff --git a/tests/sksl/intrinsics/Length.metal b/tests/sksl/intrinsics/Length.metal
index adb7294..781dfe9 100644
--- a/tests/sksl/intrinsics/Length.metal
+++ b/tests/sksl/intrinsics/Length.metal
@@ -1,15 +1,17 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = abs(_in.a);
-    _out.sk_FragColor.x = length(_in.b);
+    _out.sk_FragColor.x = abs(_uniforms.a);
+    _out.sk_FragColor.x = length(_uniforms.b);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/LessThan.asm.frag b/tests/sksl/intrinsics/LessThan.asm.frag
index 8b66d52..f197972 100644
--- a/tests/sksl/intrinsics/LessThan.asm.frag
+++ b/tests/sksl/intrinsics/LessThan.asm.frag
@@ -1,31 +1,36 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d %e %f
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
-OpName %e "e"
-OpName %f "f"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
+OpMemberName %_UniformBuffer 4 "e"
+OpMemberName %_UniformBuffer 5 "f"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
+OpMemberDecorate %_UniformBuffer 3 Offset 40
+OpMemberDecorate %_UniformBuffer 4 Offset 48
+OpMemberDecorate %_UniformBuffer 5 Offset 64
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %24 RelaxedPrecision
 OpDecorate %27 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,55 +38,59 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
 %uint = OpTypeInt 32 0
 %v2uint = OpTypeVector %uint 2
-%_ptr_Input_v2uint = OpTypePointer Input %v2uint
-%c = OpVariable %_ptr_Input_v2uint Input
-%d = OpVariable %_ptr_Input_v2uint Input
 %int = OpTypeInt 32 1
 %v3int = OpTypeVector %int 3
-%_ptr_Input_v3int = OpTypePointer Input %v3int
-%e = OpVariable %_ptr_Input_v3int Input
-%f = OpVariable %_ptr_Input_v3int Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%24 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
-%int_1 = OpConstant %int 1
+%18 = OpTypeFunction %void
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
-%v2bool = OpTypeVector %bool 2
-%v3bool = OpTypeVector %bool 3
+%_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint
 %int_2 = OpConstant %int 2
-%main = OpFunction %void None %24
-%25 = OpLabel
-%27 = OpLoad %v4float %a
-%28 = OpLoad %v4float %b
-%26 = OpFOrdLessThan %v4bool %27 %28
-%30 = OpCompositeExtract %bool %26 0
-%31 = OpSelect %int %30 %int_1 %int_0
-%34 = OpConvertSToF %float %31
-%35 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %35 %34
-%38 = OpLoad %v2uint %c
-%39 = OpLoad %v2uint %d
-%37 = OpULessThan %v2bool %38 %39
-%41 = OpCompositeExtract %bool %37 1
-%42 = OpSelect %int %41 %int_1 %int_0
-%43 = OpConvertSToF %float %42
-%44 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %44 %43
-%46 = OpLoad %v3int %e
-%47 = OpLoad %v3int %f
-%45 = OpSLessThan %v3bool %46 %47
-%49 = OpCompositeExtract %bool %45 2
-%50 = OpSelect %int %49 %int_1 %int_0
-%51 = OpConvertSToF %float %50
-%52 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2
-OpStore %52 %51
+%int_3 = OpConstant %int 3
+%v2bool = OpTypeVector %bool 2
+%_ptr_Uniform_v3int = OpTypePointer Uniform %v3int
+%int_4 = OpConstant %int 4
+%int_5 = OpConstant %int 5
+%v3bool = OpTypeVector %bool 3
+%main = OpFunction %void None %18
+%19 = OpLabel
+%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%24 = OpLoad %v4float %21
+%25 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%27 = OpLoad %v4float %25
+%20 = OpFOrdLessThan %v4bool %24 %27
+%29 = OpCompositeExtract %bool %20 0
+%30 = OpSelect %int %29 %int_1 %int_0
+%31 = OpConvertSToF %float %30
+%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %32 %31
+%35 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2
+%38 = OpLoad %v2uint %35
+%39 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3
+%41 = OpLoad %v2uint %39
+%34 = OpULessThan %v2bool %38 %41
+%43 = OpCompositeExtract %bool %34 1
+%44 = OpSelect %int %43 %int_1 %int_0
+%45 = OpConvertSToF %float %44
+%46 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
+OpStore %46 %45
+%48 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4
+%51 = OpLoad %v3int %48
+%52 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5
+%54 = OpLoad %v3int %52
+%47 = OpSLessThan %v3bool %51 %54
+%56 = OpCompositeExtract %bool %47 2
+%57 = OpSelect %int %56 %int_1 %int_0
+%58 = OpConvertSToF %float %57
+%59 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2
+OpStore %59 %58
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/LessThan.glsl b/tests/sksl/intrinsics/LessThan.glsl
index f524720..c5def0e 100644
--- a/tests/sksl/intrinsics/LessThan.glsl
+++ b/tests/sksl/intrinsics/LessThan.glsl
@@ -1,11 +1,11 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
-in uvec2 c;
-in uvec2 d;
-in ivec3 e;
-in ivec3 f;
+uniform vec4 a;
+uniform vec4 b;
+uniform uvec2 c;
+uniform uvec2 d;
+uniform ivec3 e;
+uniform ivec3 f;
 void main() {
     sk_FragColor.x = float(lessThan(a, b).x ? 1 : 0);
     sk_FragColor.y = float(lessThan(c, d).y ? 1 : 0);
diff --git a/tests/sksl/intrinsics/LessThan.metal b/tests/sksl/intrinsics/LessThan.metal
index b2bf3d2..055fa3f 100644
--- a/tests/sksl/intrinsics/LessThan.metal
+++ b/tests/sksl/intrinsics/LessThan.metal
@@ -1,4 +1,4 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
     uint2 c;
@@ -6,15 +6,17 @@
     int3 e;
     int3 f;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a < _in.b).x ? 1 : 0);
-    _out.sk_FragColor.y = float((_in.c < _in.d).y ? 1 : 0);
-    _out.sk_FragColor.z = float((_in.e < _in.f).z ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a < _uniforms.b).x ? 1 : 0);
+    _out.sk_FragColor.y = float((_uniforms.c < _uniforms.d).y ? 1 : 0);
+    _out.sk_FragColor.z = float((_uniforms.e < _uniforms.f).z ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/LessThanEqual.asm.frag b/tests/sksl/intrinsics/LessThanEqual.asm.frag
index c16d67d..c71692c 100644
--- a/tests/sksl/intrinsics/LessThanEqual.asm.frag
+++ b/tests/sksl/intrinsics/LessThanEqual.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,27 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %a
-%18 = OpLoad %v4float %b
-%16 = OpFOrdLessThanEqual %v4bool %17 %18
-%20 = OpCompositeExtract %bool %16 0
-%21 = OpSelect %int %20 %int_1 %int_0
-%25 = OpConvertSToF %float %21
-%26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %25
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%16 = OpFOrdLessThanEqual %v4bool %21 %24
+%26 = OpCompositeExtract %bool %16 0
+%27 = OpSelect %int %26 %int_1 %int_0
+%28 = OpConvertSToF %float %27
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %28
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/LessThanEqual.glsl b/tests/sksl/intrinsics/LessThanEqual.glsl
index ef81f5f..5e5e0c9 100644
--- a/tests/sksl/intrinsics/LessThanEqual.glsl
+++ b/tests/sksl/intrinsics/LessThanEqual.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
+uniform vec4 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(lessThanEqual(a, b).x ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/LessThanEqual.metal b/tests/sksl/intrinsics/LessThanEqual.metal
index f7a9d01..e624cc4 100644
--- a/tests/sksl/intrinsics/LessThanEqual.metal
+++ b/tests/sksl/intrinsics/LessThanEqual.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a <= _in.b).x ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a <= _uniforms.b).x ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Log.asm.frag b/tests/sksl/intrinsics/Log.asm.frag
index 4f5e6a6..5c0b715 100644
--- a/tests/sksl/intrinsics/Log.asm.frag
+++ b/tests/sksl/intrinsics/Log.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Log %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Log %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Log.glsl b/tests/sksl/intrinsics/Log.glsl
index f326158..3baa201 100644
--- a/tests/sksl/intrinsics/Log.glsl
+++ b/tests/sksl/intrinsics/Log.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = log(a);
 }
diff --git a/tests/sksl/intrinsics/Log.metal b/tests/sksl/intrinsics/Log.metal
index 27d7ae6..5668b8c 100644
--- a/tests/sksl/intrinsics/Log.metal
+++ b/tests/sksl/intrinsics/Log.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = log(_in.a);
+    _out.sk_FragColor.x = log(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Log2.asm.frag b/tests/sksl/intrinsics/Log2.asm.frag
index 2aeca2b..64b7ac7 100644
--- a/tests/sksl/intrinsics/Log2.asm.frag
+++ b/tests/sksl/intrinsics/Log2.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Log2 %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Log2 %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Log2.glsl b/tests/sksl/intrinsics/Log2.glsl
index 22624bb..78b73f9 100644
--- a/tests/sksl/intrinsics/Log2.glsl
+++ b/tests/sksl/intrinsics/Log2.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = log2(a);
 }
diff --git a/tests/sksl/intrinsics/Log2.metal b/tests/sksl/intrinsics/Log2.metal
index a63290f..0d410a5 100644
--- a/tests/sksl/intrinsics/Log2.metal
+++ b/tests/sksl/intrinsics/Log2.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = log2(_in.a);
+    _out.sk_FragColor.x = log2(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Mod.asm.frag b/tests/sksl/intrinsics/Mod.asm.frag
index 33c9dae..578ae4e 100644
--- a/tests/sksl/intrinsics/Mod.asm.frag
+++ b/tests/sksl/intrinsics/Mod.asm.frag
@@ -1,36 +1,39 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 16
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 32
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 OpDecorate %31 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -38,34 +41,40 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%c = OpVariable %_ptr_Input_v4float Input
-%d = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %float %a
-%21 = OpLoad %float %b
-%19 = OpFMod %float %20 %21
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %v4float %c
-%28 = OpLoad %float %b
-%29 = OpCompositeConstruct %v4float %28 %28 %28 %28
-%26 = OpFMod %v4float %27 %29
-OpStore %sk_FragColor %26
-%31 = OpLoad %v4float %c
-%32 = OpLoad %v4float %d
-%30 = OpFMod %v4float %31 %32
-OpStore %sk_FragColor %30
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpFMod %float %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%31 = OpLoad %v4float %28
+%32 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%33 = OpLoad %float %32
+%34 = OpCompositeConstruct %v4float %33 %33 %33 %33
+%27 = OpFMod %v4float %31 %34
+OpStore %sk_FragColor %27
+%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%37 = OpLoad %v4float %36
+%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%40 = OpLoad %v4float %38
+%35 = OpFMod %v4float %37 %40
+OpStore %sk_FragColor %35
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Mod.glsl b/tests/sksl/intrinsics/Mod.glsl
index 1961022..3ff20c4 100644
--- a/tests/sksl/intrinsics/Mod.glsl
+++ b/tests/sksl/intrinsics/Mod.glsl
@@ -1,9 +1,9 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in vec4 c;
-in vec4 d;
+uniform float a;
+uniform float b;
+uniform vec4 c;
+uniform vec4 d;
 void main() {
     sk_FragColor.x = mod(a, b);
     sk_FragColor = mod(c, b);
diff --git a/tests/sksl/intrinsics/Mod.metal b/tests/sksl/intrinsics/Mod.metal
index b7b3ac6..f07a07b 100644
--- a/tests/sksl/intrinsics/Mod.metal
+++ b/tests/sksl/intrinsics/Mod.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float4 c;
     float4 d;
 };
+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 _skTemp0;
@@ -17,8 +19,8 @@
     float _skTemp3;
     float4 _skTemp4;
     float4 _skTemp5;
-    _out.sk_FragColor.x = (_skTemp0 = _in.a, _skTemp1 = _in.b, _skTemp0 - _skTemp1 * floor(_skTemp0 / _skTemp1));
-    _out.sk_FragColor = (_skTemp2 = _in.c, _skTemp3 = _in.b, _skTemp2 - _skTemp3 * floor(_skTemp2 / _skTemp3));
-    _out.sk_FragColor = (_skTemp4 = _in.c, _skTemp5 = _in.d, _skTemp4 - _skTemp5 * floor(_skTemp4 / _skTemp5));
+    _out.sk_FragColor.x = (_skTemp0 = _uniforms.a, _skTemp1 = _uniforms.b, _skTemp0 - _skTemp1 * floor(_skTemp0 / _skTemp1));
+    _out.sk_FragColor = (_skTemp2 = _uniforms.c, _skTemp3 = _uniforms.b, _skTemp2 - _skTemp3 * floor(_skTemp2 / _skTemp3));
+    _out.sk_FragColor = (_skTemp4 = _uniforms.c, _skTemp5 = _uniforms.d, _skTemp4 - _skTemp5 * floor(_skTemp4 / _skTemp5));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Normalize.asm.frag b/tests/sksl/intrinsics/Normalize.asm.frag
index 7d7547d..e4e746a 100644
--- a/tests/sksl/intrinsics/Normalize.asm.frag
+++ b/tests/sksl/intrinsics/Normalize.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,25 +30,27 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %15
-%16 = OpLabel
-%18 = OpLoad %float %a
-%17 = OpExtInst %float %1 Normalize %18
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %17
-%24 = OpLoad %v4float %b
-%23 = OpExtInst %v4float %1 Normalize %24
-OpStore %sk_FragColor %23
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_1 = OpConstant %int 1
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Normalize %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
+%25 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%28 = OpLoad %v4float %25
+%24 = OpExtInst %v4float %1 Normalize %28
+OpStore %sk_FragColor %24
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Normalize.glsl b/tests/sksl/intrinsics/Normalize.glsl
index 3f4ef6d..5db7766 100644
--- a/tests/sksl/intrinsics/Normalize.glsl
+++ b/tests/sksl/intrinsics/Normalize.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in float a;
-in vec4 b;
+uniform float a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = normalize(a);
     sk_FragColor = normalize(b);
diff --git a/tests/sksl/intrinsics/Normalize.metal b/tests/sksl/intrinsics/Normalize.metal
index 51a5c79..db4e1d7 100644
--- a/tests/sksl/intrinsics/Normalize.metal
+++ b/tests/sksl/intrinsics/Normalize.metal
@@ -1,15 +1,17 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = sign(_in.a);
-    _out.sk_FragColor = normalize(_in.b);
+    _out.sk_FragColor.x = sign(_uniforms.a);
+    _out.sk_FragColor = normalize(_uniforms.b);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/NotEqual.asm.frag b/tests/sksl/intrinsics/NotEqual.asm.frag
index 07063de..bd28ca0 100644
--- a/tests/sksl/intrinsics/NotEqual.asm.frag
+++ b/tests/sksl/intrinsics/NotEqual.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,27 +30,28 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%a = OpVariable %_ptr_Input_v4float Input
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%v4bool = OpTypeVector %bool 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
-%int_1 = OpConstant %int 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%v4bool = OpTypeVector %bool 4
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %v4float %a
-%18 = OpLoad %v4float %b
-%16 = OpFOrdNotEqual %v4bool %17 %18
-%20 = OpCompositeExtract %bool %16 0
-%21 = OpSelect %int %20 %int_1 %int_0
-%25 = OpConvertSToF %float %21
-%26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %25
+%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%21 = OpLoad %v4float %17
+%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%24 = OpLoad %v4float %22
+%16 = OpFOrdNotEqual %v4bool %21 %24
+%26 = OpCompositeExtract %bool %16 0
+%27 = OpSelect %int %26 %int_1 %int_0
+%28 = OpConvertSToF %float %27
+%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %29 %28
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/NotEqual.glsl b/tests/sksl/intrinsics/NotEqual.glsl
index d0e6d8d..556330a 100644
--- a/tests/sksl/intrinsics/NotEqual.glsl
+++ b/tests/sksl/intrinsics/NotEqual.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec4 a;
-in vec4 b;
+uniform vec4 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(notEqual(a, b).x ? 1 : 0);
 }
diff --git a/tests/sksl/intrinsics/NotEqual.metal b/tests/sksl/intrinsics/NotEqual.metal
index 0f3d7d2..353da0b 100644
--- a/tests/sksl/intrinsics/NotEqual.metal
+++ b/tests/sksl/intrinsics/NotEqual.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float4 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float((_in.a != _in.b).x ? 1 : 0);
+    _out.sk_FragColor.x = float((_uniforms.a != _uniforms.b).x ? 1 : 0);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/OuterProduct.asm.frag b/tests/sksl/intrinsics/OuterProduct.asm.frag
index 32d588d..b65057a 100644
--- a/tests/sksl/intrinsics/OuterProduct.asm.frag
+++ b/tests/sksl/intrinsics/OuterProduct.asm.frag
@@ -1,57 +1,62 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %h2 = OpVariable %_ptr_Input_v2float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %h2 %h3 %h4 %f2 %f3 %f4
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %h2 "h2"
-OpName %h3 "h3"
-OpName %h4 "h4"
-OpName %f2 "f2"
-OpName %f3 "f3"
-OpName %f4 "f4"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "h2"
+OpMemberName %_UniformBuffer 1 "h3"
+OpMemberName %_UniformBuffer 2 "h4"
+OpMemberName %_UniformBuffer 3 "f2"
+OpMemberName %_UniformBuffer 4 "f3"
+OpMemberName %_UniformBuffer 5 "f4"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %h2 RelaxedPrecision
-OpDecorate %h3 RelaxedPrecision
-OpDecorate %h4 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 32
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 48
+OpMemberDecorate %_UniformBuffer 4 Offset 64
+OpMemberDecorate %_UniformBuffer 5 Offset 80
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %130 RelaxedPrecision
 OpDecorate %132 RelaxedPrecision
 OpDecorate %134 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
 OpDecorate %139 RelaxedPrecision
 OpDecorate %141 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
-OpDecorate %146 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
+OpDecorate %150 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
+OpDecorate %156 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %161 RelaxedPrecision
-OpDecorate %164 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
 OpDecorate %167 RelaxedPrecision
+OpDecorate %169 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
+OpDecorate %178 RelaxedPrecision
+OpDecorate %182 RelaxedPrecision
+OpDecorate %184 RelaxedPrecision
+OpDecorate %186 RelaxedPrecision
+OpDecorate %191 RelaxedPrecision
+OpDecorate %193 RelaxedPrecision
+OpDecorate %195 RelaxedPrecision
+OpDecorate %199 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
+OpDecorate %203 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -60,30 +65,29 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %v2float = OpTypeVector %float 2
-%_ptr_Input_v2float = OpTypePointer Input %v2float
-%h2 = OpVariable %_ptr_Input_v2float Input
 %v3float = OpTypeVector %float 3
-%_ptr_Input_v3float = OpTypePointer Input %v3float
-%h3 = OpVariable %_ptr_Input_v3float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%h4 = OpVariable %_ptr_Input_v4float Input
-%f2 = OpVariable %_ptr_Input_v2float Input
-%f3 = OpVariable %_ptr_Input_v3float Input
-%f4 = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v2float %v3float %v4float %v2float %v3float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%22 = OpTypeFunction %void
+%16 = OpTypeFunction %void
 %mat2v2float = OpTypeMatrix %v2float 2
 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
 %int = OpTypeInt 32 1
+%int_3 = OpConstant %int 3
 %int_1 = OpConstant %int 1
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %mat3v3float = OpTypeMatrix %v3float 3
 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
+%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
+%int_4 = OpConstant %int 4
 %int_2 = OpConstant %int 2
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %mat4v4float = OpTypeMatrix %v4float 4
 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
-%int_3 = OpConstant %int 3
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_5 = OpConstant %int 5
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %mat2v3float = OpTypeMatrix %v3float 2
 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float
@@ -97,165 +101,200 @@
 %_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
 %mat4v3float = OpTypeMatrix %v3float 4
 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
-%main = OpFunction %void None %22
-%23 = OpLabel
-%24 = OpVariable %_ptr_Function_mat2v2float Function
-%36 = OpVariable %_ptr_Function_mat3v3float Function
-%47 = OpVariable %_ptr_Function_mat4v4float Function
-%57 = OpVariable %_ptr_Function_mat2v3float Function
-%66 = OpVariable %_ptr_Function_mat3v2float Function
-%75 = OpVariable %_ptr_Function_mat2v4float Function
-%83 = OpVariable %_ptr_Function_mat4v2float Function
-%92 = OpVariable %_ptr_Function_mat3v4float Function
-%100 = OpVariable %_ptr_Function_mat4v3float Function
-%109 = OpVariable %_ptr_Function_mat2v2float Function
-%116 = OpVariable %_ptr_Function_mat3v3float Function
-%123 = OpVariable %_ptr_Function_mat4v4float Function
-%129 = OpVariable %_ptr_Function_mat2v3float Function
-%136 = OpVariable %_ptr_Function_mat3v2float Function
-%143 = OpVariable %_ptr_Function_mat2v4float Function
-%149 = OpVariable %_ptr_Function_mat4v2float Function
-%156 = OpVariable %_ptr_Function_mat3v4float Function
-%162 = OpVariable %_ptr_Function_mat4v3float Function
-%28 = OpLoad %v2float %f2
-%29 = OpLoad %v2float %f2
-%27 = OpOuterProduct %mat2v2float %28 %29
-OpStore %24 %27
-%32 = OpAccessChain %_ptr_Function_v2float %24 %int_1
-%34 = OpLoad %v2float %32
-%35 = OpVectorShuffle %v4float %34 %34 0 1 1 1
-OpStore %sk_FragColor %35
-%40 = OpLoad %v3float %f3
-%41 = OpLoad %v3float %f3
-%39 = OpOuterProduct %mat3v3float %40 %41
-OpStore %36 %39
-%43 = OpAccessChain %_ptr_Function_v3float %36 %int_2
-%45 = OpLoad %v3float %43
-%46 = OpVectorShuffle %v4float %45 %45 0 1 2 2
-OpStore %sk_FragColor %46
-%51 = OpLoad %v4float %f4
-%52 = OpLoad %v4float %f4
-%50 = OpOuterProduct %mat4v4float %51 %52
-OpStore %47 %50
-%54 = OpAccessChain %_ptr_Function_v4float %47 %int_3
-%56 = OpLoad %v4float %54
-OpStore %sk_FragColor %56
-%61 = OpLoad %v3float %f3
-%62 = OpLoad %v2float %f2
-%60 = OpOuterProduct %mat2v3float %61 %62
-OpStore %57 %60
-%63 = OpAccessChain %_ptr_Function_v3float %57 %int_1
-%64 = OpLoad %v3float %63
-%65 = OpVectorShuffle %v4float %64 %64 0 1 2 2
-OpStore %sk_FragColor %65
-%70 = OpLoad %v2float %f2
-%71 = OpLoad %v3float %f3
-%69 = OpOuterProduct %mat3v2float %70 %71
-OpStore %66 %69
-%72 = OpAccessChain %_ptr_Function_v2float %66 %int_2
-%73 = OpLoad %v2float %72
-%74 = OpVectorShuffle %v4float %73 %73 0 1 1 1
-OpStore %sk_FragColor %74
-%79 = OpLoad %v4float %f4
-%80 = OpLoad %v2float %f2
-%78 = OpOuterProduct %mat2v4float %79 %80
-OpStore %75 %78
-%81 = OpAccessChain %_ptr_Function_v4float %75 %int_1
-%82 = OpLoad %v4float %81
-OpStore %sk_FragColor %82
-%87 = OpLoad %v2float %f2
-%88 = OpLoad %v4float %f4
-%86 = OpOuterProduct %mat4v2float %87 %88
-OpStore %83 %86
-%89 = OpAccessChain %_ptr_Function_v2float %83 %int_3
-%90 = OpLoad %v2float %89
-%91 = OpVectorShuffle %v4float %90 %90 0 1 1 1
-OpStore %sk_FragColor %91
-%96 = OpLoad %v4float %f4
-%97 = OpLoad %v3float %f3
-%95 = OpOuterProduct %mat3v4float %96 %97
-OpStore %92 %95
-%98 = OpAccessChain %_ptr_Function_v4float %92 %int_2
-%99 = OpLoad %v4float %98
-OpStore %sk_FragColor %99
-%104 = OpLoad %v3float %f3
-%105 = OpLoad %v4float %f4
-%103 = OpOuterProduct %mat4v3float %104 %105
-OpStore %100 %103
-%106 = OpAccessChain %_ptr_Function_v3float %100 %int_3
-%107 = OpLoad %v3float %106
-%108 = OpVectorShuffle %v4float %107 %107 0 1 2 2
-OpStore %sk_FragColor %108
-%111 = OpLoad %v2float %h2
-%112 = OpLoad %v2float %h2
-%110 = OpOuterProduct %mat2v2float %111 %112
-OpStore %109 %110
-%113 = OpAccessChain %_ptr_Function_v2float %109 %int_1
-%114 = OpLoad %v2float %113
-%115 = OpVectorShuffle %v4float %114 %114 0 1 1 1
-OpStore %sk_FragColor %115
-%118 = OpLoad %v3float %h3
-%119 = OpLoad %v3float %h3
-%117 = OpOuterProduct %mat3v3float %118 %119
-OpStore %116 %117
-%120 = OpAccessChain %_ptr_Function_v3float %116 %int_2
-%121 = OpLoad %v3float %120
-%122 = OpVectorShuffle %v4float %121 %121 0 1 2 2
-OpStore %sk_FragColor %122
-%125 = OpLoad %v4float %h4
-%126 = OpLoad %v4float %h4
-%124 = OpOuterProduct %mat4v4float %125 %126
-OpStore %123 %124
-%127 = OpAccessChain %_ptr_Function_v4float %123 %int_3
-%128 = OpLoad %v4float %127
-OpStore %sk_FragColor %128
-%131 = OpLoad %v3float %h3
-%132 = OpLoad %v2float %h2
-%130 = OpOuterProduct %mat2v3float %131 %132
-OpStore %129 %130
-%133 = OpAccessChain %_ptr_Function_v3float %129 %int_1
-%134 = OpLoad %v3float %133
-%135 = OpVectorShuffle %v4float %134 %134 0 1 2 2
+%int_0 = OpConstant %int 0
+%main = OpFunction %void None %16
+%17 = OpLabel
+%18 = OpVariable %_ptr_Function_mat2v2float Function
+%34 = OpVariable %_ptr_Function_mat3v3float Function
+%49 = OpVariable %_ptr_Function_mat4v4float Function
+%62 = OpVariable %_ptr_Function_mat2v3float Function
+%73 = OpVariable %_ptr_Function_mat3v2float Function
+%84 = OpVariable %_ptr_Function_mat2v4float Function
+%94 = OpVariable %_ptr_Function_mat4v2float Function
+%105 = OpVariable %_ptr_Function_mat3v4float Function
+%115 = OpVariable %_ptr_Function_mat4v3float Function
+%126 = OpVariable %_ptr_Function_mat2v2float Function
+%136 = OpVariable %_ptr_Function_mat3v3float Function
+%145 = OpVariable %_ptr_Function_mat4v4float Function
+%153 = OpVariable %_ptr_Function_mat2v3float Function
+%162 = OpVariable %_ptr_Function_mat3v2float Function
+%171 = OpVariable %_ptr_Function_mat2v4float Function
+%179 = OpVariable %_ptr_Function_mat4v2float Function
+%188 = OpVariable %_ptr_Function_mat3v4float Function
+%196 = OpVariable %_ptr_Function_mat4v3float Function
+%22 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%26 = OpLoad %v2float %22
+%27 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%28 = OpLoad %v2float %27
+%21 = OpOuterProduct %mat2v2float %26 %28
+OpStore %18 %21
+%30 = OpAccessChain %_ptr_Function_v2float %18 %int_1
+%32 = OpLoad %v2float %30
+%33 = OpVectorShuffle %v4float %32 %32 0 1 1 1
+OpStore %sk_FragColor %33
+%38 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%41 = OpLoad %v3float %38
+%42 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%43 = OpLoad %v3float %42
+%37 = OpOuterProduct %mat3v3float %41 %43
+OpStore %34 %37
+%45 = OpAccessChain %_ptr_Function_v3float %34 %int_2
+%47 = OpLoad %v3float %45
+%48 = OpVectorShuffle %v4float %47 %47 0 1 2 2
+OpStore %sk_FragColor %48
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%56 = OpLoad %v4float %53
+%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%58 = OpLoad %v4float %57
+%52 = OpOuterProduct %mat4v4float %56 %58
+OpStore %49 %52
+%59 = OpAccessChain %_ptr_Function_v4float %49 %int_3
+%61 = OpLoad %v4float %59
+OpStore %sk_FragColor %61
+%66 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%67 = OpLoad %v3float %66
+%68 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%69 = OpLoad %v2float %68
+%65 = OpOuterProduct %mat2v3float %67 %69
+OpStore %62 %65
+%70 = OpAccessChain %_ptr_Function_v3float %62 %int_1
+%71 = OpLoad %v3float %70
+%72 = OpVectorShuffle %v4float %71 %71 0 1 2 2
+OpStore %sk_FragColor %72
+%77 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%78 = OpLoad %v2float %77
+%79 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%80 = OpLoad %v3float %79
+%76 = OpOuterProduct %mat3v2float %78 %80
+OpStore %73 %76
+%81 = OpAccessChain %_ptr_Function_v2float %73 %int_2
+%82 = OpLoad %v2float %81
+%83 = OpVectorShuffle %v4float %82 %82 0 1 1 1
+OpStore %sk_FragColor %83
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%89 = OpLoad %v4float %88
+%90 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%91 = OpLoad %v2float %90
+%87 = OpOuterProduct %mat2v4float %89 %91
+OpStore %84 %87
+%92 = OpAccessChain %_ptr_Function_v4float %84 %int_1
+%93 = OpLoad %v4float %92
+OpStore %sk_FragColor %93
+%98 = OpAccessChain %_ptr_Uniform_v2float %10 %int_3
+%99 = OpLoad %v2float %98
+%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%101 = OpLoad %v4float %100
+%97 = OpOuterProduct %mat4v2float %99 %101
+OpStore %94 %97
+%102 = OpAccessChain %_ptr_Function_v2float %94 %int_3
+%103 = OpLoad %v2float %102
+%104 = OpVectorShuffle %v4float %103 %103 0 1 1 1
+OpStore %sk_FragColor %104
+%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%110 = OpLoad %v4float %109
+%111 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%112 = OpLoad %v3float %111
+%108 = OpOuterProduct %mat3v4float %110 %112
+OpStore %105 %108
+%113 = OpAccessChain %_ptr_Function_v4float %105 %int_2
+%114 = OpLoad %v4float %113
+OpStore %sk_FragColor %114
+%119 = OpAccessChain %_ptr_Uniform_v3float %10 %int_4
+%120 = OpLoad %v3float %119
+%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_5
+%122 = OpLoad %v4float %121
+%118 = OpOuterProduct %mat4v3float %120 %122
+OpStore %115 %118
+%123 = OpAccessChain %_ptr_Function_v3float %115 %int_3
+%124 = OpLoad %v3float %123
+%125 = OpVectorShuffle %v4float %124 %124 0 1 2 2
+OpStore %sk_FragColor %125
+%128 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%130 = OpLoad %v2float %128
+%131 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%132 = OpLoad %v2float %131
+%127 = OpOuterProduct %mat2v2float %130 %132
+OpStore %126 %127
+%133 = OpAccessChain %_ptr_Function_v2float %126 %int_1
+%134 = OpLoad %v2float %133
+%135 = OpVectorShuffle %v4float %134 %134 0 1 1 1
 OpStore %sk_FragColor %135
-%138 = OpLoad %v2float %h2
-%139 = OpLoad %v3float %h3
-%137 = OpOuterProduct %mat3v2float %138 %139
+%138 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
+%139 = OpLoad %v3float %138
+%140 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
+%141 = OpLoad %v3float %140
+%137 = OpOuterProduct %mat3v3float %139 %141
 OpStore %136 %137
-%140 = OpAccessChain %_ptr_Function_v2float %136 %int_2
-%141 = OpLoad %v2float %140
-%142 = OpVectorShuffle %v4float %141 %141 0 1 1 1
-OpStore %sk_FragColor %142
-%145 = OpLoad %v4float %h4
-%146 = OpLoad %v2float %h2
-%144 = OpOuterProduct %mat2v4float %145 %146
-OpStore %143 %144
-%147 = OpAccessChain %_ptr_Function_v4float %143 %int_1
+%142 = OpAccessChain %_ptr_Function_v3float %136 %int_2
+%143 = OpLoad %v3float %142
+%144 = OpVectorShuffle %v4float %143 %143 0 1 2 2
+OpStore %sk_FragColor %144
+%147 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %148 = OpLoad %v4float %147
-OpStore %sk_FragColor %148
-%151 = OpLoad %v2float %h2
-%152 = OpLoad %v4float %h4
-%150 = OpOuterProduct %mat4v2float %151 %152
-OpStore %149 %150
-%153 = OpAccessChain %_ptr_Function_v2float %149 %int_3
-%154 = OpLoad %v2float %153
-%155 = OpVectorShuffle %v4float %154 %154 0 1 1 1
-OpStore %sk_FragColor %155
-%158 = OpLoad %v4float %h4
-%159 = OpLoad %v3float %h3
-%157 = OpOuterProduct %mat3v4float %158 %159
-OpStore %156 %157
-%160 = OpAccessChain %_ptr_Function_v4float %156 %int_2
-%161 = OpLoad %v4float %160
+%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%150 = OpLoad %v4float %149
+%146 = OpOuterProduct %mat4v4float %148 %150
+OpStore %145 %146
+%151 = OpAccessChain %_ptr_Function_v4float %145 %int_3
+%152 = OpLoad %v4float %151
+OpStore %sk_FragColor %152
+%155 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
+%156 = OpLoad %v3float %155
+%157 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%158 = OpLoad %v2float %157
+%154 = OpOuterProduct %mat2v3float %156 %158
+OpStore %153 %154
+%159 = OpAccessChain %_ptr_Function_v3float %153 %int_1
+%160 = OpLoad %v3float %159
+%161 = OpVectorShuffle %v4float %160 %160 0 1 2 2
 OpStore %sk_FragColor %161
-%164 = OpLoad %v3float %h3
-%165 = OpLoad %v4float %h4
-%163 = OpOuterProduct %mat4v3float %164 %165
-OpStore %162 %163
-%166 = OpAccessChain %_ptr_Function_v3float %162 %int_3
+%164 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%165 = OpLoad %v2float %164
+%166 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
 %167 = OpLoad %v3float %166
-%168 = OpVectorShuffle %v4float %167 %167 0 1 2 2
-OpStore %sk_FragColor %168
+%163 = OpOuterProduct %mat3v2float %165 %167
+OpStore %162 %163
+%168 = OpAccessChain %_ptr_Function_v2float %162 %int_2
+%169 = OpLoad %v2float %168
+%170 = OpVectorShuffle %v4float %169 %169 0 1 1 1
+OpStore %sk_FragColor %170
+%173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%174 = OpLoad %v4float %173
+%175 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%176 = OpLoad %v2float %175
+%172 = OpOuterProduct %mat2v4float %174 %176
+OpStore %171 %172
+%177 = OpAccessChain %_ptr_Function_v4float %171 %int_1
+%178 = OpLoad %v4float %177
+OpStore %sk_FragColor %178
+%181 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%182 = OpLoad %v2float %181
+%183 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%184 = OpLoad %v4float %183
+%180 = OpOuterProduct %mat4v2float %182 %184
+OpStore %179 %180
+%185 = OpAccessChain %_ptr_Function_v2float %179 %int_3
+%186 = OpLoad %v2float %185
+%187 = OpVectorShuffle %v4float %186 %186 0 1 1 1
+OpStore %sk_FragColor %187
+%190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%191 = OpLoad %v4float %190
+%192 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
+%193 = OpLoad %v3float %192
+%189 = OpOuterProduct %mat3v4float %191 %193
+OpStore %188 %189
+%194 = OpAccessChain %_ptr_Function_v4float %188 %int_2
+%195 = OpLoad %v4float %194
+OpStore %sk_FragColor %195
+%198 = OpAccessChain %_ptr_Uniform_v3float %10 %int_1
+%199 = OpLoad %v3float %198
+%200 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%201 = OpLoad %v4float %200
+%197 = OpOuterProduct %mat4v3float %199 %201
+OpStore %196 %197
+%202 = OpAccessChain %_ptr_Function_v3float %196 %int_3
+%203 = OpLoad %v3float %202
+%204 = OpVectorShuffle %v4float %203 %203 0 1 2 2
+OpStore %sk_FragColor %204
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/OuterProduct.glsl b/tests/sksl/intrinsics/OuterProduct.glsl
index a1bee2e..4f527c0 100644
--- a/tests/sksl/intrinsics/OuterProduct.glsl
+++ b/tests/sksl/intrinsics/OuterProduct.glsl
@@ -1,11 +1,11 @@
 
 out vec4 sk_FragColor;
-in vec2 h2;
-in vec3 h3;
-in vec4 h4;
-in vec2 f2;
-in vec3 f3;
-in vec4 f4;
+uniform vec2 h2;
+uniform vec3 h3;
+uniform vec4 h4;
+uniform vec2 f2;
+uniform vec3 f3;
+uniform vec4 f4;
 void main() {
     sk_FragColor = outerProduct(f2, f2)[1].xyyy;
     sk_FragColor = outerProduct(f3, f3)[2].xyzz;
diff --git a/tests/sksl/intrinsics/OuterProduct.metal b/tests/sksl/intrinsics/OuterProduct.metal
index 99759c7..23d5ee5 100644
--- a/tests/sksl/intrinsics/OuterProduct.metal
+++ b/tests/sksl/intrinsics/OuterProduct.metal
@@ -1,4 +1,4 @@
-struct Inputs {
+struct Uniforms {
     float2 h2;
     float3 h3;
     float4 h4;
@@ -6,30 +6,32 @@
     float3 f3;
     float4 f4;
 };
+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;
-    _out.sk_FragColor = outerProduct(_in.f2, _in.f2)[1].xyyy;
-    _out.sk_FragColor = outerProduct(_in.f3, _in.f3)[2].xyzz;
-    _out.sk_FragColor = outerProduct(_in.f4, _in.f4)[3];
-    _out.sk_FragColor = outerProduct(_in.f3, _in.f2)[1].xyzz;
-    _out.sk_FragColor = outerProduct(_in.f2, _in.f3)[2].xyyy;
-    _out.sk_FragColor = outerProduct(_in.f4, _in.f2)[1];
-    _out.sk_FragColor = outerProduct(_in.f2, _in.f4)[3].xyyy;
-    _out.sk_FragColor = outerProduct(_in.f4, _in.f3)[2];
-    _out.sk_FragColor = outerProduct(_in.f3, _in.f4)[3].xyzz;
-    _out.sk_FragColor = outerProduct(_in.h2, _in.h2)[1].xyyy;
-    _out.sk_FragColor = outerProduct(_in.h3, _in.h3)[2].xyzz;
-    _out.sk_FragColor = outerProduct(_in.h4, _in.h4)[3];
-    _out.sk_FragColor = outerProduct(_in.h3, _in.h2)[1].xyzz;
-    _out.sk_FragColor = outerProduct(_in.h2, _in.h3)[2].xyyy;
-    _out.sk_FragColor = outerProduct(_in.h4, _in.h2)[1];
-    _out.sk_FragColor = outerProduct(_in.h2, _in.h4)[3].xyyy;
-    _out.sk_FragColor = outerProduct(_in.h4, _in.h3)[2];
-    _out.sk_FragColor = outerProduct(_in.h3, _in.h4)[3].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.f2, _uniforms.f2)[1].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.f3, _uniforms.f3)[2].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.f4, _uniforms.f4)[3];
+    _out.sk_FragColor = outerProduct(_uniforms.f3, _uniforms.f2)[1].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.f2, _uniforms.f3)[2].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.f4, _uniforms.f2)[1];
+    _out.sk_FragColor = outerProduct(_uniforms.f2, _uniforms.f4)[3].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.f4, _uniforms.f3)[2];
+    _out.sk_FragColor = outerProduct(_uniforms.f3, _uniforms.f4)[3].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.h2, _uniforms.h2)[1].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.h3, _uniforms.h3)[2].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.h4, _uniforms.h4)[3];
+    _out.sk_FragColor = outerProduct(_uniforms.h3, _uniforms.h2)[1].xyzz;
+    _out.sk_FragColor = outerProduct(_uniforms.h2, _uniforms.h3)[2].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.h4, _uniforms.h2)[1];
+    _out.sk_FragColor = outerProduct(_uniforms.h2, _uniforms.h4)[3].xyyy;
+    _out.sk_FragColor = outerProduct(_uniforms.h4, _uniforms.h3)[2];
+    _out.sk_FragColor = outerProduct(_uniforms.h3, _uniforms.h4)[3].xyzz;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Pack.asm.frag b/tests/sksl/intrinsics/Pack.asm.frag
index 9b3d7bf..956dbae 100644
--- a/tests/sksl/intrinsics/Pack.asm.frag
+++ b/tests/sksl/intrinsics/Pack.asm.frag
@@ -1,30 +1,31 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_v2float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
-OpDecorate %35 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 16
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %22 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,44 +34,49 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %v2float = OpTypeVector %float 2
-%_ptr_Input_v2float = OpTypePointer Input %v2float
-%a = OpVariable %_ptr_Input_v2float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%b = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %v2float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%16 = OpTypeFunction %void
-%uint = OpTypeInt 32 0
-%_ptr_Output_float = OpTypePointer Output %float
+%15 = OpTypeFunction %void
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %16
-%17 = OpLabel
-%19 = OpLoad %v2float %a
-%18 = OpExtInst %uint %1 PackHalf2x16 %19
-%21 = OpConvertUToF %float %18
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %21
-%27 = OpLoad %v2float %a
-%26 = OpExtInst %uint %1 PackUnorm2x16 %27
-%28 = OpConvertUToF %float %26
-%29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %29 %28
-%31 = OpLoad %v2float %a
-%30 = OpExtInst %uint %1 PackSnorm2x16 %31
-%32 = OpConvertUToF %float %30
-%33 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %33 %32
-%35 = OpLoad %v4float %b
-%34 = OpExtInst %uint %1 PackUnorm4x8 %35
-%36 = OpConvertUToF %float %34
-%37 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %37 %36
-%39 = OpLoad %v4float %b
-%38 = OpExtInst %uint %1 PackSnorm4x8 %39
-%40 = OpConvertUToF %float %38
-%41 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %41 %40
+%uint = OpTypeInt 32 0
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_1 = OpConstant %int 1
+%main = OpFunction %void None %15
+%16 = OpLabel
+%18 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%22 = OpLoad %v2float %18
+%17 = OpExtInst %uint %1 PackHalf2x16 %22
+%24 = OpConvertUToF %float %17
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %24
+%28 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%29 = OpLoad %v2float %28
+%27 = OpExtInst %uint %1 PackUnorm2x16 %29
+%30 = OpConvertUToF %float %27
+%31 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %31 %30
+%33 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0
+%34 = OpLoad %v2float %33
+%32 = OpExtInst %uint %1 PackSnorm2x16 %34
+%35 = OpConvertUToF %float %32
+%36 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %36 %35
+%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%41 = OpLoad %v4float %38
+%37 = OpExtInst %uint %1 PackUnorm4x8 %41
+%42 = OpConvertUToF %float %37
+%43 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %43 %42
+%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%46 = OpLoad %v4float %45
+%44 = OpExtInst %uint %1 PackSnorm4x8 %46
+%47 = OpConvertUToF %float %44
+%48 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %48 %47
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Pack.glsl b/tests/sksl/intrinsics/Pack.glsl
index ea8d0cb..27c4f51 100644
--- a/tests/sksl/intrinsics/Pack.glsl
+++ b/tests/sksl/intrinsics/Pack.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in vec2 a;
-in vec4 b;
+uniform vec2 a;
+uniform vec4 b;
 void main() {
     sk_FragColor.x = float(packHalf2x16(a));
     sk_FragColor.x = float(packUnorm2x16(a));
diff --git a/tests/sksl/intrinsics/Pack.metal b/tests/sksl/intrinsics/Pack.metal
index c96480f..1f5af61 100644
--- a/tests/sksl/intrinsics/Pack.metal
+++ b/tests/sksl/intrinsics/Pack.metal
@@ -1,18 +1,20 @@
-struct Inputs {
+struct Uniforms {
     float2 a;
     float4 b;
 };
+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;
-    _out.sk_FragColor.x = float(packHalf2x16(_in.a));
-    _out.sk_FragColor.x = float(packUnorm2x16(_in.a));
-    _out.sk_FragColor.x = float(packSnorm2x16(_in.a));
-    _out.sk_FragColor.x = float(packUnorm4x8(_in.b));
-    _out.sk_FragColor.x = float(packSnorm4x8(_in.b));
+    _out.sk_FragColor.x = float(packHalf2x16(_uniforms.a));
+    _out.sk_FragColor.x = float(packUnorm2x16(_uniforms.a));
+    _out.sk_FragColor.x = float(packSnorm2x16(_uniforms.a));
+    _out.sk_FragColor.x = float(packUnorm4x8(_uniforms.b));
+    _out.sk_FragColor.x = float(packSnorm4x8(_uniforms.b));
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Pow.asm.frag b/tests/sksl/intrinsics/Pow.asm.frag
index 30820a0..2ab693e 100644
--- a/tests/sksl/intrinsics/Pow.asm.frag
+++ b/tests/sksl/intrinsics/Pow.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,22 +30,24 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %float %a
-%18 = OpLoad %float %b
-%16 = OpExtInst %float %1 Pow %17 %18
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %16
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpExtInst %float %1 Pow %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Pow.glsl b/tests/sksl/intrinsics/Pow.glsl
index df2a5c7..ac626a6 100644
--- a/tests/sksl/intrinsics/Pow.glsl
+++ b/tests/sksl/intrinsics/Pow.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
+uniform float a;
+uniform float b;
 void main() {
     sk_FragColor.x = pow(a, b);
 }
diff --git a/tests/sksl/intrinsics/Pow.metal b/tests/sksl/intrinsics/Pow.metal
index 165a3b2..2f16c95 100644
--- a/tests/sksl/intrinsics/Pow.metal
+++ b/tests/sksl/intrinsics/Pow.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
 };
+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;
-    _out.sk_FragColor.x = pow(_in.a, _in.b);
+    _out.sk_FragColor.x = pow(_uniforms.a, _uniforms.b);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Radians.asm.frag b/tests/sksl/intrinsics/Radians.asm.frag
index f93010d..bb9f145 100644
--- a/tests/sksl/intrinsics/Radians.asm.frag
+++ b/tests/sksl/intrinsics/Radians.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Radians %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Radians %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Radians.glsl b/tests/sksl/intrinsics/Radians.glsl
index b40ab4b..3eb98a8 100644
--- a/tests/sksl/intrinsics/Radians.glsl
+++ b/tests/sksl/intrinsics/Radians.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = radians(a);
 }
diff --git a/tests/sksl/intrinsics/Radians.metal b/tests/sksl/intrinsics/Radians.metal
index 4029f89..558ce52 100644
--- a/tests/sksl/intrinsics/Radians.metal
+++ b/tests/sksl/intrinsics/Radians.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = ((_in.a) * 0.0174532925);
+    _out.sk_FragColor.x = ((_uniforms.a) * 0.0174532925);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Reflect.asm.frag b/tests/sksl/intrinsics/Reflect.asm.frag
index d4a3112..48f627b 100644
--- a/tests/sksl/intrinsics/Reflect.asm.frag
+++ b/tests/sksl/intrinsics/Reflect.asm.frag
@@ -1,33 +1,36 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 16
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 32
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %27 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -35,29 +38,33 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%c = OpVariable %_ptr_Input_v4float Input
-%d = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%17 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %17
-%18 = OpLabel
-%20 = OpLoad %float %a
-%21 = OpLoad %float %b
-%19 = OpExtInst %float %1 Reflect %20 %21
-%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %v4float %c
-%28 = OpLoad %v4float %d
-%26 = OpExtInst %v4float %1 Reflect %27 %28
-OpStore %sk_FragColor %26
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpExtInst %float %1 Reflect %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%31 = OpLoad %v4float %28
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%34 = OpLoad %v4float %32
+%27 = OpExtInst %v4float %1 Reflect %31 %34
+OpStore %sk_FragColor %27
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Reflect.glsl b/tests/sksl/intrinsics/Reflect.glsl
index 2e52c93..8bf2111 100644
--- a/tests/sksl/intrinsics/Reflect.glsl
+++ b/tests/sksl/intrinsics/Reflect.glsl
@@ -1,9 +1,9 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in vec4 c;
-in vec4 d;
+uniform float a;
+uniform float b;
+uniform vec4 c;
+uniform vec4 d;
 void main() {
     sk_FragColor.x = reflect(a, b);
     sk_FragColor = reflect(c, d);
diff --git a/tests/sksl/intrinsics/Reflect.metal b/tests/sksl/intrinsics/Reflect.metal
index 8bb12e6..bd7e5c7 100644
--- a/tests/sksl/intrinsics/Reflect.metal
+++ b/tests/sksl/intrinsics/Reflect.metal
@@ -1,19 +1,21 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float4 c;
     float4 d;
 };
+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 _skTemp0;
     float _skTemp1;
-    _out.sk_FragColor.x = (_skTemp0 = _in.a, _skTemp1 = _in.b, _skTemp0 - 2 * _skTemp1 * _skTemp0 * _skTemp1);
-    _out.sk_FragColor = reflect(_in.c, _in.d);
+    _out.sk_FragColor.x = (_skTemp0 = _uniforms.a, _skTemp1 = _uniforms.b, _skTemp0 - 2 * _skTemp1 * _skTemp0 * _skTemp1);
+    _out.sk_FragColor = reflect(_uniforms.c, _uniforms.d);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Refract.asm.frag b/tests/sksl/intrinsics/Refract.asm.frag
index 7dc1aa6..417b5b5 100644
--- a/tests/sksl/intrinsics/Refract.asm.frag
+++ b/tests/sksl/intrinsics/Refract.asm.frag
@@ -1,37 +1,41 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c %d %e
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
-OpName %d "d"
-OpName %e "e"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
+OpMemberName %_UniformBuffer 3 "d"
+OpMemberName %_UniformBuffer 4 "e"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %d RelaxedPrecision
-OpDecorate %e RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 8
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 3 Offset 16
+OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 4 Offset 32
+OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 OpDecorate %21 RelaxedPrecision
-OpDecorate %22 RelaxedPrecision
-OpDecorate %23 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
-OpDecorate %30 RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -39,32 +43,38 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%c = OpVariable %_ptr_Input_float Input
-%_ptr_Input_v4float = OpTypePointer Input %v4float
-%d = OpVariable %_ptr_Input_v4float Input
-%e = OpVariable %_ptr_Input_v4float Input
+%_UniformBuffer = OpTypeStruct %float %float %float %v4float %v4float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%18 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %18
-%19 = OpLabel
-%21 = OpLoad %float %a
-%22 = OpLoad %float %b
-%23 = OpLoad %float %c
-%20 = OpExtInst %float %1 Refract %21 %22 %23
-%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %24 %20
-%29 = OpLoad %v4float %d
-%30 = OpLoad %v4float %e
-%31 = OpLoad %float %c
-%28 = OpExtInst %v4float %1 Refract %29 %30 %31
-OpStore %sk_FragColor %28
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%int_3 = OpConstant %int 3
+%int_4 = OpConstant %int 4
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%25 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%27 = OpLoad %float %25
+%16 = OpExtInst %float %1 Refract %21 %24 %27
+%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %28 %16
+%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%34 = OpLoad %v4float %31
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%37 = OpLoad %v4float %35
+%38 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%39 = OpLoad %float %38
+%30 = OpExtInst %v4float %1 Refract %34 %37 %39
+OpStore %sk_FragColor %30
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Refract.glsl b/tests/sksl/intrinsics/Refract.glsl
index 84151ca..bab3625 100644
--- a/tests/sksl/intrinsics/Refract.glsl
+++ b/tests/sksl/intrinsics/Refract.glsl
@@ -1,10 +1,10 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in float c;
-in vec4 d;
-in vec4 e;
+uniform float a;
+uniform float b;
+uniform float c;
+uniform vec4 d;
+uniform vec4 e;
 void main() {
     sk_FragColor.x = refract(a, b, c);
     sk_FragColor = refract(d, e, c);
diff --git a/tests/sksl/intrinsics/Refract.metal b/tests/sksl/intrinsics/Refract.metal
index 1f56562..74e427d 100644
--- a/tests/sksl/intrinsics/Refract.metal
+++ b/tests/sksl/intrinsics/Refract.metal
@@ -1,18 +1,20 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float c;
     float4 d;
     float4 e;
 };
+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;
-    _out.sk_FragColor.x = (refract(float2(_in.a, 0), float2(_in.b, 0), _in.c).x);
-    _out.sk_FragColor = refract(_in.d, _in.e, _in.c);
+    _out.sk_FragColor.x = (refract(float2(_uniforms.a, 0), float2(_uniforms.b, 0), _uniforms.c).x);
+    _out.sk_FragColor = refract(_uniforms.d, _uniforms.e, _uniforms.c);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Round.asm.frag b/tests/sksl/intrinsics/Round.asm.frag
index 7cfe9c5..7478ddb 100644
--- a/tests/sksl/intrinsics/Round.asm.frag
+++ b/tests/sksl/intrinsics/Round.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Round %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Round %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Round.glsl b/tests/sksl/intrinsics/Round.glsl
index b7ff7b7..942b7a1 100644
--- a/tests/sksl/intrinsics/Round.glsl
+++ b/tests/sksl/intrinsics/Round.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = round(a);
 }
diff --git a/tests/sksl/intrinsics/Round.metal b/tests/sksl/intrinsics/Round.metal
index ffbacd9..392d3ea 100644
--- a/tests/sksl/intrinsics/Round.metal
+++ b/tests/sksl/intrinsics/Round.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = round(_in.a);
+    _out.sk_FragColor.x = round(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/RoundEven.asm.frag b/tests/sksl/intrinsics/RoundEven.asm.frag
index b3e45e0..b15b276 100644
--- a/tests/sksl/intrinsics/RoundEven.asm.frag
+++ b/tests/sksl/intrinsics/RoundEven.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 RoundEven %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 RoundEven %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/RoundEven.glsl b/tests/sksl/intrinsics/RoundEven.glsl
index 3b16985..b4b90ab 100644
--- a/tests/sksl/intrinsics/RoundEven.glsl
+++ b/tests/sksl/intrinsics/RoundEven.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = roundEven(a);
 }
diff --git a/tests/sksl/intrinsics/RoundEven.metal b/tests/sksl/intrinsics/RoundEven.metal
index 5d19219..a814fe6 100644
--- a/tests/sksl/intrinsics/RoundEven.metal
+++ b/tests/sksl/intrinsics/RoundEven.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = rint(_in.a);
+    _out.sk_FragColor.x = rint(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Saturate.asm.frag b/tests/sksl/intrinsics/Saturate.asm.frag
index 2e6168f..e5e5b48 100644
--- a/tests/sksl/intrinsics/Saturate.asm.frag
+++ b/tests/sksl/intrinsics/Saturate.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,22 +26,23 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
+%14 = OpTypeFunction %void
+%_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
 %_ptr_Output_float = OpTypePointer Output %float
-%int = OpTypeInt 32 1
-%int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 FClamp %16 %float_0 %float_1
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %15
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 FClamp %21 %float_0 %float_1
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Saturate.glsl b/tests/sksl/intrinsics/Saturate.glsl
index 82afece..e5fbc2c 100644
--- a/tests/sksl/intrinsics/Saturate.glsl
+++ b/tests/sksl/intrinsics/Saturate.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = clamp(a, 0.0, 1.0);
 }
diff --git a/tests/sksl/intrinsics/Saturate.metal b/tests/sksl/intrinsics/Saturate.metal
index b91d0f9..da3d498 100644
--- a/tests/sksl/intrinsics/Saturate.metal
+++ b/tests/sksl/intrinsics/Saturate.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = saturate(_in.a);
+    _out.sk_FragColor.x = saturate(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Sin.asm.frag b/tests/sksl/intrinsics/Sin.asm.frag
index dca9322..fdd6bfc 100644
--- a/tests/sksl/intrinsics/Sin.asm.frag
+++ b/tests/sksl/intrinsics/Sin.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Sin %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Sin %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Sin.glsl b/tests/sksl/intrinsics/Sin.glsl
index d624f43..81ad01a 100644
--- a/tests/sksl/intrinsics/Sin.glsl
+++ b/tests/sksl/intrinsics/Sin.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = sin(a);
 }
diff --git a/tests/sksl/intrinsics/Sin.metal b/tests/sksl/intrinsics/Sin.metal
index 0ee1a10..de16100 100644
--- a/tests/sksl/intrinsics/Sin.metal
+++ b/tests/sksl/intrinsics/Sin.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = sin(_in.a);
+    _out.sk_FragColor.x = sin(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Sinh.asm.frag b/tests/sksl/intrinsics/Sinh.asm.frag
index 6a750d7..efb3a84 100644
--- a/tests/sksl/intrinsics/Sinh.asm.frag
+++ b/tests/sksl/intrinsics/Sinh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Sinh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Sinh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Sinh.glsl b/tests/sksl/intrinsics/Sinh.glsl
index 83f6895..b564a41 100644
--- a/tests/sksl/intrinsics/Sinh.glsl
+++ b/tests/sksl/intrinsics/Sinh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = sinh(a);
 }
diff --git a/tests/sksl/intrinsics/Sinh.metal b/tests/sksl/intrinsics/Sinh.metal
index d08e382..ac3bede 100644
--- a/tests/sksl/intrinsics/Sinh.metal
+++ b/tests/sksl/intrinsics/Sinh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = sinh(_in.a);
+    _out.sk_FragColor.x = sinh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Smoothstep.asm.frag b/tests/sksl/intrinsics/Smoothstep.asm.frag
index ee810d8..bebc3f9 100644
--- a/tests/sksl/intrinsics/Smoothstep.asm.frag
+++ b/tests/sksl/intrinsics/Smoothstep.asm.frag
@@ -1,30 +1,32 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b %c
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
-OpName %c "c"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
+OpMemberName %_UniformBuffer 2 "c"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %c RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 2 Offset 8
+OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,24 +34,27 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
-%c = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float %float %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %15
-%16 = OpLabel
-%18 = OpLoad %float %a
-%19 = OpLoad %float %b
-%20 = OpLoad %float %c
-%17 = OpExtInst %float %1 SmoothStep %18 %19 %20
-%21 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %21 %17
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%25 = OpAccessChain %_ptr_Uniform_float %10 %int_2
+%27 = OpLoad %float %25
+%16 = OpExtInst %float %1 SmoothStep %21 %24 %27
+%28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %28 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Smoothstep.glsl b/tests/sksl/intrinsics/Smoothstep.glsl
index 0c94751..3db1b91b 100644
--- a/tests/sksl/intrinsics/Smoothstep.glsl
+++ b/tests/sksl/intrinsics/Smoothstep.glsl
@@ -1,8 +1,8 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
-in float c;
+uniform float a;
+uniform float b;
+uniform float c;
 void main() {
     sk_FragColor.x = smoothstep(a, b, c);
 }
diff --git a/tests/sksl/intrinsics/Smoothstep.metal b/tests/sksl/intrinsics/Smoothstep.metal
index 7274f86..989c3b3 100644
--- a/tests/sksl/intrinsics/Smoothstep.metal
+++ b/tests/sksl/intrinsics/Smoothstep.metal
@@ -1,15 +1,17 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
     float c;
 };
+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;
-    _out.sk_FragColor.x = smoothstep(_in.a, _in.b, _in.c);
+    _out.sk_FragColor.x = smoothstep(_uniforms.a, _uniforms.b, _uniforms.c);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Sqrt.asm.frag b/tests/sksl/intrinsics/Sqrt.asm.frag
index 1ccb7da..ae74406 100644
--- a/tests/sksl/intrinsics/Sqrt.asm.frag
+++ b/tests/sksl/intrinsics/Sqrt.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Sqrt %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Sqrt %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Sqrt.glsl b/tests/sksl/intrinsics/Sqrt.glsl
index 790542c..d55fede 100644
--- a/tests/sksl/intrinsics/Sqrt.glsl
+++ b/tests/sksl/intrinsics/Sqrt.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = sqrt(a);
 }
diff --git a/tests/sksl/intrinsics/Sqrt.metal b/tests/sksl/intrinsics/Sqrt.metal
index 463bac6..3d8fe4c 100644
--- a/tests/sksl/intrinsics/Sqrt.metal
+++ b/tests/sksl/intrinsics/Sqrt.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = sqrt(_in.a);
+    _out.sk_FragColor.x = sqrt(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Step.asm.frag b/tests/sksl/intrinsics/Step.asm.frag
index 40aa7db..fd3627a 100644
--- a/tests/sksl/intrinsics/Step.asm.frag
+++ b/tests/sksl/intrinsics/Step.asm.frag
@@ -1,27 +1,28 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a %b
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
-OpName %b "b"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
+OpMemberName %_UniformBuffer 1 "b"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %b RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 1 Offset 4
+OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
+OpDecorate %24 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,22 +30,24 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
-%b = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
 %14 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%17 = OpLoad %float %a
-%18 = OpLoad %float %b
-%16 = OpExtInst %float %1 Step %17 %18
-%19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %16
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%22 = OpAccessChain %_ptr_Uniform_float %10 %int_1
+%24 = OpLoad %float %22
+%16 = OpExtInst %float %1 Step %21 %24
+%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %25 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Step.glsl b/tests/sksl/intrinsics/Step.glsl
index 44e72f5..5817696 100644
--- a/tests/sksl/intrinsics/Step.glsl
+++ b/tests/sksl/intrinsics/Step.glsl
@@ -1,7 +1,7 @@
 
 out vec4 sk_FragColor;
-in float a;
-in float b;
+uniform float a;
+uniform float b;
 void main() {
     sk_FragColor.x = step(a, b);
 }
diff --git a/tests/sksl/intrinsics/Step.metal b/tests/sksl/intrinsics/Step.metal
index d94bebe..e631e21 100644
--- a/tests/sksl/intrinsics/Step.metal
+++ b/tests/sksl/intrinsics/Step.metal
@@ -1,14 +1,16 @@
-struct Inputs {
+struct Uniforms {
     float a;
     float b;
 };
+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;
-    _out.sk_FragColor.x = step(_in.a, _in.b);
+    _out.sk_FragColor.x = step(_uniforms.a, _uniforms.b);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Tan.asm.frag b/tests/sksl/intrinsics/Tan.asm.frag
index 2ab8192..dc6e931 100644
--- a/tests/sksl/intrinsics/Tan.asm.frag
+++ b/tests/sksl/intrinsics/Tan.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Tan %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Tan %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Tan.glsl b/tests/sksl/intrinsics/Tan.glsl
index 4fff50d..059a077 100644
--- a/tests/sksl/intrinsics/Tan.glsl
+++ b/tests/sksl/intrinsics/Tan.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = tan(a);
 }
diff --git a/tests/sksl/intrinsics/Tan.metal b/tests/sksl/intrinsics/Tan.metal
index 67a5048..3836c80 100644
--- a/tests/sksl/intrinsics/Tan.metal
+++ b/tests/sksl/intrinsics/Tan.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = tan(_in.a);
+    _out.sk_FragColor.x = tan(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Tanh.asm.frag b/tests/sksl/intrinsics/Tanh.asm.frag
index 0454435..8c4b917 100644
--- a/tests/sksl/intrinsics/Tanh.asm.frag
+++ b/tests/sksl/intrinsics/Tanh.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Tanh %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Tanh %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Tanh.glsl b/tests/sksl/intrinsics/Tanh.glsl
index 0520c9e..9ae448b 100644
--- a/tests/sksl/intrinsics/Tanh.glsl
+++ b/tests/sksl/intrinsics/Tanh.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = tanh(a);
 }
diff --git a/tests/sksl/intrinsics/Tanh.metal b/tests/sksl/intrinsics/Tanh.metal
index 365d690..f1f5d60 100644
--- a/tests/sksl/intrinsics/Tanh.metal
+++ b/tests/sksl/intrinsics/Tanh.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = tanh(_in.a);
+    _out.sk_FragColor.x = tanh(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Trunc.asm.frag b/tests/sksl/intrinsics/Trunc.asm.frag
index 6bfaaf2..d0fc4cd 100644
--- a/tests/sksl/intrinsics/Trunc.asm.frag
+++ b/tests/sksl/intrinsics/Trunc.asm.frag
@@ -1,24 +1,24 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %a RelaxedPrecision
-OpDecorate %16 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %21 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,20 +26,21 @@
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%_ptr_Input_float = OpTypePointer Input %float
-%a = OpVariable %_ptr_Input_float Input
+%_UniformBuffer = OpTypeStruct %float
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%13 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%14 = OpTypeFunction %void
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %13
-%14 = OpLabel
-%16 = OpLoad %float %a
-%15 = OpExtInst %float %1 Trunc %16
-%17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %15
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %14
+%15 = OpLabel
+%17 = OpAccessChain %_ptr_Uniform_float %10 %int_0
+%21 = OpLoad %float %17
+%16 = OpExtInst %float %1 Trunc %21
+%22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %22 %16
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Trunc.glsl b/tests/sksl/intrinsics/Trunc.glsl
index 1826c0d..b8aa09e 100644
--- a/tests/sksl/intrinsics/Trunc.glsl
+++ b/tests/sksl/intrinsics/Trunc.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in float a;
+uniform float a;
 void main() {
     sk_FragColor.x = trunc(a);
 }
diff --git a/tests/sksl/intrinsics/Trunc.metal b/tests/sksl/intrinsics/Trunc.metal
index a18f708..5def70a 100644
--- a/tests/sksl/intrinsics/Trunc.metal
+++ b/tests/sksl/intrinsics/Trunc.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     float a;
 };
+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;
-    _out.sk_FragColor.x = trunc(_in.a);
+    _out.sk_FragColor.x = trunc(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
index ea572c7..a418111 100644
--- a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
+++ b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
@@ -1,22 +1,22 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_uint Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -25,20 +25,21 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %uint = OpTypeInt 32 0
-%_ptr_Input_uint = OpTypePointer Input %uint
-%a = OpVariable %_ptr_Input_uint Input
+%_UniformBuffer = OpTypeStruct %uint
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%14 = OpTypeFunction %void
-%_ptr_Output_float = OpTypePointer Output %float
+%15 = OpTypeFunction %void
+%_ptr_Uniform_uint = OpTypePointer Uniform %uint
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%main = OpFunction %void None %14
-%15 = OpLabel
-%17 = OpLoad %uint %a
-%16 = OpBitcast %float %17
-%18 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %18 %16
+%_ptr_Output_float = OpTypePointer Output %float
+%main = OpFunction %void None %15
+%16 = OpLabel
+%18 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%22 = OpLoad %uint %18
+%17 = OpBitcast %float %22
+%23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %23 %17
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/UintBitsToFloat.glsl b/tests/sksl/intrinsics/UintBitsToFloat.glsl
index 9a608ee..4a3d39a 100644
--- a/tests/sksl/intrinsics/UintBitsToFloat.glsl
+++ b/tests/sksl/intrinsics/UintBitsToFloat.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in uint a;
+uniform uint a;
 void main() {
     sk_FragColor.x = uintBitsToFloat(a);
 }
diff --git a/tests/sksl/intrinsics/UintBitsToFloat.metal b/tests/sksl/intrinsics/UintBitsToFloat.metal
index 01e1d7f..1daf7f2 100644
--- a/tests/sksl/intrinsics/UintBitsToFloat.metal
+++ b/tests/sksl/intrinsics/UintBitsToFloat.metal
@@ -1,13 +1,15 @@
-struct Inputs {
+struct Uniforms {
     uint a;
 };
+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;
-    _out.sk_FragColor.x = as_type<float>(_in.a);
+    _out.sk_FragColor.x = as_type<float>(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Unpack.asm.frag b/tests/sksl/intrinsics/Unpack.asm.frag
index d62b84c..70708db 100644
--- a/tests/sksl/intrinsics/Unpack.asm.frag
+++ b/tests/sksl/intrinsics/Unpack.asm.frag
@@ -1,25 +1,25 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %a = OpVariable %_ptr_Input_uint Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise %a
+OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
-OpName %a "a"
+OpName %_UniformBuffer "_UniformBuffer"
+OpMemberName %_UniformBuffer 0 "a"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %20 RelaxedPrecision
-OpDecorate %24 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
+OpMemberDecorate %_UniformBuffer 0 Offset 0
+OpDecorate %_UniformBuffer Block
+OpDecorate %10 Binding 0
+OpDecorate %10 DescriptorSet 0
+OpDecorate %25 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -28,35 +28,42 @@
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %uint = OpTypeInt 32 0
-%_ptr_Input_uint = OpTypePointer Input %uint
-%a = OpVariable %_ptr_Input_uint Input
+%_UniformBuffer = OpTypeStruct %uint
+%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
+%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%14 = OpTypeFunction %void
+%15 = OpTypeFunction %void
+%_ptr_Uniform_uint = OpTypePointer Uniform %uint
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
 %v2float = OpTypeVector %float 2
-%main = OpFunction %void None %14
-%15 = OpLabel
-%17 = OpLoad %uint %a
-%16 = OpExtInst %v2float %1 UnpackHalf2x16 %17
-%19 = OpLoad %v4float %sk_FragColor
-%20 = OpVectorShuffle %v4float %19 %16 4 5 2 3
-OpStore %sk_FragColor %20
-%22 = OpLoad %uint %a
-%21 = OpExtInst %v2float %1 UnpackUnorm2x16 %22
-%23 = OpLoad %v4float %sk_FragColor
-%24 = OpVectorShuffle %v4float %23 %21 4 5 2 3
-OpStore %sk_FragColor %24
-%26 = OpLoad %uint %a
-%25 = OpExtInst %v2float %1 UnpackSnorm2x16 %26
-%27 = OpLoad %v4float %sk_FragColor
-%28 = OpVectorShuffle %v4float %27 %25 4 5 2 3
-OpStore %sk_FragColor %28
-%30 = OpLoad %uint %a
-%29 = OpExtInst %v4float %1 UnpackUnorm4x8 %30
-OpStore %sk_FragColor %29
-%32 = OpLoad %uint %a
-%31 = OpExtInst %v4float %1 UnpackSnorm4x8 %32
-OpStore %sk_FragColor %31
+%main = OpFunction %void None %15
+%16 = OpLabel
+%18 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%22 = OpLoad %uint %18
+%17 = OpExtInst %v2float %1 UnpackHalf2x16 %22
+%24 = OpLoad %v4float %sk_FragColor
+%25 = OpVectorShuffle %v4float %24 %17 4 5 2 3
+OpStore %sk_FragColor %25
+%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%28 = OpLoad %uint %27
+%26 = OpExtInst %v2float %1 UnpackUnorm2x16 %28
+%29 = OpLoad %v4float %sk_FragColor
+%30 = OpVectorShuffle %v4float %29 %26 4 5 2 3
+OpStore %sk_FragColor %30
+%32 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%33 = OpLoad %uint %32
+%31 = OpExtInst %v2float %1 UnpackSnorm2x16 %33
+%34 = OpLoad %v4float %sk_FragColor
+%35 = OpVectorShuffle %v4float %34 %31 4 5 2 3
+OpStore %sk_FragColor %35
+%37 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%38 = OpLoad %uint %37
+%36 = OpExtInst %v4float %1 UnpackUnorm4x8 %38
+OpStore %sk_FragColor %36
+%40 = OpAccessChain %_ptr_Uniform_uint %10 %int_0
+%41 = OpLoad %uint %40
+%39 = OpExtInst %v4float %1 UnpackSnorm4x8 %41
+OpStore %sk_FragColor %39
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/intrinsics/Unpack.glsl b/tests/sksl/intrinsics/Unpack.glsl
index e9ed692..cadd99f 100644
--- a/tests/sksl/intrinsics/Unpack.glsl
+++ b/tests/sksl/intrinsics/Unpack.glsl
@@ -1,6 +1,6 @@
 
 out vec4 sk_FragColor;
-in uint a;
+uniform uint a;
 void main() {
     sk_FragColor.xy = unpackHalf2x16(a);
     sk_FragColor.xy = unpackUnorm2x16(a);
diff --git a/tests/sksl/intrinsics/Unpack.metal b/tests/sksl/intrinsics/Unpack.metal
index e1357a7..1d31b59 100644
--- a/tests/sksl/intrinsics/Unpack.metal
+++ b/tests/sksl/intrinsics/Unpack.metal
@@ -1,17 +1,19 @@
-struct Inputs {
+struct Uniforms {
     uint a;
 };
+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;
-    _out.sk_FragColor.xy = unpackHalf2x16(_in.a);
-    _out.sk_FragColor.xy = unpackUnorm2x16(_in.a);
-    _out.sk_FragColor.xy = unpackSnorm2x16(_in.a);
-    _out.sk_FragColor = unpackUnorm4x8(_in.a);
-    _out.sk_FragColor = unpackSnorm4x8(_in.a);
+    _out.sk_FragColor.xy = unpackHalf2x16(_uniforms.a);
+    _out.sk_FragColor.xy = unpackUnorm2x16(_uniforms.a);
+    _out.sk_FragColor.xy = unpackSnorm2x16(_uniforms.a);
+    _out.sk_FragColor = unpackUnorm4x8(_uniforms.a);
+    _out.sk_FragColor = unpackSnorm4x8(_uniforms.a);
     return _out;
 }
diff --git a/tests/sksl/shared/NoFragCoordsPos.asm.vert b/tests/sksl/shared/NoFragCoordsPos.asm.vert
index 632feb3..5be62c6 100644
--- a/tests/sksl/shared/NoFragCoordsPos.asm.vert
+++ b/tests/sksl/shared/NoFragCoordsPos.asm.vert
@@ -1,8 +1,3 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %pos = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
@@ -15,6 +10,7 @@
 OpMemberDecorate %sk_PerVertex 0 BuiltIn Position
 OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize
 OpDecorate %sk_PerVertex Block
+OpDecorate %pos Location 0
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %sk_PerVertex = OpTypeStruct %v4float %float
@@ -34,5 +30,3 @@
 OpStore %16 %13
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/shared/NoFragCoordsPos.glsl b/tests/sksl/shared/NoFragCoordsPos.glsl
index 55d9fb1..8388b6c 100644
--- a/tests/sksl/shared/NoFragCoordsPos.glsl
+++ b/tests/sksl/shared/NoFragCoordsPos.glsl
@@ -1,6 +1,6 @@
 #version 400
 out vec4 sk_FragCoord_Workaround;
-in vec4 pos;
+layout (location = 0) in vec4 pos;
 void main() {
     sk_FragCoord_Workaround = (gl_Position = pos);
 }
diff --git a/tests/sksl/shared/NoFragCoordsPos.metal b/tests/sksl/shared/NoFragCoordsPos.metal
index 0899084..b46147e 100644
--- a/tests/sksl/shared/NoFragCoordsPos.metal
+++ b/tests/sksl/shared/NoFragCoordsPos.metal
@@ -1,5 +1,5 @@
 struct Inputs {
-    float4 pos;
+    float4 pos  [[attribute(0)]];
 };
 struct Outputs {
     float4 sk_Position [[position]];
diff --git a/tests/sksl/shared/NoFragCoordsPosRT.asm.vert b/tests/sksl/shared/NoFragCoordsPosRT.asm.vert
index 809aa8b..3beee50 100644
--- a/tests/sksl/shared/NoFragCoordsPosRT.asm.vert
+++ b/tests/sksl/shared/NoFragCoordsPosRT.asm.vert
@@ -1,8 +1,3 @@
-### Compilation failed:
-
-error: SPIR-V validation error: Variable must be decorated with a location
-  %pos = OpVariable %_ptr_Input_v4float Input
-
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
@@ -17,6 +12,7 @@
 OpMemberDecorate %sk_PerVertex 0 BuiltIn Position
 OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize
 OpDecorate %sk_PerVertex Block
+OpDecorate %pos Location 0
 OpMemberDecorate %_UniformBuffer 0 DescriptorSet 0
 OpMemberDecorate %_UniformBuffer 0 Offset 0
 OpDecorate %_UniformBuffer Block
@@ -70,5 +66,3 @@
 OpStore %45 %44
 OpReturn
 OpFunctionEnd
-
-1 error
diff --git a/tests/sksl/shared/NoFragCoordsPosRT.glsl b/tests/sksl/shared/NoFragCoordsPosRT.glsl
index 974ce87..8858cbe 100644
--- a/tests/sksl/shared/NoFragCoordsPosRT.glsl
+++ b/tests/sksl/shared/NoFragCoordsPosRT.glsl
@@ -1,7 +1,7 @@
 #version 400
 out vec4 sk_FragCoord_Workaround;
 layout (set = 0) uniform vec4 sk_RTAdjust;
-in vec4 pos;
+layout (location = 0) in vec4 pos;
 void main() {
     sk_FragCoord_Workaround = (gl_Position = pos);
     gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
diff --git a/tests/sksl/shared/NoFragCoordsPosRT.metal b/tests/sksl/shared/NoFragCoordsPosRT.metal
index e51aa51..acf4586 100644
--- a/tests/sksl/shared/NoFragCoordsPosRT.metal
+++ b/tests/sksl/shared/NoFragCoordsPosRT.metal
@@ -2,7 +2,7 @@
     float4 sk_RTAdjust;
 };
 struct Inputs {
-    float4 pos;
+    float4 pos  [[attribute(0)]];
 };
 struct Outputs {
     float4 sk_Position [[position]];