Shader test past
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m52s
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
Aiden
2026-05-12 02:08:48 +10:00
parent e0ca548ef5
commit 4ea829af85
11 changed files with 534 additions and 7 deletions

View File

@@ -24,6 +24,8 @@ struct CadenceTelemetrySnapshot
uint64_t completions = 0;
uint64_t displayedLate = 0;
uint64_t dropped = 0;
uint64_t shaderBuildsCommitted = 0;
uint64_t shaderBuildFailures = 0;
bool deckLinkBufferedAvailable = false;
uint64_t deckLinkBuffered = 0;
double deckLinkScheduleCallMilliseconds = 0.0;
@@ -78,6 +80,20 @@ public:
return snapshot;
}
template <typename SystemFrameExchange, typename OutputThread, typename RenderThread>
CadenceTelemetrySnapshot Sample(
const SystemFrameExchange& exchange,
const DeckLinkOutput& output,
const OutputThread& outputThread,
const RenderThread& renderThread)
{
CadenceTelemetrySnapshot snapshot = Sample(exchange, output, outputThread);
const auto renderMetrics = renderThread.GetMetrics();
snapshot.shaderBuildsCommitted = renderMetrics.shaderBuildsCommitted;
snapshot.shaderBuildFailures = renderMetrics.shaderBuildFailures;
return snapshot;
}
private:
using Clock = std::chrono::steady_clock;

View File

@@ -31,18 +31,18 @@ public:
Stop();
}
template <typename SystemFrameExchange, typename OutputThread>
void Start(const SystemFrameExchange& exchange, const DeckLinkOutput& output, const OutputThread& outputThread)
template <typename SystemFrameExchange, typename OutputThread, typename RenderThread>
void Start(const SystemFrameExchange& exchange, const DeckLinkOutput& output, const OutputThread& outputThread, const RenderThread& renderThread)
{
if (mRunning)
return;
mStopping = false;
mThread = std::thread([this, &exchange, &output, &outputThread]() {
mThread = std::thread([this, &exchange, &output, &outputThread, &renderThread]() {
CadenceTelemetry telemetry;
while (!mStopping)
{
std::this_thread::sleep_for(mConfig.interval);
Print(telemetry.Sample(exchange, output, outputThread));
Print(telemetry.Sample(exchange, output, outputThread, renderThread));
}
});
mRunning = true;
@@ -70,6 +70,8 @@ private:
<< " completions=" << snapshot.completions
<< " late=" << snapshot.displayedLate
<< " dropped=" << snapshot.dropped
<< " shaderCommitted=" << snapshot.shaderBuildsCommitted
<< " shaderFailures=" << snapshot.shaderBuildFailures
<< " decklinkBuffered=";
if (snapshot.deckLinkBufferedAvailable)
std::cout << snapshot.deckLinkBuffered;