summaryrefslogtreecommitdiff
path: root/graphics/mesa-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mesa-devel/files')
-rw-r--r--graphics/mesa-devel/files/patch-suffix11
-rw-r--r--graphics/mesa-devel/files/patch-userptr24
2 files changed, 35 insertions, 0 deletions
diff --git a/graphics/mesa-devel/files/patch-suffix b/graphics/mesa-devel/files/patch-suffix
index 93a189e15f80..cc49694225f2 100644
--- a/graphics/mesa-devel/files/patch-suffix
+++ b/graphics/mesa-devel/files/patch-suffix
@@ -125,6 +125,17 @@ Library selection is handled by libglvnd and/or libmap.conf.
[files('anv_gem.c'), anv_entrypoints[0]],
include_directories : [
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler, inc_vulkan_wsi,
+--- src/intel/vulkan_hasvk/meson.build.orig 2022-09-03 20:27:51 UTC
++++ src/intel/vulkan_hasvk/meson.build
+@@ -181,7 +181,7 @@ libvulkan_intel_hasvk = shared_library(
+ )
+
+ libvulkan_intel_hasvk = shared_library(
+- 'vulkan_intel_hasvk',
++ 'vulkan_intel_hasvk' + get_option('egl-lib-suffix'),
+ [files('anv_gem.c'), anv_hasvk_entrypoints[0]],
+ include_directories : [
+ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler,
--- src/mapi/es1api/meson.build.orig 2020-05-30 21:28:01 UTC
+++ src/mapi/es1api/meson.build
@@ -33,7 +33,7 @@ if with_platform_windows
diff --git a/graphics/mesa-devel/files/patch-userptr b/graphics/mesa-devel/files/patch-userptr
index f73abcd5d1ed..409833b38ba5 100644
--- a/graphics/mesa-devel/files/patch-userptr
+++ b/graphics/mesa-devel/files/patch-userptr
@@ -73,3 +73,27 @@ https://github.com/FreeBSDDesktop/kms-drm/issues/197
return userptr.handle;
}
+--- src/intel/vulkan_hasvk/anv_gem.c.orig 2022-09-03 20:27:51 UTC
++++ src/intel/vulkan_hasvk/anv_gem.c
+@@ -179,9 +179,19 @@ anv_gem_userptr(struct anv_device *device, void *mem,
+ 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)
++ int ret;
++retry:
++ ret = intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr);
++ if (ret == -1) {
++ if (errno == ENODEV && userptr.flags == 0) {
++ userptr.flags = I915_USERPTR_UNSYNCHRONIZED;
++ goto retry;
++ }
++ if (geteuid() != 0) {
++ fprintf(stderr, "%s", "ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.\n");
++ }
+ return 0;
++ }
+
+ return userptr.handle;
+ }