mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-14 00:48:44 +01:00
[dxvk] Compile optimized graphics pipelines on worker threads if necessary
This commit is contained in:
parent
b50ed2ceca
commit
cc1575e8b7
@ -465,6 +465,8 @@ namespace dxvk {
|
|||||||
DxvkShaderPipelineLibrary* vsLibrary,
|
DxvkShaderPipelineLibrary* vsLibrary,
|
||||||
DxvkShaderPipelineLibrary* fsLibrary)
|
DxvkShaderPipelineLibrary* fsLibrary)
|
||||||
: m_device (device),
|
: m_device (device),
|
||||||
|
m_manager (pipeMgr),
|
||||||
|
m_workers (&pipeMgr->m_workers),
|
||||||
m_cache (&pipeMgr->m_cache),
|
m_cache (&pipeMgr->m_cache),
|
||||||
m_stateCache (&pipeMgr->m_stateCache),
|
m_stateCache (&pipeMgr->m_stateCache),
|
||||||
m_stats (&pipeMgr->m_stats),
|
m_stats (&pipeMgr->m_stats),
|
||||||
@ -544,6 +546,10 @@ namespace dxvk {
|
|||||||
// a state cache worker and the current thread needs priority.
|
// a state cache worker and the current thread needs priority.
|
||||||
instance = this->createInstance(state);
|
instance = this->createInstance(state);
|
||||||
this->writePipelineStateToCache(state);
|
this->writePipelineStateToCache(state);
|
||||||
|
|
||||||
|
// If necessary, compile an optimized pipeline variant
|
||||||
|
if (!instance->fastHandle.load())
|
||||||
|
m_workers->compileGraphicsPipeline(this, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,6 +360,8 @@ namespace dxvk {
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
DxvkDevice* m_device;
|
DxvkDevice* m_device;
|
||||||
|
DxvkPipelineManager* m_manager;
|
||||||
|
DxvkPipelineWorkers* m_workers;
|
||||||
DxvkPipelineCache* m_cache;
|
DxvkPipelineCache* m_cache;
|
||||||
DxvkStateCache* m_stateCache;
|
DxvkStateCache* m_stateCache;
|
||||||
DxvkPipelineStats* m_stats;
|
DxvkPipelineStats* m_stats;
|
||||||
|
Loading…
Reference in New Issue
Block a user