[client/host/idd/lgmp] add additional timing metrics

This commit is contained in:
Geoffrey McRae
2026-08-03 10:57:32 +10:00
parent 3035fa6282
commit 7533c855c2
18 changed files with 339 additions and 88 deletions

View File

@@ -29,6 +29,7 @@
#include "common/rects.h"
#include "common/vector.h"
#include "common/display.h"
#include "common/time.h"
#include "com_ref.h"
#include "backend.h"
@@ -771,8 +772,11 @@ exit:
return result;
}
static CaptureResult d12_getFrame(unsigned frameBufferIndex,
FrameBuffer * frameBuffer, const size_t maxFrameSize)
static CaptureResult d12_getFrame(
unsigned frameBufferIndex,
FrameBuffer * frameBuffer,
const size_t maxFrameSize,
CaptureFrame * captureFrame)
{
CaptureResult result = CAPTURE_RESULT_ERROR;
comRef_scopePush(3);
@@ -808,6 +812,7 @@ static CaptureResult d12_getFrame(unsigned frameBufferIndex,
if (result != CAPTURE_RESULT_OK)
goto exit;
const uint64_t postProcessStart = nanotime();
ID3D12Resource * next = *src;
D12Effect * effect;
vector_forEach(effect, &this->effects)
@@ -934,6 +939,8 @@ static CaptureResult d12_getFrame(unsigned frameBufferIndex,
ID3D12CommandQueue_Wait(*this->copyQueue,
*this->computeCommand.fence, this->computeCommand.fenceValue);
}
captureFrame->postProcessTime = this->effectsActive ?
nanotime() - postProcessStart : 0;
// execute the copy commands
DEBUG_TRACE("Execute copy commands");

View File

@@ -1504,9 +1504,13 @@ static CaptureResult dxgi_waitFrame(unsigned frameBufferIndex,
return CAPTURE_RESULT_OK;
}
static CaptureResult dxgi_getFrame(unsigned frameBufferIndex,
FrameBuffer * frame, const size_t maxFrameSize)
static CaptureResult dxgi_getFrame(
unsigned frameBufferIndex,
FrameBuffer * frame,
const size_t maxFrameSize,
CaptureFrame * captureFrame)
{
(void)captureFrame;
DEBUG_ASSERT(this);
DEBUG_ASSERT(this->initialized);

View File

@@ -718,9 +718,13 @@ static CaptureResult nvfbc_waitFrame(unsigned frameBufferIndex,
return CAPTURE_RESULT_OK;
}
static CaptureResult nvfbc_getFrame(unsigned frameBufferIndex,
FrameBuffer * frame, const size_t maxFrameSize)
static CaptureResult nvfbc_getFrame(
unsigned frameBufferIndex,
FrameBuffer * frame,
const size_t maxFrameSize,
CaptureFrame * captureFrame)
{
(void)captureFrame;
const unsigned int h = DIFF_MAP_DIM(this->grabHeight, this->diffShift);
const unsigned int w = DIFF_MAP_DIM(this->grabWidth, this->diffShift);
uint8_t * frameData = framebuffer_get_data(frame);