+struct anv_state
+anv_state_pool_alloc_back(struct anv_state_pool *pool)
+{
+ struct anv_state state;
+ state.alloc_size = pool->block_size;
+
+ if (anv_free_list_pop(&pool->back_alloc_free_list,
+ &pool->block_pool->map, &state.offset)) {
+ assert(state.offset < 0);
+ goto done;
+ }
+
+ state.offset = anv_block_pool_alloc_back(pool->block_pool, pool->block_size);
+
+done:
+ state.map = pool->block_pool->map + state.offset;
+ VG(VALGRIND_MEMPOOL_ALLOC(pool, state.map, state.alloc_size));
+ return state;
+}
+