-- v3: vkd3d: Treat negative viewport widths as invalid. vkd3d: Do not skip all viewports if one is invalid.
From: Conor McCarthy cmccarthy@codeweavers.com
Fixes blank screen in Assassin's Creed: Valhalla. --- libs/vkd3d/command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 6eddcfa2..4abee07c 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -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; } }
From: Conor McCarthy cmccarthy@codeweavers.com
Negative widths are not supported in Vulkan. --- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 4abee07c..d316b445 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3963,7 +3963,7 @@ 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) + if (vk_viewports[i].width <= 0.0f) { /* Vulkan does not support width <= 0 */ FIXME_ONCE("Setting invalid viewport %u to zero height.\n", i);
This merge request was approved by Henri Verbeet.