Based on a vkd3d-proton patch by Philip Rebohle.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d/resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 2589cf5e..f6c1851b 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2924,7 +2924,8 @@ 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 + if (desc->u.Texture3D.FirstWSlice || (desc->u.Texture3D.WSize != max(1u, + resource->desc.DepthOrArraySize >> desc->u.Texture3D.MipSlice) && desc->u.Texture3D.WSize != UINT_MAX)) FIXME("Unhandled depth view %u-%u.\n", desc->u.Texture3D.FirstWSlice, desc->u.Texture3D.WSize);