[idd] capture: define immutable texture products

This commit is contained in:
Geoffrey McRae
2026-08-13 15:12:41 +10:00
parent a8eb49fb17
commit 3dd5abb05e
8 changed files with 816 additions and 16 deletions

View File

@@ -91,9 +91,9 @@ struct GraphLeaf
FrameCfg cfg;
};
// FrameDesc is resource-free. It can cross graph nodes without retaining the
// acquired IddCx texture and is paired with owned texture storage separately.
struct FrameDesc
// All products derived from one capture retain the same immutable content.
// It contains no acquired IddCx or Direct3D resource.
struct FrameContent
{
uint64_t serial = 0;
uint64_t captureTime = 0;
@@ -103,6 +103,19 @@ struct FrameDesc
D12FrameFormat format = {};
};
using FrameContentRef = std::shared_ptr<const FrameContent>;
// FrameDesc adds one graph node's representation and damage to the shared
// content identity. It remains resource-free.
struct FrameDesc
{
FrameContentRef content;
FrameDamage damage = FrameDamage::NONE;
RECT rects[FRAME_DAMAGE_MAX] = {};
unsigned count = 0;
D12FrameFormat format = {};
};
struct LeafDesc
{
BackendId id = 0;
@@ -140,7 +153,8 @@ public:
bool Same(const GraphCfg& cfg) const;
bool Want(FrameSignal signal) const;
bool Need(FrameOp op) const;
bool Desc(unsigned leaf, const FrameDesc& frame, LeafDesc& desc) const;
bool Desc(unsigned leaf, const FrameContentRef& content,
LeafDesc& desc) const;
const GraphCfg& Cfg() const { return m_cfg; }
const GraphNode * Nodes(unsigned& count) const;