Subject: [PATCH 04/24] wip: add exact tiled output bridge

From: Justin Youens <[email-masked]>
Date: Sat, 15 Aug 2026 07:56:08 -0500

---
 CMakeLists.txt                        |   4 +-
 src/backend/drm/TiledOutputBridge.cpp | 582 ++++++++++++++++++++++++++
 src/backend/drm/TiledOutputBridge.hpp | 253 +++++++++++
 tests/TiledOutputBridge.cpp           | 420 +++++++++++++++++++
 tests/TiledVisibility.cmake           |   2 +-
 5 files changed, 1259 insertions(+), 2 deletions(-)
 create mode 100644 src/backend/drm/TiledOutputBridge.cpp
 create mode 100644 src/backend/drm/TiledOutputBridge.hpp
 create mode 100644 tests/TiledOutputBridge.cpp

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ab0b83cfa7d00c76dc86d70cbac169dfa2f6df6..04cab199928989de3561f6db4d563332a3eaf16b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,8 @@ set(AQUAMARINE_TILED_PRIVATE_SOURCES
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TileModes.cpp"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledBackendState.cpp"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledCrtcAllocator.cpp"
-    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledDRMIntegration.cpp")
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledDRMIntegration.cpp"
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledOutputBridge.cpp")
 list(REMOVE_ITEM SRCFILES ${AQUAMARINE_TILED_PRIVATE_SOURCES})
 
 add_library(aquamarine_tiled_private STATIC ${AQUAMARINE_TILED_PRIVATE_SOURCES})
@@ -207,6 +208,7 @@ addTiledPrivateTest(tiledDRMIntegration "tests/TiledDRMIntegration.cpp")
 addTiledPrivateTest(planeFormats "tests/PlaneFormats.cpp")
 addTiledPrivateTest(planeViewport "tests/PlaneViewport.cpp")
 addTiledPrivateTest(tiledCrtcAllocator "tests/TiledCrtcAllocator.cpp")
+addTiledPrivateTest(tiledOutputBridge "tests/TiledOutputBridge.cpp")
 
 add_test(
   NAME tiledVisibility
diff --git a/src/backend/drm/TiledOutputBridge.cpp b/src/backend/drm/TiledOutputBridge.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e46831de54f2edec5346795533fc3a1ce44904dc
--- /dev/null
+++ b/src/backend/drm/TiledOutputBridge.cpp
@@ -0,0 +1,582 @@
+#include "TiledOutputBridge.hpp"
+
+#include <algorithm>
+#include <exception>
+#include <map>
+#include <ranges>
+#include <set>
+#include <type_traits>
+#include <utility>
+
+namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifier-naming): established Aquamarine DRM namespace
+    namespace {
+        template <typename T, typename U>
+        bool sameOwner(const CSharedPointer<T>& lhs, const CSharedPointer<U>& rhs) {
+            return lhs.impl_ != nullptr && lhs.impl_ == rhs.impl_;
+        }
+
+        template <typename T, typename U>
+        bool sameOptionalOwner(const CSharedPointer<T>& lhs, const CSharedPointer<U>& rhs) {
+            return (!lhs && !rhs) || sameOwner(lhs, rhs);
+        }
+
+        enum class eBuildError : uint8_t {
+            NONE = 0,
+            INVALID_CHAIN,
+            INVALID_PROJECTION,
+        };
+
+        struct SBuildResult {
+            CSharedPointer<const COutputBridgeObservation> observation;
+            eBuildError                                    error = eBuildError::INVALID_CHAIN;
+        };
+
+        bool exactChain(const CSharedPointer<const CPlan>& plan) {
+            if (!plan || plan->status() != NTiledCrtcAllocator::ePlanStatus::READY || !plan->snapshot() || !plan->observation())
+                return false;
+
+            const auto& SNAPSHOT    = plan->snapshot();
+            const auto& OBSERVATION = plan->observation();
+            const auto& SCAN        = SNAPSHOT->scan();
+            if (!SCAN || !SCAN->attempt() || SCAN->attempt()->completeness() != NTiledScan::eScanCompleteness::COMPLETE || !SCAN->observation() || !SCAN->device() ||
+                !SNAPSHOT->session() || !SNAPSHOT->observation())
+                return false;
+
+            const auto& EXPECTED = OBSERVATION->expected();
+            return sameOwner(OBSERVATION->scan(), SCAN) && sameOwner(EXPECTED.snapshot, SNAPSHOT) && sameOwner(EXPECTED.scan, SCAN) &&
+                sameOwner(EXPECTED.device, SNAPSHOT->device()) && sameOwner(EXPECTED.session, SNAPSHOT->session()) && sameOwner(EXPECTED.observation, SNAPSHOT->observation()) &&
+                EXPECTED.allocationEpoch == SNAPSHOT->allocationEpoch() && sameOwner(SNAPSHOT->scan(), SCAN) && sameOwner(SNAPSHOT->observation(), SCAN->observation()) &&
+                sameOwner(SNAPSHOT->observation()->session(), SNAPSHOT->session()) && sameOwner(SNAPSHOT->session()->device(), SNAPSHOT->device()) &&
+                sameOwner(SCAN->device(), SNAPSHOT->device()) && OBSERVATION->eventThread() == std::this_thread::get_id() &&
+                SNAPSHOT->session()->eventThread() == std::this_thread::get_id() && OBSERVATION->epoch().session == SNAPSHOT->session()->sessionEpoch() &&
+                OBSERVATION->epoch().allocation == SNAPSHOT->allocationEpoch() && OBSERVATION->epoch().eventThread == SNAPSHOT->session()->eventThreadEpoch();
+        }
+
+        bool exactDefinition(const PScanGroupDefinition& definition, const PCommittedScan& scan) {
+            if (!definition || !scan || !sameOwner(definition->device(), scan->device()) || !sameOwner(definition->session(), scan->observation()->session()))
+                return false;
+            return std::ranges::any_of(scan->definitions(), [&](const auto& candidate) { return sameOwner(candidate, definition); });
+        }
+
+        bool exactModeDefinition(const PScanModeDefinition& modes, const PScanGroupDefinition& definition, const PCommittedScan& scan) {
+            if (!modes || !sameOwner(modes->definition(), definition))
+                return false;
+            return std::ranges::any_of(scan->modeDefinitions(), [&](const auto& candidate) { return sameOwner(candidate, modes); });
+        }
+
+        const PScanModeDefinition* findExactModes(const PCommittedScan& scan, const PScanGroupDefinition& definition) {
+            const PScanModeDefinition* result = nullptr;
+            for (const auto& MODES : scan->modeDefinitions()) {
+                if (!MODES || !sameOwner(MODES->definition(), definition))
+                    continue;
+                if (result)
+                    return nullptr;
+                result = &MODES;
+            }
+            return result;
+        }
+
+        const CGroupProjection* reusableGroup(const CSharedPointer<const COutputBridgeObservation>& previous, const PScanGroupDefinition& definition) {
+            if (!previous || !definition || !sameOwner(previous->capturedScan()->device(), definition->device()))
+                return nullptr;
+
+            const CGroupProjection* result = nullptr;
+            for (const auto& GROUP : previous->groups()) {
+                if (GROUP.projection() == eGroupProjection::DRIVER_UNIFIED || !GROUP.scanDefinition() || GROUP.scanDefinition()->group().key != definition->group().key)
+                    continue;
+                if (result)
+                    return nullptr;
+                result = &GROUP;
+            }
+            if (!result || !(result->scanDefinition()->group() == definition->group()))
+                return nullptr;
+            return result;
+        }
+
+        bool equivalentModes(const CModeSet& previous, const PScanModeDefinition& current) {
+            return current && previous.definition() &&
+                std::ranges::equal(previous.definition()->logicalModes(), current->logicalModes(), {}, &NTiledScan::SLogicalModeProjection::logical,
+                                   &NTiledScan::SLogicalModeProjection::logical) &&
+                std::ranges::equal(previous.definition()->physicalMappings(), current->physicalMappings());
+        }
+
+        bool modeOwnersMatchDefinition(const CModeSet& modes) {
+            if (!modes.definition() || modes.modes().size() != modes.definition()->logicalModes().size())
+                return false;
+            for (size_t index = 0; index < modes.modes().size(); ++index) {
+                const auto& BINDING = modes.modes().subspan(index, 1).front();
+                const auto& LOGICAL = modes.definition()->logicalModes().subspan(index, 1).front().logical;
+                if (!BINDING.outputMode || BINDING.logicalModeId != LOGICAL.id || BINDING.outputMode->pixelSize.x != static_cast<double>(LOGICAL.width) ||
+                    BINDING.outputMode->pixelSize.y != static_cast<double>(LOGICAL.height) || BINDING.outputMode->refreshRate != LOGICAL.refreshRate ||
+                    BINDING.outputMode->preferred != LOGICAL.preferred || BINDING.outputMode->modeInfo.has_value())
+                    return false;
+            }
+            return true;
+        }
+
+        bool validMapping(const NTiling::STileModeMap& mapping, const NTiling::STileGroup& group) {
+            if (mapping.logicalModeId == 0 || mapping.members.size() != group.members.size())
+                return false;
+            for (size_t index = 0; index < group.members.size(); ++index) {
+                const auto& MEMBER   = group.members.at(index);
+                const auto& PHYSICAL = mapping.members.at(index);
+                if (PHYSICAL.connectorId != MEMBER.connectorId || PHYSICAL.modeInfo.hdisplay != MEMBER.width || PHYSICAL.modeInfo.vdisplay != MEMBER.height)
+                    return false;
+            }
+            return true;
+        }
+
+        bool validAllocatedBindings(const CGroupAllocation& allocation) {
+            if (!allocation.definition())
+                return false;
+            const auto& MEMBERS = allocation.definition()->group().members;
+            if (allocation.bindings().size() != MEMBERS.size())
+                return false;
+            for (size_t index = 0; index < MEMBERS.size(); ++index) {
+                const auto& MEMBER  = MEMBERS.at(index);
+                const auto& BINDING = allocation.bindings().at(index);
+                if (!BINDING.tiled() || !sameOwner(BINDING.definition(), allocation.definition()) || !BINDING.connector() || !BINDING.crtc() || !BINDING.primaryPlane() ||
+                    BINDING.connector()->id != MEMBER.connectorId || BINDING.tileX() != MEMBER.tileHLoc || BINDING.tileY() != MEMBER.tileVLoc)
+                    return false;
+            }
+            return true;
+        }
+
+        eConnectorProjection connectorProjectionFor(NTiledScan::eConnectorRole role, eGroupProjection group) {
+            switch (role) {
+                case NTiledScan::eConnectorRole::ORDINARY: return eConnectorProjection::ORDINARY;
+                case NTiledScan::eConnectorRole::DRIVER_UNIFIED_PRIMARY: return eConnectorProjection::DRIVER_UNIFIED_PRIMARY;
+                case NTiledScan::eConnectorRole::DRIVER_UNIFIED_REDUNDANT: return eConnectorProjection::DRIVER_UNIFIED_REDUNDANT;
+                case NTiledScan::eConnectorRole::MULTI_STREAM_PRIMARY:
+                case NTiledScan::eConnectorRole::MULTI_STREAM_MEMBER:
+                    return group == eGroupProjection::MULTI_STREAM_ALLOCATED ? eConnectorProjection::MULTI_STREAM_AGGREGATE_CANDIDATE :
+                                                                               eConnectorProjection::MULTI_STREAM_ORDINARY_FALLBACK;
+            }
+            return eConnectorProjection::ORDINARY;
+        }
+    }
+
+    class COutputBridgeAssembler {
+      public:
+        static CSharedPointer<const CModeSet> modeSet(const PScanModeDefinition& definition, const CSharedPointer<const CModeSet>& reusable) {
+            if (!definition || !definition->definition() || definition->logicalModes().empty() || definition->logicalModes().size() != definition->physicalMappings().size())
+                return {};
+
+            std::map<uint32_t, size_t> physicalById;
+            for (size_t index = 0; index < definition->physicalMappings().size(); ++index) {
+                const auto& MAPPING = definition->physicalMappings().subspan(index, 1).front();
+                if (!validMapping(MAPPING, definition->definition()->group()) || !physicalById.emplace(MAPPING.logicalModeId, index).second)
+                    return {};
+            }
+
+            const bool                           REUSE = reusable && equivalentModes(*reusable, definition) && modeOwnersMatchDefinition(*reusable);
+            std::set<uint32_t>                   logicalIds;
+            std::vector<SModeBinding>            modes;
+            std::vector<CModeSet::SBindingIndex> indices;
+            modes.reserve(definition->logicalModes().size());
+            indices.reserve(definition->logicalModes().size());
+
+            for (size_t index = 0; index < definition->logicalModes().size(); ++index) {
+                const auto& LOGICAL = definition->logicalModes().subspan(index, 1).front().logical;
+                const auto  MAPPING = physicalById.find(LOGICAL.id);
+                if (LOGICAL.id == 0 || LOGICAL.width == 0 || LOGICAL.height == 0 || LOGICAL.refreshRate == 0 || !logicalIds.insert(LOGICAL.id).second ||
+                    MAPPING == physicalById.end())
+                    return {};
+
+                CSharedPointer<SOutputMode> outputMode;
+                if (REUSE) {
+                    const auto& PRIOR = reusable->modes().subspan(index, 1).front();
+                    if (!PRIOR.outputMode || PRIOR.logicalModeId != LOGICAL.id)
+                        return {};
+                    outputMode = PRIOR.outputMode;
+                } else {
+                    outputMode              = CSharedPointer<SOutputMode>{new SOutputMode{}};
+                    outputMode->pixelSize   = {static_cast<double>(LOGICAL.width), static_cast<double>(LOGICAL.height)};
+                    outputMode->refreshRate = LOGICAL.refreshRate;
+                    outputMode->preferred   = LOGICAL.preferred;
+                    outputMode->modeInfo.reset();
+                }
+
+                modes.push_back({.outputMode = std::move(outputMode), .logicalModeId = LOGICAL.id});
+                indices.push_back({.logical = index, .physical = MAPPING->second});
+            }
+
+            CSharedPointer<CModeSet> result{new CModeSet{definition, std::move(modes), std::move(indices)}};
+            return result;
+        }
+
+        static CGroupProjection group(eGroupProjection projection, PScanGroupDefinition scanDefinition, CSharedPointer<const CGroupDefinition> allocationDefinition,
+                                      PScanModeDefinition modeDefinition, CSharedPointer<const CModeSet> modeSet, CSharedPointer<const CPlan> plan,
+                                      std::optional<size_t> allocationIndex) {
+            return CGroupProjection{projection,     std::move(scanDefinition), std::move(allocationDefinition), std::move(modeDefinition), std::move(modeSet), std::move(plan),
+                                    allocationIndex};
+        }
+
+        static CConnectorProjection connector(uint32_t connectorId, eConnectorProjection projection, NTiledScan::eConnectorRole scanRole,
+                                              NTiledScan::eConnectorDisposition scanDisposition, PScanGroupDefinition scanDefinition) {
+            return CConnectorProjection{connectorId, projection, scanRole, scanDisposition, std::move(scanDefinition)};
+        }
+
+        static CSharedPointer<const COutputBridgeObservation> observation(PCommittedScan scan, CSharedPointer<const CSnapshot> snapshot,
+                                                                          CSharedPointer<const CAllocationObservation> allocationObservation, CSharedPointer<const CPlan> plan,
+                                                                          std::vector<CGroupProjection> groups, std::vector<CConnectorProjection> connectors) {
+            CSharedPointer<COutputBridgeObservation> result{
+                new COutputBridgeObservation{std::move(scan), std::move(snapshot), std::move(allocationObservation), std::move(plan), std::move(groups), std::move(connectors)}};
+            return result;
+        }
+
+        static SBuildResult build(const CSharedPointer<const CPlan>& plan, const CSharedPointer<const COutputBridgeObservation>& previous) {
+            if (!exactChain(plan))
+                return {.error = eBuildError::INVALID_CHAIN};
+
+            const auto            SCAN = plan->snapshot()->scan();
+            std::set<const void*> definitionOwners;
+            for (const auto& DEFINITION : SCAN->definitions()) {
+                if (!exactDefinition(DEFINITION, SCAN) || !definitionOwners.insert(DEFINITION.impl_).second || DEFINITION->group().members.empty())
+                    return {.error = eBuildError::INVALID_PROJECTION};
+            }
+
+            std::map<const void*, size_t> allocationByScanDefinition;
+            for (size_t index = 0; index < plan->groups().size(); ++index) {
+                const auto& ALLOCATION = plan->groups().at(index);
+                if (!ALLOCATION.definition() || !ALLOCATION.definition()->scanDefinition() || !exactDefinition(ALLOCATION.definition()->scanDefinition(), SCAN) ||
+                    ALLOCATION.definition()->group().kind != NTiling::eTileGroupKind::MULTI_STREAM ||
+                    !allocationByScanDefinition.emplace(ALLOCATION.definition()->scanDefinition().impl_, index).second)
+                    return {.error = eBuildError::INVALID_PROJECTION};
+                if ((ALLOCATION.status() == NTiledCrtcAllocator::eGroupStatus::ALLOCATED && !validAllocatedBindings(ALLOCATION)) ||
+                    (ALLOCATION.status() == NTiledCrtcAllocator::eGroupStatus::NO_MATCH && !ALLOCATION.bindings().empty()))
+                    return {.error = eBuildError::INVALID_PROJECTION};
+            }
+
+            std::vector<CGroupProjection> groups;
+            groups.reserve(SCAN->definitions().size());
+            std::map<const void*, eGroupProjection> projectionByDefinition;
+            std::set<const void*>                   usedModeDefinitions;
+            for (const auto& DEFINITION : SCAN->definitions()) {
+                const auto& TOPOLOGY = DEFINITION->group();
+                if (TOPOLOGY.kind == NTiling::eTileGroupKind::DRIVER_UNIFIED) {
+                    if (allocationByScanDefinition.contains(DEFINITION.impl_) || findExactModes(SCAN, DEFINITION))
+                        return {.error = eBuildError::INVALID_PROJECTION};
+                    groups.push_back(group(eGroupProjection::DRIVER_UNIFIED, DEFINITION, {}, {}, {}, plan, std::nullopt));
+                    projectionByDefinition.emplace(DEFINITION.impl_, eGroupProjection::DRIVER_UNIFIED);
+                    continue;
+                }
+
+                if (TOPOLOGY.kind != NTiling::eTileGroupKind::MULTI_STREAM)
+                    return {.error = eBuildError::INVALID_PROJECTION};
+                const auto ALLOCATION = allocationByScanDefinition.find(DEFINITION.impl_);
+                const auto MODES      = findExactModes(SCAN, DEFINITION);
+                if (ALLOCATION == allocationByScanDefinition.end() || !MODES || !exactModeDefinition(*MODES, DEFINITION, SCAN) ||
+                    !usedModeDefinitions.insert((*MODES).impl_).second)
+                    return {.error = eBuildError::INVALID_PROJECTION};
+
+                const auto& PLAN_GROUP = plan->groups().at(ALLOCATION->second);
+                const auto  PROJECTION =
+                    PLAN_GROUP.status() == NTiledCrtcAllocator::eGroupStatus::ALLOCATED ? eGroupProjection::MULTI_STREAM_ALLOCATED : eGroupProjection::MULTI_STREAM_FALLBACK;
+                CSharedPointer<const CModeSet> reusable;
+                if (const auto* PRIOR = reusableGroup(previous, DEFINITION); PRIOR && PRIOR->modeSet()) {
+                    if (sameOwner(PRIOR->modeDefinition(), *MODES)) {
+                        reusable = PRIOR->modeSet();
+                    } else if (equivalentModes(*PRIOR->modeSet(), *MODES)) {
+                        reusable = PRIOR->modeSet();
+                    }
+                }
+
+                auto modes =
+                    sameOwner(reusable ? reusable->definition() : PScanModeDefinition{}, *MODES) && modeOwnersMatchDefinition(*reusable) ? reusable : modeSet(*MODES, reusable);
+                if (!modes)
+                    return {.error = eBuildError::INVALID_PROJECTION};
+                groups.push_back(group(PROJECTION, DEFINITION, PLAN_GROUP.definition(), *MODES, std::move(modes), plan, ALLOCATION->second));
+                projectionByDefinition.emplace(DEFINITION.impl_, PROJECTION);
+            }
+
+            if (allocationByScanDefinition.size() !=
+                    static_cast<size_t>(
+                        std::ranges::count_if(SCAN->definitions(), [](const auto& definition) { return definition->group().kind == NTiling::eTileGroupKind::MULTI_STREAM; })) ||
+                usedModeDefinitions.size() != SCAN->modeDefinitions().size())
+                return {.error = eBuildError::INVALID_PROJECTION};
+
+            std::vector<CConnectorProjection> connectors;
+            connectors.reserve(SCAN->connectors().size());
+            for (const auto& CONNECTOR : SCAN->connectors()) {
+                const auto& SOURCE = CONNECTOR.projection;
+                if (SOURCE.connectorId != CONNECTOR.view.connectorId)
+                    return {.error = eBuildError::INVALID_PROJECTION};
+                if (SOURCE.role == NTiledScan::eConnectorRole::ORDINARY) {
+                    if (SOURCE.definition || SOURCE.modes || SOURCE.disposition != NTiledScan::eConnectorDisposition::PUBLISH_ORDINARY)
+                        return {.error = eBuildError::INVALID_PROJECTION};
+                    connectors.push_back(connector(SOURCE.connectorId, eConnectorProjection::ORDINARY, SOURCE.role, SOURCE.disposition, {}));
+                    continue;
+                }
+
+                if (!SOURCE.definition || !exactDefinition(SOURCE.definition, SCAN))
+                    return {.error = eBuildError::INVALID_PROJECTION};
+                const auto GROUP = projectionByDefinition.find(SOURCE.definition.impl_);
+                if (GROUP == projectionByDefinition.end())
+                    return {.error = eBuildError::INVALID_PROJECTION};
+
+                switch (SOURCE.role) {
+                    case NTiledScan::eConnectorRole::DRIVER_UNIFIED_PRIMARY:
+                        if (GROUP->second != eGroupProjection::DRIVER_UNIFIED || SOURCE.modes || SOURCE.disposition != NTiledScan::eConnectorDisposition::PUBLISH_ORDINARY ||
+                            SOURCE.connectorId != SOURCE.definition->group().primaryConnector)
+                            return {.error = eBuildError::INVALID_PROJECTION};
+                        break;
+                    case NTiledScan::eConnectorRole::DRIVER_UNIFIED_REDUNDANT:
+                        if (GROUP->second != eGroupProjection::DRIVER_UNIFIED || SOURCE.modes || SOURCE.disposition != NTiledScan::eConnectorDisposition::SUPPRESS_REDUNDANT ||
+                            SOURCE.connectorId == SOURCE.definition->group().primaryConnector)
+                            return {.error = eBuildError::INVALID_PROJECTION};
+                        break;
+                    case NTiledScan::eConnectorRole::MULTI_STREAM_PRIMARY:
+                    case NTiledScan::eConnectorRole::MULTI_STREAM_MEMBER:
+                        if (GROUP->second == eGroupProjection::DRIVER_UNIFIED || !SOURCE.modes || !exactModeDefinition(SOURCE.modes, SOURCE.definition, SCAN) ||
+                            SOURCE.disposition != NTiledScan::eConnectorDisposition::PUBLISH_ORDINARY ||
+                            (SOURCE.role == NTiledScan::eConnectorRole::MULTI_STREAM_PRIMARY) != (SOURCE.connectorId == SOURCE.definition->group().primaryConnector))
+                            return {.error = eBuildError::INVALID_PROJECTION};
+                        break;
+                    case NTiledScan::eConnectorRole::ORDINARY: break;
+                }
+                connectors.push_back(connector(SOURCE.connectorId, connectorProjectionFor(SOURCE.role, GROUP->second), SOURCE.role, SOURCE.disposition, SOURCE.definition));
+            }
+
+            for (const auto& GROUP : groups) {
+                const auto& MEMBERS = GROUP.scanDefinition()->group().members;
+                const auto  COUNT   = std::ranges::count_if(
+                    connectors, [&](const auto& connector) { return connector.scanDefinition() && sameOwner(connector.scanDefinition(), GROUP.scanDefinition()); });
+                if (std::cmp_not_equal(COUNT, MEMBERS.size()))
+                    return {.error = eBuildError::INVALID_PROJECTION};
+            }
+
+            return {
+                .observation = observation(SCAN, plan->snapshot(), plan->observation(), plan, std::move(groups), std::move(connectors)),
+                .error       = eBuildError::NONE,
+            };
+        }
+    };
+
+    CModeSet::CModeSet(PScanModeDefinition definition, std::vector<SModeBinding> modes, std::vector<SBindingIndex> indices) :
+        m_definition(std::move(definition)), m_modes(std::move(modes)), m_indices(std::move(indices)) {}
+
+    const PScanModeDefinition& CModeSet::definition() const {
+        return m_definition;
+    }
+
+    std::span<const SModeBinding> CModeSet::modes() const {
+        return m_modes;
+    }
+
+    const NTiling::STileLogicalMode* CModeSet::logicalModeFor(const CSharedPointer<SOutputMode>& outputMode) const {
+        if (!outputMode)
+            return nullptr;
+        for (size_t index = 0; index < m_modes.size(); ++index) {
+            if (sameOwner(m_modes.at(index).outputMode, outputMode))
+                return &m_definition->logicalModes().subspan(m_indices.at(index).logical, 1).front().logical;
+        }
+        return nullptr;
+    }
+
+    const NTiling::STileModeMap* CModeSet::physicalMappingFor(const CSharedPointer<SOutputMode>& outputMode) const {
+        if (!outputMode)
+            return nullptr;
+        for (size_t index = 0; index < m_modes.size(); ++index) {
+            if (sameOwner(m_modes.at(index).outputMode, outputMode))
+                return &m_definition->physicalMappings().subspan(m_indices.at(index).physical, 1).front();
+        }
+        return nullptr;
+    }
+
+    CGroupProjection::CGroupProjection(eGroupProjection projection, PScanGroupDefinition scanDefinition, CSharedPointer<const CGroupDefinition> allocationDefinition,
+                                       PScanModeDefinition modeDefinition, CSharedPointer<const CModeSet> modeSet, CSharedPointer<const CPlan> plan,
+                                       std::optional<size_t> allocationIndex) :
+        m_projection(projection), m_scanDefinition(std::move(scanDefinition)), m_allocationDefinition(std::move(allocationDefinition)), m_modeDefinition(std::move(modeDefinition)),
+        m_modeSet(std::move(modeSet)), m_plan(std::move(plan)), m_allocationIndex(allocationIndex) {}
+
+    eGroupProjection CGroupProjection::projection() const {
+        return m_projection;
+    }
+
+    const PScanGroupDefinition& CGroupProjection::scanDefinition() const {
+        return m_scanDefinition;
+    }
+
+    const CSharedPointer<const CGroupDefinition>& CGroupProjection::allocationDefinition() const {
+        return m_allocationDefinition;
+    }
+
+    const PScanModeDefinition& CGroupProjection::modeDefinition() const {
+        return m_modeDefinition;
+    }
+
+    const CSharedPointer<const CModeSet>& CGroupProjection::modeSet() const {
+        return m_modeSet;
+    }
+
+    std::optional<std::reference_wrapper<const CGroupAllocation>> CGroupProjection::allocation() const {
+        if (!m_plan || !m_allocationIndex || *m_allocationIndex >= m_plan->groups().size())
+            return std::nullopt;
+        return std::cref(m_plan->groups().at(*m_allocationIndex));
+    }
+
+    CConnectorProjection::CConnectorProjection(uint32_t connectorId, eConnectorProjection projection, NTiledScan::eConnectorRole scanRole,
+                                               NTiledScan::eConnectorDisposition scanDisposition, PScanGroupDefinition scanDefinition) :
+        m_connectorId(connectorId), m_projection(projection), m_scanRole(scanRole), m_scanDisposition(scanDisposition), m_scanDefinition(std::move(scanDefinition)) {}
+
+    uint32_t CConnectorProjection::connectorId() const {
+        return m_connectorId;
+    }
+
+    eConnectorProjection CConnectorProjection::projection() const {
+        return m_projection;
+    }
+
+    NTiledScan::eConnectorRole CConnectorProjection::scanRole() const {
+        return m_scanRole;
+    }
+
+    NTiledScan::eConnectorDisposition CConnectorProjection::scanDisposition() const {
+        return m_scanDisposition;
+    }
+
+    const PScanGroupDefinition& CConnectorProjection::scanDefinition() const {
+        return m_scanDefinition;
+    }
+
+    COutputBridgeObservation::COutputBridgeObservation(PCommittedScan scan, CSharedPointer<const CSnapshot> snapshot,
+                                                       CSharedPointer<const CAllocationObservation> allocationObservation, CSharedPointer<const CPlan> plan,
+                                                       std::vector<CGroupProjection> groups, std::vector<CConnectorProjection> connectors) :
+        m_scan(std::move(scan)), m_snapshot(std::move(snapshot)), m_allocationObservation(std::move(allocationObservation)), m_plan(std::move(plan)), m_groups(std::move(groups)),
+        m_connectors(std::move(connectors)) {}
+
+    const PCommittedScan& COutputBridgeObservation::capturedScan() const {
+        return m_scan;
+    }
+
+    const CSharedPointer<const CSnapshot>& COutputBridgeObservation::capturedSnapshot() const {
+        return m_snapshot;
+    }
+
+    const CSharedPointer<const CAllocationObservation>& COutputBridgeObservation::capturedAllocationObservation() const {
+        return m_allocationObservation;
+    }
+
+    const CSharedPointer<const CPlan>& COutputBridgeObservation::capturedPlan() const {
+        return m_plan;
+    }
+
+    std::span<const CGroupProjection> COutputBridgeObservation::groups() const {
+        return m_groups;
+    }
+
+    std::span<const CConnectorProjection> COutputBridgeObservation::connectors() const {
+        return m_connectors;
+    }
+
+    const CGroupProjection* COutputBridgeObservation::findGroup(const PScanGroupDefinition& definition) const {
+        if (!definition)
+            return nullptr;
+        const auto GROUP = std::ranges::find_if(m_groups, [&](const auto& candidate) { return sameOwner(candidate.scanDefinition(), definition); });
+        return GROUP == m_groups.end() ? nullptr : &*GROUP;
+    }
+
+    const CConnectorProjection* COutputBridgeObservation::findConnector(uint32_t connectorId) const {
+        const auto CONNECTOR = std::ranges::find(m_connectors, connectorId, &CConnectorProjection::connectorId);
+        return CONNECTOR == m_connectors.end() ? nullptr : &*CONNECTOR;
+    }
+
+    CSharedPointer<const CModeSet> COutputBridgeObservation::modeSetFor(const PScanModeDefinition& definition) const {
+        if (!definition)
+            return {};
+        for (const auto& GROUP : m_groups) {
+            if (GROUP.modeDefinition() && sameOwner(GROUP.modeDefinition(), definition))
+                return GROUP.modeSet();
+        }
+        return {};
+    }
+
+    CPreparedOutputBridge::CPreparedOutputBridge(CSharedPointer<COutputBridgeStateAuthority> authority, CSharedPointer<const COutputBridgeObservation> base,
+                                                 CSharedPointer<const COutputBridgeObservation> candidate) :
+        m_authority(std::move(authority)), m_base(std::move(base)), m_candidate(std::move(candidate)) {}
+
+    const CSharedPointer<const COutputBridgeObservation>& CPreparedOutputBridge::base() const {
+        return m_base;
+    }
+
+    const CSharedPointer<const COutputBridgeObservation>& CPreparedOutputBridge::candidate() const {
+        return m_candidate;
+    }
+
+    SPrepareResult::operator bool() const {
+        return prepared && result == ePrepareResult::PREPARED;
+    }
+
+    COutputBridgeState::COutputBridgeState(std::thread::id eventThread) :
+        m_eventThread(eventThread), m_authority(CSharedPointer<COutputBridgeStateAuthority>{new COutputBridgeStateAuthority{}}) {}
+
+    bool COutputBridgeState::onEventThread() const {
+        return std::this_thread::get_id() == m_eventThread;
+    }
+
+    SPrepareResult COutputBridgeState::prepare(const CSharedPointer<const CPlan>& plan) noexcept {
+        if (!onEventThread())
+            return {.result = ePrepareResult::WRONG_THREAD};
+
+        try {
+            auto built = COutputBridgeAssembler::build(plan, m_installed);
+            if (!built.observation) {
+                return {.result = built.error == eBuildError::INVALID_CHAIN ? ePrepareResult::INVALID_CHAIN : ePrepareResult::INVALID_PROJECTION};
+            }
+            CSharedPointer<CPreparedOutputBridge> prepared{new CPreparedOutputBridge{m_authority, m_installed, std::move(built.observation)}};
+            return {.prepared = std::move(prepared), .result = ePrepareResult::PREPARED};
+        } catch (...) { return {.result = ePrepareResult::ALLOCATION_FAILED}; }
+    }
+
+    eInstallResult COutputBridgeState::install(const CSharedPointer<const CPreparedOutputBridge>& prepared, const SCurrentState& current) noexcept {
+        static_assert(std::is_nothrow_copy_constructible_v<CSharedPointer<const COutputBridgeObservation>>);
+        static_assert(std::is_nothrow_move_assignable_v<CSharedPointer<const COutputBridgeObservation>>);
+
+        if (!onEventThread())
+            return eInstallResult::WRONG_THREAD;
+        if (!prepared || !sameOwner(prepared->m_authority, m_authority) || !prepared->candidate())
+            return eInstallResult::FOREIGN_PREPARED;
+        if (!sameOptionalOwner(prepared->base(), m_installed))
+            return eInstallResult::STALE_BASE;
+
+        struct SInstallAction {
+            COutputBridgeState*                            state = nullptr;
+            CSharedPointer<const COutputBridgeObservation> candidate;
+            bool                                           installed = false;
+
+            void                                           operator()(const CPlan&) noexcept {
+                if (std::ranges::any_of(candidate->groups(), [](const auto& group) { return group.modeSet() && !modeOwnersMatchDefinition(*group.modeSet()); }))
+                    return;
+                state->m_installed = std::move(candidate);
+                installed          = true;
+            }
+        };
+
+        SInstallAction action{.state = this, .candidate = prepared->candidate()};
+        try {
+            const std::function<void(const CPlan&)> callback = std::ref(action);
+            if (!NTiledCrtcAllocator::withCurrentPlan(prepared->candidate()->capturedPlan(), current, callback))
+                return eInstallResult::STALE_CURRENT;
+        } catch (...) { return eInstallResult::FAILED; }
+        return action.installed ? eInstallResult::INSTALLED : eInstallResult::FAILED;
+    }
+
+    bool COutputBridgeState::withCurrent(const SCurrentState& current, const std::function<void(const COutputBridgeObservation&)>& callback) const {
+        if (!onEventThread() || !callback || !m_installed)
+            return false;
+        const auto INSTALLED = m_installed;
+        return NTiledCrtcAllocator::withCurrentPlan(INSTALLED->capturedPlan(), current, [&](const CPlan&) { callback(*INSTALLED); });
+    }
+
+    CSharedPointer<const COutputBridgeObservation> COutputBridgeState::diagnosticInstalled() const {
+        return onEventThread() ? m_installed : CSharedPointer<const COutputBridgeObservation>{};
+    }
+
+    bool COutputBridgeState::clear() noexcept {
+        if (!onEventThread())
+            return false;
+        m_installed = {};
+        return true;
+    }
+}
diff --git a/src/backend/drm/TiledOutputBridge.hpp b/src/backend/drm/TiledOutputBridge.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5b2aea360bc4e592a73ddcd4dcb6736f5f2ad60b
--- /dev/null
+++ b/src/backend/drm/TiledOutputBridge.hpp
@@ -0,0 +1,253 @@
+#pragma once
+
+#include "TiledCrtcAllocator.hpp"
+
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <optional>
+#include <span>
+#include <thread>
+#include <vector>
+
+#include <hyprutils/memory/SharedPtr.hpp>
+
+#ifdef __GNUC__
+#define AQ_TILED_OUTPUT_BRIDGE_PRIVATE __attribute__((visibility("hidden")))
+#else
+#define AQ_TILED_OUTPUT_BRIDGE_PRIVATE
+#endif
+
+namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifier-naming): established Aquamarine DRM namespace
+    using Hyprutils::Memory::CSharedPointer;
+    using NTiledCrtcAllocator::CAllocationObservation;
+    using NTiledCrtcAllocator::CGroupAllocation;
+    using NTiledCrtcAllocator::CGroupDefinition;
+    using NTiledCrtcAllocator::CPlan;
+    using NTiledCrtcAllocator::CSnapshot;
+    using NTiledCrtcAllocator::SCurrentState;
+    using NTiledScan::CCommittedScan;
+    using NTiledScan::CScanGroupDefinition;
+    using NTiledScan::CScanModeDefinition;
+    using NTiledScan::PCommittedScan;
+    using NTiledScan::PScanGroupDefinition;
+    using NTiledScan::PScanModeDefinition;
+
+    class COutputBridgeAssembler;
+
+    struct AQ_TILED_OUTPUT_BRIDGE_PRIVATE SModeBinding {
+        CSharedPointer<SOutputMode> outputMode;
+        uint32_t                    logicalModeId = 0;
+    };
+
+    // One immutable association between a current scan mode-definition and
+    // real SOutputMode owners. Reconciled owners never carry freshness: this
+    // object always retains the new exact scan definition and mappings.
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE CModeSet final {
+      public:
+        CModeSet(const CModeSet&)                                                 = delete;
+        CModeSet(CModeSet&&)                                                      = delete;
+        CModeSet&                                      operator=(const CModeSet&) = delete;
+        CModeSet&                                      operator=(CModeSet&&)      = delete;
+
+        [[nodiscard]] const PScanModeDefinition&       definition() const;
+        [[nodiscard]] std::span<const SModeBinding>    modes() const;
+        [[nodiscard]] const NTiling::STileLogicalMode* logicalModeFor(const CSharedPointer<SOutputMode>& outputMode) const;
+        [[nodiscard]] const NTiling::STileModeMap*     physicalMappingFor(const CSharedPointer<SOutputMode>& outputMode) const;
+
+      private:
+        struct SBindingIndex {
+            size_t logical  = 0;
+            size_t physical = 0;
+        };
+
+        CModeSet(PScanModeDefinition definition, std::vector<SModeBinding> modes, std::vector<SBindingIndex> indices);
+
+        PScanModeDefinition        m_definition;
+        std::vector<SModeBinding>  m_modes;
+        std::vector<SBindingIndex> m_indices;
+
+        friend class COutputBridgeAssembler;
+    };
+
+    enum class eGroupProjection : uint8_t {
+        DRIVER_UNIFIED = 0,
+        MULTI_STREAM_ALLOCATED,
+        MULTI_STREAM_FALLBACK,
+    };
+
+    enum class eConnectorProjection : uint8_t {
+        ORDINARY = 0,
+        DRIVER_UNIFIED_PRIMARY,
+        DRIVER_UNIFIED_REDUNDANT,
+        MULTI_STREAM_AGGREGATE_CANDIDATE,
+        MULTI_STREAM_ORDINARY_FALLBACK,
+    };
+
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE CGroupProjection final {
+      public:
+        CGroupProjection(const CGroupProjection&)                                                                      = delete;
+        CGroupProjection(CGroupProjection&&)                                                                           = default;
+        CGroupProjection&                                                           operator=(const CGroupProjection&) = delete;
+        CGroupProjection&                                                           operator=(CGroupProjection&&)      = default;
+
+        [[nodiscard]] eGroupProjection                                              projection() const;
+        [[nodiscard]] const PScanGroupDefinition&                                   scanDefinition() const;
+        [[nodiscard]] const CSharedPointer<const CGroupDefinition>&                 allocationDefinition() const;
+        [[nodiscard]] const PScanModeDefinition&                                    modeDefinition() const;
+        [[nodiscard]] const CSharedPointer<const CModeSet>&                         modeSet() const;
+        [[nodiscard]] std::optional<std::reference_wrapper<const CGroupAllocation>> allocation() const;
+
+      private:
+        CGroupProjection(eGroupProjection projection, PScanGroupDefinition scanDefinition, CSharedPointer<const CGroupDefinition> allocationDefinition,
+                         PScanModeDefinition modeDefinition, CSharedPointer<const CModeSet> modeSet, CSharedPointer<const CPlan> plan, std::optional<size_t> allocationIndex);
+
+        eGroupProjection                       m_projection = eGroupProjection::DRIVER_UNIFIED;
+        PScanGroupDefinition                   m_scanDefinition;
+        CSharedPointer<const CGroupDefinition> m_allocationDefinition;
+        PScanModeDefinition                    m_modeDefinition;
+        CSharedPointer<const CModeSet>         m_modeSet;
+        CSharedPointer<const CPlan>            m_plan;
+        std::optional<size_t>                  m_allocationIndex;
+
+        friend class COutputBridgeAssembler;
+    };
+
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE CConnectorProjection final {
+      public:
+        CConnectorProjection(const CConnectorProjection&)                                      = delete;
+        CConnectorProjection(CConnectorProjection&&)                                           = default;
+        CConnectorProjection&                           operator=(const CConnectorProjection&) = delete;
+        CConnectorProjection&                           operator=(CConnectorProjection&&)      = default;
+
+        [[nodiscard]] uint32_t                          connectorId() const;
+        [[nodiscard]] eConnectorProjection              projection() const;
+        [[nodiscard]] NTiledScan::eConnectorRole        scanRole() const;
+        [[nodiscard]] NTiledScan::eConnectorDisposition scanDisposition() const;
+        [[nodiscard]] const PScanGroupDefinition&       scanDefinition() const;
+
+      private:
+        CConnectorProjection(uint32_t connectorId, eConnectorProjection projection, NTiledScan::eConnectorRole scanRole, NTiledScan::eConnectorDisposition scanDisposition,
+                             PScanGroupDefinition scanDefinition);
+
+        uint32_t                          m_connectorId     = 0;
+        eConnectorProjection              m_projection      = eConnectorProjection::ORDINARY;
+        NTiledScan::eConnectorRole        m_scanRole        = NTiledScan::eConnectorRole::ORDINARY;
+        NTiledScan::eConnectorDisposition m_scanDisposition = NTiledScan::eConnectorDisposition::PUBLISH_ORDINARY;
+        PScanGroupDefinition              m_scanDefinition;
+
+        friend class COutputBridgeAssembler;
+    };
+
+    // Captured immutable evidence only. None of these accessors proves that
+    // the observation remains current. Runtime consumers must enter through
+    // COutputBridgeState::withCurrent().
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE COutputBridgeObservation final {
+      public:
+        COutputBridgeObservation(const COutputBridgeObservation&)                                                    = delete;
+        COutputBridgeObservation(COutputBridgeObservation&&)                                                         = delete;
+        COutputBridgeObservation&                                         operator=(const COutputBridgeObservation&) = delete;
+        COutputBridgeObservation&                                         operator=(COutputBridgeObservation&&)      = delete;
+
+        [[nodiscard]] const PCommittedScan&                               capturedScan() const;
+        [[nodiscard]] const CSharedPointer<const CSnapshot>&              capturedSnapshot() const;
+        [[nodiscard]] const CSharedPointer<const CAllocationObservation>& capturedAllocationObservation() const;
+        [[nodiscard]] const CSharedPointer<const CPlan>&                  capturedPlan() const;
+        [[nodiscard]] std::span<const CGroupProjection>                   groups() const;
+        [[nodiscard]] std::span<const CConnectorProjection>               connectors() const;
+        [[nodiscard]] const CGroupProjection*                             findGroup(const PScanGroupDefinition& definition) const;
+        [[nodiscard]] const CConnectorProjection*                         findConnector(uint32_t connectorId) const;
+        [[nodiscard]] CSharedPointer<const CModeSet>                      modeSetFor(const PScanModeDefinition& definition) const;
+
+      private:
+        COutputBridgeObservation(PCommittedScan scan, CSharedPointer<const CSnapshot> snapshot, CSharedPointer<const CAllocationObservation> allocationObservation,
+                                 CSharedPointer<const CPlan> plan, std::vector<CGroupProjection> groups, std::vector<CConnectorProjection> connectors);
+
+        PCommittedScan                               m_scan;
+        CSharedPointer<const CSnapshot>              m_snapshot;
+        CSharedPointer<const CAllocationObservation> m_allocationObservation;
+        CSharedPointer<const CPlan>                  m_plan;
+        std::vector<CGroupProjection>                m_groups;
+        std::vector<CConnectorProjection>            m_connectors;
+
+        friend class COutputBridgeAssembler;
+    };
+
+    class COutputBridgeStateAuthority final {};
+
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE CPreparedOutputBridge final {
+      public:
+        CPreparedOutputBridge(const CPreparedOutputBridge&)                                                         = delete;
+        CPreparedOutputBridge(CPreparedOutputBridge&&)                                                              = delete;
+        CPreparedOutputBridge&                                              operator=(const CPreparedOutputBridge&) = delete;
+        CPreparedOutputBridge&                                              operator=(CPreparedOutputBridge&&)      = delete;
+
+        [[nodiscard]] const CSharedPointer<const COutputBridgeObservation>& base() const;
+        [[nodiscard]] const CSharedPointer<const COutputBridgeObservation>& candidate() const;
+
+      private:
+        CPreparedOutputBridge(CSharedPointer<COutputBridgeStateAuthority> authority, CSharedPointer<const COutputBridgeObservation> base,
+                              CSharedPointer<const COutputBridgeObservation> candidate);
+
+        CSharedPointer<COutputBridgeStateAuthority>    m_authority;
+        CSharedPointer<const COutputBridgeObservation> m_base;
+        CSharedPointer<const COutputBridgeObservation> m_candidate;
+
+        friend class COutputBridgeState;
+    };
+
+    enum class ePrepareResult : uint8_t {
+        PREPARED = 0,
+        WRONG_THREAD,
+        INVALID_CHAIN,
+        INVALID_PROJECTION,
+        ALLOCATION_FAILED,
+    };
+
+    struct AQ_TILED_OUTPUT_BRIDGE_PRIVATE SPrepareResult {
+        CSharedPointer<const CPreparedOutputBridge> prepared;
+        ePrepareResult                              result = ePrepareResult::INVALID_CHAIN;
+
+        explicit                                    operator bool() const;
+    };
+
+    enum class eInstallResult : uint8_t {
+        INSTALLED = 0,
+        WRONG_THREAD,
+        FOREIGN_PREPARED,
+        STALE_BASE,
+        STALE_CURRENT,
+        FAILED,
+    };
+
+    class AQ_TILED_OUTPUT_BRIDGE_PRIVATE COutputBridgeState final {
+      public:
+        explicit COutputBridgeState(std::thread::id eventThread = std::this_thread::get_id());
+
+        COutputBridgeState(const COutputBridgeState&)                     = delete;
+        COutputBridgeState(COutputBridgeState&&)                          = delete;
+        COutputBridgeState&          operator=(const COutputBridgeState&) = delete;
+        COutputBridgeState&          operator=(COutputBridgeState&&)      = delete;
+
+        [[nodiscard]] SPrepareResult prepare(const CSharedPointer<const CPlan>& plan) noexcept;
+        [[nodiscard]] eInstallResult install(const CSharedPointer<const CPreparedOutputBridge>& prepared, const SCurrentState& current) noexcept;
+
+        // The callback is synchronous and executes only while the allocator's
+        // exact current-plan gate holds the production backend alive.
+        [[nodiscard]] bool withCurrent(const SCurrentState& current, const std::function<void(const COutputBridgeObservation&)>& callback) const;
+
+        // Diagnostics/tests only. This owner may be stale immediately after
+        // it is returned and must never authorize output or KMS behavior.
+        [[nodiscard]] CSharedPointer<const COutputBridgeObservation> diagnosticInstalled() const;
+        [[nodiscard]] bool                                           clear() noexcept;
+
+      private:
+        [[nodiscard]] bool                             onEventThread() const;
+
+        std::thread::id                                m_eventThread;
+        CSharedPointer<COutputBridgeStateAuthority>    m_authority;
+        CSharedPointer<const COutputBridgeObservation> m_installed;
+    };
+}
+
+#undef AQ_TILED_OUTPUT_BRIDGE_PRIVATE
diff --git a/tests/TiledOutputBridge.cpp b/tests/TiledOutputBridge.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..aed1b96cfe10cc89f3f3b0081816ab78f7d07045
--- /dev/null
+++ b/tests/TiledOutputBridge.cpp
@@ -0,0 +1,420 @@
+#include "backend/drm/TiledOutputBridge.hpp"
+
+#include <algorithm>
+#include <cstdint>
+#include <iostream>
+#include <map>
+#include <ranges>
+#include <string_view>
+#include <thread>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+namespace Aquamarine::NDRM::NTiledScan {
+    // Source-private seam for constructing coherent immutable scan authority.
+    // Production reaches these constructors only through CTiledBackendState.
+    class CScanFixtureAuthority final {
+      public:
+        static PCommittedScan mint(const PSessionIncarnation& session, std::vector<uint32_t> connectorIds, std::vector<NTiling::STileGroup> groups, uint64_t serial,
+                                   uint32_t physicalClock = 1000) {
+            if (!session || !session->valid() || session->eventThread() != std::this_thread::get_id() || serial == 0)
+                return {};
+            const auto backend = session->backend().lock();
+            if (!backend)
+                return {};
+
+            std::ranges::sort(connectorIds);
+            const auto                       state       = PStateAuthority{new CStateAuthority{}};
+            const auto                       observation = PScanObservation{new CScanObservation{session, serial, serial}};
+            const auto                       ticket      = PScanAttemptTicket{new CScanAttemptTicket{state, backend, session->device(), session, observation, serial}};
+
+            std::vector<SConnectorView>      views;
+            std::vector<SCommittedConnector> connectors;
+            for (const auto id : connectorIds) {
+                views.push_back({.connectorId = id});
+                connectors.push_back({.view = {.connectorId = id}, .projection = {.connectorId = id}});
+            }
+            const auto                        attempt = PScanAttempt{new CScanAttempt{ticket, eScanCompleteness::COMPLETE, std::move(views)}};
+
+            std::vector<PScanGroupDefinition> definitions;
+            std::vector<PScanModeDefinition>  modeDefinitions;
+            for (auto& group : groups) {
+                std::ranges::sort(group.members, [](const auto& lhs, const auto& rhs) {
+                    return std::tie(lhs.tileVLoc, lhs.tileHLoc, lhs.connectorId) < std::tie(rhs.tileVLoc, rhs.tileHLoc, rhs.connectorId);
+                });
+                const auto definition = PScanGroupDefinition{new CScanGroupDefinition{session->device(), session, std::move(group)}};
+                definitions.push_back(definition);
+
+                PScanModeDefinition modes;
+                if (definition->group().kind == NTiling::eTileGroupKind::MULTI_STREAM) {
+                    NTiling::STileModeSynthesisResult synthesis;
+                    synthesis.modes.push_back({
+                        .id          = 1,
+                        .width       = definition->group().width,
+                        .height      = definition->group().height,
+                        .refreshRate = 60000,
+                        .preferred   = true,
+                        .refresh     = {.numerator = 60, .denominator = 1},
+                    });
+                    NTiling::STileModeMap mapping{.logicalModeId = 1};
+                    for (const auto& member : definition->group().members) {
+                        const drmModeModeInfo modeInfo = {
+                            .clock       = physicalClock,
+                            .hdisplay    = static_cast<uint16_t>(member.width),
+                            .hsync_start = static_cast<uint16_t>(member.width + 1),
+                            .hsync_end   = static_cast<uint16_t>(member.width + 2),
+                            .htotal      = static_cast<uint16_t>(member.width + 3),
+                            .vdisplay    = static_cast<uint16_t>(member.height),
+                            .vsync_start = static_cast<uint16_t>(member.height + 1),
+                            .vsync_end   = static_cast<uint16_t>(member.height + 2),
+                            .vtotal      = static_cast<uint16_t>(member.height + 3),
+                            .vrefresh    = 60,
+                        };
+                        mapping.members.push_back({.connectorId = member.connectorId, .modeInfo = modeInfo});
+                    }
+                    synthesis.mappings.push_back(std::move(mapping));
+                    modes = PScanModeDefinition{new CScanModeDefinition{definition, std::move(synthesis)}};
+                    modeDefinitions.push_back(modes);
+                }
+
+                for (const auto& member : definition->group().members) {
+                    const auto connector = std::ranges::find(connectors, member.connectorId, [](const auto& candidate) { return candidate.view.connectorId; });
+                    if (connector == connectors.end())
+                        return {};
+                    connector->projection.definition = definition;
+                    connector->projection.modes      = modes;
+                    if (definition->group().kind == NTiling::eTileGroupKind::MULTI_STREAM) {
+                        connector->projection.role =
+                            member.connectorId == definition->group().primaryConnector ? eConnectorRole::MULTI_STREAM_PRIMARY : eConnectorRole::MULTI_STREAM_MEMBER;
+                    } else if (member.connectorId == definition->group().primaryConnector) {
+                        connector->projection.role = eConnectorRole::DRIVER_UNIFIED_PRIMARY;
+                    } else {
+                        connector->projection.role        = eConnectorRole::DRIVER_UNIFIED_REDUNDANT;
+                        connector->projection.disposition = eConnectorDisposition::SUPPRESS_REDUNDANT;
+                    }
+                }
+            }
+            return PCommittedScan{new CCommittedScan{attempt, std::move(connectors), std::move(definitions), std::move(modeDefinitions)}};
+        }
+    };
+}
+
+using namespace Aquamarine;
+using namespace Aquamarine::NDRM::NTiledCrtcAllocator;
+using namespace Aquamarine::NDRM::NTiledOutputBridge;
+using namespace Aquamarine::NDRM::NTiledScan;
+using Hyprutils::Memory::CSharedPointer;
+using Hyprutils::Memory::makeShared;
+
+namespace {
+    int  FAILURES = 0;
+
+    void check(bool condition, std::string_view expression, int line) {
+        if (condition)
+            return;
+        std::cerr << __FILE__ << ':' << line << ": check failed: " << expression << '\n';
+        ++FAILURES;
+    }
+
+#define CHECK(condition) check((condition), #condition, __LINE__)
+
+    template <typename T, typename U>
+    bool sameOwner(const CSharedPointer<T>& lhs, const CSharedPointer<U>& rhs) {
+        return lhs.impl_ != nullptr && lhs.impl_ == rhs.impl_;
+    }
+
+    NTiling::STileGroup tiledGroup(uint64_t deviceId, uint32_t groupId, std::vector<uint32_t> connectorIds, NTiling::eTileGroupKind kind) {
+        NTiling::STileGroup result{
+            .key              = {.deviceId = deviceId, .groupId = groupId},
+            .isSingleMonitor  = true,
+            .numHTile         = static_cast<uint32_t>(connectorIds.size()),
+            .numVTile         = 1,
+            .width            = static_cast<uint32_t>(connectorIds.size() * 100),
+            .height           = 50,
+            .kind             = kind,
+            .primaryConnector = connectorIds.front(),
+        };
+        for (size_t index = 0; index < connectorIds.size(); ++index) {
+            result.members.push_back({
+                .connectorId = connectorIds.at(index),
+                .tileHLoc    = static_cast<uint32_t>(index),
+                .tileVLoc    = 0,
+                .x           = static_cast<uint32_t>(index * 100),
+                .y           = 0,
+                .width       = 100,
+                .height      = 50,
+            });
+        }
+        return result;
+    }
+
+    struct SResources {
+        std::vector<CSharedPointer<SDRMConnector>> connectors;
+        std::vector<CSharedPointer<SDRMCRTC>>      crtcs;
+        std::vector<CSharedPointer<SDRMPlane>>     planes;
+
+        SResources(std::vector<uint32_t> connectorIds, size_t routeCount) {
+            for (const auto id : connectorIds) {
+                auto connector = makeShared<SDRMConnector>();
+                connector->id  = id;
+                connectors.push_back(std::move(connector));
+            }
+            for (size_t index = 0; index < routeCount; ++index) {
+                auto crtc = makeShared<SDRMCRTC>();
+                crtc->id  = static_cast<uint32_t>(100 + index);
+                crtcs.push_back(std::move(crtc));
+                auto plane  = makeShared<SDRMPlane>();
+                plane->id   = static_cast<uint32_t>(200 + index);
+                plane->type = DRM_PLANE_TYPE_PRIMARY;
+                planes.push_back(std::move(plane));
+            }
+        }
+    };
+
+    struct SFixture {
+        PBackendLifetime    backend;
+        PDeviceIncarnation  device;
+        PSessionIncarnation session;
+        SResources          resources;
+
+        SFixture(std::vector<uint32_t> connectorIds, size_t routeCount) :
+            backend(CBackendLifetime::createTestToken(1)), device(CDeviceIncarnation::create(backend, 900, 9, 27, 2)),
+            session(CSessionIncarnation::create(backend, device, std::this_thread::get_id(), 17, 1, 3)), resources(std::move(connectorIds), routeCount) {}
+    };
+
+    const SConnectorResource* connectorResource(const CSharedPointer<const CSnapshot>& snapshot, uint32_t id) {
+        const auto found = std::ranges::find(snapshot->connectors(), id, [](const auto& resource) { return resource.connector->id; });
+        return found == snapshot->connectors().end() ? nullptr : &*found;
+    }
+
+    CSharedPointer<const CSnapshot> snapshotFor(const PCommittedScan& scan, const SResources& resources, uint64_t allocationEpoch) {
+        std::vector<SConnectorCapture>    connectors;
+        std::vector<SCRTCCapture>         crtcs;
+        std::vector<SPrimaryPlaneCapture> planes;
+        std::vector<uint32_t>             routeIds;
+        connectors.reserve(resources.connectors.size());
+        crtcs.reserve(resources.crtcs.size());
+        planes.reserve(resources.planes.size());
+        routeIds.reserve(resources.crtcs.size());
+        for (const auto& crtc : resources.crtcs)
+            routeIds.push_back(crtc->id);
+        for (const auto& connector : resources.connectors)
+            connectors.push_back({.connector = connector, .possibleCRTCIDs = routeIds});
+        for (const auto& crtc : resources.crtcs)
+            crtcs.push_back({.crtc = crtc});
+        for (const auto& plane : resources.planes)
+            planes.push_back({.plane = plane, .possibleCRTCIDs = routeIds, .usable = true});
+        return CSnapshot::create(scan, allocationEpoch, std::move(connectors), std::move(crtcs), std::move(planes));
+    }
+
+    CSharedPointer<const CGroupDefinition> allocationDefinition(const CSharedPointer<const CSnapshot>& snapshot) {
+        const auto found =
+            std::ranges::find_if(snapshot->scan()->definitions(), [](const auto& definition) { return definition->group().kind == NTiling::eTileGroupKind::MULTI_STREAM; });
+        return found == snapshot->scan()->definitions().end() ? CSharedPointer<const CGroupDefinition>{} : CGroupDefinition::create(*found);
+    }
+
+    SConnectorHandle connectorHandle(const CSharedPointer<const CSnapshot>& snapshot, uint32_t id) {
+        const auto* resource = connectorResource(snapshot, id);
+        CHECK(resource != nullptr);
+        return resource ? SConnectorHandle{.id = id, .incarnation = resource->incarnation} : SConnectorHandle{};
+    }
+
+    CSharedPointer<const CPlan> planFor(const CSharedPointer<const CSnapshot>& snapshot, std::vector<uint32_t> ordinaryIds = {}) {
+        const auto definition = allocationDefinition(snapshot);
+        CHECK(static_cast<bool>(definition));
+        SGroupRequest group{.definition = definition};
+        for (const auto& member : definition->group().members)
+            group.connectors.push_back(connectorHandle(snapshot, member.connectorId));
+        std::vector<SOrdinaryRequest> ordinary;
+        ordinary.reserve(ordinaryIds.size());
+        for (const auto id : ordinaryIds)
+            ordinary.push_back({.connector = connectorHandle(snapshot, id)});
+        const SAllocationEpoch epoch{
+            .session     = snapshot->session()->sessionEpoch(),
+            .allocation  = snapshot->allocationEpoch(),
+            .eventThread = snapshot->session()->eventThreadEpoch(),
+        };
+        const auto observation = CAllocationObservation::create(snapshot->scan(), snapshot, {definition}, {}, {std::move(group)}, std::move(ordinary), {}, {}, epoch);
+        CHECK(static_cast<bool>(observation));
+        const auto plan = Aquamarine::NDRM::NTiledCrtcAllocator::solve(observation);
+        CHECK(plan && plan->status() == ePlanStatus::READY);
+        return plan;
+    }
+
+    SCurrentState currentFor(const CSharedPointer<const CPlan>& plan) {
+        return {
+            .backendLifetime = plan->snapshot()->device()->backend().lock(),
+            .device          = plan->snapshot()->device(),
+            .session         = plan->snapshot()->session(),
+            .scan            = plan->snapshot()->scan(),
+            .scanObservation = plan->snapshot()->observation(),
+            .snapshot        = plan->snapshot(),
+            .observation     = plan->observation(),
+            .epoch           = plan->observation()->epoch(),
+        };
+    }
+
+    const CGroupProjection* groupOf(const CSharedPointer<const COutputBridgeObservation>& observation, NTiling::eTileGroupKind kind) {
+        const auto found = std::ranges::find_if(observation->groups(), [kind](const auto& group) { return group.scanDefinition()->group().kind == kind; });
+        return found == observation->groups().end() ? nullptr : &*found;
+    }
+}
+
+int main() {
+    SFixture           allocatedFixture({1, 2, 3, 4}, 3);
+    const auto         multi     = tiledGroup(allocatedFixture.device->deviceId(), 11, {1, 2}, NTiling::eTileGroupKind::MULTI_STREAM);
+    const auto         unified   = tiledGroup(allocatedFixture.device->deviceId(), 12, {3, 4}, NTiling::eTileGroupKind::DRIVER_UNIFIED);
+    const auto         scan1     = CScanFixtureAuthority::mint(allocatedFixture.session, {1, 2, 3, 4}, {multi, unified}, 10);
+    const auto         snapshot1 = snapshotFor(scan1, allocatedFixture.resources, 1);
+    const auto         plan1     = planFor(snapshot1, {3});
+
+    COutputBridgeState state;
+    const auto         prepared1 = state.prepare(plan1);
+    CHECK(static_cast<bool>(prepared1));
+    CHECK(state.install(prepared1.prepared, currentFor(plan1)) == eInstallResult::INSTALLED);
+    const auto installed1 = state.diagnosticInstalled();
+    CHECK(sameOwner(installed1->capturedScan(), scan1));
+    CHECK(sameOwner(installed1->capturedSnapshot(), snapshot1));
+    CHECK(sameOwner(installed1->capturedAllocationObservation(), plan1->observation()));
+    CHECK(sameOwner(installed1->capturedPlan(), plan1));
+
+    const auto*             allocated     = groupOf(installed1, NTiling::eTileGroupKind::MULTI_STREAM);
+    const auto*             driver        = groupOf(installed1, NTiling::eTileGroupKind::DRIVER_UNIFIED);
+    const CGroupAllocation* allocatedPlan = nullptr;
+    if (allocated) {
+        const auto allocation = allocated->allocation();
+        if (allocation)
+            allocatedPlan = &allocation->get();
+    }
+    CHECK(allocated && allocated->projection() == eGroupProjection::MULTI_STREAM_ALLOCATED);
+    CHECK(allocated && allocated->allocation().has_value());
+    CHECK(allocatedPlan && allocatedPlan->status() == eGroupStatus::ALLOCATED);
+    CHECK(allocatedPlan && allocatedPlan->bindings().size() == 2);
+    CHECK(allocated && allocated->modeSet() && allocated->modeSet()->modes().size() == 1);
+    CHECK(driver && driver->projection() == eGroupProjection::DRIVER_UNIFIED);
+    CHECK(driver && !driver->allocation().has_value());
+    CHECK(driver && !driver->allocationDefinition() && !driver->modeDefinition() && !driver->modeSet());
+    CHECK(installed1->findConnector(3) && installed1->findConnector(3)->projection() == eConnectorProjection::DRIVER_UNIFIED_PRIMARY);
+    CHECK(installed1->findConnector(4) && installed1->findConnector(4)->projection() == eConnectorProjection::DRIVER_UNIFIED_REDUNDANT);
+    CHECK(installed1->findConnector(4) && installed1->findConnector(4)->scanDisposition() == eConnectorDisposition::SUPPRESS_REDUNDANT);
+    CHECK(installed1->findConnector(1) && installed1->findConnector(1)->projection() == eConnectorProjection::MULTI_STREAM_AGGREGATE_CANDIDATE);
+
+    const auto mode1 = allocated->modeSet()->modes().front().outputMode;
+    CHECK(mode1 && !mode1->modeInfo.has_value());
+    CHECK(allocated->modeSet()->logicalModeFor(mode1) != nullptr);
+    CHECK(allocated->modeSet()->physicalMappingFor(mode1) != nullptr);
+    auto equalButForeign         = makeShared<SOutputMode>();
+    equalButForeign->pixelSize   = mode1->pixelSize;
+    equalButForeign->refreshRate = mode1->refreshRate;
+    equalButForeign->preferred   = mode1->preferred;
+    CHECK(allocated->modeSet()->physicalMappingFor(equalButForeign) == nullptr);
+
+    int currentCallbacks = 0;
+    CHECK(state.withCurrent(currentFor(plan1), [&](const COutputBridgeObservation& current) {
+        CHECK(sameOwner(current.capturedPlan(), plan1));
+        ++currentCallbacks;
+    }));
+    CHECK(currentCallbacks == 1);
+
+    // A new allocator snapshot over the exact scan definition reuses the whole
+    // CModeSet and its stable SOutputMode owner.
+    const auto snapshot2 = snapshotFor(scan1, allocatedFixture.resources, 2);
+    const auto plan2     = planFor(snapshot2, {3});
+    const auto prepared2 = state.prepare(plan2);
+    CHECK(static_cast<bool>(prepared2));
+    const auto  candidate2 = prepared2.prepared->candidate();
+    const auto* allocated2 = groupOf(candidate2, NTiling::eTileGroupKind::MULTI_STREAM);
+    CHECK(allocated2 && sameOwner(allocated2->modeSet(), allocated->modeSet()));
+    CHECK(allocated2 && sameOwner(allocated2->modeSet()->modes().front().outputMode, mode1));
+    CHECK(state.install(prepared2.prepared, currentFor(plan2)) == eInstallResult::INSTALLED);
+
+    // Session freshness is reminted, but identical validated topology and
+    // exact ordered mappings retain mode pointers in a new current CModeSet.
+    const auto session2  = CSessionIncarnation::create(allocatedFixture.backend, allocatedFixture.device, std::this_thread::get_id(), 18, 2, 20);
+    const auto scan2     = CScanFixtureAuthority::mint(session2, {1, 2, 3, 4}, {multi, unified}, 21);
+    const auto snapshot3 = snapshotFor(scan2, allocatedFixture.resources, 3);
+    const auto plan3     = planFor(snapshot3, {3});
+    const auto prepared3 = state.prepare(plan3);
+    CHECK(static_cast<bool>(prepared3));
+    const auto  candidate3 = prepared3.prepared->candidate();
+    const auto* allocated3 = groupOf(candidate3, NTiling::eTileGroupKind::MULTI_STREAM);
+    CHECK(allocated3 && !sameOwner(allocated3->modeSet(), allocated2->modeSet()));
+    CHECK(allocated3 && sameOwner(allocated3->modeDefinition(), scan2->modeDefinitions().front()));
+    CHECK(allocated3 && sameOwner(allocated3->modeSet()->modes().front().outputMode, mode1));
+    CHECK(state.install(prepared3.prepared, currentFor(plan3)) == eInstallResult::INSTALLED);
+
+    // A physical mapping change is material even when the logical dimensions
+    // match: the new bridge gets fresh public mode identity.
+    const auto session3  = CSessionIncarnation::create(allocatedFixture.backend, allocatedFixture.device, std::this_thread::get_id(), 19, 3, 30);
+    const auto scan3     = CScanFixtureAuthority::mint(session3, {1, 2, 3, 4}, {multi, unified}, 31, 1001);
+    const auto plan4     = planFor(snapshotFor(scan3, allocatedFixture.resources, 4), {3});
+    const auto prepared4 = state.prepare(plan4);
+    CHECK(static_cast<bool>(prepared4));
+    const auto* allocated4 = groupOf(prepared4.prepared->candidate(), NTiling::eTileGroupKind::MULTI_STREAM);
+    CHECK(allocated4 && !sameOwner(allocated4->modeSet()->modes().front().outputMode, mode1));
+    CHECK(allocated4 && allocated4->modeSet()->physicalMappingFor(mode1) == nullptr);
+
+    // Reused public owners are checked again under the exact-current install
+    // gate. Mutation after prepare must reject the swap.
+    const auto snapshot4      = snapshotFor(scan2, allocatedFixture.resources, 5);
+    const auto plan5          = planFor(snapshot4, {3});
+    const auto preparedToctou = state.prepare(plan5);
+    CHECK(static_cast<bool>(preparedToctou));
+    CHECK(sameOwner(groupOf(preparedToctou.prepared->candidate(), NTiling::eTileGroupKind::MULTI_STREAM)->modeSet()->modes().front().outputMode, mode1));
+    const auto beforeToctou = state.diagnosticInstalled();
+    mode1->refreshRate      = 12345;
+    CHECK(state.install(preparedToctou.prepared, currentFor(plan5)) == eInstallResult::FAILED);
+    CHECK(sameOwner(state.diagnosticInstalled(), beforeToctou));
+    CHECK(mode1->refreshRate == 12345);
+
+    // Preparing against the exact same definition must not repair or otherwise
+    // mutate an already-installed public owner. A damaged prior owner is not
+    // reused by the new candidate.
+    const auto prepared5 = state.prepare(plan5);
+    CHECK(static_cast<bool>(prepared5));
+    const auto* allocated5 = groupOf(prepared5.prepared->candidate(), NTiling::eTileGroupKind::MULTI_STREAM);
+    CHECK(mode1->refreshRate == 12345);
+    CHECK(allocated5 && !sameOwner(allocated5->modeSet()->modes().front().outputMode, mode1));
+    CHECK(allocated5 && allocated5->modeSet()->modes().front().outputMode->refreshRate == 60000);
+    CHECK(allocated5 && !allocated5->modeSet()->modes().front().outputMode->modeInfo.has_value());
+
+    // Current-plan and optimistic-base failures leave the installed owner
+    // unchanged.
+    const auto beforeRejected = state.diagnosticInstalled();
+    CHECK(state.install(prepared5.prepared, currentFor(plan1)) == eInstallResult::STALE_CURRENT);
+    CHECK(sameOwner(state.diagnosticInstalled(), beforeRejected));
+    CHECK(state.install(prepared5.prepared, currentFor(plan5)) == eInstallResult::INSTALLED);
+    CHECK(state.install(prepared4.prepared, currentFor(plan4)) == eInstallResult::STALE_BASE);
+    CHECK(sameOwner(state.diagnosticInstalled(), prepared5.prepared->candidate()));
+    CHECK(!state.withCurrent(currentFor(plan1), [&](const COutputBridgeObservation&) { ++currentCallbacks; }));
+    CHECK(currentCallbacks == 1);
+
+    // With one route, a two-member group is NO_MATCH and every member remains
+    // an ordinary fallback. Driver-unified scan behavior is not involved.
+    SFixture           fallbackFixture({10, 11}, 1);
+    const auto         fallbackTopology = tiledGroup(fallbackFixture.device->deviceId(), 22, {10, 11}, NTiling::eTileGroupKind::MULTI_STREAM);
+    const auto         fallbackScan     = CScanFixtureAuthority::mint(fallbackFixture.session, {10, 11}, {fallbackTopology}, 40);
+    const auto         fallbackPlan     = planFor(snapshotFor(fallbackScan, fallbackFixture.resources, 1));
+    COutputBridgeState fallbackState;
+    const auto         fallbackPrepared = fallbackState.prepare(fallbackPlan);
+    CHECK(static_cast<bool>(fallbackPrepared));
+    CHECK(fallbackState.install(fallbackPrepared.prepared, currentFor(fallbackPlan)) == eInstallResult::INSTALLED);
+    const auto              fallback           = fallbackState.diagnosticInstalled();
+    const auto*             fallbackGroup      = groupOf(fallback, NTiling::eTileGroupKind::MULTI_STREAM);
+    const CGroupAllocation* fallbackAllocation = nullptr;
+    if (fallbackGroup) {
+        const auto allocation = fallbackGroup->allocation();
+        if (allocation)
+            fallbackAllocation = &allocation->get();
+    }
+    CHECK(fallbackGroup && fallbackGroup->projection() == eGroupProjection::MULTI_STREAM_FALLBACK);
+    CHECK(fallbackAllocation && fallbackAllocation->status() == eGroupStatus::NO_MATCH);
+    CHECK(fallbackAllocation && fallbackAllocation->bindings().empty());
+    CHECK(fallback->findConnector(10) && fallback->findConnector(10)->projection() == eConnectorProjection::MULTI_STREAM_ORDINARY_FALLBACK);
+    CHECK(fallback->findConnector(11) && fallback->findConnector(11)->projection() == eConnectorProjection::MULTI_STREAM_ORDINARY_FALLBACK);
+    CHECK(fallback->findConnector(10) && fallback->findConnector(10)->scanDisposition() == eConnectorDisposition::PUBLISH_ORDINARY);
+    CHECK(fallback->findConnector(11) && fallback->findConnector(11)->scanDisposition() == eConnectorDisposition::PUBLISH_ORDINARY);
+
+    return FAILURES == 0 ? 0 : 1;
+}
diff --git a/tests/TiledVisibility.cmake b/tests/TiledVisibility.cmake
index eca8280dc7f5718fc7f1fa60ff0e72c257307c0d..bf6c7ec9584d9e41a27e6c5f18c52cf702eceddf 100644
--- a/tests/TiledVisibility.cmake
+++ b/tests/TiledVisibility.cmake
@@ -74,6 +74,6 @@ if(NOT demangle_result EQUAL 0)
 endif()
 
 if(demangled_output MATCHES
-   "Aquamarine::(NTiling|TiledCrtcAllocator)::|Aquamarine::NDRM::NTiled(CrtcAllocator|Incarnations|Scan|DRMIntegration)::|Aquamarine::NDRM::.*(Tile|tile|PlaneViewport|PlaneFormats|intersectPlaneFormats|encodePlaneViewport)")
+   "Aquamarine::(NTiling|TiledCrtcAllocator)::|Aquamarine::NDRM::NTiled(CrtcAllocator|Incarnations|Scan|DRMIntegration|OutputBridge)::|Aquamarine::NDRM::.*(Tile|tile|PlaneViewport|PlaneFormats|intersectPlaneFormats|encodePlaneViewport)")
   message(FATAL_ERROR "source-private TILE symbol family is dynamically exported")
 endif()