radv: clear push_constant_stages when resetting a command buffer
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Sep 2017 17:08:47 +0000 (19:08 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 13 Sep 2017 07:47:45 +0000 (09:47 +0200)
Per the spec:

   "Resetting a command buffer is an operation that discards any
   previously recorded commands and puts a command buffer in the
   initial state."

As far I'm concerned, that flag can be changed by calling
VkCmdPushConstants() (or any other functions which update it),
so it should be cleared as well.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index b0e6f139e73f5226b2dbef6e45a823124ceecaa0..4578ac80254f26a75f2b36f7b849bda1eee549dd 100644 (file)
@@ -215,6 +215,7 @@ radv_reset_cmd_buffer(struct radv_cmd_buffer *cmd_buffer)
                free(up);
        }
 
+       cmd_buffer->push_constant_stages = 0;
        cmd_buffer->scratch_size_needed = 0;
        cmd_buffer->compute_scratch_size_needed = 0;
        cmd_buffer->esgs_ring_size_needed = 0;