asahi: add more alignment asserts

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
This commit is contained in:
Alyssa Rosenzweig
2025-01-29 11:51:24 -05:00
committed by Marge Bot
parent bffb90f42c
commit db7cb681bf
+4
View File
@@ -106,6 +106,10 @@ static int
agx_bo_bind(struct agx_device *dev, struct agx_bo *bo, uint64_t addr,
size_t size_B, uint64_t offset_B, uint32_t flags, bool unbind)
{
assert((size_B % 16384) == 0 && "alignment required");
assert((offset_B % 16384) == 0 && "alignment required");
assert((addr % 16384) == 0 && "alignment required");
struct drm_asahi_gem_bind gem_bind = {
.op = unbind ? ASAHI_BIND_OP_UNBIND : ASAHI_BIND_OP_BIND,
.flags = flags,