1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00

[dxvk] Compile optimized graphics pipelines on worker threads if necessary

This commit is contained in:
Philip Rebohle 2022-07-06 12:09:03 +02:00
parent b50ed2ceca
commit cc1575e8b7
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 8 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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;