diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index d897e8103a5..c38385a23f5 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1046,6 +1046,13 @@ radv_query_shader(struct radv_cmd_buffer *cmd_buffer, VkPipeline *pipeline, radv_unaligned_dispatch(cmd_buffer, count, 1, 1); + /* Ensure that the query copy dispatch is complete before a potential vkCmdResetPool because + * there is an implicit execution dependency from each such query command to all query commands + * previously submitted to the same queue. + */ + cmd_buffer->active_query_flush_bits |= + RADV_CMD_FLAG_CS_PARTIAL_FLUSH | RADV_CMD_FLAG_INV_L2 | RADV_CMD_FLAG_INV_VCACHE; + /* Restore conditional rendering. */ cmd_buffer->state.predicating = old_predicating;