diff options
author | 2016-09-26 11:58:52 -0700 | |
---|---|---|
committer | 2016-09-26 11:58:52 -0700 | |
commit | b12b3c6908c62c908b3680be01e3b5bfd30de310 (patch) | |
tree | b591f6b46363388600fbba3ca21fbf11a5f9aeff /src/sksl/ir/SkSLIndexExpression.h | |
parent | 1d08998e4fb81755978f3d1c11744a6c77ddab2e (diff) |
Turned on SkSL->GLSL compiler
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288033003
Committed: https://skia.googlesource.com/skia/+/9b0fe3d125f237d9884732a48414fa85fc71b4e3
Review-Url: https://codereview.chromium.org/2288033003
Diffstat (limited to 'src/sksl/ir/SkSLIndexExpression.h')
-rw-r--r-- | src/sksl/ir/SkSLIndexExpression.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sksl/ir/SkSLIndexExpression.h b/src/sksl/ir/SkSLIndexExpression.h index f5b0d09c2c..319e06f97d 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.columns()) { + switch (type.rows()) { case 2: return *context.fVec2_Type; case 3: return *context.fVec3_Type; case 4: return *context.fVec4_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); + ASSERT(fIndex->fType == *context.fInt_Type || fIndex->fType == *context.fUInt_Type); } std::string description() const override { |