mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
asahi: add agx_usc_push_packed helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
parent
9974f68bb9
commit
5d375e6143
1 changed files with 8 additions and 0 deletions
|
|
@ -62,6 +62,14 @@ agx_usc_builder_validate(struct agx_usc_builder *b, size_t size)
|
|||
it; it = false, (b)->head += AGX_USC_##struct_name##_LENGTH) \
|
||||
agx_pack((b)->head, USC_##struct_name, template)
|
||||
|
||||
#define agx_usc_push_blob(b, blob, length) \
|
||||
for (bool it = agx_usc_builder_validate((b), length); it; \
|
||||
it = false, (b)->head += length) \
|
||||
memcpy((b)->head, blob, length);
|
||||
|
||||
#define agx_usc_push_packed(b, struct_name, packed) \
|
||||
agx_usc_push_blob(b, packed.opaque, AGX_USC_##struct_name##_LENGTH);
|
||||
|
||||
static void
|
||||
agx_usc_uniform(struct agx_usc_builder *b, unsigned start_halfs,
|
||||
unsigned size_halfs, uint64_t buffer)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue