diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-02-16 21:23:58 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-02-17 09:28:23 +0100 |
commit | d5bf4c739462a686fb186f5e804ea9e628431526 (patch) | |
tree | 78ce72b45bde063908bd76187fb5715d0e189af3 /src/amd/vulkan/radv_private.h | |
parent | f4487016226c3337fa5fb2244c75ce298093c3ce (diff) |
radv: Use different allocator for descriptor set vram.
This one only keeps allocated memory in the list, and list nodes
in the descriptor sets. Thsi doesn't need messing around with
max_sets, and we get automatic merging of free regions.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 9c326dcef83..099dba3f643 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -536,7 +536,6 @@ struct radv_descriptor_range { struct radv_descriptor_set { const struct radv_descriptor_set_layout *layout; - struct list_head descriptor_pool; uint32_t size; struct radv_buffer_view *buffer_views; @@ -544,28 +543,19 @@ struct radv_descriptor_set { uint64_t va; uint32_t *mapped_ptr; struct radv_descriptor_range *dynamic_descriptors; - struct radeon_winsys_bo *descriptors[0]; -}; -struct radv_descriptor_pool_free_node { - int next; - uint32_t offset; - uint32_t size; + struct list_head vram_list; + + struct radeon_winsys_bo *descriptors[0]; }; struct radv_descriptor_pool { - struct list_head descriptor_sets; - struct radeon_winsys_bo *bo; uint8_t *mapped_ptr; uint64_t current_offset; uint64_t size; - int free_list; - int full_list; - uint32_t max_sets; - uint32_t allocated_sets; - struct radv_descriptor_pool_free_node free_nodes[]; + struct list_head vram_list; }; struct radv_buffer { |