summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_bufmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/iris/iris_bufmgr.c')
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c4
1 files changed, 1 insertions, 3 deletions
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;
}