SPIR-V comma operator support
Bug: skia:
Change-Id: I9792674c49a0243017bb5f2b3c11d0678e62138e
Reviewed-on: https://skia-review.googlesource.com/21367
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 94e8a58..878c7fc 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2063,6 +2063,9 @@
lhs = this->writeExpression(*b.fLeft, out);
}
SpvId rhs = this->writeExpression(*b.fRight, out);
+ if (b.fOperator == Token::COMMA) {
+ return rhs;
+ }
// component type we are operating on: float, int, uint
const Type* operandType;
// IR allows mismatched types in expressions (e.g. vec2 * float), but they need special handling