mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
asahi: drop desc align alloc
might bring it back later idk we'll see. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
This commit is contained in:
parent
ae8e45e19c
commit
b001d68c69
1 changed files with 0 additions and 44 deletions
|
|
@ -73,47 +73,3 @@ agx_pool_upload_aligned(struct agx_pool *pool, const void *data, size_t sz,
|
|||
{
|
||||
return agx_pool_upload_aligned_with_bo(pool, data, sz, alignment, NULL);
|
||||
}
|
||||
|
||||
struct agx_desc_alloc_info {
|
||||
unsigned size;
|
||||
unsigned align;
|
||||
unsigned nelems;
|
||||
};
|
||||
|
||||
#define AGX_DESC_ARRAY(count, name) \
|
||||
{ \
|
||||
.size = MALI_##name##_LENGTH, .align = MALI_##name##_ALIGN, \
|
||||
.nelems = count, \
|
||||
}
|
||||
|
||||
#define AGX_DESC(name) AGX_DESC_ARRAY(1, name)
|
||||
|
||||
#define AGX_DESC_AGGREGATE(...) \
|
||||
(struct agx_desc_alloc_info[]) \
|
||||
{ \
|
||||
__VA_ARGS__, {0}, \
|
||||
}
|
||||
|
||||
static inline struct agx_ptr
|
||||
agx_pool_alloc_descs(struct agx_pool *pool,
|
||||
const struct agx_desc_alloc_info *descs)
|
||||
{
|
||||
unsigned size = 0;
|
||||
unsigned align = descs[0].align;
|
||||
|
||||
for (unsigned i = 0; descs[i].size; i++) {
|
||||
assert(!(size & (descs[i].align - 1)));
|
||||
size += descs[i].size * descs[i].nelems;
|
||||
}
|
||||
|
||||
return agx_pool_alloc_aligned(pool, size, align);
|
||||
}
|
||||
|
||||
#define agx_pool_alloc_desc(pool, name) \
|
||||
agx_pool_alloc_descs(pool, AGX_DESC_AGGREGATE(AGX_DESC(name)))
|
||||
|
||||
#define agx_pool_alloc_desc_array(pool, count, name) \
|
||||
agx_pool_alloc_descs(pool, AGX_DESC_AGGREGATE(AGX_DESC_ARRAY(count, name)))
|
||||
|
||||
#define agx_pool_alloc_desc_aggregate(pool, ...) \
|
||||
agx_pool_alloc_descs(pool, AGX_DESC_AGGREGATE(__VA_ARGS__))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue