aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/tests
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/tests
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/tests')
-rw-r--r--src/intel/vulkan/tests/state_pool.c5
-rw-r--r--src/intel/vulkan/tests/state_pool_free_list_only.c5
-rw-r--r--src/intel/vulkan/tests/state_pool_no_free.c5
3 files changed, 3 insertions, 12 deletions
diff --git a/src/intel/vulkan/tests/state_pool.c b/src/intel/vulkan/tests/state_pool.c
index db3f3ec08a4..249fe64fe92 100644
--- a/src/intel/vulkan/tests/state_pool.c
+++ b/src/intel/vulkan/tests/state_pool.c
@@ -38,14 +38,12 @@ int main(int argc, char **argv)
struct anv_device device = {
.instance = &instance,
};
- struct anv_block_pool block_pool;
struct anv_state_pool state_pool;
pthread_mutex_init(&device.mutex, NULL);
for (unsigned i = 0; i < NUM_RUNS; i++) {
- anv_block_pool_init(&block_pool, &device, 4096);
- anv_state_pool_init(&state_pool, &block_pool, 256);
+ anv_state_pool_init(&state_pool, &device, 256);
/* Grab one so a zero offset is impossible */
anv_state_pool_alloc(&state_pool, 16, 16);
@@ -53,7 +51,6 @@ int main(int argc, char **argv)
run_state_pool_test(&state_pool);
anv_state_pool_finish(&state_pool);
- anv_block_pool_finish(&block_pool);
}
pthread_mutex_destroy(&device.mutex);
diff --git a/src/intel/vulkan/tests/state_pool_free_list_only.c b/src/intel/vulkan/tests/state_pool_free_list_only.c
index 93b71efd437..6a04d641ce4 100644
--- a/src/intel/vulkan/tests/state_pool_free_list_only.c
+++ b/src/intel/vulkan/tests/state_pool_free_list_only.c
@@ -37,12 +37,10 @@ int main(int argc, char **argv)
struct anv_device device = {
.instance = &instance,
};
- struct anv_block_pool block_pool;
struct anv_state_pool state_pool;
pthread_mutex_init(&device.mutex, NULL);
- anv_block_pool_init(&block_pool, &device, 4096);
- anv_state_pool_init(&state_pool, &block_pool, 4096);
+ anv_state_pool_init(&state_pool, &device, 4096);
/* Grab one so a zero offset is impossible */
anv_state_pool_alloc(&state_pool, 16, 16);
@@ -64,6 +62,5 @@ int main(int argc, char **argv)
run_state_pool_test(&state_pool);
anv_state_pool_finish(&state_pool);
- anv_block_pool_finish(&block_pool);
pthread_mutex_destroy(&device.mutex);
}
diff --git a/src/intel/vulkan/tests/state_pool_no_free.c b/src/intel/vulkan/tests/state_pool_no_free.c
index c3c7c24a0a3..1ba832cf665 100644
--- a/src/intel/vulkan/tests/state_pool_no_free.c
+++ b/src/intel/vulkan/tests/state_pool_no_free.c
@@ -58,12 +58,10 @@ static void run_test()
struct anv_device device = {
.instance = &instance,
};
- struct anv_block_pool block_pool;
struct anv_state_pool state_pool;
pthread_mutex_init(&device.mutex, NULL);
- anv_block_pool_init(&block_pool, &device, 4096);
- anv_state_pool_init(&state_pool, &block_pool, 64);
+ anv_state_pool_init(&state_pool, &device, 64);
pthread_barrier_init(&barrier, NULL, NUM_THREADS);
@@ -109,7 +107,6 @@ static void run_test()
}
anv_state_pool_finish(&state_pool);
- anv_block_pool_finish(&block_pool);
pthread_mutex_destroy(&device.mutex);
}