mirror of
https://github.com/ponces/treble_aosp.git
synced 2025-04-17 03:35:59 +00:00
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From b8bca4c28847ef1fd84baf496b3447045825f441 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Hugues Husson <phh@phh.me>
|
|
Date: Wed, 20 Dec 2023 09:48:04 -0500
|
|
Subject: [PATCH 10/15] Fix loading unnamed GLES
|
|
|
|
Normally Android loads libGLES_${ro.hardware.egl}.so
|
|
But up to Android 14, it was allowed not to set ro.hardware.egl
|
|
In which case, Android would just load whatever libGLES_xxxx.so
|
|
|
|
Android 14.0 did it more finely, and would fallback only when
|
|
ro.hardware.egl is not set, which was still fine for older platforms.
|
|
Android 14.1 broke it by refusing the fallback when ro.board.platform is
|
|
set (which often is)
|
|
|
|
Simply allow the fallback in all cases.
|
|
|
|
Test:
|
|
- Blackview BV9800 Pro fails to boot without this patch
|
|
- It does boot with it
|
|
---
|
|
opengl/libs/EGL/Loader.cpp | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
|
|
index 7012df21ae..18398bb01c 100644
|
|
--- a/opengl/libs/EGL/Loader.cpp
|
|
+++ b/opengl/libs/EGL/Loader.cpp
|
|
@@ -321,8 +321,7 @@ void* Loader::open(egl_connection_t* cnx) {
|
|
hnd = attempt_to_load_system_driver(cnx, nullptr, true);
|
|
}
|
|
|
|
- if (!hnd && !failToLoadFromDriverSuffixProperty &&
|
|
- property_get_int32("ro.vendor.api_level", 0) < __ANDROID_API_U__) {
|
|
+ if (!hnd) {
|
|
// Still can't find the graphics drivers with the exact name. This time try to use wildcard
|
|
// matching if the device is launched before Android 14.
|
|
hnd = attempt_to_load_system_driver(cnx, nullptr, false);
|
|
--
|
|
2.43.0
|
|
|