libs/vkd3d: Support D3D12_SRV_DIMENSION_TEXTURE2D in d3d12_device_CreateShaderResourceView().

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-07-19 14:47:41 +02:00 committed by Alexandre Julliard
parent b9a0907691
commit 72859f8898

View File

@ -1194,6 +1194,15 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
switch (desc->ViewDimension)
{
case D3D12_SRV_DIMENSION_TEXTURE2D:
vk_view_type = VK_IMAGE_VIEW_TYPE_2D;
miplevel_idx = desc->u.Texture2D.MostDetailedMip;
miplevel_count = desc->u.Texture2D.MipLevels;
if (desc->u.Texture2D.PlaneSlice)
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2D.PlaneSlice);
if (desc->u.Texture2D.ResourceMinLODClamp)
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.Texture2D.ResourceMinLODClamp);
break;
case D3D12_SRV_DIMENSION_TEXTURECUBE:
vk_view_type = VK_IMAGE_VIEW_TYPE_CUBE;
miplevel_idx = desc->u.TextureCube.MostDetailedMip;