vkd3d: Add support for multisample texture views.

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-11-26 14:22:25 +01:00 committed by Alexandre Julliard
parent 23361bbcb2
commit 46c6bc6171

View File

@ -1785,6 +1785,14 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
if (desc->u.Texture2DArray.ResourceMinLODClamp)
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.Texture2DArray.ResourceMinLODClamp);
break;
case D3D12_SRV_DIMENSION_TEXTURE2DMS:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D;
break;
case D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
vkd3d_desc.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
vkd3d_desc.layer_count = desc->u.Texture2DMSArray.ArraySize;
break;
case D3D12_SRV_DIMENSION_TEXTURE3D:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_3D;
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MostDetailedMip;
@ -2176,6 +2184,14 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev
if (desc->u.Texture2DArray.PlaneSlice)
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2DArray.PlaneSlice);
break;
case D3D12_RTV_DIMENSION_TEXTURE2DMS:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D;
break;
case D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
vkd3d_desc.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
vkd3d_desc.layer_count = desc->u.Texture2DMSArray.ArraySize;
break;
case D3D12_RTV_DIMENSION_TEXTURE3D:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MipSlice;
@ -2261,6 +2277,14 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
vkd3d_desc.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
vkd3d_desc.layer_count = desc->u.Texture2DArray.ArraySize;
break;
case D3D12_DSV_DIMENSION_TEXTURE2DMS:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D;
break;
case D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
vkd3d_desc.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
vkd3d_desc.layer_count = desc->u.Texture2DMSArray.ArraySize;
break;
default:
FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
}