From: Kenneth Graunke Date: Fri, 17 Aug 2018 06:49:31 +0000 (-0700) Subject: iris: port non-bucket alignment bugfix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=630d602900f8e9e101659c34061dc85db3f0be48;p=mesa.git iris: port non-bucket alignment bugfix Sergii's 24839663a40257e0468406d72c48d431b5ae2bd4 --- diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index ebec10bf093..0a516b5f799 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -509,9 +509,7 @@ bo_alloc_internal(struct iris_bufmgr *bufmgr, * allocation up. */ if (bucket == NULL) { - bo_size = size; - if (bo_size < page_size) - bo_size = page_size; + bo_size = MAX2(ALIGN(size, page_size), page_size); } else { bo_size = bucket->size; }