agx: Naturally align uniform pushes

Required to pack correctly, e.g if we push a 16-bit value then a 64-bit
value.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903>
This commit is contained in:
Alyssa Rosenzweig 2022-02-06 17:38:33 -05:00 committed by Marge Bot
parent 0c2bbb470a
commit a822b7b6cc
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ agx_indexed_sysval(agx_context *ctx, enum agx_push_type type,
/* Otherwise, push */
assert(ctx->out->push_ranges < AGX_MAX_PUSH_RANGES);
ctx->push_base = ALIGN_POT(ctx->push_base, agx_size_align_16(size));
unsigned base = ctx->push_base;
ctx->push_base += length;