diff --git a/src/dxvk/dxvk_pipemanager.cpp b/src/dxvk/dxvk_pipemanager.cpp index f4b8ac25..a1392e0c 100644 --- a/src/dxvk/dxvk_pipemanager.cpp +++ b/src/dxvk/dxvk_pipemanager.cpp @@ -169,6 +169,11 @@ namespace dxvk { m_stateCache(device, this, &m_workers) { Logger::info(str::format("DXVK: Graphics pipeline libraries ", (m_device->canUseGraphicsPipelineLibrary() ? "supported" : "not supported"))); + + if (m_device->canUseGraphicsPipelineLibrary()) { + auto library = createNullFsPipelineLibrary(); + library->compilePipeline(m_cache.handle()); + } } @@ -231,7 +236,6 @@ namespace dxvk { DxvkShaderPipelineLibrary* fsLibrary = nullptr; if (shaders.tcs == nullptr && shaders.tes == nullptr && shaders.gs == nullptr) { - // TODO handle null fs properly vsLibrary = findPipelineLibrary(shaders.vs); fsLibrary = findPipelineLibrary(shaders.fs); } @@ -354,6 +358,19 @@ namespace dxvk { } + DxvkShaderPipelineLibrary* DxvkPipelineManager::createNullFsPipelineLibrary() { + std::lock_guard lock(m_mutex); + auto layout = createPipelineLayout(DxvkBindingLayout( + VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT)); + + auto iter = m_shaderLibraries.emplace( + std::piecewise_construct, + std::tuple(), + std::tuple(m_device, nullptr, layout)); + return &iter.first->second; + } + + DxvkShaderPipelineLibrary* DxvkPipelineManager::findPipelineLibrary( const Rc& shader) { DxvkShaderPipelineLibraryKey key; diff --git a/src/dxvk/dxvk_pipemanager.h b/src/dxvk/dxvk_pipemanager.h index a3739acd..154fbb0d 100644 --- a/src/dxvk/dxvk_pipemanager.h +++ b/src/dxvk/dxvk_pipemanager.h @@ -271,6 +271,8 @@ namespace dxvk { DxvkShaderPipelineLibrary* createPipelineLibrary( const Rc& shader); + DxvkShaderPipelineLibrary* createNullFsPipelineLibrary(); + DxvkShaderPipelineLibrary* findPipelineLibrary( const Rc& shader);