Fix swizzle-of-swizzle lvalues in ByteCodeGenerator

Bug: skia:10785
Change-Id: I01708af63d7e2ffc160022074ea9ff2b3c69eab5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320638
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/tests/SkSLInterpreterTest.cpp b/tests/SkSLInterpreterTest.cpp
index 04ee1b3..31b0bea 100644
--- a/tests/SkSLInterpreterTest.cpp
+++ b/tests/SkSLInterpreterTest.cpp
@@ -815,6 +815,20 @@
          1, 2, 3, 4, 3, 3, 1, 5);
 }
 
+DEF_TEST(SkSLInterpreterSwizzleSingleLvalue, r) {
+    // Add in your SkSL here.
+    test(r,
+         "void main(inout half4 color) { color.xywz = half4(1,2,3,4); }",
+         0, 0, 0, 0, 1, 2, 4, 3);
+}
+
+DEF_TEST(SkSLInterpreterSwizzleDoubleLvalue, r) {
+    // Add in your SkSL here.
+    test(r,
+         "void main(inout half4 color) { color.xywz.yxzw = half4(1,2,3,4); }",
+         0, 0, 0, 0, 2, 1, 4, 3);
+}
+
 DEF_TEST(SkSLInterpreterMathFunctions, r) {
     float value[4], expected[4];