vkd3d: Validate tiled resources tier for 3D textures.

This commit is contained in:
Conor McCarthy
2023-05-26 12:29:00 +10:00
committed by Alexandre Julliard
parent 1a0d85b8d6
commit 0b67481496
Notes: Alexandre Julliard 2023-06-27 23:33:57 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/216
3 changed files with 11 additions and 0 deletions

View File

@@ -1679,6 +1679,15 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC *desc, struct d3d
return E_INVALIDARG;
}
if (desc->Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE)
{
if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D && !device->vk_info.sparse_residency_3d)
{
WARN("The device does not support tiled 3D images.\n");
return E_INVALIDARG;
}
}
if (!d3d12_resource_validate_texture_format(desc, format)
|| !d3d12_resource_validate_texture_alignment(desc, format))
return E_INVALIDARG;