Vulkan: set ColorBlendState info (used by logicOp) (#2080)

* Vulkan: set ColorBlendState info (used by logicOp)

* fix attachmentCount
This commit is contained in:
raven02 2016-08-22 23:14:32 +08:00 committed by GitHub
parent e04de77f82
commit 707523c679
2 changed files with 5 additions and 6 deletions

View File

@ -926,6 +926,9 @@ bool VKGSRender::load_program()
}
}
properties.cs.attachmentCount = m_draw_buffers_count;
properties.cs.pAttachments = properties.att_state;
if (rsx::method_registers.logic_op_enabled())
{
properties.cs.logicOpEnable = true;

View File

@ -57,6 +57,7 @@ namespace std
seed ^= hash_struct(pipelineProperties.ia);
seed ^= hash_struct(pipelineProperties.ds);
seed ^= hash_struct(pipelineProperties.rs);
seed ^= hash_struct(pipelineProperties.cs);
seed ^= hash_struct(pipelineProperties.att_state[0]);
return hash<size_t>()(seed);
}
@ -122,18 +123,13 @@ struct VKTraits
ms.pSampleMask = NULL;
ms.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
VkPipelineColorBlendStateCreateInfo cb = {};
cb.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
cb.attachmentCount = 1;
cb.pAttachments = pipelineProperties.att_state;
VkPipeline pipeline;
VkGraphicsPipelineCreateInfo info = {};
info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
info.pVertexInputState = &vi;
info.pInputAssemblyState = &pipelineProperties.ia;
info.pRasterizationState = &pipelineProperties.rs;
info.pColorBlendState = &cb;
info.pColorBlendState = &pipelineProperties.cs;
info.pMultisampleState = &ms;
info.pViewportState = &vp;
info.pDepthStencilState = &pipelineProperties.ds;