vkd3d: Do not ignore SampleMask in D3D12_GRAPHICS_PIPELINE_STATE_DESC.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-01-24 15:09:24 +01:00 committed by Alexandre Julliard
parent 559c0191c8
commit 639693de86
2 changed files with 8 additions and 3 deletions

View File

@ -2429,9 +2429,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
rs_stream_desc_from_d3d12(&graphics->rs_stream_desc, &graphics->rs_desc, so_desc, vk_info); rs_stream_desc_from_d3d12(&graphics->rs_stream_desc, &graphics->rs_desc, so_desc, vk_info);
if (desc->SampleMask != ~0u)
FIXME("Ignoring sample mask %#x.\n", desc->SampleMask);
graphics->ms_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; graphics->ms_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
graphics->ms_desc.pNext = NULL; graphics->ms_desc.pNext = NULL;
graphics->ms_desc.flags = 0; graphics->ms_desc.flags = 0;
@ -2439,6 +2436,13 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
graphics->ms_desc.sampleShadingEnable = VK_FALSE; graphics->ms_desc.sampleShadingEnable = VK_FALSE;
graphics->ms_desc.minSampleShading = 0.0f; graphics->ms_desc.minSampleShading = 0.0f;
graphics->ms_desc.pSampleMask = NULL; graphics->ms_desc.pSampleMask = NULL;
if (desc->SampleMask != ~0u)
{
assert(DIV_ROUND_UP(sample_count, 32) < ARRAY_SIZE(graphics->sample_mask));
graphics->sample_mask[0] = desc->SampleMask;
graphics->sample_mask[1] = 0xffffffffu;
graphics->ms_desc.pSampleMask = graphics->sample_mask;
}
graphics->ms_desc.alphaToCoverageEnable = desc->BlendState.AlphaToCoverageEnable; graphics->ms_desc.alphaToCoverageEnable = desc->BlendState.AlphaToCoverageEnable;
graphics->ms_desc.alphaToOneEnable = VK_FALSE; graphics->ms_desc.alphaToOneEnable = VK_FALSE;

View File

@ -617,6 +617,7 @@ struct d3d12_graphics_pipeline_state
VkPipelineMultisampleStateCreateInfo ms_desc; VkPipelineMultisampleStateCreateInfo ms_desc;
VkPipelineDepthStencilStateCreateInfo ds_desc; VkPipelineDepthStencilStateCreateInfo ds_desc;
VkSampleMask sample_mask[2];
VkPipelineRasterizationStateStreamCreateInfoEXT rs_stream_desc; VkPipelineRasterizationStateStreamCreateInfoEXT rs_stream_desc;
const struct d3d12_root_signature *root_signature; const struct d3d12_root_signature *root_signature;