diff options
author | Jason Ekstrand <[email protected]> | 2015-07-29 11:57:44 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-07-29 12:01:08 -0700 |
commit | 8208f01a359ee7037ae46b7617cc72baf7771044 (patch) | |
tree | 99607de66ab22e11e70647b9e1396e9c907b7485 /src/vulkan/anv_private.h | |
parent | 7d507342403c775639383f0e228a081d2e3d4b44 (diff) |
vk/cmd_buffer: Store the relocation list in the anv_batch_bo struct
Before, we were doing this thing where we had one big relocation list for
the whole command buffer and each subbuffer took a chunk out of it. Now,
we store the actual relocation list in the anv_batch_bo. This comes at the
cost of more small allocations but makes a lot of things simpler.
Diffstat (limited to 'src/vulkan/anv_private.h')
-rw-r--r-- | src/vulkan/anv_private.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index cb302c96162..1d04dfca9d7 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -471,9 +471,7 @@ struct anv_batch_bo { /* Bytes actually consumed in this batch BO */ size_t length; - /* These offsets reference the per-batch reloc list */ - size_t first_reloc; - size_t num_relocs; + struct anv_reloc_list relocs; }; struct anv_batch { @@ -702,10 +700,8 @@ struct anv_cmd_buffer { * These fields are initialized by anv_cmd_buffer_init_batch_bo_chain(). */ struct list_head batch_bos; - struct anv_reloc_list batch_relocs; struct list_head surface_bos; uint32_t surface_next; - struct anv_reloc_list surface_relocs; /* Information needed for execbuf * @@ -742,6 +738,8 @@ void anv_cmd_buffer_prepare_execbuf(struct anv_cmd_buffer *cmd_buffer); struct anv_bo * anv_cmd_buffer_current_surface_bo(struct anv_cmd_buffer *cmd_buffer); +struct anv_reloc_list * +anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer); struct anv_state anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer, uint32_t size, uint32_t alignment); |