mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
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:
parent
7297a699f7
commit
1ef97241d7
4 changed files with 10 additions and 7 deletions
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue