anv: add MAP_POPULATE fallback define for portability
authorGreg V <greg@unrelenting.technology>
Thu, 18 Jan 2018 20:31:03 +0000 (23:31 +0300)
committerEric Engestrom <eric.engestrom@intel.com>
Thu, 8 Aug 2019 20:44:33 +0000 (21:44 +0100)
FreeBSD does not have MAP_POPULATE

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/intel/vulkan/anv_allocator.c

index a6eeed79a02e35f3a9281e2de1f9a9503fd58946..62a527ed235f1b97d7840d13f30e4510b1271dc7 100644 (file)
 #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)