New rules based order
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m53s
CI / Windows Release Package (push) Successful in 3m18s

This commit is contained in:
Aiden
2026-05-12 02:35:15 +10:00
parent c0d7e84495
commit 511b67c9bc
18 changed files with 772 additions and 150 deletions

View File

@@ -13,6 +13,7 @@ AppConfig DefaultAppConfig()
config.warmupTimeout = std::chrono::seconds(3);
config.prerollTimeout = std::chrono::seconds(3);
config.prerollPoll = std::chrono::milliseconds(2);
config.runtimeShaderId = "happy-accident";
return config;
}
}

View File

@@ -6,6 +6,7 @@
#include <chrono>
#include <cstddef>
#include <string>
namespace RenderCadenceCompositor
{
@@ -18,6 +19,7 @@ struct AppConfig
std::chrono::milliseconds warmupTimeout = std::chrono::seconds(3);
std::chrono::milliseconds prerollTimeout = std::chrono::seconds(3);
std::chrono::milliseconds prerollPoll = std::chrono::milliseconds(2);
std::string runtimeShaderId = "happy-accident";
};
AppConfig DefaultAppConfig();

View File

@@ -1,7 +1,7 @@
#pragma once
#include "AppConfig.h"
#include "../runtime/RuntimeSlangShaderCompiler.h"
#include "../runtime/RuntimeShaderBridge.h"
#include "../telemetry/TelemetryPrinter.h"
#include "../video/DeckLinkOutput.h"
#include "../video/DeckLinkOutputThread.h"
@@ -143,34 +143,19 @@ private:
void StartRuntimeShaderBuild()
{
mShaderCompiler.StartHappyAccidentBuild();
mShaderBridgeStopping = false;
mShaderBridgeThread = std::thread([this]() { ShaderBridgeMain(); });
mShaderBridge.Start(
mConfig.runtimeShaderId,
[this](const RuntimeShaderArtifact& artifact) {
mRenderThread.SubmitRuntimeShaderArtifact(artifact);
},
[](const std::string& message) {
std::cout << "Runtime Slang build failed: " << message << "\n";
});
}
void StopRuntimeShaderBuild()
{
mShaderBridgeStopping = true;
if (mShaderBridgeThread.joinable())
mShaderBridgeThread.join();
mShaderCompiler.Stop();
}
void ShaderBridgeMain()
{
while (!mShaderBridgeStopping)
{
RuntimeSlangShaderBuild build;
if (mShaderCompiler.TryConsume(build))
{
if (build.succeeded)
mRenderThread.SubmitRuntimeShaderArtifact(build.artifact);
else
std::cout << "Runtime Slang build failed: " << build.message << "\n";
return;
}
std::this_thread::sleep_for(std::chrono::milliseconds(5));
}
mShaderBridge.Stop();
}
RenderThread& mRenderThread;
@@ -179,9 +164,7 @@ private:
DeckLinkOutput mOutput;
DeckLinkOutputThread<SystemFrameExchange> mOutputThread;
TelemetryPrinter mTelemetry;
RuntimeSlangShaderCompiler mShaderCompiler;
std::thread mShaderBridgeThread;
std::atomic<bool> mShaderBridgeStopping{ false };
RuntimeShaderBridge mShaderBridge;
bool mStarted = false;
};
}