vkd3d: Do not skip all viewports if one is invalid.

Fixes blank screen in Assassin's Creed: Valhalla.
This commit is contained in:
Conor McCarthy 2023-04-20 17:40:00 +10:00 committed by Alexandre Julliard
parent 81cc077b53
commit 5d724abc96
Notes: Alexandre Julliard 2023-04-20 22:57:49 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/167

View File

@ -3963,10 +3963,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
vk_viewports[i].minDepth = viewports[i].MinDepth;
vk_viewports[i].maxDepth = viewports[i].MaxDepth;
if (!vk_viewports[i].width || !vk_viewports[i].height)
if (!vk_viewports[i].width)
{
FIXME_ONCE("Invalid viewport %u, ignoring RSSetViewports().\n", i);
return;
/* Vulkan does not support width <= 0 */
FIXME_ONCE("Setting invalid viewport %u to zero height.\n", i);
vk_viewports[i].width = 1.0f;
vk_viewports[i].height = 0.0f;
}
}