summaryrefslogtreecommitdiff
path: root/src/gpu/effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effect.cc')
-rw-r--r--src/gpu/effect.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc
index 4230021..1257090 100644
--- a/src/gpu/effect.cc
+++ b/src/gpu/effect.cc
@@ -58,6 +58,20 @@ void Effect::blit_input_to_output(WGPUCommandEncoder encoder,
&extent);
}
+std::string Effect::find_downstream_output(
+ const std::vector<EffectDAGNode>& dag) const {
+ for (const auto& node : dag) {
+ for (const auto& in : node.input_nodes) {
+ for (const auto& out : output_nodes_) {
+ if (in == out && !node.output_nodes.empty()) {
+ return node.output_nodes[0];
+ }
+ }
+ }
+ }
+ return "";
+}
+
void Effect::create_linear_sampler() {
sampler_.set(gpu_create_linear_sampler(ctx_.device));
}