vkd3d: Set the maximum viewport count in d3d12_pipeline_state_get_or_create_pipeline().

VK_DYNAMIC_STATE_VIEWPORT and VK_DYNAMIC_STATE_SCISSOR specify that
viewports and scissor rectangles are dynamic state, but not their
counts.

It took a while to notice this issue because the existing code seemed to
largely work as intended on hardware implementations, but tests using
the additional viewports would fail on llvmpipe.
This commit is contained in:
Henri Verbeet
2025-07-29 17:13:57 +02:00
parent 74d8c23f71
commit 55fe8df979
Notes: Henri Verbeet 2025-07-31 15:06:45 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1663
2 changed files with 17 additions and 8 deletions

View File

@@ -3971,9 +3971,9 @@ VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_sta
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,
.pNext = NULL,
.flags = 0,
.viewportCount = 1,
.viewportCount = D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE,
.pViewports = NULL,
.scissorCount = 1,
.scissorCount = D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE,
.pScissors = NULL,
};
static const VkDynamicState dynamic_states[] =