summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-04-24 08:50:23 -0700
committerJason Ekstrand <[email protected]>2017-05-04 19:07:54 -0700
commitd3ed72e2c2164d0ba5f0d2e6d652d8710030aa2b (patch)
tree6e7742bd688d69465a9e606abc3dd6453248e660 /src/intel/vulkan/anv_private.h
parentbb2a3f0df8e9f92e7694c3e643c38807bfa79902 (diff)
anv/allocator: Embed the block_pool in the state_pool
Now that the state stream is allocating off of the state pool, there's no reason why we need the block pool to be separate. 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.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index d66a2681dce..9b0dd678fdc 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -499,7 +499,7 @@ struct anv_fixed_size_state_pool {
#define ANV_STATE_BUCKETS (ANV_MAX_STATE_SIZE_LOG2 - ANV_MIN_STATE_SIZE_LOG2 + 1)
struct anv_state_pool {
- struct anv_block_pool *block_pool;
+ struct anv_block_pool block_pool;
/* The size of blocks which will be allocated from the block pool */
uint32_t block_size;
@@ -557,6 +557,9 @@ anv_invalidate_range(void *start, size_t size)
__builtin_ia32_mfence();
}
+/* The block_pool functions exported for testing only. The block pool should
+ * only be used via a state pool (see below).
+ */
VkResult anv_block_pool_init(struct anv_block_pool *pool,
struct anv_device *device,
uint32_t initial_size);
@@ -565,9 +568,10 @@ int32_t anv_block_pool_alloc(struct anv_block_pool *pool,
uint32_t block_size);
int32_t anv_block_pool_alloc_back(struct anv_block_pool *pool,
uint32_t block_size);
-void anv_state_pool_init(struct anv_state_pool *pool,
- struct anv_block_pool *block_pool,
- uint32_t block_size);
+
+VkResult anv_state_pool_init(struct anv_state_pool *pool,
+ struct anv_device *device,
+ uint32_t block_size);
void anv_state_pool_finish(struct anv_state_pool *pool);
struct anv_state anv_state_pool_alloc(struct anv_state_pool *pool,
uint32_t state_size, uint32_t alignment);
@@ -734,13 +738,8 @@ struct anv_device {
struct anv_bo_cache bo_cache;
- struct anv_block_pool dynamic_state_block_pool;
struct anv_state_pool dynamic_state_pool;
-
- struct anv_block_pool instruction_block_pool;
struct anv_state_pool instruction_state_pool;
-
- struct anv_block_pool surface_state_block_pool;
struct anv_state_pool surface_state_pool;
struct anv_bo workaround_bo;