diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-08-01 03:51:27 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-08-02 19:21:41 +0000 |
| commit | 910f9f8c26b5d9db1dfa0437030d10951486ee3c (patch) | |
| tree | 84d8d53ad67ea7a3e1c4128726dbebe785619f87 /Graphics/GraphicsEngineVulkan | |
| parent | PipelineStateVkImpl: creating implicit IRenderPass object instead of Vulkan r... (diff) | |
| download | DiligentCore-910f9f8c26b5d9db1dfa0437030d10951486ee3c.tar.gz DiligentCore-910f9f8c26b5d9db1dfa0437030d10951486ee3c.zip | |
Added pRenderPass and SubpassIndex members to GraphicsPipelineDesc struct
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp index 4355b453..92e0dee6 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp @@ -290,12 +290,15 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun auto& GraphicsPipeline = m_Desc.GraphicsPipeline; auto& RPCache = pDeviceVk->GetImplicitRenderPassCache(); - RenderPassCache::RenderPassCacheKey Key{ - GraphicsPipeline.NumRenderTargets, - GraphicsPipeline.SmplDesc.Count, - GraphicsPipeline.RTVFormats, - GraphicsPipeline.DSVFormat}; - m_pRenderPass = RPCache.GetRenderPass(Key); + if (m_pRenderPass == nullptr) + { + RenderPassCache::RenderPassCacheKey Key{ + GraphicsPipeline.NumRenderTargets, + GraphicsPipeline.SmplDesc.Count, + GraphicsPipeline.RTVFormats, + GraphicsPipeline.DSVFormat}; + m_pRenderPass = RPCache.GetRenderPass(Key); + } VkGraphicsPipelineCreateInfo PipelineCI = {}; @@ -436,7 +439,7 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun PipelineCI.renderPass = GetRenderPass()->GetVkRenderPass(); - PipelineCI.subpass = 0; + PipelineCI.subpass = m_Desc.GraphicsPipeline.SubpassIndex; PipelineCI.basePipelineHandle = VK_NULL_HANDLE; // a pipeline to derive from PipelineCI.basePipelineIndex = 0; // an index into the pCreateInfos parameter to use as a pipeline to derive from |
