Implement struct == and != on SPIR-V.

OpenGL ES2 allows structs to be compared: http://screen/6KnX4ZfkdLtqDWv
This already worked in GLSL, Metal and SkVM.

Change-Id: Iaf7029c0c1ea9d447348c8280a2788f0d36befad
Bug: skia:11846
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393598
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index 31d4c66..ee44ca1 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -324,6 +324,9 @@
                                 SpvOp_ intOperator, SpvOp_ vectorMergeOperator,
                                 SpvOp_ mergeOperator, OutputStream& out);
 
+    SpvId writeStructComparison(const Type& structType, SpvId lhs, Operator op, SpvId rhs,
+                                OutputStream& out);
+
     SpvId writeComponentwiseMatrixBinary(const Type& operandType, SpvId lhs, SpvId rhs,
                                          SpvOp_ floatOperator, SpvOp_ intOperator,
                                          OutputStream& out);
@@ -347,9 +350,9 @@
 
     SpvId writeIndexExpression(const IndexExpression& expr, OutputStream& out);
 
-    SpvId writeLogicalAnd(const BinaryExpression& b, OutputStream& out);
+    SpvId writeLogicalAnd(const Expression& left, const Expression& right, OutputStream& out);
 
-    SpvId writeLogicalOr(const BinaryExpression& o, OutputStream& out);
+    SpvId writeLogicalOr(const Expression& left, const Expression& right, OutputStream& out);
 
     SpvId writePrefixExpression(const PrefixExpression& p, OutputStream& out);