diff --git a/src/sksl/ir/SkSLConstructorSplat.cpp b/src/sksl/ir/SkSLConstructorSplat.cpp index 41451c140b..aba519f6bd 100644 --- a/src/sksl/ir/SkSLConstructorSplat.cpp +++ b/src/sksl/ir/SkSLConstructorSplat.cpp @@ -14,7 +14,7 @@ std::unique_ptr ConstructorSplat::Make(const Context& context, int offset, const Type& type, std::unique_ptr arg) { - SkASSERT(arg->type() == type.componentType()); + SkASSERT(arg->type().scalarTypeForLiteral() == type.componentType().scalarTypeForLiteral()); SkASSERT(arg->type().isScalar()); // A "splat" to a scalar type is a no-op and can be eliminated. diff --git a/src/sksl/ir/SkSLSwizzle.cpp b/src/sksl/ir/SkSLSwizzle.cpp index 70135cdc72..7921368e4b 100644 --- a/src/sksl/ir/SkSLSwizzle.cpp +++ b/src/sksl/ir/SkSLSwizzle.cpp @@ -382,8 +382,7 @@ std::unique_ptr Swizzle::Make(const Context& context, } SkASSERT(writeIdx == numConstructorArgs); - // Count up the number of times each constructor argument is used by the - // swizzle. + // Count up the number of times each constructor argument is used by the swizzle. // `half4(bar.yz, half2(foo)).xwxy` -> { 3, 1 } // - bar.yz is referenced 3 times, by `.x_xy` // - half(foo) is referenced 1 time, by `._w__`