asahi: reduce ppp alignment

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
This commit is contained in:
Alyssa Rosenzweig 2025-08-07 08:47:41 -04:00 committed by Marge Bot
parent 7297a699f7
commit 1ef97241d7
4 changed files with 10 additions and 7 deletions

View file

@ -411,7 +411,7 @@
</struct>
<!-- PPP state starts -->
<struct name="PPP Header" size="4">
<struct name="PPP Header" size="4" align="4">
<field name="Fragment control" size="1" start="0" type="bool"/>
<field name="Fragment control 2" size="1" start="1" type="bool"/>
<field name="Fragment front face" size="1" start="2" type="bool"/>

View file

@ -810,7 +810,7 @@ hk_cs_init_graphics(struct hk_cmd_buffer *cmd, struct hk_cs *cs)
};
size_t size = agx_ppp_update_size(&present);
struct agx_ptr T = hk_pool_alloc(cmd, size, 64);
struct agx_ptr T = hk_pool_alloc(cmd, size, AGX_PPP_HEADER_ALIGN);
if (!T.cpu)
return;

View file

@ -2136,7 +2136,7 @@ hk_flush_vp_state(struct hk_cmd_buffer *cmd, struct hk_cs *cs, uint8_t **out)
};
size_t size = agx_ppp_update_size(&present);
struct agx_ptr T = hk_pool_alloc(cmd, size, 64);
struct agx_ptr T = hk_pool_alloc(cmd, size, AGX_PPP_HEADER_ALIGN);
if (!T.cpu)
return;
@ -2386,7 +2386,7 @@ hk_flush_ppp_state(struct hk_cmd_buffer *cmd, struct hk_cs *cs, uint8_t **out)
/* Otherwise, allocate enough space for the update and push it. */
assert(size > AGX_PPP_HEADER_LENGTH);
struct agx_ptr T = hk_pool_alloc(cmd, size, 64);
struct agx_ptr T = hk_pool_alloc(cmd, size, AGX_PPP_HEADER_ALIGN);
if (!T.cpu)
return;

View file

@ -991,7 +991,8 @@ agx_upload_viewport_scissor(struct agx_pool *pool, struct agx_batch *batch,
};
size_t size = agx_ppp_update_size(&present);
struct agx_ptr T = agx_pool_alloc_aligned(&batch->pool, size, 64);
struct agx_ptr T =
agx_pool_alloc_aligned(&batch->pool, size, AGX_PPP_HEADER_ALIGN);
struct agx_ppp_update ppp = agx_new_ppp_update(T, size, &present);
agx_ppp_push(&ppp, DEPTH_BIAS_SCISSOR, cfg) {
@ -3331,7 +3332,8 @@ agx_batch_init_state(struct agx_batch *batch)
};
size_t size = agx_ppp_update_size(&present);
struct agx_ptr T = agx_pool_alloc_aligned(&batch->pool, size, 64);
struct agx_ptr T =
agx_pool_alloc_aligned(&batch->pool, size, AGX_PPP_HEADER_ALIGN);
struct agx_ppp_update ppp = agx_new_ppp_update(T, size, &present);
/* clang-format off */
@ -3566,7 +3568,8 @@ agx_encode_state(struct agx_batch *batch, uint8_t *out)
};
size_t size = agx_ppp_update_size(&dirty);
struct agx_ptr T = agx_pool_alloc_aligned(&batch->pool, size, 64);
struct agx_ptr T =
agx_pool_alloc_aligned(&batch->pool, size, AGX_PPP_HEADER_ALIGN);
struct agx_ppp_update ppp = agx_new_ppp_update(T, size, &dirty);
if (dirty.fragment_control) {