summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gem.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-05-18 09:59:08 -0700
committerKristian Høgsberg <[email protected]>2015-05-18 10:27:08 -0700
commitc15f3834e3a4c6aa348aed9296d1757d315a891e (patch)
treeec0226e07509848b42ce75e310ab83b6718a1f3a /src/vulkan/gem.c
parentf7b0f922bec7e0d14d72ff14e0cab794c53addc5 (diff)
vk/gem: Set the gem_mmap.flags parameter to 0 if it exists
Diffstat (limited to 'src/vulkan/gem.c')
-rw-r--r--src/vulkan/gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vulkan/gem.c b/src/vulkan/gem.c
index 2833e0c2901..dd70f7c1cf7 100644
--- a/src/vulkan/gem.c
+++ b/src/vulkan/gem.c
@@ -101,6 +101,11 @@ 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
+
ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_MMAP, &gem_mmap);
if (ret != 0) {
/* FIXME: Is NULL the right error return? Cf MAP_INVALID */