[Mesa-dev] [PATCH 4/4] radv: do not update the number of scissors in vkCmdSetScissor()

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Sep 18 09:52:12 UTC 2017


The Vulkan spec (1.0.61) says:

   "The number of scissors used by a pipeline is still specified
    by the scissorCount member of VkPipelinescissorStateCreateInfo."

So, the number of scissors is defined at pipeline creation
time and shouldn't be updated when they are set dynamically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 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 c5422c6aa5..f30932cae2 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2520,9 +2520,6 @@ void radv_CmdSetScissor(
 	assert(firstScissor < MAX_SCISSORS);
 	assert(total_count >= 1 && total_count <= MAX_SCISSORS);
 
-	if (cmd_buffer->state.dynamic.scissor.count < total_count)
-		cmd_buffer->state.dynamic.scissor.count = total_count;
-
 	memcpy(cmd_buffer->state.dynamic.scissor.scissors + firstScissor,
 	       pScissors, scissorCount * sizeof(*pScissors));
 	cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_SCISSOR;
-- 
2.14.1



More information about the mesa-dev mailing list