anv/allocator: Assert that we have a valid gem handle in bo_pool_alloc
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 27 Oct 2016 05:57:19 +0000 (22:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 27 Oct 2016 20:45:39 +0000 (13:45 -0700)
src/intel/vulkan/anv_allocator.c

index ae18f8e38374f4fa567b5dad183877facc0c11d6..36cabd721bcd82461141b3cb0d888ae024f2476c 100644 (file)
@@ -831,6 +831,7 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo, uint32_t size)
    if (anv_ptr_free_list_pop(&pool->free_list[bucket], &next_free_void)) {
       struct bo_pool_bo_link *next_free = next_free_void;
       *bo = VG_NOACCESS_READ(&next_free->bo);
+      assert(bo->gem_handle);
       assert(bo->map == next_free);
       assert(size <= bo->size);