More http post end points filled
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 3m1s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-12 14:23:53 +10:00
parent 38d729b346
commit 1ddcf5d621
15 changed files with 854 additions and 97 deletions

View File

@@ -0,0 +1,84 @@
#pragma once
#include "RuntimeShaderArtifact.h"
#include "SupportedShaderCatalog.h"
#include <cstdint>
#include <string>
#include <vector>
namespace RenderCadenceCompositor
{
enum class RuntimeLayerBuildState
{
Pending,
Ready,
Failed
};
struct RuntimeLayerReadModel
{
std::string id;
std::string shaderId;
std::string shaderName;
bool bypass = false;
RuntimeLayerBuildState buildState = RuntimeLayerBuildState::Pending;
std::string message;
bool renderReady = false;
};
struct RuntimeRenderLayerModel
{
std::string id;
std::string shaderId;
RuntimeShaderArtifact artifact;
};
struct RuntimeLayerModelSnapshot
{
bool compileSucceeded = true;
std::string compileMessage;
std::vector<RuntimeLayerReadModel> displayLayers;
std::vector<RuntimeRenderLayerModel> renderLayers;
};
class RuntimeLayerModel
{
public:
bool InitializeSingleLayer(const SupportedShaderCatalog& shaderCatalog, const std::string& shaderId, std::string& error);
void Clear();
bool AddLayer(const SupportedShaderCatalog& shaderCatalog, const std::string& shaderId, std::string& layerId, std::string& error);
bool RemoveLayer(const std::string& layerId, std::string& error);
bool MarkBuildStarted(const std::string& layerId, const std::string& message, std::string& error);
bool MarkBuildReady(const RuntimeShaderArtifact& artifact, std::string& error);
bool MarkBuildFailedForShader(const std::string& shaderId, const std::string& message);
bool MarkBuildFailed(const std::string& layerId, const std::string& message, std::string& error);
bool MarkRenderCommitFailed(const std::string& layerId, const std::string& message, std::string& error);
RuntimeLayerModelSnapshot Snapshot() const;
std::string FirstLayerId() const;
private:
struct Layer
{
std::string id;
std::string shaderId;
std::string shaderName;
bool bypass = false;
RuntimeLayerBuildState buildState = RuntimeLayerBuildState::Pending;
std::string message;
bool renderReady = false;
RuntimeShaderArtifact artifact;
};
Layer* FindLayer(const std::string& layerId);
const Layer* FindLayer(const std::string& layerId) const;
Layer* FindFirstLayerForShader(const std::string& shaderId);
std::string AllocateLayerId();
static RuntimeLayerReadModel ToReadModel(const Layer& layer);
std::vector<Layer> mLayers;
uint64_t mNextLayerNumber = 1;
};
}