mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Add support for 2D array 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:
parent
ae8c344fa4
commit
6408094e7c
@ -1479,6 +1479,17 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
|
|||||||
if (desc->u.Texture2D.ResourceMinLODClamp)
|
if (desc->u.Texture2D.ResourceMinLODClamp)
|
||||||
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.Texture2D.ResourceMinLODClamp);
|
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.Texture2D.ResourceMinLODClamp);
|
||||||
break;
|
break;
|
||||||
|
case D3D12_SRV_DIMENSION_TEXTURE2DARRAY:
|
||||||
|
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||||
|
vkd3d_desc.miplevel_idx = desc->u.Texture2DArray.MostDetailedMip;
|
||||||
|
vkd3d_desc.miplevel_count = desc->u.Texture2DArray.MipLevels;
|
||||||
|
vkd3d_desc.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
|
||||||
|
vkd3d_desc.layer_count = desc->u.Texture2DArray.ArraySize;
|
||||||
|
if (desc->u.Texture2DArray.PlaneSlice)
|
||||||
|
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2DArray.PlaneSlice);
|
||||||
|
if (desc->u.Texture2DArray.ResourceMinLODClamp)
|
||||||
|
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.Texture2DArray.ResourceMinLODClamp);
|
||||||
|
break;
|
||||||
case D3D12_SRV_DIMENSION_TEXTURE3D:
|
case D3D12_SRV_DIMENSION_TEXTURE3D:
|
||||||
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_3D;
|
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_3D;
|
||||||
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MostDetailedMip;
|
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MostDetailedMip;
|
||||||
@ -1868,6 +1879,14 @@ void d3d12_rtv_desc_create_rtv(struct d3d12_rtv_desc *rtv_desc, struct d3d12_dev
|
|||||||
if (desc->u.Texture2D.PlaneSlice)
|
if (desc->u.Texture2D.PlaneSlice)
|
||||||
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2D.PlaneSlice);
|
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2D.PlaneSlice);
|
||||||
break;
|
break;
|
||||||
|
case D3D12_RTV_DIMENSION_TEXTURE2DARRAY:
|
||||||
|
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||||
|
vkd3d_desc.miplevel_idx = desc->u.Texture2DArray.MipSlice;
|
||||||
|
vkd3d_desc.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
|
||||||
|
vkd3d_desc.layer_count = desc->u.Texture2DArray.ArraySize;
|
||||||
|
if (desc->u.Texture2DArray.PlaneSlice)
|
||||||
|
FIXME("Ignoring plane slice %u.\n", desc->u.Texture2DArray.PlaneSlice);
|
||||||
|
break;
|
||||||
case D3D12_RTV_DIMENSION_TEXTURE3D:
|
case D3D12_RTV_DIMENSION_TEXTURE3D:
|
||||||
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||||
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MipSlice;
|
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MipSlice;
|
||||||
@ -1952,6 +1971,12 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
|
|||||||
case D3D12_DSV_DIMENSION_TEXTURE2D:
|
case D3D12_DSV_DIMENSION_TEXTURE2D:
|
||||||
vkd3d_desc.miplevel_idx = desc->u.Texture2D.MipSlice;
|
vkd3d_desc.miplevel_idx = desc->u.Texture2D.MipSlice;
|
||||||
break;
|
break;
|
||||||
|
case D3D12_DSV_DIMENSION_TEXTURE2DARRAY:
|
||||||
|
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||||
|
vkd3d_desc.miplevel_idx = desc->u.Texture2DArray.MipSlice;
|
||||||
|
vkd3d_desc.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
|
||||||
|
vkd3d_desc.layer_count = desc->u.Texture2DArray.ArraySize;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
|
FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user