aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLSPIRVCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/SkSLSPIRVCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLSPIRVCodeGenerator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 85e996c031..93ec4ce9b2 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -2820,7 +2820,7 @@ void SPIRVCodeGenerator::writeReturnStatement(const ReturnStatement& r, SkWStrea
void SPIRVCodeGenerator::writeInstructions(const Program& program, SkWStream& out) {
fGLSLExtendedInstructions = this->nextId();
SkDynamicMemoryWStream body;
- std::vector<SpvId> interfaceVars;
+ std::set<SpvId> interfaceVars;
// assign IDs to functions
for (size_t i = 0; i < program.fElements.size(); i++) {
if (program.fElements[i]->fKind == ProgramElement::kFunction_Kind) {
@@ -2834,7 +2834,7 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, SkWStream& ou
SpvId id = this->writeInterfaceBlock(intf);
if ((intf.fVariable.fModifiers.fFlags & Modifiers::kIn_Flag) ||
(intf.fVariable.fModifiers.fFlags & Modifiers::kOut_Flag)) {
- interfaceVars.push_back(id);
+ interfaceVars.insert(id);
}
}
}
@@ -2861,7 +2861,7 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, SkWStream& ou
if (var->fStorage == Variable::kGlobal_Storage &&
((var->fModifiers.fFlags & Modifiers::kIn_Flag) ||
(var->fModifiers.fFlags & Modifiers::kOut_Flag))) {
- interfaceVars.push_back(entry.second);
+ interfaceVars.insert(entry.second);
}
}
this->writeCapabilities(out);