[idd] capture: execute texture frame graphs

This commit is contained in:
Geoffrey McRae
2026-08-13 21:56:41 +10:00
parent deb963774e
commit 70bc66b3f1
25 changed files with 1484 additions and 111 deletions

View File

@@ -490,6 +490,24 @@ void CTexHub::Abort(CTexStage& stage) noexcept
drop.reset();
}
void CTexHub::Fault(
const FrameIn& frame, PushResult result) noexcept
{
if (result != PushResult::REJECTED && result != PushResult::FAILED)
return;
std::shared_ptr<CTexSet> set;
unsigned index;
ITexSink * sink = nullptr;
if (!Enter(frame, true, set, index, sink))
{
if (set)
Leave(set, TRANSPORT_MAX_INSTANCES);
return;
}
Finish(set, index, result);
}
PushResult CTexHub::Push(FrameIn frame, TexLease lease) noexcept
{
std::shared_ptr<CTexSet> set;

View File

@@ -90,19 +90,18 @@ private:
std::shared_ptr<CTexSet> m_active;
std::shared_ptr<CTexSet> m_pending;
std::atomic<uint64_t> & m_rev;
HANDLE m_idle = nullptr;
unsigned m_calls = 0;
bool m_open = true;
bool m_changing = false;
bool m_stopped = false;
FaultRec m_faults[MAX_FAULTS] = {};
unsigned m_faultCount = 0;
Failure m_failures[TRANSPORT_MAX_INSTANCES] = {};
unsigned m_failureCount = 0;
HANDLE m_idle = nullptr;
unsigned m_calls = 0;
bool m_open = true;
bool m_changing = false;
bool m_stopped = false;
FaultRec m_faults[MAX_FAULTS] = {};
unsigned m_faultCount = 0;
Failure m_failures[TRANSPORT_MAX_INSTANCES] = {};
unsigned m_failureCount = 0;
static bool Match(const FaultRec& fault, BackendId id, uint32_t epoch,
const FrameCfg& cfg, bool anyCfg = false);
bool Enter(const FrameIn& frame, bool lease,
std::shared_ptr<CTexSet>& set, unsigned& route, ITexSink *& sink);
void Finish(const std::shared_ptr<CTexSet>& set, unsigned route,
@@ -135,6 +134,7 @@ private:
void Stop();
public:
void Fault(const FrameIn& frame, PushResult result) noexcept;
PushResult Push(FrameIn frame, TexLease lease) noexcept;
PushResult Push(FrameIn frame, D11Lease lease) noexcept;
};

View File

@@ -809,15 +809,15 @@ void CTransportManager::RetryEntry(Entry& entry, uint64_t now,
const bool frameService =
(entry.config.services & TRANSPORT_SERVICE_FRAME) != 0;
entry.transport.reset();
entry.directMemory = DirectFrameBufferMemory {};
entry.directMemory = DirectFrameBufferMemory {};
entry.directMemoryValid = false;
entry.setupDone = false;
entry.controlFailed = false;
entry.controlAbsent = false;
entry.inputFailed = false;
entry.inputAbsent = false;
entry.frameAbsent = false;
entry.serviceRetryAt = 0;
entry.setupDone = false;
entry.controlFailed = false;
entry.controlAbsent = false;
entry.inputFailed = false;
entry.inputAbsent = false;
entry.frameAbsent = false;
entry.serviceRetryAt = 0;
Seq::Inc(entry.epoch);
if (frameService)
BumpFrameRev();
@@ -1254,7 +1254,7 @@ CfgResult CTransportManager::Cfg(const GraphCfg& cfg,
break;
if (!next.Add(route.id, route.epoch, route.required,
route.primary, candidate))
route.primary, route.texSink != nullptr, candidate))
{
route.transport->Abort();
routeResult = CfgResult::FAILED;