aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLIndexExpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/ir/SkSLIndexExpression.h')
-rw-r--r--src/sksl/ir/SkSLIndexExpression.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sksl/ir/SkSLIndexExpression.h b/src/sksl/ir/SkSLIndexExpression.h
index ea9af3d897..f5b0d09c2c 100644
--- a/src/sksl/ir/SkSLIndexExpression.h
+++ b/src/sksl/ir/SkSLIndexExpression.h
@@ -19,7 +19,7 @@ namespace SkSL {
static const Type& index_type(const Context& context, const Type& type) {
if (type.kind() == Type::kMatrix_Kind) {
if (type.componentType() == *context.fFloat_Type) {
- switch (type.rows()) {
+ switch (type.columns()) {
case 2: return *context.fVec2_Type;
case 3: return *context.fVec3_Type;
case 4: return *context.fVec4_Type;
@@ -27,7 +27,7 @@ static const Type& index_type(const Context& context, const Type& type) {
}
} else {
ASSERT(type.componentType() == *context.fDouble_Type);
- switch (type.rows()) {
+ switch (type.columns()) {
case 2: return *context.fDVec2_Type;
case 3: return *context.fDVec3_Type;
case 4: return *context.fDVec4_Type;
@@ -47,7 +47,7 @@ struct IndexExpression : public Expression {
: INHERITED(base->fPosition, kIndex_Kind, index_type(context, base->fType))
, fBase(std::move(base))
, fIndex(std::move(index)) {
- ASSERT(fIndex->fType == *context.fInt_Type || fIndex->fType == *context.fUInt_Type);
+ ASSERT(fIndex->fType == *context.fInt_Type);
}
std::string description() const override {