summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/tests
diff options
context:
space:
mode:
authorScott D Phillips <[email protected]>2018-03-01 09:25:44 -0800
committerJason Ekstrand <[email protected]>2018-06-01 13:49:22 -0700
commite662bdb82084a9e8136aea1da10423786e103beb (patch)
treefdbf13fb1e3bdff93fca9d595cc8db3f379ce84c /src/intel/vulkan/tests
parentf00fcfb7a2e137c7c0064b5e4167bb7fb49537a9 (diff)
anv: Soft-pin state pools
The state_pools reserve virtual address space of the full BLOCK_POOL_MEMFD_SIZE, but maintain the current behavior of growing from the middle. v2: - rename block_pool::offset to block_pool::start_address (Jason) - assign state pool start_address statically (Jason) v3: - remove unnecessary bo_flags tampering for the dynamic pool (Jason) Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/tests')
-rw-r--r--src/intel/vulkan/tests/block_pool_no_free.c2
-rw-r--r--src/intel/vulkan/tests/state_pool.c2
-rw-r--r--src/intel/vulkan/tests/state_pool_free_list_only.c2
-rw-r--r--src/intel/vulkan/tests/state_pool_no_free.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/tests/block_pool_no_free.c b/src/intel/vulkan/tests/block_pool_no_free.c
index 0d08526e632..17006dd3bc7 100644
--- a/src/intel/vulkan/tests/block_pool_no_free.c
+++ b/src/intel/vulkan/tests/block_pool_no_free.c
@@ -116,7 +116,7 @@ static void run_test()
struct anv_block_pool pool;
pthread_mutex_init(&device.mutex, NULL);
- anv_block_pool_init(&pool, &device, 4096, 0);
+ anv_block_pool_init(&pool, &device, 4096, 4096, 0);
for (unsigned i = 0; i < NUM_THREADS; i++) {
jobs[i].pool = &pool;
diff --git a/src/intel/vulkan/tests/state_pool.c b/src/intel/vulkan/tests/state_pool.c
index 99ac7968d88..cb0e403f495 100644
--- a/src/intel/vulkan/tests/state_pool.c
+++ b/src/intel/vulkan/tests/state_pool.c
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
pthread_mutex_init(&device.mutex, NULL);
for (unsigned i = 0; i < NUM_RUNS; i++) {
- anv_state_pool_init(&state_pool, &device, 256, 0);
+ anv_state_pool_init(&state_pool, &device, 4096, 256, 0);
/* Grab one so a zero offset is impossible */
anv_state_pool_alloc(&state_pool, 16, 16);
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 9370b8680ac..3ea9e755927 100644
--- a/src/intel/vulkan/tests/state_pool_free_list_only.c
+++ b/src/intel/vulkan/tests/state_pool_free_list_only.c
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
struct anv_state_pool state_pool;
pthread_mutex_init(&device.mutex, NULL);
- anv_state_pool_init(&state_pool, &device, 4096, 0);
+ anv_state_pool_init(&state_pool, &device, 4096, 4096, 0);
/* Grab one so a zero offset is impossible */
anv_state_pool_alloc(&state_pool, 16, 16);
diff --git a/src/intel/vulkan/tests/state_pool_no_free.c b/src/intel/vulkan/tests/state_pool_no_free.c
index 021137337f8..404c8b003fc 100644
--- a/src/intel/vulkan/tests/state_pool_no_free.c
+++ b/src/intel/vulkan/tests/state_pool_no_free.c
@@ -61,7 +61,7 @@ static void run_test()
struct anv_state_pool state_pool;
pthread_mutex_init(&device.mutex, NULL);
- anv_state_pool_init(&state_pool, &device, 64, 0);
+ anv_state_pool_init(&state_pool, &device, 4096, 64, 0);
pthread_barrier_init(&barrier, NULL, NUM_THREADS);