---
src/mesa/drivers/dri/i965/brw_bufmgr.c | 1 +
src/mesa/drivers/dri/i965/brw_bufmgr.h | 5 +++++
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +++
3 files changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c
b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 9a65d32..2b42182 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -351,6 +351,7 @@ retry:
bo->name = name;
p_atomic_set(&bo->refcount, 1);
bo->reusable = true;
+ bo->cache_coherent = bufmgr->has_llc;
pthread_mutex_unlock(&bufmgr->lock);
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h
b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index 1e3e8cf..6ce14bb 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -123,6 +123,11 @@ struct brw_bo {
* Boolean of whether this buffer can be re-used
*/
bool reusable;
+
+ /**
+ * Boolean of whether this buffer is cache coherent
+ */
+ bool cache_coherent;
};
#define BO_ALLOC_FOR_RENDER (1<<0)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 6c308ff..049b4c1 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -627,6 +627,9 @@ miptree_create(struct brw_context *brw,
alloc_flags);
}
+ if (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT)
+ mt->bo->cache_coherent = false;
+
return mt;
}
--
2.10.2
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev