iris: port non-bucket alignment bugfix
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 17 Aug 2018 06:49:31 +0000 (23:49 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
Sergii's 24839663a40257e0468406d72c48d431b5ae2bd4

src/gallium/drivers/iris/iris_bufmgr.c

index ebec10bf093317b3d9ff5c48b69a2e4487a78cc1..0a516b5f7997c6582570f67913a645937d36b948 100644 (file)
@@ -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;
    }