[Replicant] [n5100][PATCH 2/2] Use LLVMpipe by default

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Tue Mar 31 04:59:39 UTC 2020


Using libagl for everything had the side effect of making it
impossible to use applications like IceCatMobile, as libagl
OpenGL implementation was not complete enough. Using LLVMpipe
fixes that.

Using LLVMpipe for everything has the side effect of making
some system components like SurfaceFlinger way slower.

As we have patched the EGL loader to enable to override the
default OpenGL implementation for specific binaries, and
that we used that to switch the affected system components
back to libagl, we can now switch to LLVMpipe.

However even if the overrides are already shipped
automatically for each devices, we still need to decide
on which devices LLVMpipe has to be enabled: since not all
devices have the same display controller and pixel format
for the planes, it's better to enable it only once it's
known to work well on a given device.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 n5100.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/n5100.mk b/n5100.mk
index e2bc90f..13595e4 100755
--- a/n5100.mk
+++ b/n5100.mk
@@ -25,6 +25,16 @@ PRODUCT_PACKAGES += \
     enable_modem.sh \
     disable_modem.sh
 
+# - With ro.libagl=1, libagl is always used
+# - With ro.libagl=0, LLVMpipe is used by default but it's possible to override
+#   that and use libagl for specific binaries by creating empty configuration
+#   files in /system/etc/libGLES_android/ with the binary paths paths.
+#   For instance to make SurfaceFlinger use libagl you can run this command:
+#   # touch /system/etc/libGLES_android/system/bin/surfaceflinger
+#   When launching that binary, the EGL loader will then check if that file
+#   exists to decide on which OpenGL implementation to use.
+PRODUCT_PROPERTY_OVERRIDES += ro.libagl=0
+
 # Stock parameters
 PRODUCT_PROPERTY_OVERRIDES += \
     rild.libpath=/system/lib/libsamsung-ril.so
-- 
2.26.0



More information about the Replicant mailing list