| 546 | } |
| 547 | |
| 548 | void RenderGraph::markOutput(const std::string& name, TextureChannelFlags mask) |
| 549 | { |
| 550 | FALCOR_CHECK(mask != TextureChannelFlags::None, "Mask must be non-empty"); |
| 551 | |
| 552 | // Recursive call to handle '*' wildcard. |
| 553 | if (name == "*") |
| 554 | { |
| 555 | auto outputs = getAvailableOutputs(); |
| 556 | for (const auto& o : outputs) |
| 557 | markOutput(o, mask); |
| 558 | return; |
| 559 | } |
| 560 | |
| 561 | str_pair strPair; |
| 562 | getRenderPassAndNamePair(false, name, strPair); |
| 563 | |
| 564 | GraphOut newOut; |
| 565 | newOut.field = strPair.second; |
| 566 | newOut.nodeId = mNameToIndex[strPair.first]; |
| 567 | |
| 568 | // Check if output is already marked. |
| 569 | // If it is, add the mask to its set of generated masks. |
| 570 | auto it = std::find(mOutputs.begin(), mOutputs.end(), newOut); |
| 571 | if (it != mOutputs.end()) |
| 572 | { |
| 573 | it->masks.insert(mask); |
| 574 | // No recompile necessary as output is already generated. |
| 575 | } |
| 576 | else |
| 577 | { |
| 578 | newOut.masks.insert(mask); |
| 579 | mOutputs.push_back(newOut); |
| 580 | mRecompile = true; |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | void RenderGraph::unmarkOutput(const std::string& name) |
| 585 | { |