diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 665e73fc2f9..ac7063e4f6b 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -890,6 +890,9 @@ anv_physical_device_try_create(struct anv_instance *instance, device->has_mmap_offset = anv_gem_get_param(fd, I915_PARAM_MMAP_GTT_VERSION) >= 4; + device->has_userptr_probe = + anv_gem_get_param(fd, I915_PARAM_HAS_USERPTR_PROBE); + /* GENs prior to 8 do not support EU/Subslice info */ device->subslice_total = intel_device_info_subslice_total(&device->info); diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 51621cc5f00..dd4c860a565 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -173,6 +173,9 @@ anv_gem_userptr(struct anv_device *device, void *mem, size_t size) .flags = 0, }; + if (device->physical->has_userptr_probe) + userptr.flags |= I915_USERPTR_PROBE; + int ret = intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr); if (ret == -1) return 0; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 8ac5683b168..e16e07a7a5e 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -928,6 +928,7 @@ struct anv_physical_device { bool has_thread_submit; bool has_mem_available; bool has_mmap_offset; + bool has_userptr_probe; uint64_t gtt_size; bool use_softpin;