From: Jason Ekstrand Date: Thu, 24 Sep 2015 15:46:39 +0000 (-0700) Subject: anv/batch_chain: Remove the current_surface_bo helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=913a9b76f78fd6fbef3658667acf2d737d656eb2;p=mesa.git 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. --- 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