From 913a9b76f78fd6fbef3658667acf2d737d656eb2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 24 Sep 2015 08:46:39 -0700 Subject: [PATCH] anv/batch_chain: Remove the current_surface_bo helper It's no longer used outside anv_batch_chain so we certainly don't need to be exporting. Inside anv_batch_chain, it's only used twice and it can be replaced by a single line so there's really no point. --- src/vulkan/anv_batch_chain.c | 10 ++-------- src/vulkan/anv_private.h | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index 6c37ce0aca3..aaf65c33f84 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -383,12 +383,6 @@ anv_cmd_buffer_current_surface_bbo(struct anv_cmd_buffer *cmd_buffer) return LIST_ENTRY(struct anv_batch_bo, cmd_buffer->surface_bos.prev, link); } -struct anv_bo * -anv_cmd_buffer_current_surface_bo(struct anv_cmd_buffer *cmd_buffer) -{ - return &anv_cmd_buffer_current_surface_bbo(cmd_buffer)->bo; -} - struct anv_reloc_list * anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer) { @@ -399,7 +393,7 @@ struct anv_address anv_cmd_buffer_surface_base_address(struct anv_cmd_buffer *cmd_buffer) { return (struct anv_address) { - .bo = anv_cmd_buffer_current_surface_bo(cmd_buffer), + .bo = &anv_cmd_buffer_current_surface_bbo(cmd_buffer)->bo, .offset = 0, }; } @@ -478,7 +472,7 @@ anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer, uint32_t size, uint32_t alignment) { struct anv_bo *surface_bo = - anv_cmd_buffer_current_surface_bo(cmd_buffer); + &anv_cmd_buffer_current_surface_bbo(cmd_buffer)->bo; struct anv_state state; state.offset = align_u32(cmd_buffer->surface_next, alignment); diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 2e8bfa2c1d6..f710cefe36c 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -893,8 +893,6 @@ struct anv_state anv_cmd_buffer_merge_dynamic(struct anv_cmd_buffer *cmd_buffer, void anv_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer, struct anv_subpass *subpass); -struct anv_bo * -anv_cmd_buffer_current_surface_bo(struct anv_cmd_buffer *cmd_buffer); struct anv_reloc_list * anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer); struct anv_address -- 2.30.2