Project

General

Profile

Actions

Feature #1844

closed

Feature #1539: Graphics acceleration

Select libagl/llvmpipe per app

Added by Jeremy Rand almost 7 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Graphics
Target version:
Start date:
11/02/2017
Due date:
% Done:

100%

Estimated time:
Resolution:
Device:
Grant:
Type of work:

Description

It would be useful to be able to select libagl or llvmpipe renderer on a per-app basis. This would allow apps that need llvmpipe to work, while apps that don't need llvmpipe can run faster with libagl.


Related issues

Blocks Replicant - Issue #1780: Update the webview apkNewAndrés D03/15/2017

Actions
Blocks Replicant - Issue #1960: Build release candidate image for 6.0 0004Closed10/09/2019

Actions
Actions #1

Updated by Jeremy Rand almost 7 years ago

Jookia and I have been tinkering around with this. Unfortunately https://redmine.replicant.us/issues/1843 has been a bit of a roadblock for this research.

Actions #2

Updated by Jeremy Rand about 6 years ago

  • % Done changed from 0 to 10

Experimental branch at https://notabug.org/JeremyRand/frameworks_native (specifically the replicant-6.0-egl branch). I haven't verified whether it builds without errors. If anyone would like to build it and post binaries (if it doesn't error), that would be welcome. (Make sure you verify the OpenPGP signature on the tip of the branch, it should be signed by my key.)

Actions #3

Updated by Kurtis Hanna about 6 years ago

  • Target version changed from Replicant 6.0 to Replicant 6.0 0004
Actions #4

Updated by Jeremy Rand over 5 years ago

Some notes about the patch I linked above:

Requires ro.zygote.disable_gl_preload to be set. You can check for this by typing the following in an adb shell:

getprop ro.zygote.disable_gl_preload

It should say "true".

You can create an EGL override by running the following in a root adb shell:

su -c "mkdir -m 770 /data/data/org.mozilla.fennec_fdroid/os_override" $(stat -c "%U" /data/data/org.mozilla.fennec_fdroid/)
su -c "ln -s /system/lib/egl/libGLES_mesa.so /data/data/org.mozilla.fennec_fdroid/os_override/libGLES_impl.so" $(stat -c "%U" /data/data/org.mozilla.fennec_fdroid/)

The above example enables llvmpipe for the app "org.mozilla.fennec_fdroid".

You can access debug output by grepping logcat for "libEGL".

Docs for old patch by Jookia, which may still be useful: https://lists.osuosl.org/pipermail/replicant/Week-of-Mon-20171204/001457.html

Actions #5

Updated by Denis 'GNUtoo' Carikli over 5 years ago

  • Status changed from New to Feedback
Actions #6

Updated by Denis 'GNUtoo' Carikli over 5 years ago

In order to be integrated in the next Replicant release (0004), the patches have to be sent on the mailing list so we could collectively review them.

Thanks a lot for working on that.

Actions #7

Updated by Jeremy Rand over 5 years ago

Newest patches are by adj (on top of earlier patches by Jookia and me), in these two repos:

Actions #8

Updated by Kurtis Hanna over 5 years ago

  • Parent task set to #1539
Actions #10

Updated by Kurtis Hanna about 5 years ago

adjtm recently sent a set of 8 patches to the mailing list for review that, if ACKed, I believe will allow us to close this ticket: https://lists.osuosl.org/pipermail/replicant/2019-August/002054.html

Actions #11

Updated by Kurtis Hanna about 5 years ago

Actions #12

Updated by Andrés D about 5 years ago

  • Assignee set to Andrés D
Actions #13

Updated by Kurtis Hanna about 5 years ago

A review of this patch set in the #replicant irc pointed out that this patch removes the ability to set libagl as the default renderer.

"Previously, you could switch between libagl and llvmpipe as the default, and this would apply to any app that didn't have an override set; this was a useful feature. Am I reading the patch correctly? If so, can that functionality be restored? (One way to do it would be to access() an extra file that's not a function of the app name, so that that extra file can control the default renderer if the app-specific override isn't set)

Actually it's simpler than that. No need to deal with an extra access() if you don't want to. Just revert the final 2-line diff in the 2nd commit (the part that includes the log no EGL override found, default libGLES_mesa.so). Then the standard method of choosing the default that's covered in the wiki should work.

That said, if you want to access() an extra file, that would be an improvement over the previous behavior, since the previous behavior required doing a weird sed trick on the system partition to choose the default renderer, and touching a file (potentially on the data partition) is a lot better UX. So by all means feel free to use access(); it would be better."

Actions #14

Updated by Kurtis Hanna about 5 years ago

  • Related to Issue #1960: Build release candidate image for 6.0 0004 added
Actions #15

Updated by Kurtis Hanna about 5 years ago

  • Related to deleted (Issue #1960: Build release candidate image for 6.0 0004)
Actions #16

Updated by Kurtis Hanna about 5 years ago

  • Blocked by Issue #1960: Build release candidate image for 6.0 0004 added
Actions #17

Updated by Kurtis Hanna about 5 years ago

  • Blocked by deleted (Issue #1960: Build release candidate image for 6.0 0004)
Actions #18

Updated by Kurtis Hanna about 5 years ago

  • Blocked by Issue #1960: Build release candidate image for 6.0 0004 added
Actions #19

Updated by Kurtis Hanna about 5 years ago

  • Blocked by deleted (Issue #1960: Build release candidate image for 6.0 0004)
Actions #20

Updated by Kurtis Hanna about 5 years ago

  • Blocks Issue #1960: Build release candidate image for 6.0 0004 added
Actions #21

Updated by Kurtis Hanna about 5 years ago

  • % Done changed from 10 to 80
Actions #22

Updated by Joonas Kylmälä almost 5 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 80 to 100

The patches have been pushed.

Actions

Also available in: Atom PDF