kk: Remove signal and end from upload writes not to end compute encoders

Not ending the compute encoder allows us to concatenate next commands into
the same encoder if a compute encoder is requested.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
This commit is contained in:
Aitor Camacho 2025-12-16 00:31:51 +09:00 committed by Marge Bot
parent ea7f5f7f1c
commit e11240228b
3 changed files with 6 additions and 10 deletions

View file

@ -167,9 +167,6 @@ upload_queue_writes(struct kk_cmd_buffer *cmd)
}
enc->copy_query_pool_result_infos.size = 0u;
}
/* All immediate write done, reset encoder */
kk_encoder_signal_fence_and_end(cmd);
}
static void

View file

@ -96,10 +96,9 @@ kk_CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent _event,
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_SET);
if (last_used != KK_ENC_NONE)
kk_encoder_signal_fence_and_end(cmd);
else
if (last_used == KK_ENC_NONE || last_used == KK_ENC_COMPUTE)
upload_queue_writes(cmd);
kk_encoder_signal_fence_and_end(cmd);
/* If we were inside a render pass, restart it loading attachments */
if (last_used == KK_ENC_RENDER) {
@ -119,10 +118,9 @@ kk_CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent _event,
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_RESET);
if (last_used != KK_ENC_NONE)
kk_encoder_signal_fence_and_end(cmd);
else
if (last_used == KK_ENC_NONE || last_used == KK_ENC_COMPUTE)
upload_queue_writes(cmd);
kk_encoder_signal_fence_and_end(cmd);
/* If we were inside a render pass, restart it loading attachments */
if (last_used == KK_ENC_RENDER) {

View file

@ -424,6 +424,7 @@ kk_CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool,
util_dynarray_append(&cmd->encoder->copy_query_pool_result_infos, info);
/* If we are not mid encoder, just upload the writes */
if (cmd->encoder->main.last_used == KK_ENC_NONE)
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
if (last_used == KK_ENC_NONE || last_used == KK_ENC_COMPUTE)
upload_queue_writes(cmd);
}