Added clock time
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 1m32s
CI / Windows Release Package (push) Failing after 2m7s

This commit is contained in:
2026-05-06 12:38:23 +10:00
parent d2cf852eb2
commit 414ef62479
17 changed files with 335 additions and 18 deletions

View File

@@ -1,5 +1,7 @@
#include "stdafx.h"
#include "RuntimeHost.h"
#include "RuntimeClock.h"
#include "RuntimeParameterUtils.h"
#include "ShaderCompiler.h"
#include "ShaderPackageRegistry.h"
@@ -1321,6 +1323,7 @@ bool RuntimeHost::TryGetLayerRenderStates(unsigned outputWidth, unsigned outputH
void RuntimeHost::BuildLayerRenderStatesLocked(unsigned outputWidth, unsigned outputHeight, std::vector<RuntimeRenderState>& states) const
{
const RuntimeClockSnapshot clock = GetRuntimeClockSnapshot();
for (const LayerPersistentState& layer : mPersistentState.layers)
{
auto shaderIt = mPackagesById.find(layer.shaderId);
@@ -1331,6 +1334,8 @@ void RuntimeHost::BuildLayerRenderStatesLocked(unsigned outputWidth, unsigned ou
state.layerId = layer.id;
state.shaderId = layer.shaderId;
state.timeSeconds = std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::steady_clock::now() - mStartTime).count();
state.utcTimeSeconds = clock.utcTimeSeconds;
state.utcOffsetSeconds = clock.utcOffsetSeconds;
state.frameCount = static_cast<double>(mFrameCounter);
state.mixAmount = 1.0;
state.bypass = layer.bypass ? 1.0 : 0.0;