diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-07 14:08:31 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-07 23:08:47 +0000 |
commit | 8c3f4ae56ad0d0555b8b9e6565f75f3357a95309 (patch) | |
tree | f3fe1316bce677bdcbba99e44c0fa72b5451d3a1 /src/sksl | |
parent | 5c49617f3dc24fcb10451ec8dcdf70aa058f06d6 (diff) |
fixed assertion error when calling matrixCompMult()
Change-Id: I8e702eededf150e82226477558118f1bb7e66fef
Reviewed-on: https://skia-review.googlesource.com/8138
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl')
-rw-r--r-- | src/sksl/SkSLContext.h | 10 | ||||
-rw-r--r-- | src/sksl/ir/SkSLType.h | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/sksl/SkSLContext.h b/src/sksl/SkSLContext.h index 18de3367bc..df651bc8b3 100644 --- a/src/sksl/SkSLContext.h +++ b/src/sksl/SkSLContext.h @@ -126,7 +126,15 @@ public: fUVec3_Type.get(), fUVec4_Type.get() })) , fGenBType_Type(new Type(SkString("$genBType"), { fBool_Type.get(), fBVec2_Type.get(), fBVec3_Type.get(), fBVec4_Type.get() })) - , fMat_Type(new Type(SkString("$mat"))) + , fMat_Type(new Type(SkString("$mat"), { fMat2x2_Type.get(), fMat2x3_Type.get(), + fMat2x4_Type.get(), fMat3x2_Type.get(), + fMat3x3_Type.get(), fMat3x4_Type.get(), + fMat4x2_Type.get(), fMat4x3_Type.get(), + fMat4x4_Type.get(), fDMat2x2_Type.get(), + fDMat2x3_Type.get(), fDMat2x4_Type.get(), + fDMat3x2_Type.get(), fDMat3x3_Type.get(), + fDMat3x4_Type.get(), fDMat4x2_Type.get(), + fDMat4x3_Type.get(), fDMat4x4_Type.get() })) , fVec_Type(new Type(SkString("$vec"), { fInvalid_Type.get(), fVec2_Type.get(), fVec3_Type.get(), fVec4_Type.get() })) , fGVec_Type(new Type(SkString("$gvec"))) diff --git a/src/sksl/ir/SkSLType.h b/src/sksl/ir/SkSLType.h index 05e48b01be..2f98e53e62 100644 --- a/src/sksl/ir/SkSLType.h +++ b/src/sksl/ir/SkSLType.h @@ -57,15 +57,11 @@ public: : INHERITED(Position(), kType_Kind, std::move(name)) , fTypeKind(kOther_Kind) {} - // Create a generic type which maps to the listed types. As currently implemented, there are - // always exactly four coercion targets, mapping to the scalar, vec2, vec3, and vec4 versions of - // a type. + // Create a generic type which maps to the listed types. Type(SkString name, std::vector<const Type*> types) : INHERITED(Position(), kType_Kind, std::move(name)) , fTypeKind(kGeneric_Kind) - , fCoercibleTypes(std::move(types)) { - ASSERT(fCoercibleTypes.size() == 4); - } + , fCoercibleTypes(std::move(types)) {} // Create a struct type with the given fields. Type(Position position, SkString name, std::vector<Field> fields) |