aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-13 09:36:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-13 14:07:02 +0000
commit68990be759f663bafdb7c1b746adce15557cda7f (patch)
treeb982e218f45fa02188bb38fe767797ff6315edcf /src/sksl/ir
parentc20b5f83595073c02009ff3c0a8a77aca6ad1e71 (diff)
Re-land of "converted GrSimpleTextureEffect to sksl"
This reverts commit baf981f71614e7a2fbe6af2726e65126d431ed8e. Bug: skia: Change-Id: I36f6bfb616f1ec2b89043e3a6f7cbdf473bc9588 Reviewed-on: https://skia-review.googlesource.com/22369 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/ir')
-rw-r--r--src/sksl/ir/SkSLType.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLType.cpp b/src/sksl/ir/SkSLType.cpp
index c919cbc8ae..7516377fbc 100644
--- a/src/sksl/ir/SkSLType.cpp
+++ b/src/sksl/ir/SkSLType.cpp
@@ -128,6 +128,17 @@ const Type& Type::toCompound(const Context& context, int columns, int rows) cons
}
default: ABORT("unsupported row count (%d)", rows);
}
+ } else if (*this == *context.fBool_Type) {
+ switch (rows) {
+ case 1:
+ switch (columns) {
+ case 2: return *context.fBVec2_Type;
+ case 3: return *context.fBVec3_Type;
+ case 4: return *context.fBVec4_Type;
+ default: ABORT("unsupported vector column count (%d)", columns);
+ }
+ default: ABORT("unsupported row count (%d)", rows);
+ }
}
ABORT("unsupported scalar_to_compound type %s", this->description().c_str());
}