diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index 5dc946a5..86a9de93 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -465,6 +465,8 @@ namespace dxvk { DxvkShaderPipelineLibrary* vsLibrary, DxvkShaderPipelineLibrary* fsLibrary) : m_device (device), + m_manager (pipeMgr), + m_workers (&pipeMgr->m_workers), m_cache (&pipeMgr->m_cache), m_stateCache (&pipeMgr->m_stateCache), m_stats (&pipeMgr->m_stats), @@ -544,6 +546,10 @@ namespace dxvk { // a state cache worker and the current thread needs priority. instance = this->createInstance(state); this->writePipelineStateToCache(state); + + // If necessary, compile an optimized pipeline variant + if (!instance->fastHandle.load()) + m_workers->compileGraphicsPipeline(this, state); } } diff --git a/src/dxvk/dxvk_graphics.h b/src/dxvk/dxvk_graphics.h index 967e8134..c4b25721 100644 --- a/src/dxvk/dxvk_graphics.h +++ b/src/dxvk/dxvk_graphics.h @@ -360,6 +360,8 @@ namespace dxvk { private: DxvkDevice* m_device; + DxvkPipelineManager* m_manager; + DxvkPipelineWorkers* m_workers; DxvkPipelineCache* m_cache; DxvkStateCache* m_stateCache; DxvkPipelineStats* m_stats;