From e3061e628117d22fce3ba35c6243e8ada562c935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Thu, 18 Apr 2024 21:15:26 +0200 Subject: [PATCH] v3dv: provide implementation for CmdSetViewportWithCount As with CmdSetViewport, we need to provide a custom implementation because we want to call and save the outcome of viewport_compute_xform when the viewport is set, not during emission. We can just call v3dv_CmdSetViewport, as that one is already calling vk_common_SetViewportWithCount. Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_cmd_buffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c index dc42c3f3af2..ff271d69853 100644 --- a/src/broadcom/vulkan/v3dv_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c @@ -2272,6 +2272,14 @@ v3dv_CmdSetViewport(VkCommandBuffer commandBuffer, } } +VKAPI_ATTR void VKAPI_CALL +v3dv_CmdSetViewportWithCount(VkCommandBuffer commandBuffer, + uint32_t viewportCount, + const VkViewport *pViewports) +{ + v3dv_CmdSetViewport(commandBuffer, 0, viewportCount, pViewports); +} + /* We keep a custom CmdSetScissor because we need to set the scissor * count. This is specially relevant to our case because we are * pushing/popping the dynamic state as part of the meta operations.