aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/sksl/SkSLSPIRVCodeGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 1cbe4c0920..0e20b93c44 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -1252,7 +1252,7 @@ SpvId SPIRVCodeGenerator::writeMatrixConstructor(const Constructor& c, OutputStr
currentColumn.push_back(arguments[i]);
} else {
SpvId componentType = this->getType(c.fArguments[i]->fType.componentType());
- for (int j = 0; j < c.fArguments[j]->fType.columns(); ++j) {
+ for (int j = 0; j < c.fArguments[i]->fType.columns(); ++j) {
SpvId swizzle = this->nextId();
this->writeInstruction(SpvOpCompositeExtract, componentType, swizzle,
arguments[i], j, out);