| 150 | } |
| 151 | |
| 152 | void RenderGraph::removePass(const std::string& name) |
| 153 | { |
| 154 | uint32_t index = getPassIndex(name); |
| 155 | FALCOR_CHECK(index != kInvalidIndex, "Can't remove render pass '{}'. Pass doesn't exist.", name); |
| 156 | |
| 157 | // Unmark graph outputs that belong to this pass. |
| 158 | // Because the way std::vector works, we can't call unmarkOutput() immediately, so we store the outputs in a vector |
| 159 | std::vector<std::string> outputsToDelete; |
| 160 | const std::string& outputPrefix = name + '.'; |
| 161 | for (auto& o : mOutputs) |
| 162 | { |
| 163 | if (o.nodeId == index) |
| 164 | outputsToDelete.push_back(outputPrefix + o.field); |
| 165 | } |
| 166 | |
| 167 | // Remove all the edges, indices and pass-data associated with this pass |
| 168 | for (const auto& outputName : outputsToDelete) |
| 169 | unmarkOutput(outputName); |
| 170 | mNameToIndex.erase(name); |
| 171 | mNodeData.erase(index); |
| 172 | const auto& removedEdges = mpGraph->removeNode(index); |
| 173 | for (const auto& e : removedEdges) |
| 174 | mEdgeData.erase(e); |
| 175 | mRecompile = true; |
| 176 | } |
| 177 | |
| 178 | void RenderGraph::updatePass(const std::string& passName, const Properties& props) |
| 179 | { |
no test coverage detected