diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 0d50a325..56726460 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -8,11 +8,9 @@ namespace dxvk { DxvkContext::DxvkContext( const Rc& device, - const Rc& pipelineCache, const Rc& pipelineManager, const Rc& metaClearObjects) : m_device (device), - m_pipeCache (pipelineCache), m_pipeMgr (pipelineManager), m_metaClear (metaClearObjects) { } @@ -1654,8 +1652,7 @@ namespace dxvk { m_flags.clr(DxvkContextFlag::CpDirtyPipeline); m_state.cp.state.bsBindingState.clear(); - m_state.cp.pipeline = m_pipeMgr->createComputePipeline( - m_pipeCache, m_state.cp.cs.shader); + m_state.cp.pipeline = m_pipeMgr->createComputePipeline(m_state.cp.cs.shader); if (m_state.cp.pipeline != nullptr) m_cmd->trackResource(m_state.cp.pipeline); @@ -1686,7 +1683,7 @@ namespace dxvk { m_state.gp.state.bsBindingState.clear(); m_state.gp.pipeline = m_pipeMgr->createGraphicsPipeline( - m_pipeCache, m_state.gp.vs.shader, + m_state.gp.vs.shader, m_state.gp.tcs.shader, m_state.gp.tes.shader, m_state.gp.gs.shader, m_state.gp.fs.shader); diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h index e10ddfe7..c8665326 100644 --- a/src/dxvk/dxvk_context.h +++ b/src/dxvk/dxvk_context.h @@ -29,7 +29,6 @@ namespace dxvk { DxvkContext( const Rc& device, - const Rc& pipelineCache, const Rc& pipelineManager, const Rc& metaClearObjects); ~DxvkContext(); @@ -620,7 +619,6 @@ namespace dxvk { private: const Rc m_device; - const Rc m_pipeCache; const Rc m_pipeMgr; const Rc m_metaClear; diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index d92e779d..a38cb16b 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -15,7 +15,6 @@ namespace dxvk { m_properties (adapter->deviceProperties()), m_memory (new DxvkMemoryAllocator (adapter, vkd)), m_renderPassPool (new DxvkRenderPassPool (vkd)), - m_pipelineCache (new DxvkPipelineCache (vkd)), m_pipelineManager (new DxvkPipelineManager (this)), m_metaClearObjects(new DxvkMetaClearObjects (vkd)), m_unboundResources(this), @@ -106,7 +105,6 @@ namespace dxvk { Rc DxvkDevice::createContext() { return new DxvkContext(this, - m_pipelineCache, m_pipelineManager, m_metaClearObjects); } diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index 6c91de48..9ce2f42f 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -354,7 +354,6 @@ namespace dxvk { Rc m_memory; Rc m_renderPassPool; - Rc m_pipelineCache; Rc m_pipelineManager; Rc m_metaClearObjects; diff --git a/src/dxvk/dxvk_pipemanager.cpp b/src/dxvk/dxvk_pipemanager.cpp index d827b4db..c3b617fd 100644 --- a/src/dxvk/dxvk_pipemanager.cpp +++ b/src/dxvk/dxvk_pipemanager.cpp @@ -1,3 +1,4 @@ +#include "dxvk_device.h" #include "dxvk_pipemanager.h" namespace dxvk { @@ -38,7 +39,7 @@ namespace dxvk { DxvkPipelineManager::DxvkPipelineManager(const DxvkDevice* device) - : m_device(device) { + : m_device(device), m_cache(new DxvkPipelineCache(device->vkd())) { } @@ -49,7 +50,6 @@ namespace dxvk { Rc DxvkPipelineManager::createComputePipeline( - const Rc& cache, const Rc& cs) { if (cs == nullptr) return nullptr; @@ -64,7 +64,7 @@ namespace dxvk { return pair->second; const Rc pipeline - = new DxvkComputePipeline(m_device, cache, cs); + = new DxvkComputePipeline(m_device, m_cache, cs); m_computePipelines.insert(std::make_pair(key, pipeline)); return pipeline; @@ -72,7 +72,6 @@ namespace dxvk { Rc DxvkPipelineManager::createGraphicsPipeline( - const Rc& cache, const Rc& vs, const Rc& tcs, const Rc& tes, @@ -95,7 +94,7 @@ namespace dxvk { return pair->second; const Rc pipeline - = new DxvkGraphicsPipeline(m_device, cache, vs, tcs, tes, gs, fs); + = new DxvkGraphicsPipeline(m_device, m_cache, vs, tcs, tes, gs, fs); m_graphicsPipelines.insert(std::make_pair(key, pipeline)); return pipeline; diff --git a/src/dxvk/dxvk_pipemanager.h b/src/dxvk/dxvk_pipemanager.h index 2400cdc9..5dc62152 100644 --- a/src/dxvk/dxvk_pipemanager.h +++ b/src/dxvk/dxvk_pipemanager.h @@ -72,7 +72,6 @@ namespace dxvk { * \returns Compute pipeline object */ Rc createComputePipeline( - const Rc& cache, const Rc& cs); /** @@ -89,7 +88,6 @@ namespace dxvk { * \returns Graphics pipeline object */ Rc createGraphicsPipeline( - const Rc& cache, const Rc& vs, const Rc& tcs, const Rc& tes, @@ -98,7 +96,8 @@ namespace dxvk { private: - const DxvkDevice* m_device; + const DxvkDevice* m_device; + const Rc m_cache; std::mutex m_mutex;