anv/tests: Zero-initialize instances
[mesa.git] / src / intel / vulkan / tests / state_pool_no_free.c
index 4b248c2ee66b9ff7bb93918324c3671ca8b17217..687e52606c1ccae3a9a513b70bef86cfad9f9f70 100644 (file)
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#undef NDEBUG
+
 #include <pthread.h>
 
 #include "anv_private.h"
@@ -54,13 +56,14 @@ static void *alloc_states(void *_job)
 
 static void run_test()
 {
-   struct anv_device device;
-   struct anv_block_pool block_pool;
+   struct anv_instance instance = { };
+   struct anv_device device = {
+      .instance = &instance,
+   };
    struct anv_state_pool state_pool;
 
    pthread_mutex_init(&device.mutex, NULL);
-   anv_block_pool_init(&block_pool, &device, 64);
-   anv_state_pool_init(&state_pool, &block_pool);
+   anv_state_pool_init(&state_pool, &device, 4096, 64);
 
    pthread_barrier_init(&barrier, NULL, NUM_THREADS);
 
@@ -106,7 +109,6 @@ static void run_test()
    }
 
    anv_state_pool_finish(&state_pool);
-   anv_block_pool_finish(&block_pool);
    pthread_mutex_destroy(&device.mutex);
 }