From 0a87a7d46f6b5149f421665016612fdd1c42f466 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 09 2020 19:55:06 +0000 Subject: import mesa-20.1.0-1.el8 --- diff --git a/.gitignore b/.gitignore index 4b27d16..3498a11 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/mesa-19.3.4.tar.xz +SOURCES/mesa-20.1.0.tar.xz diff --git a/.mesa.metadata b/.mesa.metadata index 1e49d90..b8429c3 100644 --- a/.mesa.metadata +++ b/.mesa.metadata @@ -1 +1 @@ -73dccea365efef46c700bcfd87d14209381efa3d SOURCES/mesa-19.3.4.tar.xz +568e330d16a6bf920b193901d5e44ddd3b30af02 SOURCES/mesa-20.1.0.tar.xz diff --git a/SOURCES/0001-dri-add-another-get-shm-variant.patch b/SOURCES/0001-dri-add-another-get-shm-variant.patch deleted file mode 100644 index 2d3cc3b..0000000 --- a/SOURCES/0001-dri-add-another-get-shm-variant.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 7881d29f2c729e4a8a5af21a0abcf3db18e22918 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 14 Feb 2020 15:00:13 +1000 -Subject: [PATCH 1/2] dri: add another get shm variant. - -When Brian in 02c3dad0f3b4d26e0faa5cc51d06bc50d693dcdc restricted -the shm permissions it means we hit the fallback paths in some -scenarios we hadn't before. - -When you use Xephyr to xdmcp from one user to another the new perms -stop the X server (running as user a) attaching to the SHM segments -from gnome-shell (running as user b). - -In this case however only the GLX side of the code had insight into this, -and the dri could was meant of fall back, and it worked for put image -fine but the get image path was broken, since there was no indication -in the broken case of the need to fallback. - -This adds a return type to a new interface member that lets the -caller know it has to fallback. - -Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777") ---- - include/GL/internal/dri_interface.h | 15 ++++++++++++++- - src/gallium/state_trackers/dri/drisw.c | 3 +++ - 2 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h -index 09782c8baeb..e40106575c0 100644 ---- a/include/GL/internal/dri_interface.h -+++ b/include/GL/internal/dri_interface.h -@@ -634,7 +634,7 @@ struct __DRIdamageExtensionRec { - * SWRast Loader extension. - */ - #define __DRI_SWRAST_LOADER "DRI_SWRastLoader" --#define __DRI_SWRAST_LOADER_VERSION 5 -+#define __DRI_SWRAST_LOADER_VERSION 6 - struct __DRIswrastLoaderExtensionRec { - __DRIextension base; - -@@ -711,6 +711,19 @@ struct __DRIswrastLoaderExtensionRec { - int width, int height, int stride, - int shmid, char *shmaddr, unsigned offset, - void *loaderPrivate); -+ -+ /** -+ * get shm image to drawable (v2) -+ * -+ * There are some cases where GLX can't use SHM, but DRI -+ * still tries, we need to get a return type for when to -+ * fallback to the non-shm path. -+ * -+ * \since 6 -+ */ -+ GLboolean (*getImageShm2)(__DRIdrawable *readable, -+ int x, int y, int width, int height, -+ int shmid, void *loaderPrivate); - }; - - /** -diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c -index e3fb3f1b925..df364c47391 100644 ---- a/src/gallium/state_trackers/dri/drisw.c -+++ b/src/gallium/state_trackers/dri/drisw.c -@@ -138,6 +138,9 @@ get_image_shm(__DRIdrawable *dPriv, int x, int y, int width, int height, - if (!res->screen->resource_get_handle(res->screen, NULL, res, &whandle, PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) - return FALSE; - -+ if (loader->base.version > 5 && loader->getImageShm2) -+ return loader->getImageShm2(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate); -+ - loader->getImageShm(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate); - return TRUE; - } --- -2.21.1 - diff --git a/SOURCES/0002-glx-add-getImageShm2-path.patch b/SOURCES/0002-glx-add-getImageShm2-path.patch deleted file mode 100644 index d8062b3..0000000 --- a/SOURCES/0002-glx-add-getImageShm2-path.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 74e4f90deeae466ed19d2a31d8f62f6fc5e1709b Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 14 Feb 2020 15:03:24 +1000 -Subject: [PATCH 2/2] glx: add getImageShm2 path - -If the glx side shmid is -1 (because the X server failed to attach) -then we should let the caller know to fallback. - -Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777") ---- - src/glx/drisw_glx.c | 25 +++++++++++++++++++------ - 1 file changed, 19 insertions(+), 6 deletions(-) - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index 069f64d5216..dfa3218d759 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -288,10 +288,10 @@ swrastGetImage(__DRIdrawable * read, - swrastGetImage2(read, x, y, w, h, 0, data, loaderPrivate); - } - --static void --swrastGetImageShm(__DRIdrawable * read, -- int x, int y, int w, int h, -- int shmid, void *loaderPrivate) -+static GLboolean -+swrastGetImageShm2(__DRIdrawable * read, -+ int x, int y, int w, int h, -+ int shmid, void *loaderPrivate) - { - struct drisw_drawable *prp = loaderPrivate; - __GLXDRIdrawable *pread = &(prp->base); -@@ -301,8 +301,11 @@ swrastGetImageShm(__DRIdrawable * read, - - if (!prp->ximage || shmid != prp->shminfo.shmid) { - if (!XCreateDrawable(prp, shmid, dpy)) -- return; -+ return GL_FALSE; - } -+ -+ if (prp->shminfo.shmid == -1) -+ return GL_FALSE; - readable = pread->xDrawable; - - ximage = prp->ximage; -@@ -312,10 +315,19 @@ swrastGetImageShm(__DRIdrawable * read, - ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32); - - XShmGetImage(dpy, readable, ximage, x, y, ~0L); -+ return GL_TRUE; -+} -+ -+static void -+swrastGetImageShm(__DRIdrawable * read, -+ int x, int y, int w, int h, -+ int shmid, void *loaderPrivate) -+{ -+ swrastGetImageShm2(read, x, y, w, h, shmid, loaderPrivate); - } - - static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = { -- .base = {__DRI_SWRAST_LOADER, 5 }, -+ .base = {__DRI_SWRAST_LOADER, 6 }, - - .getDrawableInfo = swrastGetDrawableInfo, - .putImage = swrastPutImage, -@@ -325,6 +337,7 @@ static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = { - .putImageShm = swrastPutImageShm, - .getImageShm = swrastGetImageShm, - .putImageShm2 = swrastPutImageShm2, -+ .getImageShm2 = swrastGetImageShm2, - }; - - static const __DRIextension *loader_extensions_shm[] = { --- -2.21.1 - diff --git a/SOURCES/Makefile b/SOURCES/Makefile index 68bdaa7..e2df122 100644 --- a/SOURCES/Makefile +++ b/SOURCES/Makefile @@ -1,4 +1,4 @@ -VERSION ?= 19.3.4 +VERSION ?= 20.1.0 SANITIZE ?= 1 DIRNAME = mesa-${VERSION} diff --git a/SOURCES/dri-shm-fix-put-image.patch b/SOURCES/dri-shm-fix-put-image.patch deleted file mode 100644 index 7548e56..0000000 --- a/SOURCES/dri-shm-fix-put-image.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mesa-19.3.3/src/glx/drisw_glx.c.dma mesa-19.3.3/src/glx/drisw_glx.c ---- mesa-19.3.3/src/glx/drisw_glx.c.dma 2020-02-14 12:37:42.551008273 +1000 -+++ mesa-19.3.3/src/glx/drisw_glx.c 2020-02-14 12:37:49.683081406 +1000 -@@ -199,7 +199,7 @@ swrastXPutImage(__DRIdrawable * draw, in - XShmPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h, False); - XSync(dpy, False); - } else { -- ximage->width = w; -+ ximage->width = ximage->bytes_per_line / ((ximage->bits_per_pixel + 7)/ 8); - ximage->height = h; - XPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h); - } diff --git a/SPECS/mesa.spec b/SPECS/mesa.spec index 0952e53..67b3c52 100644 --- a/SPECS/mesa.spec +++ b/SPECS/mesa.spec @@ -12,6 +12,7 @@ %define platform_drivers ,i965 %define with_vmware 1 %define with_xa 1 +%define with_iris 1 %endif %ifarch %{ix86} x86_64 @@ -40,8 +41,8 @@ Name: mesa Summary: Mesa graphics libraries -Version: 19.3.4 -Release: 2%{?rctag:.%{rctag}}%{?dist} +Version: 20.1.0 +Release: 1%{?rctag:.%{rctag}}%{?dist} License: MIT URL: http://www.mesa3d.org @@ -57,9 +58,6 @@ Source4: Mesa-MLAA-License-Clarification-Email.txt # fix for shm black images with Xephyr (#1798702) # upstream in 19.3.5 most likely -Patch0: 0001-dri-add-another-get-shm-variant.patch -Patch1: 0002-glx-add-getImageShm2-path.patch -Patch2: dri-shm-fix-put-image.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -328,7 +326,7 @@ export ASFLAGS="--generate-missing-build-notes=yes" -Ddri3=true \ -Ddri-drivers=%{?dri_drivers} \ %if 0%{?with_hardware} - -Dgallium-drivers=swrast,virgl,nouveau%{?with_vmware:,svga},radeonsi,r600%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_kmsro:,kmsro} \ + -Dgallium-drivers=swrast%{?with_iris:,iris},virgl,nouveau%{?with_vmware:,svga},radeonsi,r600%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_kmsro:,kmsro} \ %else -Dgallium-drivers=swrast,virgl \ %endif @@ -355,6 +353,7 @@ export ASFLAGS="--generate-missing-build-notes=yes" -Dbuild-tests=false \ -Dselinux=true \ -Dosmesa=gallium \ + -Dvulkan-device-select-layer=true \ %{nil} %meson_build @@ -489,6 +488,7 @@ done %{_libdir}/dri/radeonsi_dri.so %ifarch %{ix86} x86_64 %{_libdir}/dri/i965_dri.so +%{_libdir}/dri/iris_dri.so %endif %if 0%{?with_vc4} %{_libdir}/dri/vc4_dri.so @@ -537,12 +537,20 @@ done %{_datadir}/vulkan/icd.d/intel_icd.i686.json %{_datadir}/vulkan/icd.d/radeon_icd.i686.json %endif +%{_libdir}/libVkLayer_MESA_device_select.so +%{_datadir}/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json %files vulkan-devel %{_includedir}/vulkan/ %endif %changelog +* Thu May 28 2020 Dave Airlie - 20.1.0-1 +- Update to 20.1.0 final + +* Mon May 25 2020 Dave Airlie - 20.1.0-0.1.rc4 +- Update to 20.1.0-rc4 + * Thu Feb 20 2020 Dave Airlie - 19.3.4-2 - Fix put image shm fallback path.