asahi: Always use resource size, not BO size
authorAsahi Lina <lina@asahilina.net>
Sat, 22 Jul 2023 09:35:42 +0000 (18:35 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:27 +0000 (20:31 +0000)
commitccbd1254684fde0efed0a87a1e19ba48c3c20d64
treeee8ca13300efc72a61eedf4799a39be9870a16d5
parentf8f4f466f7150d0dcc9be235511c0076f304740c
asahi: Always use resource size, not BO size

BOs can be oversized, as they can come from the BO cache. Make sure to
always use the resource layout size, not the BO size, when we need this
for some reason.

This fixes BO shadowing creating overlarge BOs, and also the attachment
size for submissions (probably doesn't matter, but it's more correct now).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
src/gallium/drivers/asahi/agx_pipe.c