Phase 5 step 5
Some checks failed
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m42s
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
Aiden
2026-05-11 19:14:59 +10:00
parent fdcc38c6ae
commit ff10b66d1d
9 changed files with 65 additions and 14 deletions

View File

@@ -89,7 +89,7 @@ bool RenderSnapshotBuilder::TryBuildLayerRenderStates(unsigned outputWidth, unsi
bool RenderSnapshotBuilder::TryRefreshLayerParameters(std::vector<RuntimeRenderState>& states) const
{
RefreshLayerParameters(mRuntimeStore.CopyLayerStates(), states);
RefreshLayerParameters(mRuntimeStore.CopyCommittedLiveLayerStates(), states);
return true;
}
@@ -113,10 +113,10 @@ void RenderSnapshotBuilder::BuildLayerRenderStates(unsigned outputWidth, unsigne
{
states.clear();
for (const LayerStackStore::LayerPersistentState& layer : readModel.layers)
for (const LayerStackStore::LayerPersistentState& layer : readModel.committedLiveState.layers)
{
auto shaderIt = readModel.packagesById.find(layer.shaderId);
if (shaderIt == readModel.packagesById.end())
auto shaderIt = readModel.committedLiveState.packagesById.find(layer.shaderId);
if (shaderIt == readModel.committedLiveState.packagesById.end())
continue;
const ShaderPackage& shaderPackage = shaderIt->second;

View File

@@ -576,24 +576,37 @@ ShaderCompilerInputs RuntimeStore::GetShaderCompilerInputs() const
return inputs;
}
CommittedLiveStateReadModel RuntimeStore::BuildCommittedLiveStateReadModel() const
{
CommittedLiveStateReadModel model;
std::lock_guard<std::mutex> lock(mMutex);
model.layers = mLayerStack.Layers();
model.packagesById = mShaderCatalog.CaptureSnapshot().packagesById;
return model;
}
RenderSnapshotReadModel RuntimeStore::BuildRenderSnapshotReadModel() const
{
RenderSnapshotReadModel model;
model.signalStatus = mHealthTelemetry.GetSignalStatusSnapshot();
model.committedLiveState = BuildCommittedLiveStateReadModel();
std::lock_guard<std::mutex> lock(mMutex);
model.layers = mLayerStack.Layers();
model.packagesById = mShaderCatalog.CaptureSnapshot().packagesById;
model.timing.startTime = mStartTime;
model.timing.startupRandom = mStartupRandom;
return model;
}
std::vector<RuntimeStore::LayerPersistentState> RuntimeStore::CopyLayerStates() const
std::vector<RuntimeStore::LayerPersistentState> RuntimeStore::CopyCommittedLiveLayerStates() const
{
std::lock_guard<std::mutex> lock(mMutex);
return mLayerStack.Layers();
}
std::vector<RuntimeStore::LayerPersistentState> RuntimeStore::CopyLayerStates() const
{
return CopyCommittedLiveLayerStates();
}
RenderTimingSnapshot RuntimeStore::GetRenderTimingSnapshot() const
{
std::lock_guard<std::mutex> lock(mMutex);

View File

@@ -71,7 +71,9 @@ public:
void ClearReloadRequest();
bool CopyShaderPackageForStoredLayer(const std::string& layerId, ShaderPackage& shaderPackage, std::string& error) const;
::ShaderCompilerInputs GetShaderCompilerInputs() const;
::CommittedLiveStateReadModel BuildCommittedLiveStateReadModel() const;
::RenderSnapshotReadModel BuildRenderSnapshotReadModel() const;
std::vector<LayerPersistentState> CopyCommittedLiveLayerStates() const;
std::vector<LayerPersistentState> CopyLayerStates() const;
::RenderTimingSnapshot GetRenderTimingSnapshot() const;
::RuntimeStatePresentationReadModel BuildRuntimeStatePresentationReadModel() const;

View File

@@ -27,10 +27,15 @@ struct RenderTimingSnapshot
double startupRandom = 0.0;
};
struct RenderSnapshotReadModel
struct CommittedLiveStateReadModel
{
std::vector<LayerStackStore::LayerPersistentState> layers;
std::map<std::string, ShaderPackage> packagesById;
};
struct RenderSnapshotReadModel
{
CommittedLiveStateReadModel committedLiveState;
HealthTelemetry::SignalStatusSnapshot signalStatus;
RenderTimingSnapshot timing;
};