From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/resource.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e40ccbc5525e..b7c657bee6be 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1312,6 +1312,11 @@ static bool init_default_texture_view_desc(struct vkd3d_texture_view_desc *desc, ? VK_IMAGE_VIEW_TYPE_2D_ARRAY : VK_IMAGE_VIEW_TYPE_2D; break;
+ case D3D12_RESOURCE_DIMENSION_TEXTURE3D: + desc->view_type = VK_IMAGE_VIEW_TYPE_3D; + desc->layer_count = 1; + break; + default: FIXME("Resource dimension %#x not implemented.\n", resource->desc.Dimension); return false; @@ -1899,6 +1904,12 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev return; }
+ if (resource->desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) + { + WARN("Cannot create DSV for 3D texture.\n"); + return; + } + if (!init_default_texture_view_desc(&vkd3d_desc, resource, desc ? desc->Format : 0)) return;