Switch from cElementTree to ElementTree.
[mesa.git] / src / intel / vulkan / tests / state_pool.c
index 878ec19a595fee01a02607856a7bacaf56a81a1c..0c9f5d35009247af821685018198cea3ea839385 100644 (file)
@@ -24,6 +24,7 @@
 #include <pthread.h>
 
 #include "anv_private.h"
+#include "test_common.h"
 
 #define NUM_THREADS 8
 #define STATES_PER_THREAD_LOG2 10
 
 #include "state_pool_test_helper.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
-   struct anv_device device;
-   struct anv_block_pool block_pool;
+   struct anv_physical_device physical_device = { };
+   struct anv_device device = {
+      .physical = &physical_device,
+   };
    struct anv_state_pool state_pool;
 
    pthread_mutex_init(&device.mutex, NULL);
+   anv_bo_cache_init(&device.bo_cache);
 
    for (unsigned i = 0; i < NUM_RUNS; i++) {
-      anv_block_pool_init(&block_pool, &device, 256);
-      anv_state_pool_init(&state_pool, &block_pool);
+      anv_state_pool_init(&state_pool, &device, 4096, 0, 256);
 
       /* Grab one so a zero offset is impossible */
       anv_state_pool_alloc(&state_pool, 16, 16);
@@ -50,7 +53,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);