Merge pull request #1360 from HifiExperiments/staticPlumbers

fix long startup times
This commit is contained in:
ksuprynowicz 2025-03-14 18:11:43 +01:00 committed by GitHub
commit 44c600a184
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,10 +96,13 @@ void RenderDeferredTask::configure(const Config& config) {
void RenderDeferredTask::build(JobModel& task, const render::Varying& input, render::Varying& output, render::CullFunctor cullFunctor, uint transformOffset, size_t depth) {
// Prepare the ShapePipelines
ShapePlumberPointer shapePlumberDeferred = std::make_shared<ShapePlumber>();
static ShapePlumberPointer shapePlumberDeferred = std::make_shared<ShapePlumber>();
static ShapePlumberPointer shapePlumberForward = std::make_shared<ShapePlumber>();
static std::once_flag once;
std::call_once(once, [] {
initDeferredPipelines(*shapePlumberDeferred, FadeEffect::getBatchSetter(), FadeEffect::getItemUniformSetter());
ShapePlumberPointer shapePlumberForward = std::make_shared<ShapePlumber>();
initForwardPipelines(*shapePlumberForward);
});
uint backgroundViewTransformSlot = render::RenderEngine::TS_BACKGROUND_VIEW + transformOffset;
uint mainViewTransformSlot = render::RenderEngine::TS_MAIN_VIEW + transformOffset;