Split out everying remaining from Swap

This commit is contained in:
Scott Mansell
2023-01-31 00:46:10 +13:00
parent 2a18b34a73
commit 0da69055d9
21 changed files with 182 additions and 170 deletions

View File

@ -105,6 +105,7 @@ VertexManagerBase::~VertexManagerBase() = default;
bool VertexManagerBase::Initialize()
{
m_frame_end_event = AfterFrameEvent::Register([this] { OnEndFrame();}, "VertexManagerBase");
m_index_generator.Init();
m_cpu_cull.Init();
return true;
@ -996,4 +997,10 @@ void VertexManagerBase::OnEndFrame()
#endif
m_cpu_accesses_this_frame.clear();
// We invalidate the pipeline object at the start of the frame.
// This is for the rare case where only a single pipeline configuration is used,
// and hybrid ubershaders have compiled the specialized shader, but without any
// state changes the specialized shader will not take over.
InvalidatePipelineObject();
}