[Mesa-dev] [PATCH v2 5/5] anv: add MAP_POPULATE fallback define for portability

Greg V greg at unrelenting.technology
Thu Jan 18 22:54:46 UTC 2018


FreeBSD does not have MAP_POPULATE
---
 src/intel/vulkan/anv_allocator.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index aa669359d7..1fe00f9ef6 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -50,6 +50,10 @@
 #define VG_NOACCESS_WRITE(__ptr, __val) (*(__ptr) = (__val))
 #endif
 
+#ifndef MAP_POPULATE
+#define MAP_POPULATE 0
+#endif
+
 /* Design goals:
  *
  *  - Lock free (except when resizing underlying bos)
-- 
2.15.1



More information about the mesa-dev mailing list