From 4fc7510a7cb370bcbdeaa1d54b4f51222484bb31 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 29 Jul 2015 12:01:02 -0700 Subject: [PATCH] vk/cmd_buffer: Move emit_batch_buffer_end higher in the file --- src/vulkan/anv_cmd_buffer.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index d7a006d9b7a..e673ac6f94e 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -474,6 +474,20 @@ anv_cmd_buffer_reset_batch_bo_chain(struct anv_cmd_buffer *cmd_buffer) cmd_buffer->surface_next = 1; } +void +anv_cmd_buffer_emit_batch_buffer_end(struct anv_cmd_buffer *cmd_buffer) +{ + struct anv_batch_bo *batch_bo = anv_cmd_buffer_current_batch_bo(cmd_buffer); + struct anv_batch_bo *surface_bbo = + anv_cmd_buffer_current_surface_bbo(cmd_buffer); + + anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_END); + + anv_batch_bo_finish(batch_bo, &cmd_buffer->batch); + + surface_bbo->length = cmd_buffer->surface_next; +} + static VkResult anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer, struct anv_bo *bo, @@ -569,20 +583,6 @@ anv_cmd_buffer_process_relocs(struct anv_cmd_buffer *cmd_buffer, } } -void -anv_cmd_buffer_emit_batch_buffer_end(struct anv_cmd_buffer *cmd_buffer) -{ - struct anv_batch_bo *batch_bo = anv_cmd_buffer_current_batch_bo(cmd_buffer); - struct anv_batch_bo *surface_bbo = - anv_cmd_buffer_current_surface_bbo(cmd_buffer); - - anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_END); - - anv_batch_bo_finish(batch_bo, &cmd_buffer->batch); - - surface_bbo->length = cmd_buffer->surface_next; -} - void anv_cmd_buffer_prepare_execbuf(struct anv_cmd_buffer *cmd_buffer) { -- 2.30.2