diff options
author | Jason Ekstrand <[email protected]> | 2015-07-27 15:14:31 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-07-27 15:14:31 -0700 |
commit | 4ced8650d492c8a346bdc51c494b2268d7bf473d (patch) | |
tree | 06ba2a9d834513c5751c9de7ff13255605df4385 /src/vulkan/anv_cmd_buffer.c | |
parent | d4c249364dc7049cf91d8f626b289d51a53b3bc1 (diff) |
vk/cmd_buffer: Move the remaining entrypoints into cmd_emit.c
Diffstat (limited to 'src/vulkan/anv_cmd_buffer.c')
-rw-r--r-- | src/vulkan/anv_cmd_buffer.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 34916386b6a..bb58338c85f 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -453,62 +453,6 @@ anv_cmd_buffer_reset_batch_bo_chain(struct anv_cmd_buffer *cmd_buffer) cmd_buffer->surface_relocs.num_relocs = 0; } -VkResult anv_CreateCommandBuffer( - VkDevice _device, - const VkCmdBufferCreateInfo* pCreateInfo, - VkCmdBuffer* pCmdBuffer) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - struct anv_cmd_buffer *cmd_buffer; - VkResult result; - - assert(pCreateInfo->level == VK_CMD_BUFFER_LEVEL_PRIMARY); - - cmd_buffer = anv_device_alloc(device, sizeof(*cmd_buffer), 8, - VK_SYSTEM_ALLOC_TYPE_API_OBJECT); - if (cmd_buffer == NULL) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - - cmd_buffer->device = device; - - result = anv_cmd_buffer_init_batch_bo_chain(cmd_buffer); - if (result != VK_SUCCESS) - goto fail; - - anv_cmd_state_init(&cmd_buffer->state); - - anv_state_stream_init(&cmd_buffer->surface_state_stream, - &device->surface_state_block_pool); - anv_state_stream_init(&cmd_buffer->dynamic_state_stream, - &device->dynamic_state_block_pool); - - *pCmdBuffer = anv_cmd_buffer_to_handle(cmd_buffer); - - return VK_SUCCESS; - - fail: anv_device_free(device, cmd_buffer); - - return result; -} - -VkResult anv_DestroyCommandBuffer( - VkDevice _device, - VkCmdBuffer _cmd_buffer) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, _cmd_buffer); - - anv_cmd_state_fini(&cmd_buffer->state); - - anv_cmd_buffer_fini_batch_bo_chain(cmd_buffer); - - anv_state_stream_finish(&cmd_buffer->surface_state_stream); - anv_state_stream_finish(&cmd_buffer->dynamic_state_stream); - anv_device_free(device, cmd_buffer); - - return VK_SUCCESS; -} - static VkResult anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer, struct anv_bo *bo, @@ -673,36 +617,3 @@ anv_cmd_buffer_compute_validate_list(struct anv_cmd_buffer *cmd_buffer) cmd_buffer->execbuf.rsvd1 = cmd_buffer->device->context_id; cmd_buffer->execbuf.rsvd2 = 0; } - -VkResult anv_EndCommandBuffer( - VkCmdBuffer cmdBuffer) -{ - ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer); - struct anv_device *device = cmd_buffer->device; - - anv_cmd_buffer_emit_batch_buffer_end(cmd_buffer); - - /* The algorithm used to compute the validate list is not threadsafe as - * it uses the bo->index field. We have to lock the device around it. - * Fortunately, the chances for contention here are probably very low. - */ - pthread_mutex_lock(&device->mutex); - anv_cmd_buffer_compute_validate_list(cmd_buffer); - pthread_mutex_unlock(&device->mutex); - - return VK_SUCCESS; -} - -VkResult anv_ResetCommandBuffer( - VkCmdBuffer cmdBuffer, - VkCmdBufferResetFlags flags) -{ - ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer); - - anv_cmd_buffer_reset_batch_bo_chain(cmd_buffer); - - anv_cmd_state_fini(&cmd_buffer->state); - anv_cmd_state_init(&cmd_buffer->state); - - return VK_SUCCESS; -} |