Mesa (master): lima: align size before trying to fetch BO from cache
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 1 20:38:52 UTC 2019
Module: Mesa
Branch: master
Commit: ae0b05d8db852cfe4df716e9b6d46c77510214d1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae0b05d8db852cfe4df716e9b6d46c77510214d1
Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date: Thu Oct 24 22:12:30 2019 -0700
lima: align size before trying to fetch BO from cache
Otherwise we may be looking in wrong bucket
Reviewed-by: Erico Nunes <nunes.erico at gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
---
src/gallium/drivers/lima/lima_bo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/lima/lima_bo.c b/src/gallium/drivers/lima/lima_bo.c
index f0015396217..779e23ce1c8 100644
--- a/src/gallium/drivers/lima/lima_bo.c
+++ b/src/gallium/drivers/lima/lima_bo.c
@@ -289,13 +289,13 @@ struct lima_bo *lima_bo_create(struct lima_screen *screen,
{
struct lima_bo *bo;
+ size = align(size, LIMA_PAGE_SIZE);
+
/* Try to get bo from cache first */
bo = lima_bo_cache_get(screen, size, flags);
if (bo)
return bo;
- size = align(size, LIMA_PAGE_SIZE);
-
struct drm_lima_gem_create req = {
.size = size,
.flags = flags,
More information about the mesa-commit
mailing list