mirror of
https://github.com/ponces/treble_aosp.git
synced 2025-02-16 16:05:50 +00:00
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 71510732a097c837a83861b0f03c1305dfa2d404 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/14] 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 e487cbc54d..71e170c73f 100644
|
|
--- a/opengl/libs/EGL/Loader.cpp
|
|
+++ b/opengl/libs/EGL/Loader.cpp
|
|
@@ -314,8 +314,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.34.1
|
|
|