diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-12-03 23:58:05 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-12-04 09:51:47 -0800 |
commit | bbb6875f35c783d4f350dc9fbf2e2904b3d47a5a (patch) | |
tree | 3a92815ebd7af2607228900674c98e1ef32c2517 /src/vulkan/anv_gem.c | |
parent | c3c61d210f0929a71e031dfb3830bf39cee583a4 (diff) |
vk: Map uncached, coherent memory as write-combine
This gives us the required characteristics for the memory type.
Diffstat (limited to 'src/vulkan/anv_gem.c')
-rw-r--r-- | src/vulkan/anv_gem.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) { |