diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-11-02 10:33:54 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-09 23:24:42 +0000 |
commit | 9eca84e052b9c5080c54b083fc637428b53338ec (patch) | |
tree | 51c22946ca1a8b3b8222c1a129f65a9a8debb55e /src/intel | |
parent | 6f55a66ad325f2484687f0bee7d1db7d7e499ebc (diff) | |
download | external_mesa3d-9eca84e052b9c5080c54b083fc637428b53338ec.zip external_mesa3d-9eca84e052b9c5080c54b083fc637428b53338ec.tar.gz external_mesa3d-9eca84e052b9c5080c54b083fc637428b53338ec.tar.bz2 |
anv: Add a cmd_buffer_execbuf helper
This puts the actual execbuf2 call in anv_batch_chain.c along with the
other relocation stuff.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit db9f4b2a2bbf1aff3c6c878735495fc7accbb11e)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 8 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 3 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index dfa9abf..529fe7e 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1131,3 +1131,11 @@ anv_cmd_buffer_prepare_execbuf(struct anv_cmd_buffer *cmd_buffer) if (!cmd_buffer->execbuf2.need_reloc) cmd_buffer->execbuf2.execbuf.flags |= I915_EXEC_NO_RELOC; } + +VkResult +anv_cmd_buffer_execbuf(struct anv_device *device, + struct anv_cmd_buffer *cmd_buffer) +{ + return anv_device_execbuf(device, &cmd_buffer->execbuf2.execbuf, + cmd_buffer->execbuf2.bos); +} diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 6d8de90..27402ce 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1103,8 +1103,7 @@ VkResult anv_QueueSubmit( pSubmits[i].pCommandBuffers[j]); assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY); - result = anv_device_execbuf(device, &cmd_buffer->execbuf2.execbuf, - cmd_buffer->execbuf2.bos); + result = anv_cmd_buffer_execbuf(device, cmd_buffer); if (result != VK_SUCCESS) return result; } diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 9947b8c..09345c8 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1197,6 +1197,8 @@ void anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer); void anv_cmd_buffer_add_secondary(struct anv_cmd_buffer *primary, struct anv_cmd_buffer *secondary); void anv_cmd_buffer_prepare_execbuf(struct anv_cmd_buffer *cmd_buffer); +VkResult anv_cmd_buffer_execbuf(struct anv_device *device, + struct anv_cmd_buffer *cmd_buffer); VkResult anv_cmd_buffer_reset(struct anv_cmd_buffer *cmd_buffer); |