summaryrefslogtreecommitdiff
path: root/src/intel/vulkan/anv_gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_gem.c')
-rw-r--r--src/intel/vulkan/anv_gem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
index e10db2e04d7..51621cc5f00 100644
--- a/src/intel/vulkan/anv_gem.c
+++ b/src/intel/vulkan/anv_gem.c
@@ -99,8 +99,8 @@ anv_gem_mmap_offset(struct anv_device *device, uint32_t gem_handle,
{
struct drm_i915_gem_mmap_offset gem_mmap = {
.handle = gem_handle,
- .flags = (flags & I915_MMAP_WC) ?
- I915_MMAP_OFFSET_WC : I915_MMAP_OFFSET_WB,
+ .flags = device->info.has_local_mem ? I915_MMAP_OFFSET_FIXED :
+ (flags & I915_MMAP_WC) ? I915_MMAP_OFFSET_WC : I915_MMAP_OFFSET_WB,
};
assert(offset == 0);
@@ -119,6 +119,8 @@ static void*
anv_gem_mmap_legacy(struct anv_device *device, uint32_t gem_handle,
uint64_t offset, uint64_t size, uint32_t flags)
{
+ assert(!device->info.has_local_mem);
+
struct drm_i915_gem_mmap gem_mmap = {
.handle = gem_handle,
.offset = offset,