vkd3d: Avoid passing invalid viewport to Vulkan.

Needs more tests.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-02-14 12:22:34 +01:00 committed by Alexandre Julliard
parent c333fddaf9
commit 70822141b7

View File

@ -2953,6 +2953,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
vk_viewports[i].height = -viewports[i].Height;
vk_viewports[i].minDepth = viewports[i].MinDepth;
vk_viewports[i].maxDepth = viewports[i].MaxDepth;
if (!vk_viewports[i].width || !vk_viewports[i].height)
{
FIXME("Invalid viewport %u, ignoring RSSetViewports().\n", i);
return;
}
}
vk_procs = &list->device->vk_procs;