From ccf8230547526aab10634fa44af2e5e1c385e9db Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 4 Dec 2019 12:22:55 -0800 Subject: [PATCH] turnip: Move pipeline BO list adding to BindPipeline. We only need to do it once when we bind, rather than having to check at every draw call. Reviewed-by: Jonathan Marek --- src/freedreno/vulkan/tu_cmd_buffer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index bb9d18604b8..a32495103f1 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -1815,6 +1815,13 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, unreachable("unrecognized pipeline bind point"); break; } + + tu_bo_list_add(&cmd->bo_list, &pipeline->program.binary_bo, + MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_DUMP); + for (uint32_t i = 0; i < pipeline->cs.bo_count; i++) { + tu_bo_list_add(&cmd->bo_list, pipeline->cs.bos[i], + MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_DUMP); + } } void @@ -2781,14 +2788,6 @@ tu6_bind_draw_states(struct tu_cmd_buffer *cmd, tu_cs_sanity_check(cs); /* track BOs */ - if (cmd->state.dirty & TU_CMD_DIRTY_PIPELINE) { - tu_bo_list_add(&cmd->bo_list, &pipeline->program.binary_bo, - MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_DUMP); - for (uint32_t i = 0; i < pipeline->cs.bo_count; i++) { - tu_bo_list_add(&cmd->bo_list, pipeline->cs.bos[i], - MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_DUMP); - } - } if (cmd->state.dirty & TU_CMD_DIRTY_VERTEX_BUFFERS) { for (uint32_t i = 0; i < MAX_VBS; i++) { const struct tu_buffer *buf = cmd->state.vb.buffers[i]; -- 2.30.2