From 60878dd00ceab6528c0cdb69fbd111470a789610 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 18 Sep 2017 11:45:55 +0200 Subject: [PATCH] radv: do not update the number of viewports in vkCmdSetViewport() The Vulkan spec (1.0.61) says: "The number of viewports used by a pipeline is still specified by the viewportCount member of VkPipelineViewportStateCreateInfo." So, the number of viewports is defined at pipeline creation time and shouldn't be updated when they are set dynamically. Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- src/amd/vulkan/radv_cmd_buffer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index d7b27cae27c..9724cc52940 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2502,9 +2502,6 @@ void radv_CmdSetViewport( assert(firstViewport < MAX_VIEWPORTS); assert(total_count >= 1 && total_count <= MAX_VIEWPORTS); - if (cmd_buffer->state.dynamic.viewport.count < total_count) - cmd_buffer->state.dynamic.viewport.count = total_count; - memcpy(cmd_buffer->state.dynamic.viewport.viewports + firstViewport, pViewports, viewportCount * sizeof(*pViewports));