summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-08-04 04:11:58 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-04 04:11:58 +0000
commit876590adc6002ca131b2580d8109b1ca7826907b (patch)
treee96bdf485c71d12c994ba1ebac699f17b91b37cd /Graphics/GraphicsEngineVulkan
parentAdded render pass test, fixed default viewport setting issue when beginning t... (diff)
downloadDiligentCore-876590adc6002ca131b2580d8109b1ca7826907b.tar.gz
DiligentCore-876590adc6002ca131b2580d8109b1ca7826907b.zip
Added render pass MS resolve test
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index a4f61fd1..96592793 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -394,15 +394,16 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun
DepthStencilStateDesc_To_VkDepthStencilStateCI(GraphicsPipeline.DepthStencilDesc);
PipelineCI.pDepthStencilState = &DepthStencilStateCI;
- const auto& RPDesc = m_pRenderPass->GetDesc();
- VERIFY_EXPR(GraphicsPipeline.pRenderPass != nullptr || GraphicsPipeline.NumRenderTargets == RPDesc.AttachmentCount);
- std::vector<VkPipelineColorBlendAttachmentState> ColorBlendAttachmentStates(RPDesc.AttachmentCount);
+ const auto& RPDesc = m_pRenderPass->GetDesc();
+ const auto NumRTAttachments = RPDesc.pSubpasses[GraphicsPipeline.SubpassIndex].RenderTargetAttachmentCount;
+ VERIFY_EXPR(GraphicsPipeline.pRenderPass != nullptr || GraphicsPipeline.NumRenderTargets == NumRTAttachments);
+ std::vector<VkPipelineColorBlendAttachmentState> ColorBlendAttachmentStates(NumRTAttachments);
VkPipelineColorBlendStateCreateInfo BlendStateCI = {};
BlendStateCI.pAttachments = !ColorBlendAttachmentStates.empty() ? ColorBlendAttachmentStates.data() : nullptr;
- BlendStateCI.attachmentCount = RPDesc.AttachmentCount; // must equal the colorAttachmentCount for the subpass
- // in which this pipeline is used.
+ BlendStateCI.attachmentCount = NumRTAttachments; // must equal the colorAttachmentCount for the subpass
+ // in which this pipeline is used.
BlendStateDesc_To_VkBlendStateCI(GraphicsPipeline.BlendDesc, BlendStateCI, ColorBlendAttachmentStates);
PipelineCI.pColorBlendState = &BlendStateCI;