UYVY backend
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m22s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-30 19:16:16 +10:00
parent d0b1f63524
commit f0f8b080ca
30 changed files with 733 additions and 239 deletions

View File

@@ -6,7 +6,7 @@
#include "../logging/Logger.h"
#include "../platform/HiddenGlWindow.h"
#include "InputFrameTexture.h"
#include "readback/Bgra8ReadbackPipeline.h"
#include "readback/OutputReadbackPipeline.h"
#include "GLExtensions.h"
#include "RuntimeRenderScene.h"
#include "SimpleMotionRenderer.h"
@@ -43,14 +43,15 @@ void RenderThread::ThreadMain()
SimpleMotionRenderer renderer;
RuntimeRenderScene runtimeRenderScene;
Bgra8ReadbackPipeline readback;
OutputReadbackPipeline readback;
InputFrameTexture inputTexture;
if (!runtimeRenderScene.StartPrepareWorker(std::move(prepareWindow), error))
{
SignalStartupFailure(error.empty() ? "Runtime shader prepare worker initialization failed." : error);
return;
}
if (!renderer.InitializeGl(mConfig.width, mConfig.height) || !readback.Initialize(mConfig.width, mConfig.height, mConfig.pboDepth))
if (!renderer.InitializeGl(mConfig.width, mConfig.height) ||
!readback.Initialize(mConfig.width, mConfig.height, mConfig.outputPixelFormat, mConfig.pboDepth))
{
SignalStartupFailure("Render pipeline initialization failed.");
return;

View File

@@ -4,6 +4,7 @@
#include "RuntimeLayerModel.h"
#include "RuntimeShaderArtifact.h"
#include "RuntimeRenderScene.h"
#include "VideoIOFormat.h"
#include <atomic>
#include <condition_variable>
@@ -16,7 +17,7 @@
class SystemFrameExchange;
class InputFrameMailbox;
class InputFrameTexture;
class Bgra8ReadbackPipeline;
class OutputReadbackPipeline;
class RenderThread
{
@@ -25,6 +26,7 @@ public:
{
unsigned width = 1920;
unsigned height = 1080;
VideoIOPixelFormat outputPixelFormat = VideoIOPixelFormat::Bgra8;
double frameDurationMilliseconds = 1000.0 / 59.94;
std::size_t pboDepth = 6;
};
@@ -77,7 +79,7 @@ private:
void CountRendered();
void CountCompleted();
void CountAcquireMiss();
void PublishReadbackMetrics(const Bgra8ReadbackPipeline& readback);
void PublishReadbackMetrics(const OutputReadbackPipeline& readback);
void PublishInputMetrics(const InputFrameTexture& inputTexture);
void TryCommitReadyRuntimeShader(RuntimeRenderScene& runtimeRenderScene);
bool TryTakePendingRuntimeShaderArtifact(RuntimeShaderArtifact& artifact);

View File

@@ -2,7 +2,7 @@
#include "../frames/InputFrameMailbox.h"
#include "InputFrameTexture.h"
#include "readback/Bgra8ReadbackPipeline.h"
#include "readback/OutputReadbackPipeline.h"
RenderThread::Metrics RenderThread::GetMetrics() const
{
@@ -48,7 +48,7 @@ void RenderThread::CountAcquireMiss()
mAcquireMisses.fetch_add(1, std::memory_order_relaxed);
}
void RenderThread::PublishReadbackMetrics(const Bgra8ReadbackPipeline& readback)
void RenderThread::PublishReadbackMetrics(const OutputReadbackPipeline& readback)
{
const double renderMilliseconds = readback.LastRenderFrameMilliseconds();
mRenderFrameMilliseconds.store(renderMilliseconds, std::memory_order_relaxed);