diff options
author | Jason Ekstrand <[email protected]> | 2017-04-23 17:22:26 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-05-04 19:07:54 -0700 |
commit | e86aeecb6aa3cf5992bb87792c2219f49c905e05 (patch) | |
tree | cacfa961b7c9e5c444044a907afe9ea35920b8f7 /src/intel/vulkan/anv_private.h | |
parent | e049dea5b280bebd6480823a4cddd70baf46fea7 (diff) |
anv/allocator: Convert the state stream to pull from a state pool
Reviewed-by: Juan A. Suarez Romero <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 8652f105f92..27ae0d294b1 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -511,17 +511,19 @@ struct anv_state_pool { struct anv_state_stream_block; struct anv_state_stream { - struct anv_block_pool *block_pool; + struct anv_state_pool *state_pool; + + /* The size of blocks to allocate from the state pool */ + uint32_t block_size; - /* The current working block */ - struct anv_state_stream_block *block; + /* Current block we're allocating from */ + struct anv_state block; - /* Offset at which the current block starts */ - uint32_t start; - /* Offset at which to allocate the next state */ + /* Offset into the current block at which to allocate the next state */ uint32_t next; - /* Offset at which the current block ends */ - uint32_t end; + + /* List of all blocks allocated from this pool */ + struct anv_state_stream_block *block_list; }; #define CACHELINE_SIZE 64 @@ -566,7 +568,8 @@ struct anv_state anv_state_pool_alloc(struct anv_state_pool *pool, size_t state_size, size_t alignment); void anv_state_pool_free(struct anv_state_pool *pool, struct anv_state state); void anv_state_stream_init(struct anv_state_stream *stream, - struct anv_block_pool *block_pool); + struct anv_state_pool *state_pool, + uint32_t block_size); void anv_state_stream_finish(struct anv_state_stream *stream); struct anv_state anv_state_stream_alloc(struct anv_state_stream *stream, uint32_t size, uint32_t alignment); |