From: Józef Kucia jkucia@codeweavers.com
Needs more tests.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 4a9f7c4f8f99..7457ae3610fa 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -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;