summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_bufmgr.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-04-08 00:45:41 -0700
committerKenneth Graunke <[email protected]>2019-04-15 14:51:01 -0700
commit62b2ce0592963b5328d126b05a726913adeb5ba2 (patch)
treea273ddf3b3a60071378a965f8010a4e2d2a1cbac /src/gallium/drivers/iris/iris_bufmgr.h
parent9c52dce6a9219f031ffe0a80fd6f389960cb0018 (diff)
iris: Preserve all PIPE_TRANSFER flags in xfer->usage
We need to preserve PIPE_TRANSFER_FLUSH_EXPLICIT, DISCARD_RANGE, and so on, but don't want to pass them to iris_bo_map(). So, keep them all, but mask them off when calling map. Chris Wilson told me to do this a long time ago and he was right.
Diffstat (limited to 'src/gallium/drivers/iris/iris_bufmgr.h')
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h
index a8a65088036..fa74c978191 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.h
+++ b/src/gallium/drivers/iris/iris_bufmgr.h
@@ -251,6 +251,9 @@ void iris_bo_unreference(struct iris_bo *bo);
#define MAP_INTERNAL_MASK (0xff << 24)
#define MAP_RAW (0x01 << 24)
+#define MAP_FLAGS (MAP_READ | MAP_WRITE | MAP_ASYNC | \
+ MAP_PERSISTENT | MAP_COHERENT | MAP_INTERNAL_MASK)
+
/**
* Maps the buffer into userspace.
*