Add upstream patch to fix egl call failures with nvidia libs installed

This commit is contained in:
Aleksei Bavshin 2021-04-20 01:17:25 +00:00
parent 259a936064
commit d66f4e99a0
No known key found for this signature in database
GPG Key ID: 4F071603387A382A
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From a527411da713b2068974c46d7129326520dc5923 Mon Sep 17 00:00:00 2001
From: Ronan Pigott <rpigott@berkeley.edu>
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

View File

@ -4,7 +4,7 @@
Name: libglvnd Name: libglvnd
Version: 1.3.2 Version: 1.3.2
Release: 3%{?dist} Release: 4%{?dist}
# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1 # Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
Epoch: 1 Epoch: 1
Summary: The GL Vendor-Neutral Dispatch library 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 #Source0: %%{url}/archive/%%{commit0}.tar.gz#/%%{name}-%%{shortcommit0}.tar.gz
Patch0: libglvnd-python3.patch Patch0: libglvnd-python3.patch
Patch1: 0001-glx-Add-another-fallback-library-name.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: make
BuildRequires: libtool BuildRequires: libtool
@ -242,6 +244,9 @@ xvfb-run -s '-screen 0 640x480x24' -d make check V=1 || \
%changelog %changelog
* Mon Apr 19 2021 Aleksei Bavshin <alebastr@fedoraproject.org> - 1:1.3.2-4
- Add upstream patch to fix egl call failures with nvidia libs installed
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-3 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild