Mesa (main): iris: SMEM buffers on discrete platforms are coherent
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 12 20:00:55 UTC 2021
Module: Mesa
Branch: main
Commit: c49041c9d7a923fc0306f5b0c313f62706dcb12a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c49041c9d7a923fc0306f5b0c313f62706dcb12a
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri Jul 23 12:03:32 2021 -0500
iris: SMEM buffers on discrete platforms are coherent
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
---
src/gallium/drivers/iris/iris_bufmgr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 9515c4bee32..f5f0ec0e9d3 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -613,7 +613,9 @@ iris_bo_alloc(struct iris_bufmgr *bufmgr,
uint64_t bo_size =
bucket ? bucket->size : MAX2(ALIGN(size, page_size), page_size);
- bool is_coherent = bufmgr->has_llc || (flags & BO_ALLOC_COHERENT);
+ bool is_coherent = bufmgr->has_llc ||
+ (bufmgr->vram.size > 0 && !local) ||
+ (flags & BO_ALLOC_COHERENT);
enum iris_mmap_mode mmap_mode =
!local && is_coherent ? IRIS_MMAP_WB : IRIS_MMAP_WC;
More information about the mesa-commit
mailing list