From bbb6875f35c783d4f350dc9fbf2e2904b3d47a5a Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Kristensen Date: Thu, 3 Dec 2015 23:58:05 -0800 Subject: vk: Map uncached, coherent memory as write-combine This gives us the required characteristics for the memory type. --- src/vulkan/anv_gem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/vulkan/anv_gem.c') diff --git a/src/vulkan/anv_gem.c b/src/vulkan/anv_gem.c index 57b8505e156..429f4a29fad 100644 --- a/src/vulkan/anv_gem.c +++ b/src/vulkan/anv_gem.c @@ -84,7 +84,7 @@ anv_gem_close(struct anv_device *device, int gem_handle) */ void* anv_gem_mmap(struct anv_device *device, uint32_t gem_handle, - uint64_t offset, uint64_t size) + uint64_t offset, uint64_t size, uint32_t flags) { struct drm_i915_gem_mmap gem_mmap; int ret; @@ -94,10 +94,7 @@ anv_gem_mmap(struct anv_device *device, uint32_t gem_handle, gem_mmap.offset = offset; gem_mmap.size = size; VG_CLEAR(gem_mmap.addr_ptr); - -#ifdef I915_MMAP_WC - gem_mmap.flags = 0; -#endif + gem_mmap.flags = flags; ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_MMAP, &gem_mmap); if (ret != 0) { -- cgit v1.2.3