aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/sksl/SkSLCPPCodeGenerator.cpp2
-rw-r--r--tests/SkSLFPTest.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp
index 3da7e8e5f0..235c9d8950 100644
--- a/src/sksl/SkSLCPPCodeGenerator.cpp
+++ b/src/sksl/SkSLCPPCodeGenerator.cpp
@@ -442,7 +442,7 @@ void CPPCodeGenerator::writeSetData(std::vector<const Variable*>& uniforms) {
const char* name = u->fName.c_str();
if (u->fType == *fContext.fVec4_Type) {
this->writef(" const SkRect %sValue = _outer.%s();\n"
- " %s.set4fv(%sVar, 4, (float*) &%sValue);\n",
+ " %s.set4fv(%sVar, 1, (float*) &%sValue);\n",
name, name, pdman, HCodeGenerator::FieldName(name).c_str(), name);
} else if (u->fType == *fContext.fMat4x4_Type) {
this->writef(" float %sValue[16];\n"
diff --git a/tests/SkSLFPTest.cpp b/tests/SkSLFPTest.cpp
index a5a1a6ebeb..bf8e835bba 100644
--- a/tests/SkSLFPTest.cpp
+++ b/tests/SkSLFPTest.cpp
@@ -205,7 +205,7 @@ DEF_TEST(SkSLFPInUniform, r) {
"fColorVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kVec4f_GrSLType, "
"kDefault_GrSLPrecision, \"color\");",
"const SkRect colorValue = _outer.color();",
- "pdman.set4fv(fColorVar, 4, (float*) &colorValue);"
+ "pdman.set4fv(fColorVar, 1, (float*) &colorValue);"
});
}