mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
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:
parent
ea7f5f7f1c
commit
e11240228b
3 changed files with 6 additions and 10 deletions
|
|
@ -167,9 +167,6 @@ upload_queue_writes(struct kk_cmd_buffer *cmd)
|
||||||
}
|
}
|
||||||
enc->copy_query_pool_result_infos.size = 0u;
|
enc->copy_query_pool_result_infos.size = 0u;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All immediate write done, reset encoder */
|
|
||||||
kk_encoder_signal_fence_and_end(cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,9 @@ kk_CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent _event,
|
||||||
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
|
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
|
||||||
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
|
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
|
||||||
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_SET);
|
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_SET);
|
||||||
if (last_used != KK_ENC_NONE)
|
if (last_used == KK_ENC_NONE || last_used == KK_ENC_COMPUTE)
|
||||||
kk_encoder_signal_fence_and_end(cmd);
|
|
||||||
else
|
|
||||||
upload_queue_writes(cmd);
|
upload_queue_writes(cmd);
|
||||||
|
kk_encoder_signal_fence_and_end(cmd);
|
||||||
|
|
||||||
/* If we were inside a render pass, restart it loading attachments */
|
/* If we were inside a render pass, restart it loading attachments */
|
||||||
if (last_used == KK_ENC_RENDER) {
|
if (last_used == KK_ENC_RENDER) {
|
||||||
|
|
@ -119,10 +118,9 @@ kk_CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent _event,
|
||||||
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
|
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
|
||||||
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
|
enum kk_encoder_type last_used = cmd->encoder->main.last_used;
|
||||||
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_RESET);
|
kk_cmd_write(cmd, event->bo->map, event->addr, VK_EVENT_RESET);
|
||||||
if (last_used != KK_ENC_NONE)
|
if (last_used == KK_ENC_NONE || last_used == KK_ENC_COMPUTE)
|
||||||
kk_encoder_signal_fence_and_end(cmd);
|
|
||||||
else
|
|
||||||
upload_queue_writes(cmd);
|
upload_queue_writes(cmd);
|
||||||
|
kk_encoder_signal_fence_and_end(cmd);
|
||||||
|
|
||||||
/* If we were inside a render pass, restart it loading attachments */
|
/* If we were inside a render pass, restart it loading attachments */
|
||||||
if (last_used == KK_ENC_RENDER) {
|
if (last_used == KK_ENC_RENDER) {
|
||||||
|
|
|
||||||
|
|
@ -424,6 +424,7 @@ kk_CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool,
|
||||||
|
|
||||||
util_dynarray_append(&cmd->encoder->copy_query_pool_result_infos, info);
|
util_dynarray_append(&cmd->encoder->copy_query_pool_result_infos, info);
|
||||||
/* If we are not mid encoder, just upload the writes */
|
/* 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);
|
upload_queue_writes(cmd);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue