summaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-12-04 12:22:55 -0800
committerEric Anholt <[email protected]>2019-12-04 20:32:15 -0800
commitccf8230547526aab10634fa44af2e5e1c385e9db (patch)
treee1253b07df25e7118d1530cca83c80fdaaa00bc5 /src/freedreno/vulkan
parente26962f756a15f0b6b56822b677b7a984acb9029 (diff)
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 <[email protected]>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c15
1 files 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];