summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2023-04-06 18:54:09 -0400
committerJordan Justen <jordan.l.justen@intel.com>2023-04-06 19:12:24 -0400
commit43c3896c839570147d56b2c25b2c25cdc7c7d225 (patch)
tree5e1270820e7f1a96a929d8fe9fd0107033ba8ca9
parentaa43ae0570d68b2ab1a2c7bd283ec78e88d2c5ed (diff)
HACK: iris: clflush buffers after allocation.
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 1235e2ee9c9..91a84b30cc1 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1147,6 +1147,13 @@ iris_bo_alloc(struct iris_bufmgr *bufmgr,
bo->real.reusable = false;
}
+ if (!(flags & (BO_ALLOC_COHERENT))) {
+ void *map = iris_bo_map(NULL, bo, MAP_WRITE | MAP_RAW);
+ if (map)
+ intel_invalidate_range(map, bo->size);
+ }
+
+
DBG("bo_create: buf %d (%s) (%s memzone) (%s) %llub\n", bo->gem_handle,
bo->name, memzone_name(memzone), iris_heap_to_string[bo->real.heap],
(unsigned long long) size);