From 3909a709503fdba2c39b43b4f7f0d4ca281ba769 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 1 Oct 2026 09:33:43 +1000 Subject: [PATCH] [idd] capture: accept effective texture alignment Ignore runtime-selected alignment when comparing frame textures. This allows software-adapter products through publication and routing. Log the first execution-stage failure per graph. --- idd/LGIdd/capture/CFrameExec.cpp | 25 ++++++++++++++++-------- idd/LGIdd/postprocess/D12FrameFormat.cpp | 3 ++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/idd/LGIdd/capture/CFrameExec.cpp b/idd/LGIdd/capture/CFrameExec.cpp index da6ecfcc..36c3f5b6 100644 --- a/idd/LGIdd/capture/CFrameExec.cpp +++ b/idd/LGIdd/capture/CFrameExec.cpp @@ -20,6 +20,7 @@ #include "capture/CFrameExec.h" +#include "CDebug.h" #include "d3d/CD3D11Device.h" #include "d3d/CD3D12Device.h" #include "d3d/CInteropPool.h" @@ -262,6 +263,7 @@ struct CFrameExec::Core : std::enable_shared_from_this unsigned leafCount = 0; unsigned nextLane = 0; bool live = false; + bool failureLogged = false; std::atomic forceFull { true }; ~Core() @@ -424,6 +426,17 @@ struct CFrameExec::Core : std::enable_shared_from_this return Atomic::Load(forceFull, std::memory_order_acquire); } + TexResult Failed(const char * stage) + { + if (!failureLogged) + { + DEBUG_ERROR("Frame graph execution failed during %s", stage); + failureLogged = true; + } + Atomic::Store(forceFull, true, std::memory_order_release); + return TexResult::FAILED; + } + FrameContentRef Content(uint64_t serial, const D12FrameFormat& format, uint64_t captureTime, bool full, FrameDamage damage, const RECT * rects, unsigned count) @@ -536,8 +549,7 @@ struct CFrameExec::Core : std::enable_shared_from_this for (unsigned node = 1; node < nodeCount; ++node) writes[node].Cancel(); slot->Cancel(); - Atomic::Store(forceFull, true, std::memory_order_release); - return TexResult::FAILED; + return Failed("source synchronization"); } ComPtr list = slot->GetGfxList(); @@ -559,8 +571,7 @@ struct CFrameExec::Core : std::enable_shared_from_this for (unsigned node = 1; node < nodeCount; ++node) writes[node].Cancel(); slot->Cancel(); - Atomic::Store(forceFull, true, std::memory_order_release); - return TexResult::FAILED; + return Failed("command recording"); } D12Sync sync; @@ -572,8 +583,7 @@ struct CFrameExec::Core : std::enable_shared_from_this writes[node].Fail(sync); else writes[node].Cancel(); - Atomic::Store(forceFull, true, std::memory_order_release); - return TexResult::FAILED; + return Failed("command submission"); } const FrameTime time = { postStart, 0, 0, 0, false, false }; @@ -599,8 +609,7 @@ struct CFrameExec::Core : std::enable_shared_from_this writes[node].Fail(sync); leases[node].Reset(); } - Atomic::Store(forceFull, true, std::memory_order_release); - return TexResult::FAILED; + return Failed("texture publication"); } bool dropped = false; diff --git a/idd/LGIdd/postprocess/D12FrameFormat.cpp b/idd/LGIdd/postprocess/D12FrameFormat.cpp index 4f5811b1..de82b7df 100644 --- a/idd/LGIdd/postprocess/D12FrameFormat.cpp +++ b/idd/LGIdd/postprocess/D12FrameFormat.cpp @@ -194,7 +194,8 @@ bool D12::Same(const D3D12_RESOURCE_DESC& left, const D3D12_RESOURCE_DESC& right, DescCmp cmp) { const bool alignment = cmp != DescCmp::CREATE && - cmp != DescCmp::COPY && cmp != DescCmp::VIEW; + cmp != DescCmp::COPY && cmp != DescCmp::NO_FLAGS && + cmp != DescCmp::VIEW; const bool layout = cmp != DescCmp::COPY; const bool flags = cmp != DescCmp::COPY && cmp != DescCmp::NO_FLAGS && cmp != DescCmp::VIEW;