aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_batch_chain.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-01-19 08:54:32 -0600
committerJason Ekstrand <[email protected]>2019-02-01 17:09:42 -0600
commit48ed2a7bb009618edfde28ee87ae391c1879c35b (patch)
tree6a7979c5f3a22f273cf1db4af2987a27757a7c53 /src/intel/vulkan/anv_batch_chain.c
parente644ed468f986b44310b1cc5d5695ed4d473223d (diff)
anv: Implement VK_EXT_buffer_device_address
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_batch_chain.c')
-rw-r--r--src/intel/vulkan/anv_batch_chain.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 1b8811ce81a..ff713d529af 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1393,6 +1393,20 @@ setup_execbuf_for_cmd_buffer(struct anv_execbuf *execbuf,
anv_execbuf_add_bo_set(execbuf, cmd_buffer->surface_relocs.deps, 0,
&cmd_buffer->device->alloc);
+ /* Add the BOs for all the pinned buffers */
+ if (cmd_buffer->device->pinned_buffers->entries) {
+ struct set *pinned_bos = _mesa_pointer_set_create(NULL);
+ if (pinned_bos == NULL)
+ return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY);
+ set_foreach(cmd_buffer->device->pinned_buffers, entry) {
+ const struct anv_buffer *buffer = entry->key;
+ _mesa_set_add(pinned_bos, buffer->address.bo);
+ }
+ anv_execbuf_add_bo_set(execbuf, pinned_bos, 0,
+ &cmd_buffer->device->alloc);
+ _mesa_set_destroy(pinned_bos, NULL);
+ }
+
struct anv_block_pool *pool;
pool = &cmd_buffer->device->dynamic_state_pool.block_pool;
anv_block_pool_foreach_bo(bo, pool) {