unsigned create_flags;
};
-struct pan_pool
-panfrost_create_pool(void *memctx, struct panfrost_device *dev, unsigned create_flags, bool prealloc);
+void
+panfrost_pool_init(struct pan_pool *pool, void *memctx,
+ struct panfrost_device *dev, unsigned create_flags,
+ bool prealloc);
/* Represents a fat pointer for GPU-mapped memory, returned from the transient
* allocator and not used for much else */
static inline struct panfrost_transfer
panfrost_pool_alloc(struct pan_pool *pool, size_t sz)
{
- return panfrost_pool_alloc_aligned(pool, sz, util_next_power_of_two(sz));
+ assert(sz == util_next_power_of_two(sz));
+ return panfrost_pool_alloc_aligned(pool, sz, sz);
}
struct panfrost_transfer
mali_ptr
panfrost_pool_upload(struct pan_pool *pool, const void *data, size_t sz);
+mali_ptr
+panfrost_pool_upload_aligned(struct pan_pool *pool, const void *data, size_t sz, unsigned alignment);
+
#endif