Merge pull request #4251 from aws-lumberyard-dev/nvsickle/RevertFrameTimer
Revert "Refresh rate driven rendering tick logic (#3375)"
This commit is contained in:
@@ -418,7 +418,7 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
void Scene::PrepareRender([[maybe_unused]]const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy)
|
||||
void Scene::PrepareRender(const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(RPI, "Scene: PrepareRender");
|
||||
|
||||
@@ -429,27 +429,20 @@ namespace AZ
|
||||
|
||||
SceneNotificationBus::Event(GetId(), &SceneNotification::OnBeginPrepareRender);
|
||||
|
||||
// Get active pipelines which need to be rendered and notify them of an impending frame.
|
||||
// Get active pipelines which need to be rendered and notify them frame started
|
||||
AZStd::vector<RenderPipelinePtr> activePipelines;
|
||||
{
|
||||
AZ_PROFILE_SCOPE(RPI, "Scene: OnPrepareFrame");
|
||||
AZ_PROFILE_SCOPE(RPI, "Scene: OnStartFrame");
|
||||
for (auto& pipeline : m_pipelines)
|
||||
{
|
||||
pipeline->OnPrepareFrame();
|
||||
if (pipeline->NeedsRender())
|
||||
{
|
||||
activePipelines.push_back(pipeline);
|
||||
pipeline->OnStartFrame(tickInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get active pipelines which need to be rendered and notify them frame started
|
||||
for (const auto& pipeline : activePipelines)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(RPI, "Scene: OnStartFrame");
|
||||
pipeline->OnStartFrame();
|
||||
}
|
||||
|
||||
// Return if there is no active render pipeline
|
||||
if (activePipelines.empty())
|
||||
{
|
||||
@@ -589,12 +582,10 @@ namespace AZ
|
||||
void Scene::OnFrameEnd()
|
||||
{
|
||||
AZ_PROFILE_SCOPE(RPI, "Scene: OnFrameEnd");
|
||||
bool didRender = false;
|
||||
for (auto& pipeline : m_pipelines)
|
||||
{
|
||||
if (pipeline->NeedsRender())
|
||||
{
|
||||
didRender = true;
|
||||
pipeline->OnFrameEnd();
|
||||
}
|
||||
}
|
||||
@@ -602,10 +593,6 @@ namespace AZ
|
||||
{
|
||||
fp->OnRenderEnd();
|
||||
}
|
||||
if (didRender)
|
||||
{
|
||||
SceneNotificationBus::Event(GetId(), &SceneNotification::OnFrameEnd);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene::UpdateSrgs()
|
||||
|
||||
Reference in New Issue
Block a user