Skip to content

Commit

Permalink
Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 13, 2019
1 parent e8a101e commit ab0cb85
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ext/native/thin3d/VulkanQueueRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,8 @@ void VulkanQueueRunner::ApplyRenderPassMerge(std::vector<VKRStep *> &steps) {
// ok. Now, if it's a render, slurp up all the commands
// and kill the step.
// Also slurp up any pretransitions.
for (int k = 0; k < (int)steps[j]->preTransitions.size(); k++) {
steps[i]->preTransitions.push_back(steps[j]->preTransitions[k]);
}
for (int k = 0; k < (int)steps[j]->commands.size(); k++) {
steps[i]->commands.push_back(steps[j]->commands[k]);
}
steps[i]->preTransitions.insert(steps[i]->preTransitions.end(), steps[j]->preTransitions.begin(), steps[j]->preTransitions.end());
steps[i]->commands.insert(steps[i]->commands.end(), steps[j]->commands.begin(), steps[j]->commands.end());
steps[j]->stepType = VKRStepType::RENDER_SKIP;
}
// keep going.
Expand Down

0 comments on commit ab0cb85

Please sign in to comment.