MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / removePass

Method removePass

Source/Falcor/RenderGraph/RenderGraph.cpp:152–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void 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
178void RenderGraph::updatePass(const std::string& passName, const Properties& props)
179{

Callers 2

removeRenderPassMethod · 0.45

Calls 3

eraseMethod · 0.80
removeNodeMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected