Skip to content

Side effect pass inputs not preserved #8

@maxamula

Description

@maxamula

FrameGraph’s compile logic skips passes with no used outputs (which includes side-effect-only passes) when determining each resource’s last usage.
Possible fix:

// -- Calculate resources lifetime:

for (auto &pass : m_passNodes) {
  if (pass.m_refCount == 0 && !pass.hasSideEffect()) continue;

  for (const auto id : pass.m_creates)
    _getResourceEntry(id).m_producer = &pass;
  for (const auto [id, _] : pass.m_writes)
    _getResourceEntry(id).m_last = &pass;
  for (const auto [id, _] : pass.m_reads)
    _getResourceEntry(id).m_last = &pass;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions