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:
parent
b50ed2ceca
commit
cc1575e8b7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user