[client/host/idd] correct frame timing attribution

Use calibrated copy-queue timestamps to separate source and effect
waits from the actual framebuffer copy.

Exclude producer readiness waits from client import timing so the
same interval is not counted in both Copy and Import.
This commit is contained in:
Geoffrey McRae
2026-08-03 15:58:41 +10:00
parent c8e4b97c3c
commit aa289fa022
17 changed files with 630 additions and 92 deletions

View File

@@ -33,16 +33,16 @@ using namespace Microsoft::WRL;
class CFrameBufferResource
{
private:
bool m_valid = false;
unsigned m_frameIndex = 0;
uint8_t * m_base = nullptr;
size_t m_size = 0;
size_t m_frameSize = 0;
uint64_t m_captureTime = 0;
uint64_t m_postProcessTime = 0;
uint64_t m_copyStart = 0;
bool m_valid = false;
unsigned m_frameIndex = 0;
uint8_t * m_base = nullptr;
size_t m_size = 0;
size_t m_frameSize = 0;
uint64_t m_captureTime = 0;
uint64_t m_postProcessStart = 0;
uint64_t m_copyStart = 0;
ComPtr<ID3D12Resource> m_res;
void * m_map = nullptr;
void * m_map = nullptr;
public:
bool Init(CSwapChainProcessor * swapChain, unsigned frameIndex, uint8_t * base, size_t size);
@@ -55,16 +55,16 @@ class CFrameBufferResource
size_t GetFrameSize() { return m_frameSize; }
void * GetMap() { return m_map; }
void SetTiming(uint64_t captureTime, uint64_t postProcessTime,
void SetTiming(uint64_t captureTime, uint64_t postProcessStart,
uint64_t copyStart)
{
m_captureTime = captureTime;
m_postProcessTime = postProcessTime;
m_copyStart = copyStart;
m_captureTime = captureTime;
m_postProcessStart = postProcessStart;
m_copyStart = copyStart;
}
uint64_t GetCaptureTime () const { return m_captureTime; }
uint64_t GetPostProcessTime() const { return m_postProcessTime; }
uint64_t GetCopyStart () const { return m_copyStart; }
uint64_t GetCaptureTime () const { return m_captureTime; }
uint64_t GetPostProcessStart() const { return m_postProcessStart; }
uint64_t GetCopyStart () const { return m_copyStart; }
ComPtr<ID3D12Resource> Get() { return m_res; }
};