diff options
author | Samuel Iglesias Gonsálvez <[email protected]> | 2017-05-03 08:02:21 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2017-05-04 08:56:36 +0200 |
commit | b546c9d318731b988aa3d8c4e4735cdbb596cfbf (patch) | |
tree | d4fcacac9a726f7479979b262b402b1ad45f87ce /src/intel/vulkan/anv_allocator.c | |
parent | a6fb943f3eb86ca501a7e7b8d4621ba215f91133 (diff) |
anv: anv_gem_mmap() returns MAP_FAILED as mapping error
Take it into account when checking if the mapping failed.
v2:
- Remove map == NULL and its related comment (Emil)
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Fixes: 6f3e3c715a7 ("vk/allocator: Add a BO pool")
Fixes: 9919a2d34de ("anv/image: Memset hiz surfaces to 0 when binding memory")
Cc: "17.0 17.1" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 554ca4ac5fa..6ab2da5d64a 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -889,7 +889,7 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo, uint32_t size) assert(new_bo.size == pow2_size); new_bo.map = anv_gem_mmap(pool->device, new_bo.gem_handle, 0, pow2_size, 0); - if (new_bo.map == NULL) { + if (new_bo.map == MAP_FAILED) { anv_gem_close(pool->device, new_bo.gem_handle); return vk_error(VK_ERROR_MEMORY_MAP_FAILED); } |