From d66f4e99a0dbba8e3b8acde6d9ddd184c88d52f9 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 20 Apr 2021 01:17:25 +0000 Subject: [PATCH] Add upstream patch to fix egl call failures with nvidia libs installed --- ...patch-if-at-least-one-vendor-suceeds.patch | 37 +++++++++++++++++++ libglvnd.spec | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch diff --git a/egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch b/egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch new file mode 100644 index 0000000..529e895 --- /dev/null +++ b/egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch @@ -0,0 +1,37 @@ +From a527411da713b2068974c46d7129326520dc5923 Mon Sep 17 00:00:00 2001 +From: Ronan Pigott +Date: Wed, 18 Nov 2020 11:05:59 -0700 +Subject: [PATCH] egl: use device dispatch if at least one vendor suceeds + +Currently, in InitDeviceListInternal if any egl vendor fails to list +its devices for any reason the construction of the device list is +abandoned. That means that even if we have one vendor successfully +serving the application, the failure of another vendor library will +break any api calls related to egl devices. + +Instead, if a vendor fails queryDevicesEXT the device mapping logic +should proceed as if it listed no devices. If the relevant device +belongs to the failed vendor then the dispatch will still fail with +EGL_BAD_DEVICE. +--- + src/EGL/libeglmapping.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/EGL/libeglmapping.c b/src/EGL/libeglmapping.c +index c736172..7cf5a87 100644 +--- a/src/EGL/libeglmapping.c ++++ b/src/EGL/libeglmapping.c +@@ -276,7 +276,9 @@ static EGLBoolean AddVendorDevices(__EGLvendorInfo *vendor) + } + + if (!vendor->staticDispatch.queryDevicesEXT(0, NULL, &count)) { +- return EGL_FALSE; ++ // Even if this vendor fails, we can still return the devices from any ++ // other vendors ++ return EGL_TRUE; + } + if (count <= 0) { + return EGL_TRUE; +-- +GitLab + diff --git a/libglvnd.spec b/libglvnd.spec index ea94ade..242fbf4 100644 --- a/libglvnd.spec +++ b/libglvnd.spec @@ -4,7 +4,7 @@ Name: libglvnd Version: 1.3.2 -Release: 3%{?dist} +Release: 4%{?dist} # Provide an upgrade path from the negativo17.org pkgs which have Epoch 1 Epoch: 1 Summary: The GL Vendor-Neutral Dispatch library @@ -15,6 +15,8 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz #Source0: %%{url}/archive/%%{commit0}.tar.gz#/%%{name}-%%{shortcommit0}.tar.gz Patch0: libglvnd-python3.patch Patch1: 0001-glx-Add-another-fallback-library-name.patch +# https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/235 +Patch2: egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch BuildRequires: make BuildRequires: libtool @@ -242,6 +244,9 @@ xvfb-run -s '-screen 0 640x480x24' -d make check V=1 || \ %changelog +* Mon Apr 19 2021 Aleksei Bavshin - 1:1.3.2-4 +- Add upstream patch to fix egl call failures with nvidia libs installed + * Tue Jan 26 2021 Fedora Release Engineering - 1:1.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild