summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-10-11 16:10:43 +0200
committerSamuel Pitoiset <[email protected]>2017-10-16 14:09:51 +0200
commitb253f3189ac6440103ae70784030a577f36100a5 (patch)
treec7c7e1a958c34b5a8647b81e135cd34b9c138fae
parent4e65b4ea4b28642dbf15e562cd7c845c060a0f0e (diff)
radv: always dirty some states after executing secondary buffers
The spec requires the number of buffer to be greater than 0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index b01f1ee7efa..64e7e2637b9 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2622,6 +2622,8 @@ void radv_CmdExecuteCommands(
{
RADV_FROM_HANDLE(radv_cmd_buffer, primary, commandBuffer);
+ assert(commandBufferCount > 0);
+
/* Emit pending flushes on primary prior to executing secondary */
si_emit_cache_flush(primary);
@@ -2671,12 +2673,12 @@ void radv_CmdExecuteCommands(
primary->state.last_primitive_reset_index = secondary->state.last_primitive_reset_index;
}
- /* if we execute secondary we need to mark some stuff to reset dirty */
- if (commandBufferCount) {
- primary->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
- primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
- radv_mark_descriptor_sets_dirty(primary);
- }
+ /* After executing commands from secondary buffers we have to dirty
+ * some states.
+ */
+ primary->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
+ primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
+ radv_mark_descriptor_sets_dirty(primary);
}
VkResult radv_CreateCommandPool(