mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[idd] capture: restore direct software publication
This commit is contained in:
@@ -666,13 +666,17 @@ bool CFrameHub::GetFramePlan(
|
||||
return plan.count != 0;
|
||||
}
|
||||
|
||||
bool CFrameHub::GetImmediateFramePlan(uint64_t now, FramePlan& plan)
|
||||
bool CFrameHub::GetImmediatePrimaryFramePlan(
|
||||
uint64_t now, FramePlan& plan)
|
||||
{
|
||||
plan = {};
|
||||
SinkRef refs[FRAME_MAX_SINKS];
|
||||
const unsigned count = Snapshot(refs);
|
||||
for (unsigned i = 0; i < count; ++i)
|
||||
{
|
||||
if (!refs[i].primary)
|
||||
continue;
|
||||
|
||||
Sink& sink = *refs[i].sink;
|
||||
CSRWSharedLock call(sink.callLock);
|
||||
if (!Atomic::Load(sink.active, std::memory_order_acquire) ||
|
||||
@@ -693,8 +697,9 @@ bool CFrameHub::GetImmediateFramePlan(uint64_t now, FramePlan& plan)
|
||||
CFrameScheduler::Schedule schedule = {};
|
||||
bool periodic = false;
|
||||
bool republish = false;
|
||||
sink.target->GetPublishTarget(
|
||||
now, target, schedule, periodic, republish);
|
||||
if (!sink.target->GetPublishTarget(
|
||||
now, target, schedule, periodic, republish))
|
||||
continue;
|
||||
|
||||
if (plan.count == FRAME_MAX_SINKS)
|
||||
continue;
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
bool NeedsFrame() const override;
|
||||
bool GetFramePlan(
|
||||
uint64_t now, bool productReady, FramePlan& plan) override;
|
||||
bool GetImmediateFramePlan(
|
||||
bool GetImmediatePrimaryFramePlan(
|
||||
uint64_t now, FramePlan& plan) override;
|
||||
void MissFramePlan(const FramePlan& plan, uint64_t now) override;
|
||||
bool PrepareFrameBatch(const FramePlan& plan,
|
||||
|
||||
@@ -1214,15 +1214,28 @@ CfgResult CTransportManager::Cfg(const GraphCfg& cfg,
|
||||
{
|
||||
Entry& entry = *entries[i];
|
||||
bool frameService = false;
|
||||
bool required = false;
|
||||
bool required = false;
|
||||
bool primary = false;
|
||||
{
|
||||
CSRWSharedLock entryLock(entry.lock);
|
||||
frameService =
|
||||
(entry.config.services & TRANSPORT_SERVICE_FRAME) != 0;
|
||||
required = entry.required;
|
||||
primary = entry.primary;
|
||||
}
|
||||
// Software capture writes directly into the primary frame target.
|
||||
// Secondary routes add fan-out work and can require staging copies.
|
||||
if (!frameService)
|
||||
continue;
|
||||
if (cfg.mode == GpuMode::SOFTWARE && !primary)
|
||||
{
|
||||
if (required)
|
||||
{
|
||||
result = CfgResult::REJECTED;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!BeginCall(entry, Call::CFG, true))
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
virtual bool NeedsFrame() const = 0;
|
||||
virtual bool GetFramePlan(
|
||||
uint64_t now, bool productReady, FramePlan& plan) = 0;
|
||||
virtual bool GetImmediateFramePlan(
|
||||
virtual bool GetImmediatePrimaryFramePlan(
|
||||
uint64_t now, FramePlan& plan) = 0;
|
||||
virtual void MissFramePlan(const FramePlan& plan, uint64_t now) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user