vkd3d: Set the numer of samples for clears.

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 2018-10-25 11:24:00 +02:00 committed by Alexandre Julliard
parent 5d28817164
commit 5e0094f617
3 changed files with 6 additions and 2 deletions

View File

@ -3677,7 +3677,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra
attachment_desc.flags = 0;
attachment_desc.format = dsv_desc->format;
attachment_desc.samples = VK_SAMPLE_COUNT_1_BIT;
attachment_desc.samples = dsv_desc->sample_count;
if (flags & D3D12_CLEAR_FLAG_DEPTH)
{
attachment_desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
@ -3725,7 +3725,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12Gra
attachment_desc.flags = 0;
attachment_desc.format = rtv_desc->format;
attachment_desc.samples = VK_SAMPLE_COUNT_1_BIT;
attachment_desc.samples = rtv_desc->sample_count;
attachment_desc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachment_desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
attachment_desc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;

View File

@ -2058,6 +2058,7 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev
rtv_desc->magic = VKD3D_DESCRIPTOR_MAGIC_RTV;
rtv_desc->format = vkd3d_desc.format->vk_format;
rtv_desc->sample_count = vk_samples_from_dxgi_sample_desc(&resource->desc.SampleDesc);
rtv_desc->width = d3d12_resource_desc_get_width(&resource->desc, vkd3d_desc.miplevel_idx);
rtv_desc->height = d3d12_resource_desc_get_height(&resource->desc, vkd3d_desc.miplevel_idx);
rtv_desc->layer_count = vkd3d_desc.layer_count;
@ -2130,6 +2131,7 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
dsv_desc->magic = VKD3D_DESCRIPTOR_MAGIC_DSV;
dsv_desc->format = vkd3d_desc.format->vk_format;
dsv_desc->sample_count = vk_samples_from_dxgi_sample_desc(&resource->desc.SampleDesc);
dsv_desc->width = d3d12_resource_desc_get_width(&resource->desc, vkd3d_desc.miplevel_idx);
dsv_desc->height = d3d12_resource_desc_get_height(&resource->desc, vkd3d_desc.miplevel_idx);
dsv_desc->layer_count = vkd3d_desc.layer_count;

View File

@ -337,6 +337,7 @@ struct d3d12_rtv_desc
{
uint32_t magic;
VkFormat format;
VkSampleCountFlagBits sample_count;
uint64_t width;
unsigned int height;
unsigned int layer_count;
@ -356,6 +357,7 @@ struct d3d12_dsv_desc
{
uint32_t magic;
VkFormat format;
VkSampleCountFlagBits sample_count;
uint64_t width;
unsigned int height;
unsigned int layer_count;