Skip to content

Commit ab0cb85

Browse files
committed
Minor optimization
1 parent e8a101e commit ab0cb85

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/native/thin3d/VulkanQueueRunner.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -735,12 +735,8 @@ void VulkanQueueRunner::ApplyRenderPassMerge(std::vector<VKRStep *> &steps) {
735735
// ok. Now, if it's a render, slurp up all the commands
736736
// and kill the step.
737737
// Also slurp up any pretransitions.
738-
for (int k = 0; k < (int)steps[j]->preTransitions.size(); k++) {
739-
steps[i]->preTransitions.push_back(steps[j]->preTransitions[k]);
740-
}
741-
for (int k = 0; k < (int)steps[j]->commands.size(); k++) {
742-
steps[i]->commands.push_back(steps[j]->commands[k]);
743-
}
738+
steps[i]->preTransitions.insert(steps[i]->preTransitions.end(), steps[j]->preTransitions.begin(), steps[j]->preTransitions.end());
739+
steps[i]->commands.insert(steps[i]->commands.end(), steps[j]->commands.begin(), steps[j]->commands.end());
744740
steps[j]->stepType = VKRStepType::RENDER_SKIP;
745741
}
746742
// keep going.

0 commit comments

Comments
 (0)