diff options
author | Jason Ekstrand <[email protected]> | 2015-07-31 08:52:28 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-07-31 08:52:30 -0700 |
commit | 220a01d525cc49380e97b87695f454f5e76ce69a (patch) | |
tree | c1fcf99d2e31dedd0c54ab8234493ab784a6fc6f /src | |
parent | 26ba0ad54d6bef6237abfabf5a3f572c325951d3 (diff) |
vk/batch_chain: Compute secondary exec mode after finishing the bo
Figuring out whether or not to do a copy requires knowing the length of the
final batch_bo. This gets set by anv_batch_bo_finish so we have to do it
afterwards. Not sure how this was even working before.
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/anv_batch_chain.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index 2f09248acee..04528bb06b6 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -636,7 +636,13 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer) anv_batch_emit(&cmd_buffer->batch, GEN8_MI_NOOP); cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_PRIMARY; - } else { + } + + anv_batch_bo_finish(batch_bo, &cmd_buffer->batch); + + surface_bbo->length = cmd_buffer->surface_next; + + if (cmd_buffer->level == VK_CMD_BUFFER_LEVEL_SECONDARY) { /* If this is a secondary command buffer, we need to determine the * mode in which it will be executed with vkExecuteCommands. We * determine this statically here so that this stays in sync with the @@ -666,10 +672,6 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer) cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_COPY_AND_CHAIN; } } - - anv_batch_bo_finish(batch_bo, &cmd_buffer->batch); - - surface_bbo->length = cmd_buffer->surface_next; } static inline VkResult |