summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2015-06-18 15:50:47 -0700
committerKristian Høgsberg Kristensen <[email protected]>2015-06-19 15:42:15 -0700
commitb20794cfa81191993e702b333cef4efe908f5841 (patch)
tree52a87ae51f217c26bebcd3228b203ccb86e83b6d /src/vulkan
parentaba75d054660a5c1636534128a93b7794625ef83 (diff)
vk/allocator: Get rid of non-memfd path
We can just use modern valgrind now.
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/allocator.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/vulkan/allocator.c b/src/vulkan/allocator.c
index 8752edac91d..6a7e845ef37 100644
--- a/src/vulkan/allocator.c
+++ b/src/vulkan/allocator.c
@@ -263,12 +263,6 @@ anv_block_pool_init(struct anv_block_pool *pool,
anv_block_pool_grow(pool);
}
-/* The memfd path lets us create a map for an fd and lets us grow and remap
- * without copying. It breaks valgrind however, so we have a MAP_ANONYMOUS
- * path we can take for valgrind debugging. */
-
-#define USE_MEMFD 1
-
void
anv_block_pool_finish(struct anv_block_pool *pool)
{
@@ -283,9 +277,7 @@ anv_block_pool_finish(struct anv_block_pool *pool)
anv_vector_finish(&pool->mmap_cleanups);
-#if USE_MEMFD
close(pool->fd);
-#endif
}
static int
@@ -307,7 +299,6 @@ anv_block_pool_grow(struct anv_block_pool *pool)
return -1;
*cleanup = ANV_MMAP_CLEANUP_INIT;
-#if USE_MEMFD
if (pool->size == 0)
pool->fd = memfd_create("block pool", MFD_CLOEXEC);
@@ -335,17 +326,6 @@ anv_block_pool_grow(struct anv_block_pool *pool)
}
if (map == MAP_FAILED)
return -1;
-#else
- /* The MAP_ANONYMOUS fallback can't grow without races, so just bail here
- * if we're trying to grow the pool. */
- assert(pool->size == 0);
- map = mmap(NULL, size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
- if (map == MAP_FAILED)
- return -1;
- cleanup->map = map;
- cleanup->size = size;
-#endif
gem_handle = anv_gem_userptr(pool->device, map, size);
if (gem_handle == 0)