aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xextra/mesa/build13
-rw-r--r--extra/mesa/checksums3
-rw-r--r--extra/mesa/depends10
-rw-r--r--extra/mesa/patches/revert_deprecation.patch155
-rw-r--r--extra/mesa/sources3
-rw-r--r--extra/mesa/version2
6 files changed, 16 insertions, 170 deletions
diff --git a/extra/mesa/build b/extra/mesa/build
index 3408a9d7..464a3703 100755
--- a/extra/mesa/build
+++ b/extra/mesa/build
@@ -1,5 +1,9 @@
#!/bin/sh -e
+# Support for vulkan drivers of intel, amd, and broadcom. Change if you just
+# want to specify your own graphics card.
+vulkan_drivers=amd,intel,broadcom
+
# Temporarily install python-mako to build mesa
(
cd mako
@@ -17,9 +21,6 @@ export PYTHONPATH
export DESTDIR="$1"
export CFLAGS="-DGLX_X86_READONLY_TEXT $CFLAGS"
-# Revert commit that causes WebKit to break on Wayland.
-patch -p1 < revert_deprecation.patch
-
# Fix issues with musl and firefox.
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
# https://github.com/mesa3d/mesa/commit/9f37c9903b87f86a533bfaffa72f0ecb285b02b2
@@ -27,11 +28,9 @@ clsed "/pre_args += '-DUSE_ELF_TLS'/d" meson.build
python3 bin/git_sha1_gen.py --output include/git_sha1.h
-platforms=x11
-cpt l -q wayland-protocols && platforms=$platforms,wayland
-
cl-meson \
- -Dplatforms="$platforms" \
+ -Dplatforms=x11,wayland \
+ -Dvulkan-drivers="$vulkan_drivers" \
-Dzstd=false \
. output
diff --git a/extra/mesa/checksums b/extra/mesa/checksums
index ca0f2aec..7232638f 100644
--- a/extra/mesa/checksums
+++ b/extra/mesa/checksums
@@ -1,5 +1,4 @@
%BLAKE3
-cd88da2ff5762cc4b0aac19731098497321f04d2f9635598e35db5fb827a4754 mesa-22.1.7.tar.gz
+0f7eaa05c43583de412043b469dafdd82660b1f999bae866feb96b5930f16ec1 mesa-22.2.4.tar.gz
6137ab643355c5770cacdc1999d0026e8a5e7437a052c31ca7170e98b9c2c3c9 Mako-1.1.1.tar.gz
f8dd3db221098d462b08038180a5a9341f9df9e0bda97bdb072402ff865978af pythonpath
-ef4400595514d04cce2676ea0908c1457c74307471dfd79dca62f40c78570afd revert_deprecation.patch
diff --git a/extra/mesa/depends b/extra/mesa/depends
index 582eef94..18063ed0 100644
--- a/extra/mesa/depends
+++ b/extra/mesa/depends
@@ -1,5 +1,7 @@
+eudev
expat
-flex make
+flex make
+glslang make
libX11
libXdamage
libXext
@@ -11,7 +13,9 @@ libelf
libxcb
libxshmfence
llvm
-meson make
-python make
+meson make
+python make
+wayland
+wayland-protocols make
xorgproto
zlib
diff --git a/extra/mesa/patches/revert_deprecation.patch b/extra/mesa/patches/revert_deprecation.patch
deleted file mode 100644
index cf9df864..00000000
--- a/extra/mesa/patches/revert_deprecation.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From c60fea8c228ae3f32e20d6b65c473d9f04871d20 Mon Sep 17 00:00:00 2001
-From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-Date: Sun, 10 Apr 2022 22:54:36 -0300
-Subject: [PATCH] Revert "egl/wayland: deprecate drm_handle_format() and
- drm_handle_capabilities()"
-
-Commit af1ee8e010441f8f2ed8c77065b159652a4ac9fe dropped support to
-wl_drm, as we thought that most compositors from active projects were
-already supporting zwp_linux_dmabuf_v1.
-
-But that's not true, so revert this commit in order to give these
-projects a longer transition period.
-
-Note that we didn't add back the support to GEM name API, and that was
-on purpose.
-
-Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-Reviewed-by: Simon Ser <contact@emersion.fr>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15822>
----
- src/egl/drivers/dri2/egl_dri2.h | 1 +
- src/egl/drivers/dri2/platform_wayland.c | 59 +++++++++++++++++++------
- 2 files changed, 47 insertions(+), 13 deletions(-)
-
-diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
-index 89158993efdd..1c840a966b3c 100644
---- a/src/egl/drivers/dri2/egl_dri2.h
-+++ b/src/egl/drivers/dri2/egl_dri2.h
-@@ -284,6 +284,7 @@ struct dri2_egl_display
- struct zwp_linux_dmabuf_feedback_v1 *wl_dmabuf_feedback;
- struct dmabuf_feedback_format_table format_table;
- bool authenticated;
-+ uint32_t capabilities;
- char *device_name;
- #endif
-
-diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
-index e9ecf6d1e716..9a33e0b2a6e3 100644
---- a/src/egl/drivers/dri2/platform_wayland.c
-+++ b/src/egl/drivers/dri2/platform_wayland.c
-@@ -1344,7 +1344,7 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
- struct dri2_egl_surface *dri2_surf,
- __DRIimage *image)
- {
-- struct wl_buffer *ret;
-+ struct wl_buffer *ret = NULL;
- EGLBoolean query;
- int width, height, fourcc, num_planes;
- uint64_t modifier = DRM_FORMAT_MOD_INVALID;
-@@ -1448,11 +1448,28 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
- ret = zwp_linux_buffer_params_v1_create_immed(params, width, height,
- fourcc, 0);
- zwp_linux_buffer_params_v1_destroy(params);
-+ } else {
-+ struct wl_drm *wl_drm =
-+ dri2_surf ? dri2_surf->wl_drm_wrapper : dri2_dpy->wl_drm;
-+ int fd = -1, stride;
-+
-+ if (num_planes > 1)
-+ return NULL;
-+
-+ query = dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd);
-+ query &= dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
-+ if (!query) {
-+ if (fd >= 0)
-+ close(fd);
-+ return NULL;
-+ }
-
-- return ret;
-+ ret = wl_drm_create_prime_buffer(wl_drm, fd, width, height, fourcc, 0,
-+ stride, 0, 0, 0, 0);
-+ close(fd);
- }
-
-- return NULL;
-+ return ret;
- }
-
- static EGLBoolean
-@@ -1699,16 +1716,21 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
- static void
- drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
- {
-- /* deprecated, as compositors already support the dma-buf protocol extension
-- * and so we can rely on dmabuf_handle_modifier() to receive formats and
-- * modifiers */
-+ struct dri2_egl_display *dri2_dpy = data;
-+ int visual_idx = dri2_wl_visual_idx_from_fourcc(format);
-+
-+ if (visual_idx == -1)
-+ return;
-+
-+ BITSET_SET(dri2_dpy->formats.formats_bitmap, visual_idx);
- }
-
- static void
- drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value)
- {
-- /* deprecated, as compositors already support the dma-buf protocol extension
-- * and so we can rely on it to create wl_buffer's */
-+ struct dri2_egl_display *dri2_dpy = data;
-+
-+ dri2_dpy->capabilities = value;
- }
-
- static void
-@@ -2077,13 +2099,12 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
- wl_registry_add_listener(dri2_dpy->wl_registry,
- &registry_listener_drm, dri2_dpy);
-
-- /* The compositor must expose the dma-buf interface. */
-- if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_dmabuf == NULL)
-+ if (roundtrip(dri2_dpy) < 0)
- goto cleanup;
-
- /* Get default dma-buf feedback */
-- if (zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
-- ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
-+ if (dri2_dpy->wl_dmabuf && zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
-+ ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
- dmabuf_feedback_format_table_init(&dri2_dpy->format_table);
- dri2_dpy->wl_dmabuf_feedback =
- zwp_linux_dmabuf_v1_get_default_feedback(dri2_dpy->wl_dmabuf);
-@@ -2091,7 +2112,6 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
- &dmabuf_feedback_listener, dri2_dpy);
- }
-
-- /* Receive events from the interfaces */
- if (roundtrip(dri2_dpy) < 0)
- goto cleanup;
-
-@@ -2178,6 +2198,19 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
-
- dri2_wl_setup_swap_interval(disp);
-
-+ if (dri2_dpy->wl_drm) {
-+ /* To use Prime, we must have _DRI_IMAGE v7 at least. createImageFromFds
-+ * support indicates that Prime export/import is supported by the driver.
-+ * We deprecated the support to GEM names API, so we bail out if the
-+ * driver does not suport Prime. */
-+ if (!(dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) ||
-+ (dri2_dpy->image->base.version < 7) ||
-+ (dri2_dpy->image->createImageFromFds == NULL)) {
-+ _eglLog(_EGL_WARNING, "wayland-egl: display does not support prime");
-+ goto cleanup;
-+ }
-+ }
-+
- if (dri2_dpy->is_different_gpu &&
- (dri2_dpy->image->base.version < 9 ||
- dri2_dpy->image->blitImage == NULL)) {
---
-GitLab
-
diff --git a/extra/mesa/sources b/extra/mesa/sources
index 64c81766..8a317361 100644
--- a/extra/mesa/sources
+++ b/extra/mesa/sources
@@ -1,4 +1,3 @@
-https://github.com/mesa3d/mesa/archive/mesa-22.1.7.tar.gz
+https://github.com/mesa3d/mesa/archive/mesa-22.2.4.tar.gz
https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.1.1.tar.gz mako
files/pythonpath
-patches/revert_deprecation.patch
diff --git a/extra/mesa/version b/extra/mesa/version
index e85d5cdc..9d4f2ca2 100644
--- a/extra/mesa/version
+++ b/extra/mesa/version
@@ -1 +1 @@
-22.1.7 2
+22.2.4 1