nvk: Add an addr field to nvk_image_plane

Nothing actually needs the pointer to the memory object so it's better
to not even include it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand
2023-07-19 17:03:30 -05:00
committed by Marge Bot
parent ad37394dfe
commit f0a165799c
2 changed files with 6 additions and 10 deletions

View File

@@ -610,14 +610,11 @@ nvk_image_plane_bind(struct nvk_image_plane *plane,
*offset_B = ALIGN_POT(*offset_B, plane->nil.align_B);
if (mem->dedicated_image_plane == plane) {
assert(*offset_B == 0);
plane->mem = mem;
plane->offset = 0;
plane->addr = mem->bo->offset;
} else if (plane->internal != NULL) {
plane->mem = plane->internal;
plane->offset = 0;
plane->addr = plane->internal->bo->offset;
} else {
plane->mem = mem;
plane->offset = *offset_B;
plane->addr = mem->bo->offset + *offset_B;
}
*offset_B += plane->nil.size_B;
}