vkd3d: Take the mip-level into account for the 3D UAV slice check in vkd3d_create_texture_uav().

Based on a vkd3d-proton patch by Philip Rebohle.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2021-10-18 18:28:08 +02:00 committed by Alexandre Julliard
parent c8d94c036d
commit 566eeb0465

View File

@ -2967,8 +2967,9 @@ static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor,
case D3D12_UAV_DIMENSION_TEXTURE3D:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_3D;
vkd3d_desc.miplevel_idx = desc->u.Texture3D.MipSlice;
if (desc->u.Texture3D.FirstWSlice || (desc->u.Texture3D.WSize != resource->desc.DepthOrArraySize
&& desc->u.Texture3D.WSize != UINT_MAX))
if (desc->u.Texture3D.FirstWSlice || (desc->u.Texture3D.WSize != UINT_MAX
&& desc->u.Texture3D.WSize != max(1u,
resource->desc.DepthOrArraySize >> desc->u.Texture3D.MipSlice)))
FIXME("Unhandled depth view %u-%u.\n",
desc->u.Texture3D.FirstWSlice, desc->u.Texture3D.WSize);
break;