Add support for struct constructors to SkSL.
This is allowed in OpenGL ES2, and its absence in SkSL has been a pain
point for new users adopting Runtime Effects.
Change-Id: Id2ed78261a2cd2b14b49ad22cb74cdc9e0905f8a
Bug: skia:11368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393418
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index ee44ca1..902b5a0 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -29,6 +29,7 @@
#include "src/sksl/ir/SkSLConstructorMatrixResize.h"
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
+#include "src/sksl/ir/SkSLConstructorStruct.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLFloatLiteral.h"
@@ -294,7 +295,7 @@
SpvId writeVectorConstructor(const ConstructorCompound& c, OutputStream& out);
- SpvId writeArrayConstructor(const ConstructorArray& c, OutputStream& out);
+ SpvId writeCompositeConstructor(const AnyConstructor& c, OutputStream& out);
SpvId writeConstructorDiagonalMatrix(const ConstructorDiagonalMatrix& c, OutputStream& out);